Maude-2.7/0000755000147300135640000000000012305232002007413 500000000000000Maude-2.7/mkinstalldirs0000755000147300135640000000341107704647736012177 00000000000000#! /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-2.7/COPYING0000644000147300135640000004311007666306651010417 00000000000000 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-2.7/depcomp0000755000147300135640000002753307704647737010762 00000000000000#! /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-2.7/tests/0000755000147300135640000000000012305232005010560 500000000000000Maude-2.7/tests/ResolvedBugs/0000755000147300135640000000000012305232005013164 500000000000000Maude-2.7/tests/ResolvedBugs/CUIbug12-22-090000755000147300135640000000036411314537127015001 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/CUIbug12-22-09.maude -no-banner -no-advise \ > CUIbug12-22-09.out 2>&1 diff $srcdir/CUIbug12-22-09.expected CUIbug12-22-09.out > /dev/null 2>&1 Maude-2.7/tests/ResolvedBugs/unificationMar20130000755000147300135640000000040412117476052016323 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/unificationMar2013.maude -no-banner -no-advise \ > unificationMar2013.out 2>&1 diff $srcdir/unificationMar2013.expected unificationMar2013.out > /dev/null 2>&1 Maude-2.7/tests/ResolvedBugs/CUIbug12-22-09.expected0000644000147300135640000000036111375636052016577 00000000000000Maude> ========================================== rewrite in CUI-BUG : f(a, g(b)) . rewrites: 2 result Foo: f(a, g(d)) ========================================== rewrite in CUI-BUG2 : f(a, g(b)) . rewrites: 2 result Foo: f(a, d) Maude> Bye. Maude-2.7/tests/ResolvedBugs/Makefile.in0000644000147300135640000003030312305230426015155 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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 = tests/ResolvedBugs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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@ TESTS = \ CUIbug12-22-09 \ unificationMar2013 MAUDE_FILES = \ CUIbug12-22-09.maude \ unificationMar2013.maude RESULT_FILES = \ CUIbug12-22-09.expected \ unificationMar2013.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) all: all-am .SUFFIXES: $(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 tests/ResolvedBugs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/ResolvedBugs/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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): tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(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 $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ distclean distclean-generic 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-generic pdf pdf-am ps ps-am uninstall \ uninstall-am # 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-2.7/tests/ResolvedBugs/CUIbug12-22-09.maude0000644000147300135640000000200311375622141016056 00000000000000***( Bug discovered 12/22/09. CUI_DagNode::stackArguments() checks the wrong UNSTACKABLE flag for the second argument resulting in a missed rewrite. Resolved in alpha92b. ) set show timing off . mod CUI-BUG is sort Foo . ops a b c d 1 : -> Foo . op f : Foo Foo -> Foo [id: 1] . op g : Foo -> Foo . rl b => c . rl c => d . endm rew f(a, g(b)) . ***( first pass: f does not rewrite - marked unrewritable f stacks a and g(b) a does not rewrite - marked unrewritable g(b) does not rewrite - marked unrewritable a does not stack anything and is unrewritable - marked unstackable g stacks b b rewrites to c and we rebuild f(a, g(c)) with only the a node shared with the previous dag second pass: f is unrewritable f cannot stack a because it is unstackable f cannot stack g(c) because we check the wrong unstackable flag thus we miss c => d ) mod CUI-BUG2 is sort Foo . ops a b c d 1 : -> Foo . op f : Foo Foo -> Foo [id: 1] . op g : Foo -> Foo . rl b => c . rl g(c) => d . endm rew f(a, g(b)) . Maude-2.7/tests/ResolvedBugs/unificationMar2013.maude0000644000147300135640000000200112117476420017404 00000000000000set show timing off . fmod FOO is sort Foo . op f : Foo -> Foo . vars X Y Z : Foo . endfm unify X =? f(f(Y)) /\ Y =? X /\ Y =? f(X) . unify X =? f(Y) /\ Y =? f(f(X)) /\ X =? Y . fmod FOO2 is sort Foo . op a : -> Foo . op f : Foo Foo -> Foo [assoc comm] . op g : Foo -> Foo . vars A X Y : Foo . endfm unify f(a, A) =? f(a, X) /\ f(a, Y) =? f(a, X) /\ f(a, g(A)) =? f(a, g(X)) /\ f(a, g(Y)) =? f(a, g(X)) . unify f(a, Y) =? f(a, X) /\ f(a, g(A)) =? f(a, g(X)) /\ f(a, g(Y)) =? f(a, g(X)) . fmod FOO3 is sort Foo . op a : -> Foo . op f : Foo Foo -> Foo [assoc comm] . op g : Foo -> Foo . vars A B C D X Y Z : Foo . endfm unify f(a, X) =? f(a, g(X)) /\ f(a, X) =? f(a, g(g(X))) . unify Y =? X /\ f(a, X) =? f(a, g(Y)) /\ f(a, X) =? f(a, g(g(Y))) . fmod FOO4 is sort Foo . op f : Foo Foo -> Foo [assoc comm] . ops a b c d e : -> Foo . vars W X Y Z : Foo . endfm unify f(a, Y) =? f(a, X) . unify f(X, a) =? f(X, a) . unify f(a, b) =? f(a, b) . unify f(X, Y) =? f(X, Y) . Maude-2.7/tests/ResolvedBugs/Makefile.am0000644000147300135640000000036312117744747015170 00000000000000TESTS = \ CUIbug12-22-09 \ unificationMar2013 MAUDE_FILES = \ CUIbug12-22-09.maude \ unificationMar2013.maude RESULT_FILES = \ CUIbug12-22-09.expected \ unificationMar2013.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) Maude-2.7/tests/ResolvedBugs/unificationMar2013.expected0000644000147300135640000000250312117476450020124 00000000000000Maude> ========================================== unify in FOO : X =? f(f(Y)) /\ Y =? X /\ Y =? f(X) . No unifier. ========================================== unify in FOO : X =? f(Y) /\ Y =? f(f(X)) /\ X =? Y . No unifier. ========================================== unify in FOO2 : f(a, A) =? f(a, X) /\ f(a, Y) =? f(a, X) /\ f(a, g(A)) =? f(a, g(X)) /\ f(a, g(Y)) =? f(a, g(X)) . Solution 1 A --> #1:Foo X --> #1:Foo Y --> #1:Foo ========================================== unify in FOO2 : f(a, Y) =? f(a, X) /\ f(a, g(A)) =? f(a, g(X)) /\ f(a, g(Y)) =? f(a, g(X)) . Solution 1 Y --> #1:Foo X --> #1:Foo A --> #1:Foo ========================================== unify in FOO3 : f(a, X) =? f(a, g(X)) /\ f(a, X) =? f(a, g(g(X))) . No unifier. ========================================== unify in FOO3 : Y =? X /\ f(a, X) =? f(a, g(Y)) /\ f(a, X) =? f(a, g(g(Y))) . No unifier. ========================================== unify in FOO4 : f(a, Y) =? f(a, X) . Solution 1 Y --> #1:Foo X --> #1:Foo ========================================== unify in FOO4 : f(X, a) =? f(X, a) . Solution 1 X --> #1:Foo ========================================== unify in FOO4 : f(a, b) =? f(a, b) . Solution 1 empty substitution ========================================== unify in FOO4 : f(X, Y) =? f(X, Y) . Solution 1 X --> #1:Foo Y --> #2:Foo Maude> Bye. Maude-2.7/tests/Misc/0000755000147300135640000000000012305232005011453 500000000000000Maude-2.7/tests/Misc/unification2.expected0000644000147300135640000012031412117457023015523 00000000000000Maude> ========================================== unify in TEST : g(f(X, X, Y, Y, h(Z)), f(X, Y, Y, Z, Z)) =? g(f(A, A, A, B, C), f(A, B, B, h(C))) . Solution 1 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 2 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 3 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo, h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 4 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo, h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 5 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo, h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 6 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo, h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 7 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #11:Foo, #11:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #13:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, #14:Foo, #14:Foo, #14:Foo, #14:Foo, #14:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #20:Foo, #20:Foo, #20:Foo, #20:Foo, #20:Foo, #21:Foo, #21:Foo, #21:Foo, #21:Foo, #21:Foo, #21:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #23:Foo, #23:Foo, #23:Foo, #23:Foo, #23:Foo, #23:Foo, #23:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #25:Foo, #25:Foo, #25:Foo, #26:Foo, #26:Foo, #26:Foo, #26:Foo, #26:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #28:Foo, #28:Foo, #28:Foo, #28:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #36:Foo, #36:Foo, #37:Foo, #37:Foo, #37:Foo, #37:Foo, #37:Foo, #37:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #40:Foo, #40:Foo, #40:Foo, #40:Foo, #40:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #44:Foo, #44:Foo, #45:Foo, #45:Foo, #45:Foo, #45:Foo, #46:Foo, #46:Foo, #46:Foo, #46:Foo, #46:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #48:Foo, #48:Foo, #48:Foo, #48:Foo, #48:Foo, #48:Foo, #49:Foo, #49:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #54:Foo, #54:Foo, #54:Foo, #54:Foo, #55:Foo, #55:Foo, #55:Foo, #56:Foo, #56:Foo, #58:Foo, #58:Foo, #58:Foo, #59:Foo, #59:Foo, #59:Foo, #59:Foo, #59:Foo, #60:Foo) Y --> f(#5:Foo, #9:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #17:Foo, #20:Foo, #23:Foo, #25:Foo, #25:Foo, #26:Foo, #31:Foo, #33:Foo, #33:Foo, #34:Foo, #36:Foo, #40:Foo, #41:Foo, #42:Foo, #42:Foo, #44:Foo, #46:Foo, #47:Foo, #48:Foo, #48:Foo, #49:Foo, #49:Foo, #49:Foo, #53:Foo, #54:Foo, #55:Foo, #55:Foo, #56:Foo, #56:Foo, #56:Foo, #57:Foo, #57:Foo, #60:Foo, #61:Foo, #61:Foo, #61:Foo, #61:Foo, #61:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #7:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, #14:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #20:Foo, #20:Foo, #20:Foo, #21:Foo, #21:Foo, #22:Foo, #22:Foo, #23:Foo, #23:Foo, #24:Foo, #24:Foo, #24:Foo, #25:Foo, #25:Foo, #26:Foo, #26:Foo, #26:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #28:Foo, #28:Foo, #28:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #36:Foo, #36:Foo, #37:Foo, #37:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #40:Foo, #40:Foo, #40:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #44:Foo, #44:Foo, #45:Foo, #45:Foo, #45:Foo, #46:Foo, #46:Foo, #46:Foo, #47:Foo, #47:Foo, #47:Foo, #48:Foo, #48:Foo, #48:Foo, #49:Foo, #49:Foo, #49:Foo, #50:Foo, #50:Foo, #50:Foo, #51:Foo, #51:Foo, #51:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #54:Foo, #55:Foo, #55:Foo, #56:Foo, #56:Foo, #56:Foo, #57:Foo, #58:Foo))) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #7:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, #14:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #20:Foo, #20:Foo, #20:Foo, #21:Foo, #21:Foo, #22:Foo, #22:Foo, #23:Foo, #23:Foo, #24:Foo, #24:Foo, #24:Foo, #25:Foo, #25:Foo, #26:Foo, #26:Foo, #26:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #28:Foo, #28:Foo, #28:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #36:Foo, #36:Foo, #37:Foo, #37:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #40:Foo, #40:Foo, #40:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #44:Foo, #44:Foo, #45:Foo, #45:Foo, #45:Foo, #46:Foo, #46:Foo, #46:Foo, #47:Foo, #47:Foo, #47:Foo, #48:Foo, #48:Foo, #48:Foo, #49:Foo, #49:Foo, #49:Foo, #50:Foo, #50:Foo, #50:Foo, #51:Foo, #51:Foo, #51:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #54:Foo, #55:Foo, #55:Foo, #56:Foo, #56:Foo, #56:Foo, #57:Foo, #58:Foo) A --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #13:Foo, #14:Foo, #14:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #16:Foo, #16:Foo, #16:Foo, #17:Foo, #17:Foo, #18:Foo, #18:Foo, #19:Foo, #20:Foo, #21:Foo, #21:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #23:Foo, #23:Foo, #23:Foo, #24:Foo, #24:Foo, #24:Foo, #25:Foo, #26:Foo, #27:Foo, #29:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #31:Foo, #31:Foo, #32:Foo, #32:Foo, #37:Foo, #37:Foo, #38:Foo, #39:Foo, #39:Foo, #40:Foo, #46:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #48:Foo, #48:Foo, #50:Foo, #50:Foo, #50:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #52:Foo, #52:Foo, #52:Foo, #53:Foo, #53:Foo, #54:Foo, #54:Foo, #55:Foo, #58:Foo, #59:Foo, #59:Foo, #59:Foo, #60:Foo, #61:Foo, #61:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #7:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, #14:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #20:Foo, #20:Foo, #20:Foo, #21:Foo, #21:Foo, #22:Foo, #22:Foo, #23:Foo, #23:Foo, #24:Foo, #24:Foo, #24:Foo, #25:Foo, #25:Foo, #26:Foo, #26:Foo, #26:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #28:Foo, #28:Foo, #28:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #36:Foo, #36:Foo, #37:Foo, #37:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #40:Foo, #40:Foo, #40:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #44:Foo, #44:Foo, #45:Foo, #45:Foo, #45:Foo, #46:Foo, #46:Foo, #46:Foo, #47:Foo, #47:Foo, #47:Foo, #48:Foo, #48:Foo, #48:Foo, #49:Foo, #49:Foo, #49:Foo, #50:Foo, #50:Foo, #50:Foo, #51:Foo, #51:Foo, #51:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #54:Foo, #55:Foo, #55:Foo, #56:Foo, #56:Foo, #56:Foo, #57:Foo, #58:Foo))) B --> f(#1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #11:Foo, #11:Foo, #11:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, #14:Foo, #14:Foo, #14:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #20:Foo, #20:Foo, #20:Foo, #20:Foo, #20:Foo, #20:Foo, #21:Foo, #21:Foo, #21:Foo, #21:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #22:Foo, #23:Foo, #23:Foo, #23:Foo, #23:Foo, #23:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #24:Foo, #25:Foo, #25:Foo, #25:Foo, #25:Foo, #25:Foo, #26:Foo, #26:Foo, #26:Foo, #26:Foo, #26:Foo, #26:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #28:Foo, #28:Foo, #28:Foo, #28:Foo, #28:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #36:Foo, #36:Foo, #36:Foo, #36:Foo, #37:Foo, #37:Foo, #37:Foo, #37:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #40:Foo, #40:Foo, #40:Foo, #40:Foo, #40:Foo, #40:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #44:Foo, #44:Foo, #44:Foo, #44:Foo, #45:Foo, #45:Foo, #45:Foo, #45:Foo, #45:Foo, #46:Foo, #46:Foo, #46:Foo, #46:Foo, #46:Foo, #46:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #47:Foo, #48:Foo, #48:Foo, #48:Foo, #48:Foo, #48:Foo, #48:Foo, #48:Foo, #49:Foo, #49:Foo, #49:Foo, #49:Foo, #49:Foo, #49:Foo, #49:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #50:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #51:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #54:Foo, #54:Foo, #54:Foo, #55:Foo, #55:Foo, #55:Foo, #55:Foo, #55:Foo, #56:Foo, #56:Foo, #56:Foo, #56:Foo, #56:Foo, #56:Foo, #56:Foo, #57:Foo, #57:Foo, #57:Foo, #58:Foo, #58:Foo, #59:Foo, #60:Foo, #61:Foo, #61:Foo, #61:Foo, #61:Foo) C --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #7:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, #14:Foo, #15:Foo, #15:Foo, #15:Foo, #15:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #16:Foo, #17:Foo, #17:Foo, #17:Foo, #17:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #18:Foo, #19:Foo, #19:Foo, #19:Foo, #19:Foo, #20:Foo, #20:Foo, #20:Foo, #21:Foo, #21:Foo, #22:Foo, #22:Foo, #23:Foo, #23:Foo, #24:Foo, #24:Foo, #24:Foo, #25:Foo, #25:Foo, #26:Foo, #26:Foo, #26:Foo, #27:Foo, #27:Foo, #27:Foo, #27:Foo, #28:Foo, #28:Foo, #28:Foo, #29:Foo, #29:Foo, #29:Foo, #29:Foo, #30:Foo, #30:Foo, #30:Foo, #30:Foo, #31:Foo, #31:Foo, #31:Foo, #31:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #32:Foo, #33:Foo, #33:Foo, #33:Foo, #33:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #34:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #35:Foo, #36:Foo, #36:Foo, #37:Foo, #37:Foo, #38:Foo, #38:Foo, #38:Foo, #38:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #39:Foo, #40:Foo, #40:Foo, #40:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #41:Foo, #42:Foo, #42:Foo, #42:Foo, #42:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #43:Foo, #44:Foo, #44:Foo, #45:Foo, #45:Foo, #45:Foo, #46:Foo, #46:Foo, #46:Foo, #47:Foo, #47:Foo, #47:Foo, #48:Foo, #48:Foo, #48:Foo, #49:Foo, #49:Foo, #49:Foo, #50:Foo, #50:Foo, #50:Foo, #51:Foo, #51:Foo, #51:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #52:Foo, #53:Foo, #53:Foo, #53:Foo, #53:Foo, #54:Foo, #55:Foo, #55:Foo, #56:Foo, #56:Foo, #56:Foo, #57:Foo, #58:Foo) Solution 8 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 9 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo, h(f( #1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h( f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)))), h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo)), h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo))))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo) Solution 10 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)))), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)))), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))))) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)))), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))) Solution 11 X --> f(#1:Foo, #1:Foo, #1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #5:Foo, #5:Foo, #6:Foo, #6:Foo, #6:Foo, #7:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo) Y --> f(#7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #12:Foo, #14:Foo, h(f( #3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo)))), h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))))) Z --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo, #4:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))))) B --> f(#1:Foo, #1:Foo, #2:Foo, #2:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo, #7:Foo, #8:Foo, #8:Foo, #8:Foo, #8:Foo, #9:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #10:Foo, #11:Foo, #11:Foo, #12:Foo, #12:Foo, #13:Foo, #14:Foo, h(f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))))) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #10:Foo, #11:Foo, #11:Foo, #13:Foo, #13:Foo, #13:Foo, #14:Foo, h(f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #9:Foo, #9:Foo, #9:Foo, #10:Foo, #10:Foo, #11:Foo, #12:Foo))) ========================================== unify in FOO : X =? W /\ f(X, Y) =? f(W, Z) . Solution 1 X --> #1:Foo W --> #1:Foo Y --> #2:Foo Z --> #2:Foo ========================================== unify in NAT' : X =? s (X * Y) . Solution 1 X --> s 0 Y --> 0 ========================================== unify in NAT' : X =? s X * Y . Solution 1 X --> 0 Y --> 0 ========================================== unify in NAT' : s X =? s X * Y . Solution 1 X --> #1:Nat Y --> s 0 ========================================== unify in NAT' : s X =? X * Y . Solution 1 X --> s 0 Y --> s_^2(0) ========================================== unify in COMM : X =? c(f(X, Y), Z) . Solution 1 X --> c(a, b) Z --> a Y --> b Solution 2 X --> c(a, b) Z --> b Y --> a ========================================== unify in FOO2 : X =? f(Y, a, b) /\ Y =? g(X, c, d) . Solution 1 X --> f(a, b) Y --> g(c, d) Solution 2 X --> f(a, b) Y --> g(c, d) ========================================== unify in FOO3 : X =? f(Y, a, b) /\ Y =? h(X) . Solution 1 X --> f(a, b) Y --> h(f(a, b)) Maude> Bye. Maude-2.7/tests/Misc/commands.expected0000644000147300135640000014777011757305063014756 00000000000000Maude> Warning: , line 12 (mod FOO): variable Z is used before it is bound in rule: crl f(X, Y, Y) => f(Z, X) if Z =/= Y = true . mod FOO is inc INT . sorts Foo . subsorts Int < Foo . op f : Int Int -> Int [assoc comm id: 1] . vars X Y Z : Int . eq f (f (X, Y), X) = f (Y, Y) . cq f (f (X, Y), Y) = f (Y, X) if X =/= Y . rl f (f (X, Y), X) => f (Y, Y) . crl f (f (X, Y), Y) => f (Z, X) if Z =/= Y . mb f (X, X) : NzInt . cmb f (X, Y) : NzInt if X =/= Y . endm Warning: membership axioms are not guaranteed to work correctly for iterated symbol s_ as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol _+_ as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol _*_ as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol gcd as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol lcm as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol min as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol max as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol _xor_ as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol _&_ as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol _|_ as it has declarations that are not at the kind level. Warning: membership axioms are not guaranteed to work correctly for associative symbol f as it has declarations that are not at the kind level. mod FOO is sorts Bool Zero NzNat Nat NzInt Int Foo . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . subsort Int < Foo . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Foo] [Foo] [Foo] -> [Foo] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op f : Int Int -> Int [assoc comm id: 1] . var Z : Int . var X : Int . var Y : Int . mb f(X, X) : NzInt . cmb f(X, Y) : NzInt if X =/= Y = true . eq f(X, X, Y) = f(Y, Y) . ceq f(X, Y, Y) = f(X, Y) if X =/= Y = true . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . rl f(X, X, Y) => f(Y, Y) . crl f(X, Y, Y) => f(Z, X) if Z =/= Y = true [nonexec] . endm sort Bool . sort Zero . subsorts Zero < Nat Int Foo . sort NzNat . subsorts NzNat < Nat NzInt Int Foo . sort Nat . subsorts NzNat Zero < Nat < Int Foo . sort NzInt . subsorts NzNat < NzInt < Int Foo . sort Int . subsorts NzNat Zero Nat NzInt < Int < Foo . sort Foo . subsorts NzNat Zero Nat NzInt Int < Foo . [Bool]: 1 Bool [Foo]: 1 Foo 2 Int 3 NzInt 4 Nat 5 Zero 6 NzNat eq f(X, X, Y) = f(Y, Y) . ceq f(X, Y, Y) = f(X, Y) if X =/= Y = true . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . mb f(X, X) : NzInt . cmb f(X, Y) : NzInt if X =/= Y = true . rl f(X, X, Y) => f(Y, Y) . crl f(X, Y, Y) => f(Z, X) if Z =/= Y = true [nonexec] . var Z : Int . var X : Int . var Y : Int . Grammar: nonterminals: 42 terminals: 124 productions: 192 Term rewriting system: kinds: 2 sorts: 7 user symbols: 35 total symbols: 38 polymorphic operators: 3 membership axioms: 2 equations: 11 rules: 2 fmod INT is protecting NAT . sorts NzInt Int . subsorts NzNat < NzInt Nat < Int . op -_ : NzNat -> NzInt [ctor special ( id-hook MinusSymbol () op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op -_ : NzInt -> NzInt [ditto] . op -_ : Int -> Int [ditto] . op _+_ : Int Int -> Int [assoc comm prec 33 special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _*_ : Int Int -> Int [ditto] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _^_ : NzInt Nat -> NzInt [ditto] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op abs : Int -> Nat [ditto] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op gcd : Int Int -> Nat [ditto] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op lcm : Int Int -> Nat [ditto] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op min : Int Int -> Int [ditto] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op max : Int Int -> Int [ditto] . op max : NzNat Int -> NzNat [ditto] . op max : Nat Int -> Nat [ditto] . op ~_ : Int -> Int [special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _xor_ : Int Int -> Int [assoc comm prec 55 special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _&_ : Int Int -> Int [ditto] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _|_ : Int Int -> Int [ditto] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int))] . op _<_ : Int Int -> Bool [prec 37 special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> Int) term-hook trueTerm (true) term-hook falseTerm (false))] . endfm mod FOO is inc INT . sorts Foo . subsorts Int < Foo . op f : Int Int -> Int [assoc comm id: 1] . vars X Y Z : Int . eq f (f (X, Y), X) = f (Y, Y) . cq f (f (X, Y), Y) = f (Y, X) if X =/= Y . rl f (f (X, Y), X) => f (Y, Y) . crl f (f (X, Y), Y) => f (Z, X) if Z =/= Y . mb f (X, X) : NzInt . cmb f (X, Y) : NzInt if X =/= Y . endm eq f(X, X, Y) = f(Y, Y) . ceq f(X, Y, Y) = f(X, Y) if X =/= Y = true . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . Int: f(0, 2) mod FOO is sorts Bool Zero NzNat Nat NzInt Int Foo . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . subsort Int < Foo . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Foo] [Foo] [Foo] -> [Foo] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op f : Int Int -> Int [assoc comm id: 1] . var Z : Int . var X : Int . var Y : Int . mb f(X, X) : NzInt . cmb f(X, Y) : NzInt if _=/=_(X, Y) = true . eq f(X, X, Y) = f(Y, Y) . ceq f(X, Y, Y) = f(X, Y) if _=/=_(X, Y) = true . eq _and_(true, A:Bool) = A:Bool . eq _and_(false, A:Bool) = false . eq _and_(A:Bool, A:Bool) = A:Bool . eq _xor_(false, A:Bool) = A:Bool . eq _xor_(A:Bool, A:Bool) = false . eq _and_(A:Bool, _xor_(B:Bool, C:Bool)) = _xor_(_and_(A:Bool, B:Bool), _and_( A:Bool, C:Bool)) . eq not_(A:Bool) = _xor_(true, A:Bool) . eq _or_(A:Bool, B:Bool) = _xor_(_and_(A:Bool, B:Bool), _xor_(A:Bool, B:Bool)) . eq _implies_(A:Bool, B:Bool) = not_(_xor_(A:Bool, _and_(A:Bool, B:Bool))) . rl f(X, X, Y) => f(Y, Y) . crl f(X, Y, Y) => f(Z, X) if _=/=_(Z, Y) = true [nonexec] . endm mod FOO is sorts Bool Zero NzNat Nat NzInt Int Foo . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . subsort Int < Foo . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Foo] [Foo] [Foo] -> [Foo] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op f : Int Int -> Int [assoc comm id: 1] . var Z : Int . var X : Int . var Y : Int . mb f(X, X) : NzInt . cmb f(X, Y) : NzInt if (X =/= Y) = true . eq f(X, X, Y) = f(Y, Y) . ceq f(X, Y, Y) = f(X, Y) if (X =/= Y) = true . eq (true and A:Bool) = A:Bool . eq (false and A:Bool) = false . eq (A:Bool and A:Bool) = A:Bool . eq (false xor A:Bool) = A:Bool . eq (A:Bool xor A:Bool) = false . eq (A:Bool and (B:Bool xor C:Bool)) = ((A:Bool and B:Bool) xor (A:Bool and C:Bool)) . eq (not A:Bool) = (true xor A:Bool) . eq (A:Bool or B:Bool) = ((A:Bool and B:Bool) xor (A:Bool xor B:Bool)) . eq (A:Bool implies B:Bool) = (not (A:Bool xor (A:Bool and B:Bool))) . rl f(X, X, Y) => f(Y, Y) . crl f(X, Y, Y) => f(Z, X) if (Z =/= Y) = true [nonexec] . endm Maude> Bye. Maude-2.7/tests/Misc/unification20000755000147300135640000000035411431127521013722 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/unification2.maude -no-banner -no-advise \ > unification2.out 2>&1 diff $srcdir/unification2.expected unification2.out > /dev/null 2>&1 Maude-2.7/tests/Misc/variantNarrowing.maude0000644000147300135640000000234712006104535015755 00000000000000set show timing off . fmod CONSTANTS is sort Msg . op null : -> Msg . op 1 : -> Msg . op 2 : -> Msg . op 3 : -> Msg . op 4 : -> Msg . op 5 : -> Msg . op f : Msg Msg -> Msg [frozen] . op g : Msg Msg -> Msg [frozen] . endfm fmod TEST is inc CONSTANTS . op u : Msg Msg -> Msg [frozen assoc comm] . eq u(X:Msg, X:Msg) = (null).Msg [variant] . eq u(X:Msg, X:Msg, Y:Msg) = Y:Msg [variant] . eq u(X:Msg, (null).Msg) = X:Msg [variant] . endfm get variants in TEST : g(f(u(u(X14:Msg,2),g(g(X3:Msg,X15:Msg),X16:Msg)),u(g(X12:Msg,X3:Msg),g(X8:Msg,g(X10:Msg,X9:Msg)))),f(u(f(X8:Msg,X15:Msg),u(X15:Msg,X9:Msg)),g(f(X2:Msg,X2:Msg),g(3,X6:Msg)))) . fmod XOR is sort XOR . sort Elem . ops cst1 cst2 cst3 cst4 : -> Elem . subsort Elem < XOR . op _+_ : XOR XOR -> XOR [ctor assoc comm] . op 0 : -> XOR . op a : -> XOR . vars X Y : XOR . eq Y + 0 = Y [variant] . eq X + X = 0 [variant] . eq X + X + Y = Y [variant] . endfm get variants in XOR : X:XOR + cst1 . get variants in XOR : X:XOR + cst2 . get variants in XOR : X:XOR + cst2 such that X:XOR + a irreducible . get variants in XOR : X:XOR + Y:XOR + cst1 . get variants in XOR : X:XOR + Y:XOR + cst1 such that X:XOR + cst1, X:XOR + cst2 irreducible . Maude-2.7/tests/Misc/dekker.expected0000644000147300135640000001661010026175753014405 00000000000000Maude> ========================================== reduce in CHECK : modelCheck(initial, []~ (enterCrit(1) /\ enterCrit(2))) . rewrites: 1048 result Bool: true ========================================== reduce in CHECK : modelCheck(initial, []<> exec(1) -> []<> enterCrit(1)) . rewrites: 100 result ModelCheckResult: counterexample({{[1,repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,1] ['c2,1] [ 'turn,1],0},unlabeled} {{[1,'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,1] ['c2,1] ['turn,1],1}, unlabeled} {{[1,while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [ 2,repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2,1] ['turn,1],1},unlabeled} {{[1,while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2,1] ['turn,1],2}, unlabeled} {{[1,while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [ 2,while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2, 0] ['turn,1],2},unlabeled} {{[1,if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2,0] ['turn,1],1},unlabeled} {{[1,while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2,0] ['turn,1],1}, unlabeled} {{[1,while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [ 2,if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2, 0] ['turn,1],2},unlabeled} {{[1,while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2, 0] ['turn,1],2},unlabeled}, {{[1,if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2, 0] ['turn,1],1},unlabeled} {{[1,while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem ; repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever] | [2,'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem ; repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever],['c1,0] ['c2, 0] ['turn,1],1},unlabeled}) ========================================== reduce in CHECK : modelCheck(initial, []<> exec(1) /\ []<> exec(2) -> []<> enterCrit(1) /\ []<> enterCrit(2)) . rewrites: 1319 result Bool: true Maude> Bye. Maude-2.7/tests/Misc/unification3.maude0000644000147300135640000000407611444017676015034 00000000000000*** Unification problems where the order sorting interacts with collapse *** 9/14/10 set show timing off . fmod FOO is sorts Small Big . subsort Small < Big . op f : Big Big -> Big [assoc comm id: 1f] . op 1f : -> Small . op h : Small -> Big . endfm *** only collapse version is sortable unify X:Big =? h(f(Y:Big, Z:Big)) . fmod FOO1 is sorts Small Big . subsort Small < Big . op f : Big Big -> Big [assoc comm id: 1f] . op f : Small Small -> Small [ditto] . op 1f : -> Big . endfm *** collapse version is no longer covered unify X:Small =? f(Y:Big, Z:Big) . fmod FOO2 is sorts Small Big . subsort Small < Big . op a : -> Small . op g : Big -> Big . op f : Big Big -> Big [assoc comm id: g(a)] . op f : Small Small -> Small [assoc comm id: g(a)] . op 1f : -> Small . endfm *** only collapse version is sortable unify X:Small =? f(g(Y:Small), Z:Small) . fmod FOO3 is sorts Small Big . subsort Small < Big . op a : -> Big . op g : Big -> Big . op g : Small -> Small . op f : Big Big -> Big [assoc comm id: g(a)] . op f : Small Small -> Small [assoc comm id: g(a)] . op 1f : -> Small . endfm *** collapse version is no longer covered unify X:Small =? f(g(Y:Big), Z:Small) . fmod FOO4 is sorts Small Big . subsort Small < Big . op a : -> Small . op g : Big -> Big [iter] . op f : Big Big -> Big [assoc comm id: g^1000000(a)] . op f : Small Small -> Small [ditto] . op 1f : -> Small . endfm *** only collapse version is sortable unify X:Small =? f(g(Y:Big), Z:Small) . fmod FOO5 is sorts Small Big . subsort Small < Big . op a : -> Big . op g : Big -> Big [iter]. op g : Small -> Small [ditto] . op f : Big Big -> Big [assoc comm id: g^1000000(a)] . op f : Small Small -> Small [ditto] . op 1f : -> Small . endfm *** collapse version is no longer covered unify X:Small =? f(g(Y:Big), Z:Small) . fmod FOO6 is sorts Small Big . subsort Small < Big . op f : Big Big -> Big [assoc comm id: 1f] . op 1f : -> Small . op h : Small -> Big . endfm *** need empty basis selection unify X:Big =? h(f(Y:Big, Y:Big)) . Maude-2.7/tests/Misc/CU_Unification0000755000147300135640000000036412117720075014175 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/CU_Unification.maude -no-banner -no-advise \ > CU_Unification.out 2>&1 diff $srcdir/CU_Unification.expected CU_Unification.out > /dev/null 2>&1 Maude-2.7/tests/Misc/dekker0000755000147300135640000000032410511603007012566 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/dekker.maude -no-banner -no-advise \ > dekker.out 2>&1 diff $srcdir/dekker.expected dekker.out > /dev/null 2>&1 Maude-2.7/tests/Misc/commands.maude0000644000147300135640000000130310026174223014213 00000000000000set show timing off . set show advisories off . mod FOO is inc INT . op f : Int Int -> Int [assoc comm id: 1] . sort Foo . subsort Int < Foo . vars X Y Z : Int . eq f(f(X, Y), X) = f(Y, Y) . cq f(f(X, Y), Y) = f(Y, X) if X =/= Y . rl f(f(X, Y), X) => f(Y, Y) . crl f(f(X, Y), Y) => f(Z, X) if Z =/= Y . mb f(X, X) : NzInt . cmb f(X, Y) : NzInt if X =/= Y . endm show mod . show all FOO . show sorts . show kinds . show eqs . show mbs . show rls . show vars . show summary . select INT . show mod . show mod FOO . show eqs FOO . parse in FOO : f(0, 2) . set print mixfix off . show all FOO . set print mixfix on . set print with parens on . show all FOO . set print with parens off . Maude-2.7/tests/Misc/unification30000755000147300135640000000035411444017756013737 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/unification3.maude -no-banner -no-advise \ > unification3.out 2>&1 diff $srcdir/unification3.expected unification3.out > /dev/null 2>&1 Maude-2.7/tests/Misc/attributes.expected0000644000147300135640000000551411064251611015316 00000000000000Maude> mod ATTRIBUTES is sorts Bool Foo Bar . subsort Foo < Bar . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op a : -> Foo . op b : -> Foo . op c : -> Foo . op f : Foo Foo -> Foo [metadata "binary op"] . op f : Bar Bar -> Bar . op g : Foo -> Bar [metadata "unary op"] . op h : Foo -> Bar [metadata "unary op"] . var X : Foo . var Y : Bar . mb g(g(X)) : Foo [label downSort metadata "down sort" print "sort became Foo"] . cmb Y : Foo if f(Y, a) = f(a, Y) [nonexec] . eq a = b [metadata "definition"] . eq f(X, X) = g(X) [print "X = " X] . eq f(g(X), X) = c [label collapse metadata "collapse" print "X = " X] . eq g(X) = f(X, X) [nonexec label rev metadata "rev"] . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . rl f(X, X) => f(g(X), g(X)) [nonexec label expand] . rl h(h(X)) => f(c, X) [label tick metadata "step" print "step X = " X] . endm ========================================== reduce in ATTRIBUTES : f(c, c) . rewrites: 1 result Bar: g(c) ========================================== reduce in ATTRIBUTES : f(c, c) . X = c rewrites: 1 result Bar: g(c) ========================================== reduce in ATTRIBUTES : f(g(c), c) . X = c rewrites: 1 result Foo: c ========================================== reduce in ATTRIBUTES : f(g(c), c) . X = crewrites: 1 result Foo: c ========================================== reduce in ATTRIBUTES : g(g(c)) . sort became Foo rewrites: 1 result Foo: g(g(c)) ========================================== rewrite in ATTRIBUTES : h(h(b)) . step X = b rewrites: 1 result Foo: f(c, b) Maude> Bye. Maude-2.7/tests/Misc/sreduce.maude0000744000147300135640000001032112234062520014044 00000000000000set show timing off . set show advisories off . set include BOOL off . fmod MODULAR is sorts Nat NzNat . subsort NzNat < Nat . var X Y Z : Nat . op 0 : -> Nat . op s_ : Nat -> NzNat . op _+_ : Nat NzNat -> Nat . op _+_ : Nat Nat -> Nat . eq 0 + X = X . eq s Y + X = s (Y + X) . op _*_ : NzNat NzNat -> NzNat . op _*_ : Nat Nat -> Nat . eq 0 * X = 0 . eq s Y * X = X + (Y * X) . op _^_ : Nat Nat -> Nat . op _^_ : NzNat Nat -> NzNat . eq X ^ 0 = s 0 . eq X ^ s Y = X * (X ^ Y) . op c : Nat Nat -> Nat . eq c(0, Y) = 0 . eq c(X, 0) = X . eq c(s X, s Y) = c(X, Y) . op _mod_ : Nat NzNat -> Nat . eq X mod Y = i(X, Y, Y) . op i : Nat Nat NzNat -> Nat . eq i(0, 0, Z) = 0 . eq i(0, s Y, Z) = c(Z, s Y) . eq i(s X, 0, Z) = i(s X, Z, Z) . eq i(s X, s Y, Z) = i(X, Y, Z) . op modExp : Nat Nat NzNat ~> Nat . eq modExp(X, 0, Z) = s 0 . eq modExp(X, s Y, Z) = (X * modExp(X, Y, Z)) mod Z . endfm sred modExp(s s s s 0, s s 0 ^ ((s s 0 ^ s s s s 0) + s s s s 0), s s s s s 0) . fmod NAT' is sorts Nat NzNat . subsort NzNat < Nat . var X Y : Nat . op 0 : -> Nat . op s_ : Nat -> NzNat . op _+_ : Nat NzNat -> Nat . op _+_ : Nat Nat -> Nat . eq 0 + X = X . eq s Y + X = s (X + Y) . op _*_ : NzNat NzNat -> NzNat . op _*_ : Nat Nat -> Nat . eq 0 * X = 0 . eq s Y * X = X + (Y * X) . endfm fmod LIST-BENCH is pr NAT' . sorts Elt List . op dirtyElt : ~> Elt . op dirtyList : ~> List . op nil : -> List . op __ : Elt List -> List . ops a b c d e : -> Elt . vars E E' : Elt . vars L L' : List . var N : Nat . *** to make big lists by doubling op cat : List List -> List . eq cat(E L, L') = E cat(L, L') . eq cat(nil, L') = L' . op dup : List Nat -> List . eq dup(L, 0) = L . eq dup(L, s N) = cat(dup(L, N), dup(L, N)) . op head : List -> Elt . eq head(E L) = E . *** efficient reverse op rev : List List -> List . eq rev(E L, L') = rev(L, E L') . eq rev(nil, L) = L . op rev : List -> List . eq rev(L) = rev(L, nil) . op multi : List Nat -> List . eq multi(L, 0) = L . eq multi(L, s N) = rev(multi(L, N)) . endfm sred head(multi(dup(a b c d e nil, s s s s 0 * s s s s 0), s s s s s s s s s 0 * s s s s s s s s s 0)) . fmod BIT is sorts Bool Bit List . ops true false : -> Bool . ops 0 1 : -> Bit . op nil : -> List . op __ : Bit List -> List . var L : List . op isZero : List -> Bool . eq isZero(nil) = true . eq isZero(0 L) = isZero(L) . eq isZero(1 L) = false . op dec : List -> List . eq dec(nil) = nil . eq dec(0 L) = 1 dec(L) . eq dec(1 L) = 0 L . op count : List -> List . eq count(L) = count'(isZero(L), L) . op count' : Bool List -> List . eq count'(false, L) = count(dec(L)) . eq count'(true, L) = L . endfm sred count(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 nil) . ***( sred count(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 nil) . ) fmod BINARY is sorts Bool Bit Num . ops true false : -> Bool . ops 0 1 : -> Bit . op nil : -> Num . op __ : Bit Num -> Num . var X Y : Num . var B : Bit . op add : Num Num -> Num . eq add(nil, X) = X . eq add(X, nil) = X . eq add(0 X, B Y) = B add(X, Y) . eq add(B X, 0 Y) = B add(X, Y) . eq add(1 X, 1 Y) = 0 c(X, Y) . op c : Num Num -> Num . eq c(nil, X) = add(1 nil, X) . eq c(X, nil) = add(1 nil, X) . eq c(1 X, B Y) = B c(X, Y) . eq c(B X, 1 Y) = B c(X, Y) . eq c(0 X, 0 Y) = 1 add(X, Y) . op mult : Num Num -> Num . eq mult(nil, X) = 0 nil . eq mult(X, nil) = 0 nil . eq mult(0 X, Y) = 0 mult(X, Y) . eq mult(1 X, Y) = add(Y, 0 mult(X, Y)) . op dec : Num -> Num . eq dec(nil) = nil . eq dec(0 X) = 1 dec(X) . eq dec(1 X) = 0 X . op isZero : Num -> Bool . eq isZero(nil) = true . eq isZero(0 X) = isZero(X) . eq isZero(1 X) = false . op fact : Num -> Num . eq fact(X) = fact'(isZero(X), X) . op fact' : Bool Num -> Num . eq fact'(true, X) = 1 nil . eq fact'(false, X) = mult(X, fact(dec(X))) . op count : Num -> Num . eq count(nil) = 0 nil . eq count(0 X) = count(X) . eq count(1 X) = add(1 nil, count(X)) . endfm sred count(fact(1 1 1 1 1 1 1 1 1 1 nil)) . ***( *** count 1's in binary representation of 4095! sred count(fact(1 1 1 1 1 1 1 1 1 1 1 1 nil)) . ) Maude-2.7/tests/Misc/sreduce.expected0000644000147300135640000000135112234062640014557 00000000000000Maude> ========================================== sreduce in MODULAR : modExp(s s s s 0, s s 0 ^ ((s s 0 ^ s s s s 0) + s s s s 0), s s s s s 0) . rewrites: 40894656 result NzNat: s 0 ========================================== sreduce in LIST-BENCH : head(multi(dup(a b c d e nil, s s s s 0 * s s s s 0), s s s s s s s s s 0 * s s s s s s s s s 0)) . rewrites: 26870231 result Elt: e ========================================== sreduce in BIT : count(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 nil) . rewrites: 1572843 result List: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nil ========================================== sreduce in BINARY : count(fact(1 1 1 1 1 1 1 1 1 1 nil)) . rewrites: 18755260 result Num: 0 0 0 1 0 0 0 0 1 1 1 1 nil Maude> Bye. Maude-2.7/tests/Misc/renaming.expected0000644000147300135640000004015411374640616014742 00000000000000Maude> fmod BAR is inc FOO * (sort Foo to Baz, sort Bar to Quux) . endfm fmod BAR is sorts Bool Baz Quux . subsort Baz < Quux . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm fmod THREE is inc TWO * (sort Foo to Foo', sort Baz to Baz', sort Quux to Quux') . sorts Jaz . subsorts Jaz < Baz' . endfm fmod THREE is sorts Bool Baz' Bar Quux' Jaz . subsorts Quux' Jaz < Baz' . subsort Baz' < Bar . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm fmod BAR is inc FOO * (sort Foo to Baz, op a to b) . endfm fmod BAR is sorts Bool Baz Bar . subsort Baz < Bar . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op b : -> Baz . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm fmod BAR' is inc FOO' * (sort Foo to Quux, op _+_ : [Foo] [Foo] -> [Foo] to _*_ [prec 29 gather (E e)], op _+_ : [Baz] [Baz] -> [Foo] to _._ [prec 27 gather (E e)]) . endfm fmod BAR' is sorts Bool Quux Bar Baz . subsort Quux < Bar . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op a : -> Baz . op _*_ : Quux Quux -> Quux [assoc comm prec 29 gather (E e)] . op _._ : Baz Baz -> Quux [prec 27 gather (E e)] . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm ========================================== reduce in BAR' : a . a * a . a . rewrites: 0 result Quux: a . a * a . a fmod BAR'' is inc FOO' * (sort Foo to Quux, op _+_ to _*_ [prec 29 gather (E E)]) . endfm fmod BAR'' is sorts Bool Quux Bar Baz . subsort Quux < Bar . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op a : -> Baz . op _*_ : Quux Quux -> Quux [assoc comm prec 29 gather (E E)] . op _*_ : Baz Baz -> Quux [prec 29 gather (E E)] . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm ========================================== reduce in BAR'' : a * a * a * a . rewrites: 0 result Quux: a * a * a * a ========================================== reduce in BAR'' : a * a * a * a . rewrites: 0 result Quux: a * a * a * a fmod TEST is inc BASH * (op f : [Foo] -> [Foo] to g) . endfm fmod TEST is sorts Bool Foo Bar . subsort Foo < Bar . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op g : Foo -> Foo . op g : Bar -> Bar . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm fmod BOOL fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL fmod NAT fmod INT fmod RAT fmod FLOAT fmod STRING fmod CONVERSION fmod RANDOM fmod QID fth TRIV fth STRICT-WEAK-ORDER fth STRICT-TOTAL-ORDER fth TOTAL-PREORDER fth TOTAL-ORDER fth DEFAULT fmod LIST fmod WEAKLY-SORTABLE-LIST fmod SORTABLE-LIST fmod WEAKLY-SORTABLE-LIST' fmod SORTABLE-LIST' fmod SET fmod LIST-AND-SET fmod SORTABLE-LIST-AND-SET fmod SORTABLE-LIST-AND-SET' fmod LIST* fmod SET* fmod MAP fmod ARRAY fmod NAT-LIST fmod QID-LIST fmod QID-SET fmod META-TERM fmod META-MODULE fmod META-VIEW fmod META-LEVEL mod COUNTER mod LOOP-MODE mod CONFIGURATION fmod FOO fmod BAR fmod ONE fmod TWO fmod THREE fmod FOO' fmod BAR' fmod BAR'' fmod DIFF fmod BASH fmod TEST fth X :: TRIV fth X :: STRICT-WEAK-ORDER fmod LIST{STRICT-WEAK-ORDER} fmod LIST{STRICT-WEAK-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{[X]} * (sort NeList{STRICT-WEAK-ORDER}{X} to NeList{X}, sort List{STRICT-WEAK-ORDER}{X} to List{X}) fth X :: STRICT-TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fth X :: TOTAL-PREORDER fmod LIST{TOTAL-PREORDER} fmod LIST{TOTAL-PREORDER}{[X]} fmod LIST{TOTAL-PREORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{X} to NeList{X}, sort List{TOTAL-PREORDER}{X} to List{X}) fth X :: TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{[X]} fmod SET{[X]} fmod SORTABLE-LIST{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}, sort NeSet{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeSet{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SORTABLE-LIST'{[X]} fmod LIST-AND-SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{ TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}, sort NeSet{TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeSet{X}, sort Set{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeSet{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeSet{X}, sort Set{TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fth Y :: TRIV fth Y :: DEFAULT fmod LIST{Nat} fmod LIST{Nat} * (sort NeList{Nat} to NeNatList, sort List{Nat} to NatList) fmod LIST{Qid} fmod LIST{Qid} * (sort NeList{Qid} to NeQidList, sort List{Qid} to QidList) fmod SET{Qid} fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) fmod QID-SET * (op _`,_ to _;_ [prec 43], op empty to none) fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) * (op _`,_ to _;_ [prec 43], op empty to none) fmod ONE * (sort Foo to Baz) fmod TWO * (sort Baz to Baz', sort Quux to Quux') fmod ONE * (sort Foo to Baz) * (sort Baz to Baz') fmod FOO * (sort Foo to Baz, op a to b) fmod FOO' * (sort Foo to Quux, op _+_ : [Baz] [Baz] -> [Foo,Bar] to _._ [prec 27 gather (E e)], op _+_ : [Foo,Bar] [Foo,Bar] -> [Foo,Bar] to _*_ [prec 29 gather (E e)]) fmod FOO' * (sort Foo to Quux, op _+_ to _*_ [prec 29 gather (E E)]) fmod BASH * (op f : [Foo,Bar] -> [Foo,Bar] to g) fmod DIFF * (op f : [Bar] -> [Bar] to g, op f : [Foo] -> [Foo] to g) Maude> Bye. Maude-2.7/tests/Misc/sreduce0000744000147300135640000000033012234061774012763 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/sreduce.maude -no-banner -no-advise \ > sreduce.out 2>&1 diff $srcdir/sreduce.expected sreduce.out > /dev/null 2>&1 Maude-2.7/tests/Misc/variantNarrowing.expected0000644000147300135640000027255712305221456016503 00000000000000Maude> ========================================== get variants in TEST : g(f(u(g(g(X3:Msg, X15:Msg), X16:Msg), u(2, X14:Msg)), u( g(X12:Msg, X3:Msg), g(X8:Msg, g(X10:Msg, X9:Msg)))), f(u(f(X8:Msg, X15:Msg), u(X15:Msg, X9:Msg)), g(f(X2:Msg, X2:Msg), g(3, X6:Msg)))) . Variant #1 rewrites: 0 Msg: g(f(u(2, #4:Msg, g(g(#1:Msg, #2:Msg), #3:Msg)), u(g(#5:Msg, #1:Msg), g( #6:Msg, g(#7:Msg, #8:Msg)))), f(u(#2:Msg, #8:Msg, f(#6:Msg, #2:Msg)), g(f( #9:Msg, #9:Msg), g(3, #10:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> #4:Msg X12:Msg --> #5:Msg X8:Msg --> #6:Msg X10:Msg --> #7:Msg X9:Msg --> #8:Msg X2:Msg --> #9:Msg X6:Msg --> #10:Msg Variant #2 rewrites: 14 Msg: g(f(u(%10:Msg, g(g(%1:Msg, %2:Msg), %3:Msg)), u(g(%4:Msg, %1:Msg), g( %5:Msg, g(%6:Msg, %7:Msg)))), f(u(%2:Msg, %7:Msg, f(%5:Msg, %2:Msg)), g(f( %8:Msg, %8:Msg), g(3, %9:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> u(2, %10:Msg) X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %7:Msg X2:Msg --> %8:Msg X6:Msg --> %9:Msg Variant #3 rewrites: 14 Msg: g(f(g(g(%1:Msg, %2:Msg), %3:Msg), u(g(%4:Msg, %1:Msg), g(%5:Msg, g(%6:Msg, %7:Msg)))), f(u(%2:Msg, %7:Msg, f(%5:Msg, %2:Msg)), g(f(%8:Msg, %8:Msg), g( 3, %9:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> 2 X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %7:Msg X2:Msg --> %8:Msg X6:Msg --> %9:Msg Variant #4 rewrites: 14 Msg: g(f(u(2, %10:Msg), u(g(%4:Msg, %1:Msg), g(%5:Msg, g(%6:Msg, %7:Msg)))), f( u(%2:Msg, %7:Msg, f(%5:Msg, %2:Msg)), g(f(%8:Msg, %8:Msg), g(3, %9:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> u(%10:Msg, g(g(%1:Msg, %2:Msg), %3:Msg)) X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %7:Msg X2:Msg --> %8:Msg X6:Msg --> %9:Msg Variant #5 rewrites: 14 Msg: g(f(2, u(g(%4:Msg, %1:Msg), g(%5:Msg, g(%6:Msg, %7:Msg)))), f(u(%2:Msg, %7:Msg, f(%5:Msg, %2:Msg)), g(f(%8:Msg, %8:Msg), g(3, %9:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> g(g(%1:Msg, %2:Msg), %3:Msg) X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %7:Msg X2:Msg --> %8:Msg X6:Msg --> %9:Msg Variant #6 rewrites: 14 Msg: g(f(u(2, g(g(%1:Msg, %2:Msg), %3:Msg)), u(g(%4:Msg, %1:Msg), g(%5:Msg, g( %6:Msg, %7:Msg)))), f(u(%2:Msg, %7:Msg, f(%5:Msg, %2:Msg)), g(f(%8:Msg, %8:Msg), g(3, %9:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> null X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %7:Msg X2:Msg --> %8:Msg X6:Msg --> %9:Msg Variant #7 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(g(%5:Msg, %6:Msg), %2:Msg), %3:Msg)), null), f(u( %2:Msg, %6:Msg, f(%4:Msg, %2:Msg)), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> g(%5:Msg, %6:Msg) X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> %6:Msg X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #8 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, u(%9:Msg, %10:Msg)), %3:Msg)), u(g(%4:Msg, %2:Msg), g(%5:Msg, g(%6:Msg, u(%9:Msg, %11:Msg))))), f(u(%10:Msg, %11:Msg, f(%5:Msg, u(%9:Msg, %10:Msg))), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%9:Msg, %11:Msg) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #9 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, u(%9:Msg, %10:Msg)), %3:Msg)), u(g(%4:Msg, %2:Msg), g(%5:Msg, g(%6:Msg, %9:Msg)))), f(u(%10:Msg, f(%5:Msg, u(%9:Msg, %10:Msg))), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %9:Msg X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #10 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, %9:Msg), %3:Msg)), u(g(%4:Msg, %2:Msg), g( %5:Msg, g(%6:Msg, u(%9:Msg, %10:Msg))))), f(u(%10:Msg, f(%5:Msg, %9:Msg)), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %9:Msg X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%9:Msg, %10:Msg) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #11 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, %9:Msg), %3:Msg)), u(g(%4:Msg, %2:Msg), g( %5:Msg, g(%6:Msg, %9:Msg)))), f(f(%5:Msg, %9:Msg), g(f(%7:Msg, %7:Msg), g( 3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %9:Msg X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %9:Msg X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #12 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, %9:Msg), %3:Msg)), u(g(%4:Msg, %2:Msg), g( %5:Msg, g(%6:Msg, u(%10:Msg, f(%5:Msg, %9:Msg)))))), f(u(%9:Msg, %10:Msg), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %9:Msg X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%10:Msg, f(%5:Msg, %9:Msg)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #13 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, %9:Msg), %3:Msg)), u(g(%4:Msg, %2:Msg), g( %5:Msg, g(%6:Msg, f(%5:Msg, %9:Msg))))), f(%9:Msg, g(f(%7:Msg, %7:Msg), g( 3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %9:Msg X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> f(%5:Msg, %9:Msg) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #14 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, null), %3:Msg)), u(g(%4:Msg, %2:Msg), g( %5:Msg, g(%6:Msg, %9:Msg)))), f(u(%9:Msg, f(%5:Msg, null)), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> null X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> %9:Msg X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #15 rewrites: 14 Msg: g(f(u(2, %1:Msg, g(g(%2:Msg, %9:Msg), %3:Msg)), u(g(%4:Msg, %2:Msg), g( %5:Msg, g(%6:Msg, null)))), f(u(%9:Msg, f(%5:Msg, %9:Msg)), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %9:Msg X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> null X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #16 rewrites: 141 Msg: g(f(null, u(g(#4:Msg, #1:Msg), g(#5:Msg, g(#6:Msg, #7:Msg)))), f(u(#2:Msg, #7:Msg, f(#5:Msg, #2:Msg)), g(f(#8:Msg, #8:Msg), g(3, #9:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, g(g(#1:Msg, #2:Msg), #3:Msg)) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> #7:Msg X2:Msg --> #8:Msg X6:Msg --> #9:Msg Variant #17 rewrites: 141 Msg: g(f(#10:Msg, u(g(#4:Msg, #1:Msg), g(#5:Msg, g(#6:Msg, #7:Msg)))), f(u( #2:Msg, #7:Msg, f(#5:Msg, #2:Msg)), g(f(#8:Msg, #8:Msg), g(3, #9:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, #10:Msg, g(g(#1:Msg, #2:Msg), #3:Msg)) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> #7:Msg X2:Msg --> #8:Msg X6:Msg --> #9:Msg Variant #18 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(g(#5:Msg, #6:Msg), #2:Msg), #3:Msg)), null), f(u(#2:Msg, #6:Msg, f(#4:Msg, #2:Msg)), g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> g(#5:Msg, #6:Msg) X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #6:Msg X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #19 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, u(#9:Msg, #10:Msg)), #3:Msg)), u(g(#4:Msg, #2:Msg), g(#5:Msg, g(#6:Msg, u(#9:Msg, #11:Msg))))), f(u(#10:Msg, #11:Msg, f(#5:Msg, u(#9:Msg, #10:Msg))), g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> u(#9:Msg, #11:Msg) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #20 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, u(#9:Msg, #10:Msg)), #3:Msg)), u(g(#4:Msg, #2:Msg), g(#5:Msg, g(#6:Msg, #9:Msg)))), f(u(#10:Msg, f(#5:Msg, u(#9:Msg, #10:Msg))), g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> #9:Msg X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #21 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, #9:Msg), #3:Msg)), u(g(#4:Msg, #2:Msg), g( #5:Msg, g(#6:Msg, u(#9:Msg, #10:Msg))))), f(u(#10:Msg, f(#5:Msg, #9:Msg)), g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #9:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> u(#9:Msg, #10:Msg) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #22 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, #9:Msg), #3:Msg)), u(g(#4:Msg, #2:Msg), g( #5:Msg, g(#6:Msg, #9:Msg)))), f(f(#5:Msg, #9:Msg), g(f(#7:Msg, #7:Msg), g( 3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #9:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> #9:Msg X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #23 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, #9:Msg), #3:Msg)), u(g(#4:Msg, #2:Msg), g( #5:Msg, g(#6:Msg, u(#10:Msg, f(#5:Msg, #9:Msg)))))), f(u(#9:Msg, #10:Msg), g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #9:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> u(#10:Msg, f(#5:Msg, #9:Msg)) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #24 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, #9:Msg), #3:Msg)), u(g(#4:Msg, #2:Msg), g( #5:Msg, g(#6:Msg, f(#5:Msg, #9:Msg))))), f(#9:Msg, g(f(#7:Msg, #7:Msg), g( 3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #9:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> f(#5:Msg, #9:Msg) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #25 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, null), #3:Msg)), u(g(#4:Msg, #2:Msg), g(#5:Msg, g(#6:Msg, #9:Msg)))), f(u(#9:Msg, f(#5:Msg, null)), g(f(#7:Msg, #7:Msg), g( 3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> null X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> #9:Msg X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #26 rewrites: 141 Msg: g(f(u(#1:Msg, g(g(#2:Msg, #9:Msg), #3:Msg)), u(g(#4:Msg, #2:Msg), g( #5:Msg, g(#6:Msg, null)))), f(u(#9:Msg, f(#5:Msg, #9:Msg)), g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #9:Msg X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> null X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #27 rewrites: 141 Msg: g(f(g(g(g(#4:Msg, #5:Msg), #1:Msg), #2:Msg), null), f(u(#1:Msg, #5:Msg, f( #3:Msg, #1:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> g(#4:Msg, #5:Msg) X15:Msg --> #1:Msg X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> #5:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #28 rewrites: 141 Msg: g(f(g(g(#1:Msg, u(#8:Msg, #9:Msg)), #2:Msg), u(g(#3:Msg, #1:Msg), g( #4:Msg, g(#5:Msg, u(#8:Msg, #10:Msg))))), f(u(#9:Msg, #10:Msg, f(#4:Msg, u( #8:Msg, #9:Msg))), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#8:Msg, #10:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #29 rewrites: 141 Msg: g(f(g(g(#1:Msg, u(#8:Msg, #9:Msg)), #2:Msg), u(g(#3:Msg, #1:Msg), g( #4:Msg, g(#5:Msg, #8:Msg)))), f(u(#9:Msg, f(#4:Msg, u(#8:Msg, #9:Msg))), g( f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #8:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #30 rewrites: 141 Msg: g(f(g(g(#1:Msg, #8:Msg), #2:Msg), u(g(#3:Msg, #1:Msg), g(#4:Msg, g(#5:Msg, u(#8:Msg, #9:Msg))))), f(u(#9:Msg, f(#4:Msg, #8:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#8:Msg, #9:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #31 rewrites: 141 Msg: g(f(g(g(#1:Msg, #8:Msg), #2:Msg), u(g(#3:Msg, #1:Msg), g(#4:Msg, g(#5:Msg, #8:Msg)))), f(f(#4:Msg, #8:Msg), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #8:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #32 rewrites: 141 Msg: g(f(g(g(#1:Msg, #8:Msg), #2:Msg), u(g(#3:Msg, #1:Msg), g(#4:Msg, g(#5:Msg, u(#9:Msg, f(#4:Msg, #8:Msg)))))), f(u(#8:Msg, #9:Msg), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#9:Msg, f(#4:Msg, #8:Msg)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #33 rewrites: 141 Msg: g(f(g(g(#1:Msg, #8:Msg), #2:Msg), u(g(#3:Msg, #1:Msg), g(#4:Msg, g(#5:Msg, f(#4:Msg, #8:Msg))))), f(#8:Msg, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> f(#4:Msg, #8:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #34 rewrites: 141 Msg: g(f(g(g(#1:Msg, null), #2:Msg), u(g(#3:Msg, #1:Msg), g(#4:Msg, g(#5:Msg, #8:Msg)))), f(u(#8:Msg, f(#4:Msg, null)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> null X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #8:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #35 rewrites: 141 Msg: g(f(g(g(#1:Msg, #8:Msg), #2:Msg), u(g(#3:Msg, #1:Msg), g(#4:Msg, g(#5:Msg, null)))), f(u(#8:Msg, f(#4:Msg, #8:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> null X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #36 rewrites: 141 Msg: g(f(u(2, #1:Msg), null), f(u(#4:Msg, #5:Msg, f(#2:Msg, #5:Msg)), g(f( #6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> g(#3:Msg, #4:Msg) X15:Msg --> #5:Msg X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(g(#3:Msg, #4:Msg), #5:Msg), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #3:Msg X9:Msg --> #4:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #37 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#9:Msg, #11:Msg))))), f(u(#10:Msg, #11:Msg, f(#4:Msg, u(#9:Msg, #10:Msg))), g(f( #6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, u(#9:Msg, #10:Msg)), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#9:Msg, #11:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #38 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, #9:Msg)))), f( u(#10:Msg, f(#4:Msg, u(#9:Msg, #10:Msg))), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, u(#9:Msg, #10:Msg)), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #9:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #39 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#9:Msg, #10:Msg))))), f(u(#10:Msg, f(#4:Msg, #9:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> #9:Msg X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, #9:Msg), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#9:Msg, #10:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #40 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, #9:Msg)))), f( f(#4:Msg, #9:Msg), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> #9:Msg X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, #9:Msg), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #9:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #41 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#10:Msg, f( #4:Msg, #9:Msg)))))), f(u(#9:Msg, #10:Msg), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> #9:Msg X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, #9:Msg), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#10:Msg, f(#4:Msg, #9:Msg)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #42 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, f(#4:Msg, #9:Msg))))), f(#9:Msg, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> #9:Msg X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, #9:Msg), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> f(#4:Msg, #9:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #43 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, #9:Msg)))), f( u(#9:Msg, f(#4:Msg, null)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> null X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, null), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #9:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #44 rewrites: 141 Msg: g(f(u(2, #1:Msg), u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, null)))), f(u( #9:Msg, f(#4:Msg, #9:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> #9:Msg X16:Msg --> #8:Msg X14:Msg --> u(#1:Msg, g(g(#3:Msg, #9:Msg), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> null X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #45 rewrites: 141 Msg: g(f(2, null), f(u(#3:Msg, #4:Msg, f(#1:Msg, #4:Msg)), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, #3:Msg) X15:Msg --> #4:Msg X16:Msg --> #7:Msg X14:Msg --> g(g(g(#2:Msg, #3:Msg), #4:Msg), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #2:Msg X9:Msg --> #3:Msg X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #46 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#8:Msg, #10:Msg))))), f( u(#9:Msg, #10:Msg, f(#3:Msg, u(#8:Msg, #9:Msg))), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, u(#8:Msg, #9:Msg)), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#8:Msg, #10:Msg) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #47 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, #8:Msg)))), f(u(#9:Msg, f( #3:Msg, u(#8:Msg, #9:Msg))), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, u(#8:Msg, #9:Msg)), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> #8:Msg X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #48 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#8:Msg, #9:Msg))))), f( u(#9:Msg, f(#3:Msg, #8:Msg)), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #8:Msg X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, #8:Msg), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#8:Msg, #9:Msg) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #49 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, #8:Msg)))), f(f(#3:Msg, #8:Msg), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #8:Msg X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, #8:Msg), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> #8:Msg X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #50 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#9:Msg, f(#3:Msg, #8:Msg)))))), f(u(#8:Msg, #9:Msg), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #8:Msg X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, #8:Msg), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#9:Msg, f(#3:Msg, #8:Msg)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #51 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, f(#3:Msg, #8:Msg))))), f( #8:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #8:Msg X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, #8:Msg), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> f(#3:Msg, #8:Msg) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #52 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, #8:Msg)))), f(u(#8:Msg, f( #3:Msg, null)), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> null X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, null), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> #8:Msg X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #53 rewrites: 141 Msg: g(f(2, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, null)))), f(u(#8:Msg, f( #3:Msg, #8:Msg)), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #8:Msg X16:Msg --> #7:Msg X14:Msg --> g(g(#2:Msg, #8:Msg), #7:Msg) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> null X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #54 rewrites: 141 Msg: g(f(u(2, g(g(g(#4:Msg, #5:Msg), #1:Msg), #2:Msg)), null), f(u(#1:Msg, #5:Msg, f(#3:Msg, #1:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> g(#4:Msg, #5:Msg) X15:Msg --> #1:Msg X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> #5:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #55 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, u(#8:Msg, #9:Msg)), #2:Msg)), u(g(#3:Msg, #1:Msg), g( #4:Msg, g(#5:Msg, u(#8:Msg, #10:Msg))))), f(u(#9:Msg, #10:Msg, f(#4:Msg, u( #8:Msg, #9:Msg))), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#8:Msg, #10:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #56 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, u(#8:Msg, #9:Msg)), #2:Msg)), u(g(#3:Msg, #1:Msg), g( #4:Msg, g(#5:Msg, #8:Msg)))), f(u(#9:Msg, f(#4:Msg, u(#8:Msg, #9:Msg))), g( f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #8:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #57 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, #8:Msg), #2:Msg)), u(g(#3:Msg, #1:Msg), g(#4:Msg, g( #5:Msg, u(#8:Msg, #9:Msg))))), f(u(#9:Msg, f(#4:Msg, #8:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#8:Msg, #9:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #58 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, #8:Msg), #2:Msg)), u(g(#3:Msg, #1:Msg), g(#4:Msg, g( #5:Msg, #8:Msg)))), f(f(#4:Msg, #8:Msg), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #8:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #59 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, #8:Msg), #2:Msg)), u(g(#3:Msg, #1:Msg), g(#4:Msg, g( #5:Msg, u(#9:Msg, f(#4:Msg, #8:Msg)))))), f(u(#8:Msg, #9:Msg), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#9:Msg, f(#4:Msg, #8:Msg)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #60 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, #8:Msg), #2:Msg)), u(g(#3:Msg, #1:Msg), g(#4:Msg, g( #5:Msg, f(#4:Msg, #8:Msg))))), f(#8:Msg, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> f(#4:Msg, #8:Msg) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #61 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, null), #2:Msg)), u(g(#3:Msg, #1:Msg), g(#4:Msg, g( #5:Msg, #8:Msg)))), f(u(#8:Msg, f(#4:Msg, null)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> null X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> #8:Msg X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #62 rewrites: 141 Msg: g(f(u(2, g(g(#1:Msg, #8:Msg), #2:Msg)), u(g(#3:Msg, #1:Msg), g(#4:Msg, g( #5:Msg, null)))), f(u(#8:Msg, f(#4:Msg, #8:Msg)), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #1:Msg X15:Msg --> #8:Msg X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> null X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #63 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, u(#7:Msg, #9:Msg)), u(#7:Msg, #8:Msg)), #3:Msg)), null), f(u(#8:Msg, #9:Msg, f(#4:Msg, u(#7:Msg, #8:Msg))), g(f( #5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, u(#7:Msg, #9:Msg)) X15:Msg --> u(#7:Msg, #8:Msg) X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> u(#7:Msg, #9:Msg) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #64 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, #7:Msg), u(#7:Msg, #8:Msg)), #3:Msg)), null), f(u(#8:Msg, f(#4:Msg, u(#7:Msg, #8:Msg))), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, #7:Msg) X15:Msg --> u(#7:Msg, #8:Msg) X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> #7:Msg X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #65 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, u(#7:Msg, #8:Msg)), #7:Msg), #3:Msg)), null), f(u(#8:Msg, f(#4:Msg, #7:Msg)), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, u(#7:Msg, #8:Msg)) X15:Msg --> #7:Msg X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> u(#7:Msg, #8:Msg) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #66 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, #7:Msg), #7:Msg), #3:Msg)), null), f(f( #4:Msg, #7:Msg), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, #7:Msg) X15:Msg --> #7:Msg X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> #7:Msg X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #67 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, u(#8:Msg, f(#4:Msg, #7:Msg))), #7:Msg), #3:Msg)), null), f(u(#7:Msg, #8:Msg), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, u(#8:Msg, f(#4:Msg, #7:Msg))) X15:Msg --> #7:Msg X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> u(#8:Msg, f(#4:Msg, #7:Msg)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #68 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, f(#4:Msg, #7:Msg)), #7:Msg), #3:Msg)), null), f(#7:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, f(#4:Msg, #7:Msg)) X15:Msg --> #7:Msg X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> f(#4:Msg, #7:Msg) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #69 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, #7:Msg), null), #3:Msg)), null), f(u( #7:Msg, f(#4:Msg, null)), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, #7:Msg) X15:Msg --> null X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> #7:Msg X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #70 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(g(#2:Msg, null), #7:Msg), #3:Msg)), null), f(u( #7:Msg, f(#4:Msg, #7:Msg)), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, null) X15:Msg --> #7:Msg X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> null X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #71 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(#2:Msg, u(#9:Msg, #10:Msg)), #3:Msg)), u(g(#4:Msg, #2:Msg), g(#5:Msg, g(#6:Msg, u(#9:Msg, #11:Msg, f(#5:Msg, u(#9:Msg, #10:Msg))))))), f(u(#10:Msg, #11:Msg), g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> u(#9:Msg, #11:Msg, f(#5:Msg, u(#9:Msg, #10:Msg))) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #72 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(#2:Msg, u(#9:Msg, #10:Msg)), #3:Msg)), u(g(#4:Msg, #2:Msg), g(#5:Msg, g(#6:Msg, u(#9:Msg, f(#5:Msg, u(#9:Msg, #10:Msg))))))), f(#10:Msg, g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> u(#9:Msg, f(#5:Msg, u(#9:Msg, #10:Msg))) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #73 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(#2:Msg, #3:Msg), #4:Msg)), u(g(#5:Msg, #2:Msg), g( #6:Msg, g(#7:Msg, u(#3:Msg, f(#6:Msg, #3:Msg)))))), f(null, g(f(#8:Msg, #8:Msg), g(3, #9:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #3:Msg X16:Msg --> #4:Msg X14:Msg --> #1:Msg X12:Msg --> #5:Msg X8:Msg --> #6:Msg X10:Msg --> #7:Msg X9:Msg --> u(#3:Msg, f(#6:Msg, #3:Msg)) X2:Msg --> #8:Msg X6:Msg --> #9:Msg Variant #74 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(#2:Msg, #3:Msg), #4:Msg)), u(g(#5:Msg, #2:Msg), g( #6:Msg, g(#7:Msg, u(#3:Msg, #10:Msg, f(#6:Msg, #3:Msg)))))), f(#10:Msg, g( f(#8:Msg, #8:Msg), g(3, #9:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #3:Msg X16:Msg --> #4:Msg X14:Msg --> #1:Msg X12:Msg --> #5:Msg X8:Msg --> #6:Msg X10:Msg --> #7:Msg X9:Msg --> u(#3:Msg, #10:Msg, f(#6:Msg, #3:Msg)) X2:Msg --> #8:Msg X6:Msg --> #9:Msg Variant #75 rewrites: 141 Msg: g(f(u(2, #1:Msg, g(g(#2:Msg, null), #3:Msg)), u(g(#4:Msg, #2:Msg), g( #5:Msg, g(#6:Msg, u(#9:Msg, f(#5:Msg, null)))))), f(#9:Msg, g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #2:Msg X15:Msg --> null X16:Msg --> #3:Msg X14:Msg --> #1:Msg X12:Msg --> #4:Msg X8:Msg --> #5:Msg X10:Msg --> #6:Msg X9:Msg --> u(#9:Msg, f(#5:Msg, null)) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #76 rewrites: 451 Msg: g(f(null, null), f(u(%3:Msg, %4:Msg, f(%1:Msg, %4:Msg)), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, %3:Msg) X15:Msg --> %4:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(g(%2:Msg, %3:Msg), %4:Msg), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %2:Msg X9:Msg --> %3:Msg X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #77 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%8:Msg, %10:Msg))))), f(u(%9:Msg, %10:Msg, f(%3:Msg, u(%8:Msg, %9:Msg))), g(f(%5:Msg, %5:Msg), g( 3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, u(%8:Msg, %9:Msg)), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%8:Msg, %10:Msg) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #78 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, %8:Msg)))), f(u(%9:Msg, f(%3:Msg, u(%8:Msg, %9:Msg))), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, u(%8:Msg, %9:Msg)), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> %8:Msg X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #79 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%8:Msg, %9:Msg))))), f(u(%9:Msg, f(%3:Msg, %8:Msg)), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %8:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, %8:Msg), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%8:Msg, %9:Msg) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #80 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, %8:Msg)))), f(f(%3:Msg, %8:Msg), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %8:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, %8:Msg), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> %8:Msg X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #81 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%9:Msg, f(%3:Msg, %8:Msg)))))), f(u(%8:Msg, %9:Msg), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %8:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, %8:Msg), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%9:Msg, f(%3:Msg, %8:Msg)) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #82 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, f(%3:Msg, %8:Msg))))), f(%8:Msg, g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %8:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, %8:Msg), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> f(%3:Msg, %8:Msg) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #83 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, %8:Msg)))), f(u(%8:Msg, f(%3:Msg, null)), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> null X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, null), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> %8:Msg X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #84 rewrites: 451 Msg: g(f(null, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, null)))), f(u(%8:Msg, f(%3:Msg, %8:Msg)), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %8:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, g(g(%2:Msg, %8:Msg), %7:Msg)) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> null X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #85 rewrites: 451 Msg: g(f(%1:Msg, null), f(u(%4:Msg, %5:Msg, f(%2:Msg, %5:Msg)), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> g(%3:Msg, %4:Msg) X15:Msg --> %5:Msg X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(g(%3:Msg, %4:Msg), %5:Msg), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %3:Msg X9:Msg --> %4:Msg X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #86 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%9:Msg, %11:Msg))))), f(u(%10:Msg, %11:Msg, f(%4:Msg, u(%9:Msg, %10:Msg))), g(f( %6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, u(%9:Msg, %10:Msg)), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%9:Msg, %11:Msg) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #87 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, %9:Msg)))), f(u( %10:Msg, f(%4:Msg, u(%9:Msg, %10:Msg))), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, u(%9:Msg, %10:Msg)), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> %9:Msg X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #88 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%9:Msg, %10:Msg))))), f(u(%10:Msg, f(%4:Msg, %9:Msg)), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> %9:Msg X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, %9:Msg), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%9:Msg, %10:Msg) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #89 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, %9:Msg)))), f(f( %4:Msg, %9:Msg), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> %9:Msg X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, %9:Msg), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> %9:Msg X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #90 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%10:Msg, f(%4:Msg, %9:Msg)))))), f(u(%9:Msg, %10:Msg), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> %9:Msg X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, %9:Msg), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%10:Msg, f(%4:Msg, %9:Msg)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #91 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, f(%4:Msg, %9:Msg))))), f(%9:Msg, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> %9:Msg X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, %9:Msg), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> f(%4:Msg, %9:Msg) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #92 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, %9:Msg)))), f(u( %9:Msg, f(%4:Msg, null)), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> null X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, null), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> %9:Msg X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #93 rewrites: 451 Msg: g(f(%1:Msg, u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, null)))), f(u(%9:Msg, f(%4:Msg, %9:Msg)), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> %9:Msg X16:Msg --> %8:Msg X14:Msg --> u(2, %1:Msg, g(g(%3:Msg, %9:Msg), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> null X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #94 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, u(%7:Msg, %9:Msg)), u(%7:Msg, %8:Msg)), %3:Msg)), null), f(u(%8:Msg, %9:Msg, f(%4:Msg, u(%7:Msg, %8:Msg))), g(f( %5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, u(%7:Msg, %9:Msg)) X15:Msg --> u(%7:Msg, %8:Msg) X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> u(%7:Msg, %9:Msg) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #95 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, %7:Msg), u(%7:Msg, %8:Msg)), %3:Msg)), null), f(u(%8:Msg, f(%4:Msg, u(%7:Msg, %8:Msg))), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, %7:Msg) X15:Msg --> u(%7:Msg, %8:Msg) X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> %7:Msg X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #96 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, u(%7:Msg, %8:Msg)), %7:Msg), %3:Msg)), null), f(u(%8:Msg, f(%4:Msg, %7:Msg)), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, u(%7:Msg, %8:Msg)) X15:Msg --> %7:Msg X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> u(%7:Msg, %8:Msg) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #97 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, %7:Msg), %7:Msg), %3:Msg)), null), f(f(%4:Msg, %7:Msg), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, %7:Msg) X15:Msg --> %7:Msg X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> %7:Msg X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #98 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, u(%8:Msg, f(%4:Msg, %7:Msg))), %7:Msg), %3:Msg)), null), f(u(%7:Msg, %8:Msg), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, u(%8:Msg, f(%4:Msg, %7:Msg))) X15:Msg --> %7:Msg X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> u(%8:Msg, f(%4:Msg, %7:Msg)) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #99 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, f(%4:Msg, %7:Msg)), %7:Msg), %3:Msg)), null), f(%7:Msg, g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, f(%4:Msg, %7:Msg)) X15:Msg --> %7:Msg X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> f(%4:Msg, %7:Msg) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #100 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, %7:Msg), null), %3:Msg)), null), f(u(%7:Msg, f(%4:Msg, null)), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, %7:Msg) X15:Msg --> null X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> %7:Msg X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #101 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(g(%2:Msg, null), %7:Msg), %3:Msg)), null), f(u(%7:Msg, f(%4:Msg, %7:Msg)), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, null) X15:Msg --> %7:Msg X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> null X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #102 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(%2:Msg, u(%9:Msg, %10:Msg)), %3:Msg)), u(g(%4:Msg, %2:Msg), g(%5:Msg, g(%6:Msg, u(%9:Msg, %11:Msg, f(%5:Msg, u(%9:Msg, %10:Msg))))))), f(u(%10:Msg, %11:Msg), g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%9:Msg, %11:Msg, f(%5:Msg, u(%9:Msg, %10:Msg))) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #103 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(%2:Msg, u(%9:Msg, %10:Msg)), %3:Msg)), u(g(%4:Msg, %2:Msg), g(%5:Msg, g(%6:Msg, u(%9:Msg, f(%5:Msg, u(%9:Msg, %10:Msg))))))), f(%10:Msg, g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%9:Msg, f(%5:Msg, u(%9:Msg, %10:Msg))) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #104 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(%2:Msg, %3:Msg), %4:Msg)), u(g(%5:Msg, %2:Msg), g( %6:Msg, g(%7:Msg, u(%3:Msg, f(%6:Msg, %3:Msg)))))), f(null, g(f(%8:Msg, %8:Msg), g(3, %9:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %3:Msg X16:Msg --> %4:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %5:Msg X8:Msg --> %6:Msg X10:Msg --> %7:Msg X9:Msg --> u(%3:Msg, f(%6:Msg, %3:Msg)) X2:Msg --> %8:Msg X6:Msg --> %9:Msg Variant #105 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(%2:Msg, %3:Msg), %4:Msg)), u(g(%5:Msg, %2:Msg), g( %6:Msg, g(%7:Msg, u(%3:Msg, %10:Msg, f(%6:Msg, %3:Msg)))))), f(%10:Msg, g( f(%8:Msg, %8:Msg), g(3, %9:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %3:Msg X16:Msg --> %4:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %5:Msg X8:Msg --> %6:Msg X10:Msg --> %7:Msg X9:Msg --> u(%3:Msg, %10:Msg, f(%6:Msg, %3:Msg)) X2:Msg --> %8:Msg X6:Msg --> %9:Msg Variant #106 rewrites: 451 Msg: g(f(u(%1:Msg, g(g(%2:Msg, null), %3:Msg)), u(g(%4:Msg, %2:Msg), g(%5:Msg, g(%6:Msg, u(%9:Msg, f(%5:Msg, null)))))), f(%9:Msg, g(f(%7:Msg, %7:Msg), g( 3, %8:Msg)))) X3:Msg --> %2:Msg X15:Msg --> null X16:Msg --> %3:Msg X14:Msg --> u(2, %1:Msg) X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%9:Msg, f(%5:Msg, null)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #107 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, u(%6:Msg, %8:Msg)), u(%6:Msg, %7:Msg)), %2:Msg), null), f(u(%7:Msg, %8:Msg, f(%3:Msg, u(%6:Msg, %7:Msg))), g(f(%4:Msg, %4:Msg), g( 3, %5:Msg)))) X3:Msg --> g(%1:Msg, u(%6:Msg, %8:Msg)) X15:Msg --> u(%6:Msg, %7:Msg) X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> u(%6:Msg, %8:Msg) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #108 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, %6:Msg), u(%6:Msg, %7:Msg)), %2:Msg), null), f(u(%7:Msg, f(%3:Msg, u(%6:Msg, %7:Msg))), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, %6:Msg) X15:Msg --> u(%6:Msg, %7:Msg) X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> %6:Msg X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #109 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, u(%6:Msg, %7:Msg)), %6:Msg), %2:Msg), null), f(u(%7:Msg, f(%3:Msg, %6:Msg)), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, u(%6:Msg, %7:Msg)) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> u(%6:Msg, %7:Msg) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #110 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, %6:Msg), %6:Msg), %2:Msg), null), f(f(%3:Msg, %6:Msg), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, %6:Msg) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> %6:Msg X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #111 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, u(%7:Msg, f(%3:Msg, %6:Msg))), %6:Msg), %2:Msg), null), f(u(%6:Msg, %7:Msg), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, u(%7:Msg, f(%3:Msg, %6:Msg))) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> u(%7:Msg, f(%3:Msg, %6:Msg)) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #112 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, f(%3:Msg, %6:Msg)), %6:Msg), %2:Msg), null), f(%6:Msg, g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, f(%3:Msg, %6:Msg)) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> f(%3:Msg, %6:Msg) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #113 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, %6:Msg), null), %2:Msg), null), f(u(%6:Msg, f(%3:Msg, null)), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, %6:Msg) X15:Msg --> null X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> %6:Msg X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #114 rewrites: 451 Msg: g(f(g(g(g(%1:Msg, null), %6:Msg), %2:Msg), null), f(u(%6:Msg, f(%3:Msg, %6:Msg)), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, null) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> null X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #115 rewrites: 451 Msg: g(f(g(g(%1:Msg, u(%8:Msg, %9:Msg)), %2:Msg), u(g(%3:Msg, %1:Msg), g( %4:Msg, g(%5:Msg, u(%8:Msg, %10:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))))))), f( u(%9:Msg, %10:Msg), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %1:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%8:Msg, %10:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #116 rewrites: 451 Msg: g(f(g(g(%1:Msg, u(%8:Msg, %9:Msg)), %2:Msg), u(g(%3:Msg, %1:Msg), g( %4:Msg, g(%5:Msg, u(%8:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))))))), f(%9:Msg, g( f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %1:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%8:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #117 rewrites: 451 Msg: g(f(g(g(%1:Msg, %2:Msg), %3:Msg), u(g(%4:Msg, %1:Msg), g(%5:Msg, g(%6:Msg, u(%2:Msg, f(%5:Msg, %2:Msg)))))), f(null, g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> 2 X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%2:Msg, f(%5:Msg, %2:Msg)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #118 rewrites: 451 Msg: g(f(g(g(%1:Msg, %2:Msg), %3:Msg), u(g(%4:Msg, %1:Msg), g(%5:Msg, g(%6:Msg, u(%2:Msg, %9:Msg, f(%5:Msg, %2:Msg)))))), f(%9:Msg, g(f(%7:Msg, %7:Msg), g( 3, %8:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> 2 X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%2:Msg, %9:Msg, f(%5:Msg, %2:Msg)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #119 rewrites: 451 Msg: g(f(g(g(%1:Msg, null), %2:Msg), u(g(%3:Msg, %1:Msg), g(%4:Msg, g(%5:Msg, u(%8:Msg, f(%4:Msg, null)))))), f(%8:Msg, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %1:Msg X15:Msg --> null X16:Msg --> %2:Msg X14:Msg --> 2 X12:Msg --> %3:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%8:Msg, f(%4:Msg, null)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #120 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(u(%8:Msg, %9:Msg, f(%2:Msg, u(%7:Msg, %9:Msg))), g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, u(%7:Msg, %8:Msg)) X15:Msg --> u(%7:Msg, %9:Msg) X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, u(%7:Msg, %8:Msg)), u(%7:Msg, %9:Msg)), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> u(%7:Msg, %8:Msg) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #121 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(u(%8:Msg, f(%2:Msg, %7:Msg)), g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, u(%7:Msg, %8:Msg)) X15:Msg --> %7:Msg X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, u(%7:Msg, %8:Msg)), %7:Msg), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> u(%7:Msg, %8:Msg) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #122 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(u(%8:Msg, f(%2:Msg, u(%7:Msg, %8:Msg))), g(f( %3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, %7:Msg) X15:Msg --> u(%7:Msg, %8:Msg) X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, %7:Msg), u(%7:Msg, %8:Msg)), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> %7:Msg X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #123 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(f(%2:Msg, %7:Msg), g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, %7:Msg) X15:Msg --> %7:Msg X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, %7:Msg), %7:Msg), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> %7:Msg X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #124 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(u(%7:Msg, %8:Msg), g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, u(%7:Msg, f(%2:Msg, %8:Msg))) X15:Msg --> %8:Msg X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, u(%7:Msg, f(%2:Msg, %8:Msg))), %8:Msg), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> u(%7:Msg, f(%2:Msg, %8:Msg)) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #125 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(%7:Msg, g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, f(%2:Msg, %7:Msg)) X15:Msg --> %7:Msg X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, f(%2:Msg, %7:Msg)), %7:Msg), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> f(%2:Msg, %7:Msg) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #126 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(u(%7:Msg, f(%2:Msg, %7:Msg)), g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, null) X15:Msg --> %7:Msg X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, null), %7:Msg), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> null X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #127 rewrites: 451 Msg: g(f(u(2, %1:Msg), null), f(u(%7:Msg, f(%2:Msg, null)), g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, %7:Msg) X15:Msg --> null X16:Msg --> %6:Msg X14:Msg --> u(%1:Msg, g(g(g(%5:Msg, %7:Msg), null), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> %7:Msg X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #128 rewrites: 451 Msg: g(f(u(2, %1:Msg), u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%9:Msg, %11:Msg, f(%4:Msg, u(%9:Msg, %10:Msg))))))), f(u(%10:Msg, %11:Msg), g(f( %6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %8:Msg X14:Msg --> u(%1:Msg, g(g(%3:Msg, u(%9:Msg, %10:Msg)), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%9:Msg, %11:Msg, f(%4:Msg, u(%9:Msg, %10:Msg))) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #129 rewrites: 451 Msg: g(f(u(2, %1:Msg), u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%9:Msg, f( %4:Msg, u(%9:Msg, %10:Msg))))))), f(%10:Msg, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> u(%9:Msg, %10:Msg) X16:Msg --> %8:Msg X14:Msg --> u(%1:Msg, g(g(%3:Msg, u(%9:Msg, %10:Msg)), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%9:Msg, f(%4:Msg, u(%9:Msg, %10:Msg))) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #130 rewrites: 451 Msg: g(f(u(2, %1:Msg), u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%6:Msg, f( %4:Msg, %6:Msg)))))), f(null, g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %3:Msg X15:Msg --> %6:Msg X16:Msg --> %9:Msg X14:Msg --> u(%1:Msg, g(g(%3:Msg, %6:Msg), %9:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%6:Msg, f(%4:Msg, %6:Msg)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #131 rewrites: 451 Msg: g(f(u(2, %1:Msg), u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%6:Msg, %10:Msg, f(%4:Msg, %6:Msg)))))), f(%10:Msg, g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %3:Msg X15:Msg --> %6:Msg X16:Msg --> %9:Msg X14:Msg --> u(%1:Msg, g(g(%3:Msg, %6:Msg), %9:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%6:Msg, %10:Msg, f(%4:Msg, %6:Msg)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #132 rewrites: 451 Msg: g(f(u(2, %1:Msg), u(g(%2:Msg, %3:Msg), g(%4:Msg, g(%5:Msg, u(%9:Msg, f( %4:Msg, null)))))), f(%9:Msg, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %3:Msg X15:Msg --> null X16:Msg --> %8:Msg X14:Msg --> u(%1:Msg, g(g(%3:Msg, null), %8:Msg)) X12:Msg --> %2:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%9:Msg, f(%4:Msg, null)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #133 rewrites: 451 Msg: g(f(2, null), f(u(%7:Msg, %8:Msg, f(%1:Msg, u(%6:Msg, %8:Msg))), g(f( %2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, u(%6:Msg, %7:Msg)) X15:Msg --> u(%6:Msg, %8:Msg) X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, u(%6:Msg, %7:Msg)), u(%6:Msg, %8:Msg)), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> u(%6:Msg, %7:Msg) X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #134 rewrites: 451 Msg: g(f(2, null), f(u(%7:Msg, f(%1:Msg, %6:Msg)), g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, u(%6:Msg, %7:Msg)) X15:Msg --> %6:Msg X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, u(%6:Msg, %7:Msg)), %6:Msg), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> u(%6:Msg, %7:Msg) X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #135 rewrites: 451 Msg: g(f(2, null), f(u(%7:Msg, f(%1:Msg, u(%6:Msg, %7:Msg))), g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, %6:Msg) X15:Msg --> u(%6:Msg, %7:Msg) X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, %6:Msg), u(%6:Msg, %7:Msg)), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> %6:Msg X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #136 rewrites: 451 Msg: g(f(2, null), f(f(%1:Msg, %6:Msg), g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, %6:Msg) X15:Msg --> %6:Msg X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, %6:Msg), %6:Msg), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> %6:Msg X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #137 rewrites: 451 Msg: g(f(2, null), f(u(%6:Msg, %7:Msg), g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, u(%6:Msg, f(%1:Msg, %7:Msg))) X15:Msg --> %7:Msg X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, u(%6:Msg, f(%1:Msg, %7:Msg))), %7:Msg), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> u(%6:Msg, f(%1:Msg, %7:Msg)) X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #138 rewrites: 451 Msg: g(f(2, null), f(%6:Msg, g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, f(%1:Msg, %6:Msg)) X15:Msg --> %6:Msg X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, f(%1:Msg, %6:Msg)), %6:Msg), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> f(%1:Msg, %6:Msg) X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #139 rewrites: 451 Msg: g(f(2, null), f(u(%6:Msg, f(%1:Msg, %6:Msg)), g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, null) X15:Msg --> %6:Msg X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, null), %6:Msg), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> null X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #140 rewrites: 451 Msg: g(f(2, null), f(u(%6:Msg, f(%1:Msg, null)), g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, %6:Msg) X15:Msg --> null X16:Msg --> %5:Msg X14:Msg --> g(g(g(%4:Msg, %6:Msg), null), %5:Msg) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> %6:Msg X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #141 rewrites: 451 Msg: g(f(2, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%8:Msg, %10:Msg, f( %3:Msg, u(%8:Msg, %9:Msg))))))), f(u(%9:Msg, %10:Msg), g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %7:Msg X14:Msg --> g(g(%2:Msg, u(%8:Msg, %9:Msg)), %7:Msg) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%8:Msg, %10:Msg, f(%3:Msg, u(%8:Msg, %9:Msg))) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #142 rewrites: 451 Msg: g(f(2, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%8:Msg, f(%3:Msg, u( %8:Msg, %9:Msg))))))), f(%9:Msg, g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %7:Msg X14:Msg --> g(g(%2:Msg, u(%8:Msg, %9:Msg)), %7:Msg) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%8:Msg, f(%3:Msg, u(%8:Msg, %9:Msg))) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #143 rewrites: 451 Msg: g(f(2, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%5:Msg, f(%3:Msg, %5:Msg)))))), f(null, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %5:Msg X16:Msg --> %8:Msg X14:Msg --> g(g(%2:Msg, %5:Msg), %8:Msg) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%5:Msg, f(%3:Msg, %5:Msg)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #144 rewrites: 451 Msg: g(f(2, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%5:Msg, %9:Msg, f( %3:Msg, %5:Msg)))))), f(%9:Msg, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %2:Msg X15:Msg --> %5:Msg X16:Msg --> %8:Msg X14:Msg --> g(g(%2:Msg, %5:Msg), %8:Msg) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%5:Msg, %9:Msg, f(%3:Msg, %5:Msg)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #145 rewrites: 451 Msg: g(f(2, u(g(%1:Msg, %2:Msg), g(%3:Msg, g(%4:Msg, u(%8:Msg, f(%3:Msg, null)))))), f(%8:Msg, g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> %2:Msg X15:Msg --> null X16:Msg --> %7:Msg X14:Msg --> g(g(%2:Msg, null), %7:Msg) X12:Msg --> %1:Msg X8:Msg --> %3:Msg X10:Msg --> %4:Msg X9:Msg --> u(%8:Msg, f(%3:Msg, null)) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #146 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, u(%6:Msg, %8:Msg)), u(%6:Msg, %7:Msg)), %2:Msg)), null), f(u(%7:Msg, %8:Msg, f(%3:Msg, u(%6:Msg, %7:Msg))), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, u(%6:Msg, %8:Msg)) X15:Msg --> u(%6:Msg, %7:Msg) X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> u(%6:Msg, %8:Msg) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #147 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, %6:Msg), u(%6:Msg, %7:Msg)), %2:Msg)), null), f(u( %7:Msg, f(%3:Msg, u(%6:Msg, %7:Msg))), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, %6:Msg) X15:Msg --> u(%6:Msg, %7:Msg) X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> %6:Msg X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #148 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, u(%6:Msg, %7:Msg)), %6:Msg), %2:Msg)), null), f(u( %7:Msg, f(%3:Msg, %6:Msg)), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, u(%6:Msg, %7:Msg)) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> u(%6:Msg, %7:Msg) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #149 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, %6:Msg), %6:Msg), %2:Msg)), null), f(f(%3:Msg, %6:Msg), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, %6:Msg) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> %6:Msg X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #150 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, u(%7:Msg, f(%3:Msg, %6:Msg))), %6:Msg), %2:Msg)), null), f(u(%6:Msg, %7:Msg), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, u(%7:Msg, f(%3:Msg, %6:Msg))) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> u(%7:Msg, f(%3:Msg, %6:Msg)) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #151 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, f(%3:Msg, %6:Msg)), %6:Msg), %2:Msg)), null), f( %6:Msg, g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, f(%3:Msg, %6:Msg)) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> f(%3:Msg, %6:Msg) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #152 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, %6:Msg), null), %2:Msg)), null), f(u(%6:Msg, f( %3:Msg, null)), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, %6:Msg) X15:Msg --> null X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> %6:Msg X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #153 rewrites: 451 Msg: g(f(u(2, g(g(g(%1:Msg, null), %6:Msg), %2:Msg)), null), f(u(%6:Msg, f( %3:Msg, %6:Msg)), g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%1:Msg, null) X15:Msg --> %6:Msg X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %1:Msg X9:Msg --> null X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #154 rewrites: 451 Msg: g(f(u(2, g(g(%1:Msg, u(%8:Msg, %9:Msg)), %2:Msg)), u(g(%3:Msg, %1:Msg), g( %4:Msg, g(%5:Msg, u(%8:Msg, %10:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))))))), f( u(%9:Msg, %10:Msg), g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %1:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%8:Msg, %10:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #155 rewrites: 451 Msg: g(f(u(2, g(g(%1:Msg, u(%8:Msg, %9:Msg)), %2:Msg)), u(g(%3:Msg, %1:Msg), g( %4:Msg, g(%5:Msg, u(%8:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))))))), f(%9:Msg, g( f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %1:Msg X15:Msg --> u(%8:Msg, %9:Msg) X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%8:Msg, f(%4:Msg, u(%8:Msg, %9:Msg))) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #156 rewrites: 451 Msg: g(f(u(2, g(g(%1:Msg, %2:Msg), %3:Msg)), u(g(%4:Msg, %1:Msg), g(%5:Msg, g( %6:Msg, u(%2:Msg, f(%5:Msg, %2:Msg)))))), f(null, g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> null X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%2:Msg, f(%5:Msg, %2:Msg)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #157 rewrites: 451 Msg: g(f(u(2, g(g(%1:Msg, %2:Msg), %3:Msg)), u(g(%4:Msg, %1:Msg), g(%5:Msg, g( %6:Msg, u(%2:Msg, %9:Msg, f(%5:Msg, %2:Msg)))))), f(%9:Msg, g(f(%7:Msg, %7:Msg), g(3, %8:Msg)))) X3:Msg --> %1:Msg X15:Msg --> %2:Msg X16:Msg --> %3:Msg X14:Msg --> null X12:Msg --> %4:Msg X8:Msg --> %5:Msg X10:Msg --> %6:Msg X9:Msg --> u(%2:Msg, %9:Msg, f(%5:Msg, %2:Msg)) X2:Msg --> %7:Msg X6:Msg --> %8:Msg Variant #158 rewrites: 451 Msg: g(f(u(2, g(g(%1:Msg, null), %2:Msg)), u(g(%3:Msg, %1:Msg), g(%4:Msg, g( %5:Msg, u(%8:Msg, f(%4:Msg, null)))))), f(%8:Msg, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> %1:Msg X15:Msg --> null X16:Msg --> %2:Msg X14:Msg --> null X12:Msg --> %3:Msg X8:Msg --> %4:Msg X10:Msg --> %5:Msg X9:Msg --> u(%8:Msg, f(%4:Msg, null)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #159 rewrites: 451 Msg: g(f(u(2, %1:Msg, g(g(g(%2:Msg, u(%7:Msg, %9:Msg, f(%4:Msg, u(%7:Msg, %8:Msg)))), u(%7:Msg, %8:Msg)), %3:Msg)), null), f(u(%8:Msg, %9:Msg), g(f( %5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, u(%7:Msg, %9:Msg, f(%4:Msg, u(%7:Msg, %8:Msg)))) X15:Msg --> u(%7:Msg, %8:Msg) X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> u(%7:Msg, %9:Msg, f(%4:Msg, u(%7:Msg, %8:Msg))) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #160 rewrites: 451 Msg: g(f(u(2, %1:Msg, g(g(g(%2:Msg, u(%7:Msg, f(%4:Msg, u(%7:Msg, %8:Msg)))), u(%7:Msg, %8:Msg)), %3:Msg)), null), f(%8:Msg, g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, u(%7:Msg, f(%4:Msg, u(%7:Msg, %8:Msg)))) X15:Msg --> u(%7:Msg, %8:Msg) X16:Msg --> %3:Msg X14:Msg --> %1:Msg X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %2:Msg X9:Msg --> u(%7:Msg, f(%4:Msg, u(%7:Msg, %8:Msg))) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #161 rewrites: 451 Msg: g(f(u(2, %1:Msg, g(g(g(%2:Msg, u(%3:Msg, f(%5:Msg, %3:Msg))), %3:Msg), %4:Msg)), null), f(null, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> g(%2:Msg, u(%3:Msg, f(%5:Msg, %3:Msg))) X15:Msg --> %3:Msg X16:Msg --> %4:Msg X14:Msg --> %1:Msg X12:Msg --> %5:Msg X8:Msg --> %5:Msg X10:Msg --> %2:Msg X9:Msg --> u(%3:Msg, f(%5:Msg, %3:Msg)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #162 rewrites: 451 Msg: g(f(u(2, %1:Msg, g(g(g(%2:Msg, u(%3:Msg, %8:Msg, f(%5:Msg, %3:Msg))), %3:Msg), %4:Msg)), null), f(%8:Msg, g(f(%6:Msg, %6:Msg), g(3, %7:Msg)))) X3:Msg --> g(%2:Msg, u(%3:Msg, %8:Msg, f(%5:Msg, %3:Msg))) X15:Msg --> %3:Msg X16:Msg --> %4:Msg X14:Msg --> %1:Msg X12:Msg --> %5:Msg X8:Msg --> %5:Msg X10:Msg --> %2:Msg X9:Msg --> u(%3:Msg, %8:Msg, f(%5:Msg, %3:Msg)) X2:Msg --> %6:Msg X6:Msg --> %7:Msg Variant #163 rewrites: 451 Msg: g(f(u(2, %1:Msg, g(g(g(%2:Msg, u(%7:Msg, f(%3:Msg, null))), null), %4:Msg)), null), f(%7:Msg, g(f(%5:Msg, %5:Msg), g(3, %6:Msg)))) X3:Msg --> g(%2:Msg, u(%7:Msg, f(%3:Msg, null))) X15:Msg --> null X16:Msg --> %4:Msg X14:Msg --> %1:Msg X12:Msg --> %3:Msg X8:Msg --> %3:Msg X10:Msg --> %2:Msg X9:Msg --> u(%7:Msg, f(%3:Msg, null)) X2:Msg --> %5:Msg X6:Msg --> %6:Msg Variant #164 rewrites: 728 Msg: g(f(null, null), f(u(#7:Msg, #8:Msg, f(#1:Msg, u(#6:Msg, #8:Msg))), g(f( #2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, u(#6:Msg, #7:Msg)) X15:Msg --> u(#6:Msg, #8:Msg) X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, u(#6:Msg, #7:Msg)), u(#6:Msg, #8:Msg)), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> u(#6:Msg, #7:Msg) X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #165 rewrites: 728 Msg: g(f(null, null), f(u(#7:Msg, f(#1:Msg, #6:Msg)), g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, u(#6:Msg, #7:Msg)) X15:Msg --> #6:Msg X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, u(#6:Msg, #7:Msg)), #6:Msg), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> u(#6:Msg, #7:Msg) X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #166 rewrites: 728 Msg: g(f(null, null), f(u(#7:Msg, f(#1:Msg, u(#6:Msg, #7:Msg))), g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, #6:Msg) X15:Msg --> u(#6:Msg, #7:Msg) X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, #6:Msg), u(#6:Msg, #7:Msg)), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> #6:Msg X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #167 rewrites: 728 Msg: g(f(null, null), f(f(#1:Msg, #6:Msg), g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, #6:Msg) X15:Msg --> #6:Msg X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, #6:Msg), #6:Msg), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> #6:Msg X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #168 rewrites: 728 Msg: g(f(null, null), f(u(#6:Msg, #7:Msg), g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, u(#6:Msg, f(#1:Msg, #7:Msg))) X15:Msg --> #7:Msg X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, u(#6:Msg, f(#1:Msg, #7:Msg))), #7:Msg), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> u(#6:Msg, f(#1:Msg, #7:Msg)) X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #169 rewrites: 728 Msg: g(f(null, null), f(#6:Msg, g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, f(#1:Msg, #6:Msg)) X15:Msg --> #6:Msg X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, f(#1:Msg, #6:Msg)), #6:Msg), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> f(#1:Msg, #6:Msg) X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #170 rewrites: 728 Msg: g(f(null, null), f(u(#6:Msg, f(#1:Msg, #6:Msg)), g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, null) X15:Msg --> #6:Msg X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, null), #6:Msg), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> null X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #171 rewrites: 728 Msg: g(f(null, null), f(u(#6:Msg, f(#1:Msg, null)), g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, #6:Msg) X15:Msg --> null X16:Msg --> #5:Msg X14:Msg --> u(2, g(g(g(#4:Msg, #6:Msg), null), #5:Msg)) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> #6:Msg X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #172 rewrites: 728 Msg: g(f(null, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#8:Msg, #10:Msg, f( #3:Msg, u(#8:Msg, #9:Msg))))))), f(u(#9:Msg, #10:Msg), g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #7:Msg X14:Msg --> u(2, g(g(#2:Msg, u(#8:Msg, #9:Msg)), #7:Msg)) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#8:Msg, #10:Msg, f(#3:Msg, u(#8:Msg, #9:Msg))) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #173 rewrites: 728 Msg: g(f(null, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#8:Msg, f(#3:Msg, u( #8:Msg, #9:Msg))))))), f(#9:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> u(#8:Msg, #9:Msg) X16:Msg --> #7:Msg X14:Msg --> u(2, g(g(#2:Msg, u(#8:Msg, #9:Msg)), #7:Msg)) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#8:Msg, f(#3:Msg, u(#8:Msg, #9:Msg))) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #174 rewrites: 728 Msg: g(f(null, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#5:Msg, f(#3:Msg, #5:Msg)))))), f(null, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #5:Msg X16:Msg --> #8:Msg X14:Msg --> u(2, g(g(#2:Msg, #5:Msg), #8:Msg)) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#5:Msg, f(#3:Msg, #5:Msg)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #175 rewrites: 728 Msg: g(f(null, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#5:Msg, #9:Msg, f( #3:Msg, #5:Msg)))))), f(#9:Msg, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #2:Msg X15:Msg --> #5:Msg X16:Msg --> #8:Msg X14:Msg --> u(2, g(g(#2:Msg, #5:Msg), #8:Msg)) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#5:Msg, #9:Msg, f(#3:Msg, #5:Msg)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #176 rewrites: 728 Msg: g(f(null, u(g(#1:Msg, #2:Msg), g(#3:Msg, g(#4:Msg, u(#8:Msg, f(#3:Msg, null)))))), f(#8:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> #2:Msg X15:Msg --> null X16:Msg --> #7:Msg X14:Msg --> u(2, g(g(#2:Msg, null), #7:Msg)) X12:Msg --> #1:Msg X8:Msg --> #3:Msg X10:Msg --> #4:Msg X9:Msg --> u(#8:Msg, f(#3:Msg, null)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #177 rewrites: 728 Msg: g(f(#1:Msg, null), f(u(#8:Msg, #9:Msg, f(#2:Msg, u(#7:Msg, #9:Msg))), g(f( #3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, u(#7:Msg, #8:Msg)) X15:Msg --> u(#7:Msg, #9:Msg) X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, u(#7:Msg, #8:Msg)), u(#7:Msg, #9:Msg)), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> u(#7:Msg, #8:Msg) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #178 rewrites: 728 Msg: g(f(#1:Msg, null), f(u(#8:Msg, f(#2:Msg, #7:Msg)), g(f(#3:Msg, #3:Msg), g( 3, #4:Msg)))) X3:Msg --> g(#5:Msg, u(#7:Msg, #8:Msg)) X15:Msg --> #7:Msg X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, u(#7:Msg, #8:Msg)), #7:Msg), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> u(#7:Msg, #8:Msg) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #179 rewrites: 728 Msg: g(f(#1:Msg, null), f(u(#8:Msg, f(#2:Msg, u(#7:Msg, #8:Msg))), g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, #7:Msg) X15:Msg --> u(#7:Msg, #8:Msg) X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, #7:Msg), u(#7:Msg, #8:Msg)), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> #7:Msg X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #180 rewrites: 728 Msg: g(f(#1:Msg, null), f(f(#2:Msg, #7:Msg), g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, #7:Msg) X15:Msg --> #7:Msg X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, #7:Msg), #7:Msg), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> #7:Msg X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #181 rewrites: 728 Msg: g(f(#1:Msg, null), f(u(#7:Msg, #8:Msg), g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, u(#7:Msg, f(#2:Msg, #8:Msg))) X15:Msg --> #8:Msg X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, u(#7:Msg, f(#2:Msg, #8:Msg))), #8:Msg), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> u(#7:Msg, f(#2:Msg, #8:Msg)) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #182 rewrites: 728 Msg: g(f(#1:Msg, null), f(#7:Msg, g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, f(#2:Msg, #7:Msg)) X15:Msg --> #7:Msg X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, f(#2:Msg, #7:Msg)), #7:Msg), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> f(#2:Msg, #7:Msg) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #183 rewrites: 728 Msg: g(f(#1:Msg, null), f(u(#7:Msg, f(#2:Msg, #7:Msg)), g(f(#3:Msg, #3:Msg), g( 3, #4:Msg)))) X3:Msg --> g(#5:Msg, null) X15:Msg --> #7:Msg X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, null), #7:Msg), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> null X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #184 rewrites: 728 Msg: g(f(#1:Msg, null), f(u(#7:Msg, f(#2:Msg, null)), g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, #7:Msg) X15:Msg --> null X16:Msg --> #6:Msg X14:Msg --> u(2, #1:Msg, g(g(g(#5:Msg, #7:Msg), null), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> #7:Msg X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #185 rewrites: 728 Msg: g(f(#1:Msg, u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#9:Msg, #11:Msg, f( #4:Msg, u(#9:Msg, #10:Msg))))))), f(u(#10:Msg, #11:Msg), g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #8:Msg X14:Msg --> u(2, #1:Msg, g(g(#3:Msg, u(#9:Msg, #10:Msg)), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#9:Msg, #11:Msg, f(#4:Msg, u(#9:Msg, #10:Msg))) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #186 rewrites: 728 Msg: g(f(#1:Msg, u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#9:Msg, f(#4:Msg, u(#9:Msg, #10:Msg))))))), f(#10:Msg, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> u(#9:Msg, #10:Msg) X16:Msg --> #8:Msg X14:Msg --> u(2, #1:Msg, g(g(#3:Msg, u(#9:Msg, #10:Msg)), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#9:Msg, f(#4:Msg, u(#9:Msg, #10:Msg))) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #187 rewrites: 728 Msg: g(f(#1:Msg, u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#6:Msg, f(#4:Msg, #6:Msg)))))), f(null, g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #3:Msg X15:Msg --> #6:Msg X16:Msg --> #9:Msg X14:Msg --> u(2, #1:Msg, g(g(#3:Msg, #6:Msg), #9:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#6:Msg, f(#4:Msg, #6:Msg)) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #188 rewrites: 728 Msg: g(f(#1:Msg, u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#6:Msg, #10:Msg, f( #4:Msg, #6:Msg)))))), f(#10:Msg, g(f(#7:Msg, #7:Msg), g(3, #8:Msg)))) X3:Msg --> #3:Msg X15:Msg --> #6:Msg X16:Msg --> #9:Msg X14:Msg --> u(2, #1:Msg, g(g(#3:Msg, #6:Msg), #9:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#6:Msg, #10:Msg, f(#4:Msg, #6:Msg)) X2:Msg --> #7:Msg X6:Msg --> #8:Msg Variant #189 rewrites: 728 Msg: g(f(#1:Msg, u(g(#2:Msg, #3:Msg), g(#4:Msg, g(#5:Msg, u(#9:Msg, f(#4:Msg, null)))))), f(#9:Msg, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> #3:Msg X15:Msg --> null X16:Msg --> #8:Msg X14:Msg --> u(2, #1:Msg, g(g(#3:Msg, null), #8:Msg)) X12:Msg --> #2:Msg X8:Msg --> #4:Msg X10:Msg --> #5:Msg X9:Msg --> u(#9:Msg, f(#4:Msg, null)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #190 rewrites: 728 Msg: g(f(u(#1:Msg, g(g(g(#2:Msg, u(#7:Msg, #9:Msg, f(#4:Msg, u(#7:Msg, #8:Msg)))), u(#7:Msg, #8:Msg)), #3:Msg)), null), f(u(#8:Msg, #9:Msg), g(f( #5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, u(#7:Msg, #9:Msg, f(#4:Msg, u(#7:Msg, #8:Msg)))) X15:Msg --> u(#7:Msg, #8:Msg) X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> u(#7:Msg, #9:Msg, f(#4:Msg, u(#7:Msg, #8:Msg))) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #191 rewrites: 728 Msg: g(f(u(#1:Msg, g(g(g(#2:Msg, u(#7:Msg, f(#4:Msg, u(#7:Msg, #8:Msg)))), u( #7:Msg, #8:Msg)), #3:Msg)), null), f(#8:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, u(#7:Msg, f(#4:Msg, u(#7:Msg, #8:Msg)))) X15:Msg --> u(#7:Msg, #8:Msg) X16:Msg --> #3:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #2:Msg X9:Msg --> u(#7:Msg, f(#4:Msg, u(#7:Msg, #8:Msg))) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #192 rewrites: 728 Msg: g(f(u(#1:Msg, g(g(g(#2:Msg, u(#3:Msg, f(#5:Msg, #3:Msg))), #3:Msg), #4:Msg)), null), f(null, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> g(#2:Msg, u(#3:Msg, f(#5:Msg, #3:Msg))) X15:Msg --> #3:Msg X16:Msg --> #4:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #5:Msg X8:Msg --> #5:Msg X10:Msg --> #2:Msg X9:Msg --> u(#3:Msg, f(#5:Msg, #3:Msg)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #193 rewrites: 728 Msg: g(f(u(#1:Msg, g(g(g(#2:Msg, u(#3:Msg, #8:Msg, f(#5:Msg, #3:Msg))), #3:Msg), #4:Msg)), null), f(#8:Msg, g(f(#6:Msg, #6:Msg), g(3, #7:Msg)))) X3:Msg --> g(#2:Msg, u(#3:Msg, #8:Msg, f(#5:Msg, #3:Msg))) X15:Msg --> #3:Msg X16:Msg --> #4:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #5:Msg X8:Msg --> #5:Msg X10:Msg --> #2:Msg X9:Msg --> u(#3:Msg, #8:Msg, f(#5:Msg, #3:Msg)) X2:Msg --> #6:Msg X6:Msg --> #7:Msg Variant #194 rewrites: 728 Msg: g(f(u(#1:Msg, g(g(g(#2:Msg, u(#7:Msg, f(#3:Msg, null))), null), #4:Msg)), null), f(#7:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#2:Msg, u(#7:Msg, f(#3:Msg, null))) X15:Msg --> null X16:Msg --> #4:Msg X14:Msg --> u(2, #1:Msg) X12:Msg --> #3:Msg X8:Msg --> #3:Msg X10:Msg --> #2:Msg X9:Msg --> u(#7:Msg, f(#3:Msg, null)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #195 rewrites: 728 Msg: g(f(g(g(g(#1:Msg, u(#6:Msg, #8:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))), u( #6:Msg, #7:Msg)), #2:Msg), null), f(u(#7:Msg, #8:Msg), g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#1:Msg, u(#6:Msg, #8:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))) X15:Msg --> u(#6:Msg, #7:Msg) X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #3:Msg X10:Msg --> #1:Msg X9:Msg --> u(#6:Msg, #8:Msg, f(#3:Msg, u(#6:Msg, #7:Msg))) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #196 rewrites: 728 Msg: g(f(g(g(g(#1:Msg, u(#6:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))), u(#6:Msg, #7:Msg)), #2:Msg), null), f(#7:Msg, g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#1:Msg, u(#6:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))) X15:Msg --> u(#6:Msg, #7:Msg) X16:Msg --> #2:Msg X14:Msg --> 2 X12:Msg --> #3:Msg X8:Msg --> #3:Msg X10:Msg --> #1:Msg X9:Msg --> u(#6:Msg, f(#3:Msg, u(#6:Msg, #7:Msg))) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #197 rewrites: 728 Msg: g(f(g(g(g(#1:Msg, u(#2:Msg, f(#4:Msg, #2:Msg))), #2:Msg), #3:Msg), null), f(null, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#1:Msg, u(#2:Msg, f(#4:Msg, #2:Msg))) X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> 2 X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #1:Msg X9:Msg --> u(#2:Msg, f(#4:Msg, #2:Msg)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #198 rewrites: 728 Msg: g(f(g(g(g(#1:Msg, u(#2:Msg, #7:Msg, f(#4:Msg, #2:Msg))), #2:Msg), #3:Msg), null), f(#7:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#1:Msg, u(#2:Msg, #7:Msg, f(#4:Msg, #2:Msg))) X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> 2 X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #1:Msg X9:Msg --> u(#2:Msg, #7:Msg, f(#4:Msg, #2:Msg)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #199 rewrites: 728 Msg: g(f(g(g(g(#1:Msg, u(#6:Msg, f(#2:Msg, null))), null), #3:Msg), null), f( #6:Msg, g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#1:Msg, u(#6:Msg, f(#2:Msg, null))) X15:Msg --> null X16:Msg --> #3:Msg X14:Msg --> 2 X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #1:Msg X9:Msg --> u(#6:Msg, f(#2:Msg, null)) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #200 rewrites: 728 Msg: g(f(u(2, #1:Msg), null), f(u(#8:Msg, #9:Msg), g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, u(#7:Msg, #9:Msg, f(#2:Msg, u(#7:Msg, #8:Msg)))) X15:Msg --> u(#7:Msg, #8:Msg) X16:Msg --> #6:Msg X14:Msg --> u(#1:Msg, g(g(g(#5:Msg, u(#7:Msg, #9:Msg, f(#2:Msg, u(#7:Msg, #8:Msg)))), u(#7:Msg, #8:Msg)), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> u(#7:Msg, #9:Msg, f(#2:Msg, u(#7:Msg, #8:Msg))) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #201 rewrites: 728 Msg: g(f(u(2, #1:Msg), null), f(#8:Msg, g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, u(#7:Msg, f(#2:Msg, u(#7:Msg, #8:Msg)))) X15:Msg --> u(#7:Msg, #8:Msg) X16:Msg --> #6:Msg X14:Msg --> u(#1:Msg, g(g(g(#5:Msg, u(#7:Msg, f(#2:Msg, u(#7:Msg, #8:Msg)))), u(#7:Msg, #8:Msg)), #6:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #5:Msg X9:Msg --> u(#7:Msg, f(#2:Msg, u(#7:Msg, #8:Msg))) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #202 rewrites: 728 Msg: g(f(u(2, #1:Msg), null), f(null, g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#6:Msg, u(#3:Msg, f(#2:Msg, #3:Msg))) X15:Msg --> #3:Msg X16:Msg --> #7:Msg X14:Msg --> u(#1:Msg, g(g(g(#6:Msg, u(#3:Msg, f(#2:Msg, #3:Msg))), #3:Msg), #7:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #6:Msg X9:Msg --> u(#3:Msg, f(#2:Msg, #3:Msg)) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #203 rewrites: 728 Msg: g(f(u(2, #1:Msg), null), f(#8:Msg, g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#6:Msg, u(#3:Msg, #8:Msg, f(#2:Msg, #3:Msg))) X15:Msg --> #3:Msg X16:Msg --> #7:Msg X14:Msg --> u(#1:Msg, g(g(g(#6:Msg, u(#3:Msg, #8:Msg, f(#2:Msg, #3:Msg))), #3:Msg), #7:Msg)) X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #6:Msg X9:Msg --> u(#3:Msg, #8:Msg, f(#2:Msg, #3:Msg)) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #204 rewrites: 728 Msg: g(f(u(2, #1:Msg), null), f(#7:Msg, g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, u(#7:Msg, f(#5:Msg, null))) X15:Msg --> null X16:Msg --> #6:Msg X14:Msg --> u(#1:Msg, g(g(g(#4:Msg, u(#7:Msg, f(#5:Msg, null))), null), #6:Msg)) X12:Msg --> #5:Msg X8:Msg --> #5:Msg X10:Msg --> #4:Msg X9:Msg --> u(#7:Msg, f(#5:Msg, null)) X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #205 rewrites: 728 Msg: g(f(2, null), f(u(#7:Msg, #8:Msg), g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, u(#6:Msg, #8:Msg, f(#1:Msg, u(#6:Msg, #7:Msg)))) X15:Msg --> u(#6:Msg, #7:Msg) X16:Msg --> #5:Msg X14:Msg --> g(g(g(#4:Msg, u(#6:Msg, #8:Msg, f(#1:Msg, u(#6:Msg, #7:Msg)))), u( #6:Msg, #7:Msg)), #5:Msg) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> u(#6:Msg, #8:Msg, f(#1:Msg, u(#6:Msg, #7:Msg))) X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #206 rewrites: 728 Msg: g(f(2, null), f(#7:Msg, g(f(#2:Msg, #2:Msg), g(3, #3:Msg)))) X3:Msg --> g(#4:Msg, u(#6:Msg, f(#1:Msg, u(#6:Msg, #7:Msg)))) X15:Msg --> u(#6:Msg, #7:Msg) X16:Msg --> #5:Msg X14:Msg --> g(g(g(#4:Msg, u(#6:Msg, f(#1:Msg, u(#6:Msg, #7:Msg)))), u(#6:Msg, #7:Msg)), #5:Msg) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #4:Msg X9:Msg --> u(#6:Msg, f(#1:Msg, u(#6:Msg, #7:Msg))) X2:Msg --> #2:Msg X6:Msg --> #3:Msg Variant #207 rewrites: 728 Msg: g(f(2, null), f(null, g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, u(#2:Msg, f(#1:Msg, #2:Msg))) X15:Msg --> #2:Msg X16:Msg --> #6:Msg X14:Msg --> g(g(g(#5:Msg, u(#2:Msg, f(#1:Msg, #2:Msg))), #2:Msg), #6:Msg) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #5:Msg X9:Msg --> u(#2:Msg, f(#1:Msg, #2:Msg)) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #208 rewrites: 728 Msg: g(f(2, null), f(#7:Msg, g(f(#3:Msg, #3:Msg), g(3, #4:Msg)))) X3:Msg --> g(#5:Msg, u(#2:Msg, #7:Msg, f(#1:Msg, #2:Msg))) X15:Msg --> #2:Msg X16:Msg --> #6:Msg X14:Msg --> g(g(g(#5:Msg, u(#2:Msg, #7:Msg, f(#1:Msg, #2:Msg))), #2:Msg), #6:Msg) X12:Msg --> #1:Msg X8:Msg --> #1:Msg X10:Msg --> #5:Msg X9:Msg --> u(#2:Msg, #7:Msg, f(#1:Msg, #2:Msg)) X2:Msg --> #3:Msg X6:Msg --> #4:Msg Variant #209 rewrites: 728 Msg: g(f(2, null), f(#6:Msg, g(f(#1:Msg, #1:Msg), g(3, #2:Msg)))) X3:Msg --> g(#3:Msg, u(#6:Msg, f(#4:Msg, null))) X15:Msg --> null X16:Msg --> #5:Msg X14:Msg --> g(g(g(#3:Msg, u(#6:Msg, f(#4:Msg, null))), null), #5:Msg) X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #3:Msg X9:Msg --> u(#6:Msg, f(#4:Msg, null)) X2:Msg --> #1:Msg X6:Msg --> #2:Msg Variant #210 rewrites: 728 Msg: g(f(u(2, g(g(g(#1:Msg, u(#6:Msg, #8:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))), u(#6:Msg, #7:Msg)), #2:Msg)), null), f(u(#7:Msg, #8:Msg), g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#1:Msg, u(#6:Msg, #8:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))) X15:Msg --> u(#6:Msg, #7:Msg) X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #3:Msg X10:Msg --> #1:Msg X9:Msg --> u(#6:Msg, #8:Msg, f(#3:Msg, u(#6:Msg, #7:Msg))) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #211 rewrites: 728 Msg: g(f(u(2, g(g(g(#1:Msg, u(#6:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))), u(#6:Msg, #7:Msg)), #2:Msg)), null), f(#7:Msg, g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#1:Msg, u(#6:Msg, f(#3:Msg, u(#6:Msg, #7:Msg)))) X15:Msg --> u(#6:Msg, #7:Msg) X16:Msg --> #2:Msg X14:Msg --> null X12:Msg --> #3:Msg X8:Msg --> #3:Msg X10:Msg --> #1:Msg X9:Msg --> u(#6:Msg, f(#3:Msg, u(#6:Msg, #7:Msg))) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #212 rewrites: 728 Msg: g(f(u(2, g(g(g(#1:Msg, u(#2:Msg, f(#4:Msg, #2:Msg))), #2:Msg), #3:Msg)), null), f(null, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#1:Msg, u(#2:Msg, f(#4:Msg, #2:Msg))) X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> null X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #1:Msg X9:Msg --> u(#2:Msg, f(#4:Msg, #2:Msg)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #213 rewrites: 728 Msg: g(f(u(2, g(g(g(#1:Msg, u(#2:Msg, #7:Msg, f(#4:Msg, #2:Msg))), #2:Msg), #3:Msg)), null), f(#7:Msg, g(f(#5:Msg, #5:Msg), g(3, #6:Msg)))) X3:Msg --> g(#1:Msg, u(#2:Msg, #7:Msg, f(#4:Msg, #2:Msg))) X15:Msg --> #2:Msg X16:Msg --> #3:Msg X14:Msg --> null X12:Msg --> #4:Msg X8:Msg --> #4:Msg X10:Msg --> #1:Msg X9:Msg --> u(#2:Msg, #7:Msg, f(#4:Msg, #2:Msg)) X2:Msg --> #5:Msg X6:Msg --> #6:Msg Variant #214 rewrites: 728 Msg: g(f(u(2, g(g(g(#1:Msg, u(#6:Msg, f(#2:Msg, null))), null), #3:Msg)), null), f(#6:Msg, g(f(#4:Msg, #4:Msg), g(3, #5:Msg)))) X3:Msg --> g(#1:Msg, u(#6:Msg, f(#2:Msg, null))) X15:Msg --> null X16:Msg --> #3:Msg X14:Msg --> null X12:Msg --> #2:Msg X8:Msg --> #2:Msg X10:Msg --> #1:Msg X9:Msg --> u(#6:Msg, f(#2:Msg, null)) X2:Msg --> #4:Msg X6:Msg --> #5:Msg Variant #215 rewrites: 820 Msg: g(f(null, null), f(u(%7:Msg, %8:Msg), g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, u(%6:Msg, %8:Msg, f(%1:Msg, u(%6:Msg, %7:Msg)))) X15:Msg --> u(%6:Msg, %7:Msg) X16:Msg --> %5:Msg X14:Msg --> u(2, g(g(g(%4:Msg, u(%6:Msg, %8:Msg, f(%1:Msg, u(%6:Msg, %7:Msg)))), u(%6:Msg, %7:Msg)), %5:Msg)) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> u(%6:Msg, %8:Msg, f(%1:Msg, u(%6:Msg, %7:Msg))) X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #216 rewrites: 820 Msg: g(f(null, null), f(%7:Msg, g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, u(%6:Msg, f(%1:Msg, u(%6:Msg, %7:Msg)))) X15:Msg --> u(%6:Msg, %7:Msg) X16:Msg --> %5:Msg X14:Msg --> u(2, g(g(g(%4:Msg, u(%6:Msg, f(%1:Msg, u(%6:Msg, %7:Msg)))), u( %6:Msg, %7:Msg)), %5:Msg)) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %4:Msg X9:Msg --> u(%6:Msg, f(%1:Msg, u(%6:Msg, %7:Msg))) X2:Msg --> %2:Msg X6:Msg --> %3:Msg Variant #217 rewrites: 820 Msg: g(f(null, null), f(null, g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, u(%2:Msg, f(%1:Msg, %2:Msg))) X15:Msg --> %2:Msg X16:Msg --> %6:Msg X14:Msg --> u(2, g(g(g(%5:Msg, u(%2:Msg, f(%1:Msg, %2:Msg))), %2:Msg), %6:Msg)) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %5:Msg X9:Msg --> u(%2:Msg, f(%1:Msg, %2:Msg)) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #218 rewrites: 820 Msg: g(f(null, null), f(%7:Msg, g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, u(%2:Msg, %7:Msg, f(%1:Msg, %2:Msg))) X15:Msg --> %2:Msg X16:Msg --> %6:Msg X14:Msg --> u(2, g(g(g(%5:Msg, u(%2:Msg, %7:Msg, f(%1:Msg, %2:Msg))), %2:Msg), %6:Msg)) X12:Msg --> %1:Msg X8:Msg --> %1:Msg X10:Msg --> %5:Msg X9:Msg --> u(%2:Msg, %7:Msg, f(%1:Msg, %2:Msg)) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #219 rewrites: 820 Msg: g(f(null, null), f(%6:Msg, g(f(%1:Msg, %1:Msg), g(3, %2:Msg)))) X3:Msg --> g(%3:Msg, u(%6:Msg, f(%4:Msg, null))) X15:Msg --> null X16:Msg --> %5:Msg X14:Msg --> u(2, g(g(g(%3:Msg, u(%6:Msg, f(%4:Msg, null))), null), %5:Msg)) X12:Msg --> %4:Msg X8:Msg --> %4:Msg X10:Msg --> %3:Msg X9:Msg --> u(%6:Msg, f(%4:Msg, null)) X2:Msg --> %1:Msg X6:Msg --> %2:Msg Variant #220 rewrites: 820 Msg: g(f(%1:Msg, null), f(u(%8:Msg, %9:Msg), g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, u(%7:Msg, %9:Msg, f(%2:Msg, u(%7:Msg, %8:Msg)))) X15:Msg --> u(%7:Msg, %8:Msg) X16:Msg --> %6:Msg X14:Msg --> u(2, %1:Msg, g(g(g(%5:Msg, u(%7:Msg, %9:Msg, f(%2:Msg, u(%7:Msg, %8:Msg)))), u(%7:Msg, %8:Msg)), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> u(%7:Msg, %9:Msg, f(%2:Msg, u(%7:Msg, %8:Msg))) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #221 rewrites: 820 Msg: g(f(%1:Msg, null), f(%8:Msg, g(f(%3:Msg, %3:Msg), g(3, %4:Msg)))) X3:Msg --> g(%5:Msg, u(%7:Msg, f(%2:Msg, u(%7:Msg, %8:Msg)))) X15:Msg --> u(%7:Msg, %8:Msg) X16:Msg --> %6:Msg X14:Msg --> u(2, %1:Msg, g(g(g(%5:Msg, u(%7:Msg, f(%2:Msg, u(%7:Msg, %8:Msg)))), u(%7:Msg, %8:Msg)), %6:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %5:Msg X9:Msg --> u(%7:Msg, f(%2:Msg, u(%7:Msg, %8:Msg))) X2:Msg --> %3:Msg X6:Msg --> %4:Msg Variant #222 rewrites: 820 Msg: g(f(%1:Msg, null), f(null, g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%6:Msg, u(%3:Msg, f(%2:Msg, %3:Msg))) X15:Msg --> %3:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, %1:Msg, g(g(g(%6:Msg, u(%3:Msg, f(%2:Msg, %3:Msg))), %3:Msg), %7:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %6:Msg X9:Msg --> u(%3:Msg, f(%2:Msg, %3:Msg)) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #223 rewrites: 820 Msg: g(f(%1:Msg, null), f(%8:Msg, g(f(%4:Msg, %4:Msg), g(3, %5:Msg)))) X3:Msg --> g(%6:Msg, u(%3:Msg, %8:Msg, f(%2:Msg, %3:Msg))) X15:Msg --> %3:Msg X16:Msg --> %7:Msg X14:Msg --> u(2, %1:Msg, g(g(g(%6:Msg, u(%3:Msg, %8:Msg, f(%2:Msg, %3:Msg))), %3:Msg), %7:Msg)) X12:Msg --> %2:Msg X8:Msg --> %2:Msg X10:Msg --> %6:Msg X9:Msg --> u(%3:Msg, %8:Msg, f(%2:Msg, %3:Msg)) X2:Msg --> %4:Msg X6:Msg --> %5:Msg Variant #224 rewrites: 820 Msg: g(f(%1:Msg, null), f(%7:Msg, g(f(%2:Msg, %2:Msg), g(3, %3:Msg)))) X3:Msg --> g(%4:Msg, u(%7:Msg, f(%5:Msg, null))) X15:Msg --> null X16:Msg --> %6:Msg X14:Msg --> u(2, %1:Msg, g(g(g(%4:Msg, u(%7:Msg, f(%5:Msg, null))), null), %6:Msg)) X12:Msg --> %5:Msg X8:Msg --> %5:Msg X10:Msg --> %4:Msg X9:Msg --> u(%7:Msg, f(%5:Msg, null)) X2:Msg --> %2:Msg X6:Msg --> %3:Msg No more variants. rewrites: 828 ========================================== get variants in XOR : cst1 + X . Variant #1 rewrites: 0 XOR: cst1 + #1:XOR X --> #1:XOR Variant #2 rewrites: 3 Elem: cst1 X --> 0 Variant #3 rewrites: 3 XOR: 0 X --> cst1 Variant #4 rewrites: 3 XOR: %1:XOR X --> cst1 + %1:XOR No more variants. rewrites: 3 ========================================== get variants in XOR : cst2 + X . Variant #1 rewrites: 0 XOR: cst2 + #1:XOR X --> #1:XOR Variant #2 rewrites: 3 Elem: cst2 X --> 0 Variant #3 rewrites: 3 XOR: 0 X --> cst2 Variant #4 rewrites: 3 XOR: %1:XOR X --> cst2 + %1:XOR No more variants. rewrites: 3 ========================================== get variants in XOR : cst2 + X such that X + a irreducible . Variant #1 rewrites: 0 XOR: cst2 + #1:XOR X --> #1:XOR Variant #2 rewrites: 2 XOR: 0 X --> cst2 Variant #3 rewrites: 2 XOR: %1:XOR X --> cst2 + %1:XOR No more variants. rewrites: 2 ========================================== get variants in XOR : X + cst1 + Y . Variant #1 rewrites: 0 XOR: cst1 + #1:XOR + #2:XOR X --> #1:XOR Y --> #2:XOR Variant #2 rewrites: 10 XOR: cst1 + %1:XOR X --> 0 Y --> %1:XOR Variant #3 rewrites: 10 XOR: cst1 + %1:XOR X --> %1:XOR Y --> 0 Variant #4 rewrites: 10 XOR: %1:XOR + %2:XOR X --> cst1 + %1:XOR Y --> %2:XOR Variant #5 rewrites: 10 XOR: %1:XOR X --> cst1 Y --> %1:XOR Variant #6 rewrites: 10 XOR: %1:XOR + %2:XOR X --> %1:XOR Y --> cst1 + %2:XOR Variant #7 rewrites: 10 XOR: %1:XOR X --> %1:XOR Y --> cst1 Variant #8 rewrites: 10 XOR: cst1 + %2:XOR + %3:XOR X --> %1:XOR + %2:XOR Y --> %1:XOR + %3:XOR Variant #9 rewrites: 10 XOR: cst1 + %2:XOR X --> %1:XOR + %2:XOR Y --> %1:XOR Variant #10 rewrites: 10 XOR: cst1 + %2:XOR X --> %1:XOR Y --> %1:XOR + %2:XOR Variant #11 rewrites: 10 Elem: cst1 X --> %1:XOR Y --> %1:XOR Variant #12 rewrites: 38 XOR: #1:XOR X --> 0 Y --> cst1 + #1:XOR Variant #13 rewrites: 38 XOR: #1:XOR X --> cst1 + #1:XOR Y --> 0 Variant #14 rewrites: 38 XOR: 0 X --> cst1 + #1:XOR Y --> #1:XOR Variant #15 rewrites: 38 XOR: #2:XOR + #3:XOR X --> cst1 + #1:XOR + #2:XOR Y --> #1:XOR + #3:XOR Variant #16 rewrites: 38 XOR: #2:XOR X --> cst1 + #1:XOR + #2:XOR Y --> #1:XOR Variant #17 rewrites: 38 XOR: #2:XOR X --> cst1 + #1:XOR Y --> #1:XOR + #2:XOR Variant #18 rewrites: 38 XOR: 0 X --> #1:XOR Y --> cst1 + #1:XOR Variant #19 rewrites: 38 XOR: #2:XOR + #3:XOR X --> #1:XOR + #2:XOR Y --> cst1 + #1:XOR + #3:XOR Variant #20 rewrites: 38 XOR: #2:XOR X --> #1:XOR + #2:XOR Y --> cst1 + #1:XOR Variant #21 rewrites: 38 XOR: #2:XOR X --> #1:XOR Y --> cst1 + #1:XOR + #2:XOR No more variants. rewrites: 46 ========================================== get variants in XOR : X + cst1 + Y such that X + cst1, X + cst2 irreducible . Variant #1 rewrites: 0 XOR: cst1 + #1:XOR + #2:XOR X --> #1:XOR Y --> #2:XOR Variant #2 rewrites: 7 XOR: cst1 + %1:XOR X --> %1:XOR Y --> 0 Variant #3 rewrites: 7 XOR: %1:XOR + %2:XOR X --> %1:XOR Y --> cst1 + %2:XOR Variant #4 rewrites: 7 XOR: %1:XOR X --> %1:XOR Y --> cst1 Variant #5 rewrites: 7 XOR: cst1 + %2:XOR + %3:XOR X --> %1:XOR + %2:XOR Y --> %1:XOR + %3:XOR Variant #6 rewrites: 7 XOR: cst1 + %2:XOR X --> %1:XOR + %2:XOR Y --> %1:XOR Variant #7 rewrites: 7 XOR: cst1 + %2:XOR X --> %1:XOR Y --> %1:XOR + %2:XOR Variant #8 rewrites: 7 Elem: cst1 X --> %1:XOR Y --> %1:XOR Variant #9 rewrites: 19 XOR: 0 X --> #1:XOR Y --> cst1 + #1:XOR Variant #10 rewrites: 19 XOR: #2:XOR + #3:XOR X --> #1:XOR + #2:XOR Y --> cst1 + #1:XOR + #3:XOR Variant #11 rewrites: 19 XOR: #2:XOR X --> #1:XOR + #2:XOR Y --> cst1 + #1:XOR Variant #12 rewrites: 19 XOR: #2:XOR X --> #1:XOR Y --> cst1 + #1:XOR + #2:XOR No more variants. rewrites: 23 Maude> Bye. Maude-2.7/tests/Misc/attributes.maude0000644000147300135640000000164411064251067014615 00000000000000set show timing off . mod ATTRIBUTES is sorts Foo Bar . subsort Foo < Bar . ops a b c : -> Foo . op f : Foo Foo -> Foo [metadata "binary op"] . op f : Bar Bar -> Bar [ditto] . ops g h : Foo -> Bar [metadata "unary op"] . var X : Foo . var Y : Bar . eq a = b [metadata "definition"] . eq f(X, X) = g(X) [print "X = " X] . eq f(g(X), X) = c [label collapse metadata "collapse" print "X = " X] . eq g(X) = f(X, X) [label rev nonexec metadata "rev"] . mb g(g(X)) : Foo [metadata "down sort" label downSort print "sort became Foo"] . cmb Y : Foo if f(Y, a) = f(a, Y) [nonexec] . rl f(X, X) => f(g(X), g(X)) [label expand nonexec] . rl h(h(X)) => f(c, X) [metadata "step" label tick print "step X = " X:Foo] . endm show all . red f(c, c) . set print attr on . red f(c, c) . red f(g(c), c) . set print attr newline off . red f(g(c), c) . set print attr newline on . red g(g(c)) . rew h(h(b)) . Maude-2.7/tests/Misc/CU_Unification.maude0000644000147300135640000000230012117477771015270 00000000000000set show timing off . *** Ul theory fmod FOO is sort Foo . op f : Foo Foo -> Foo [left id: 1f] . op 1f : -> Foo . vars U V W X Y Z : Foo . endfm unify f(X, Y) =? f(U, V) . variant unify f(X, Y) =? f(U, V) . unify f(X, Y) =? X . variant unify f(X, Y) =? X . unify f(X, Y) =? Y . variant unify f(X, Y) =? Y . *** Ur theory fmod FOO2 is sort Foo . op f : Foo Foo -> Foo [right id: 1f] . op 1f : -> Foo . vars U V W X Y Z : Foo . endfm unify f(X, Y) =? f(U, V) . variant unify f(X, Y) =? f(U, V) . unify f(X, Y) =? X . variant unify f(X, Y) =? X . unify f(X, Y) =? Y . variant unify f(X, Y) =? Y . *** U theory fmod FOO3 is sort Foo . op f : Foo Foo -> Foo [id: 1f] . op 1f : -> Foo . vars U V W X Y Z : Foo . endfm unify f(X, Y) =? f(U, V) . variant unify f(X, Y) =? f(U, V) . unify f(X, Y) =? X . variant unify f(X, Y) =? X . unify f(X, Y) =? Y . variant unify f(X, Y) =? Y . *** CU theory fmod FOO4 is sort Foo . op f : Foo Foo -> Foo [comm id: 1f] . op 1f : -> Foo . vars U V W X Y Z : Foo . endfm unify f(X, Y) =? f(U, V) . variant unify f(X, Y) =? f(U, V) . unify f(X, Y) =? X . variant unify f(X, Y) =? X . unify f(X, Y) =? Y . variant unify f(X, Y) =? Y . Maude-2.7/tests/Misc/variantNarrowing0000755000147300135640000000037412006104637014667 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/variantNarrowing.maude -no-banner -no-advise \ > variantNarrowing.out 2>&1 diff $srcdir/variantNarrowing.expected variantNarrowing.out > /dev/null 2>&1 Maude-2.7/tests/Misc/unification.expected0000644000147300135640000032244512117457041015452 00000000000000Maude> ========================================== unify in TEST : f(X:Nat, Y:Nat) ^ B:NzNat =? A:NzNat ^ f(Y:Nat, Z:Nat) . Solution 1 X:Nat --> #1:Nat Y:Nat --> #2:NzNat B:NzNat --> f(#2:NzNat, #3:Nat) A:NzNat --> f(#1:Nat, #2:NzNat) Z:Nat --> #3:Nat Solution 2 X:Nat --> #1:NzNat Y:Nat --> #2:Nat B:NzNat --> f(#2:Nat, #3:NzNat) A:NzNat --> f(#1:NzNat, #2:Nat) Z:Nat --> #3:NzNat ========================================== unify [100] in NAT : X:Nat + X:Nat + Y:Nat =? A:Nat + B:Nat + C:Nat . Solution 1 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat + #8:Nat Y:Nat --> #4:Nat + #7:Nat + #9:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat + #7:Nat C:Nat --> #3:Nat + #6:Nat + #8:Nat + #8:Nat + #9:Nat Solution 2 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat + #8:Nat Y:Nat --> #4:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat + #7:Nat C:Nat --> #3:Nat + #6:Nat + #8:Nat + #8:Nat Solution 3 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat + #7:Nat + #8:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat + #7:Nat C:Nat --> #3:Nat + #6:Nat + #8:Nat Solution 4 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat + #7:Nat C:Nat --> #3:Nat + #6:Nat Solution 5 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat + #7:Nat Y:Nat --> #4:Nat + #8:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #6:Nat + #7:Nat + #7:Nat + #8:Nat Solution 6 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat + #7:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #6:Nat + #7:Nat + #7:Nat Solution 7 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #6:Nat + #7:Nat Solution 8 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #6:Nat Solution 9 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #7:Nat Y:Nat --> #4:Nat + #6:Nat + #8:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #7:Nat + #7:Nat + #8:Nat Solution 10 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #7:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #7:Nat + #7:Nat Solution 11 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #7:Nat Solution 12 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat Solution 13 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat + #6:Nat + #7:Nat Solution 14 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat + #6:Nat Solution 15 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat Solution 16 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #5:Nat C:Nat --> #3:Nat Solution 17 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #7:Nat Y:Nat --> #4:Nat + #6:Nat + #8:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat + #7:Nat + #7:Nat + #8:Nat Solution 18 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #7:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat + #7:Nat + #7:Nat Solution 19 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat + #7:Nat Solution 20 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat Solution 21 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat + #5:Nat + #6:Nat + #6:Nat + #7:Nat Solution 22 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat + #6:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat + #5:Nat + #6:Nat + #6:Nat Solution 23 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat + #5:Nat + #6:Nat Solution 24 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat + #5:Nat Solution 25 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #6:Nat Y:Nat --> #4:Nat + #5:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat + #6:Nat + #7:Nat Solution 26 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #6:Nat Y:Nat --> #4:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat + #6:Nat Solution 27 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat + #5:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat Solution 28 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat + #5:Nat C:Nat --> #3:Nat Solution 29 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat C:Nat --> #3:Nat + #5:Nat + #5:Nat + #6:Nat Solution 30 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat C:Nat --> #3:Nat + #5:Nat + #5:Nat Solution 31 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat C:Nat --> #3:Nat + #5:Nat Solution 32 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat + #4:Nat B:Nat --> #2:Nat C:Nat --> #3:Nat Solution 33 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat + #7:Nat Y:Nat --> #6:Nat + #8:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat + #7:Nat + #7:Nat + #8:Nat Solution 34 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat + #7:Nat Y:Nat --> #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat + #7:Nat + #7:Nat Solution 35 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat Y:Nat --> #6:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat + #7:Nat Solution 36 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat Y:Nat --> #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #3:Nat + #5:Nat Solution 37 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat + #6:Nat Y:Nat --> #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #5:Nat + #6:Nat + #6:Nat + #7:Nat Solution 38 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat Y:Nat --> #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #5:Nat + #6:Nat Solution 39 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #6:Nat Y:Nat --> #5:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat + #6:Nat + #7:Nat Solution 40 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #6:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat + #6:Nat Solution 41 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #6:Nat Solution 42 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat Solution 43 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat Y:Nat --> #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat + #5:Nat + #6:Nat Solution 44 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat Solution 45 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #6:Nat Y:Nat --> #5:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #4:Nat + #6:Nat + #6:Nat + #7:Nat Solution 46 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #6:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #4:Nat + #6:Nat + #6:Nat Solution 47 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #4:Nat + #6:Nat Solution 48 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #3:Nat + #4:Nat Solution 49 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat Y:Nat --> #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #3:Nat + #4:Nat + #5:Nat + #5:Nat + #6:Nat Solution 50 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #3:Nat + #4:Nat + #5:Nat Solution 51 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat + #5:Nat + #6:Nat Solution 52 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat + #5:Nat Solution 53 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat Solution 54 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #3:Nat Solution 55 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat C:Nat --> #3:Nat + #4:Nat + #4:Nat + #5:Nat Solution 56 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat C:Nat --> #3:Nat + #4:Nat Solution 57 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat + #7:Nat Y:Nat --> #3:Nat + #6:Nat + #8:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #5:Nat + #7:Nat + #7:Nat + #8:Nat Solution 58 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat + #7:Nat Y:Nat --> #3:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #5:Nat + #7:Nat + #7:Nat Solution 59 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat + #6:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #5:Nat + #7:Nat Solution 60 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat + #6:Nat C:Nat --> #5:Nat Solution 61 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat + #6:Nat Y:Nat --> #3:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #5:Nat + #6:Nat + #6:Nat + #7:Nat Solution 62 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat + #6:Nat Y:Nat --> #3:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #5:Nat + #6:Nat + #6:Nat Solution 63 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #5:Nat + #6:Nat Solution 64 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #5:Nat Solution 65 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #6:Nat Y:Nat --> #3:Nat + #5:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #6:Nat + #6:Nat + #7:Nat Solution 66 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #6:Nat Y:Nat --> #3:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #6:Nat + #6:Nat Solution 67 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat + #5:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat + #5:Nat C:Nat --> #6:Nat Solution 68 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat C:Nat --> #5:Nat + #5:Nat + #6:Nat Solution 69 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat C:Nat --> #5:Nat + #5:Nat Solution 70 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #4:Nat C:Nat --> #5:Nat Solution 71 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #6:Nat Y:Nat --> #3:Nat + #5:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat + #6:Nat + #6:Nat + #7:Nat Solution 72 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #6:Nat Y:Nat --> #3:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat + #6:Nat + #6:Nat Solution 73 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat + #5:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat + #6:Nat Solution 74 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat Solution 75 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #4:Nat + #5:Nat + #5:Nat + #6:Nat Solution 76 X:Nat --> #1:Nat + #2:Nat + #4:Nat + #5:Nat Y:Nat --> #3:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #4:Nat + #5:Nat + #5:Nat Solution 77 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #4:Nat + #5:Nat Solution 78 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #4:Nat Solution 79 X:Nat --> #1:Nat + #2:Nat + #5:Nat Y:Nat --> #3:Nat + #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #5:Nat + #5:Nat + #6:Nat Solution 80 X:Nat --> #1:Nat + #2:Nat + #5:Nat Y:Nat --> #3:Nat + #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #5:Nat + #5:Nat Solution 81 X:Nat --> #1:Nat + #2:Nat Y:Nat --> #3:Nat + #4:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat + #4:Nat C:Nat --> #5:Nat Solution 82 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat C:Nat --> #4:Nat + #4:Nat + #5:Nat Solution 83 X:Nat --> #1:Nat + #2:Nat + #4:Nat Y:Nat --> #3:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat C:Nat --> #4:Nat + #4:Nat Solution 84 X:Nat --> #1:Nat + #2:Nat Y:Nat --> #3:Nat + #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat + #3:Nat B:Nat --> #2:Nat C:Nat --> #4:Nat Solution 85 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #6:Nat Y:Nat --> #5:Nat + #7:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat + #6:Nat + #6:Nat + #7:Nat Solution 86 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #6:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat + #6:Nat + #6:Nat Solution 87 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat + #6:Nat Solution 88 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat + #5:Nat C:Nat --> #4:Nat Solution 89 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat + #5:Nat Y:Nat --> #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat C:Nat --> #4:Nat + #5:Nat + #5:Nat + #6:Nat Solution 90 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat C:Nat --> #4:Nat + #5:Nat Solution 91 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat C:Nat --> #5:Nat + #5:Nat + #6:Nat Solution 92 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat C:Nat --> #5:Nat + #5:Nat Solution 93 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat + #4:Nat C:Nat --> #5:Nat Solution 94 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat C:Nat --> #4:Nat + #4:Nat + #5:Nat Solution 95 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #3:Nat C:Nat --> #4:Nat Solution 96 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat + #6:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat + #5:Nat + #6:Nat Solution 97 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #5:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat + #5:Nat Solution 98 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat + #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #4:Nat C:Nat --> #3:Nat + #5:Nat Solution 99 X:Nat --> #1:Nat + #2:Nat + #3:Nat Y:Nat --> #4:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat + #4:Nat C:Nat --> #3:Nat Solution 100 X:Nat --> #1:Nat + #2:Nat + #3:Nat + #4:Nat Y:Nat --> #5:Nat A:Nat --> #1:Nat + #1:Nat + #2:Nat B:Nat --> #2:Nat + #3:Nat C:Nat --> #3:Nat + #4:Nat + #4:Nat + #5:Nat ========================================== unify in CONVERSION : X:String < "foo" + Y:Char =? Z:String + string(pi) < "foo" + Z:String . Solution 1 X:String --> #1:Char + string(pi) Y:Char --> #1:Char Z:String --> #1:Char ========================================== unify in NAT : X:Nat ^ #1:Nat =? #2:Nat . Warning: unsafe variable name #1:Nat in unification problem. ========================================== unify in TEST2 : f(f(X:Nat, Y:Nat), Z:Nat) =? f(A:Nat, B:Nat) . Warning: Term f(X:Nat, Y:Nat, Z:Nat) is non-ground and unification for its top symbol is not currently supported. ========================================== unify in TEST2 : X:Nat + f(41, 42) =? Y:Nat + f(41, 42) . Solution 1 X:Nat --> #1:Nat Y:Nat --> #1:Nat ========================================== unify in ITER : s^1000000(X:OddNat) =? s^100000000001(Y:Int) . Solution 1 X:OddNat --> s^99999000001(#1:EvenNat) Y:Int --> #1:EvenNat ========================================== unify in ITER : s^1000000(X:OddNat) =? s^100000000001(Y:Int + Z:Int + W:Int) . Solution 1 X:OddNat --> s^99999000001(#1:OddNat + (#2:OddNat + #3:EvenNat)) W:Int --> #1:OddNat Z:Int --> #2:OddNat Y:Int --> #3:EvenNat Solution 2 X:OddNat --> s^99999000001(#1:OddNat + (#2:EvenNat + #3:OddNat)) W:Int --> #1:OddNat Z:Int --> #2:EvenNat Y:Int --> #3:OddNat Solution 3 X:OddNat --> s^99999000001(#1:EvenNat + (#2:OddNat + #3:OddNat)) W:Int --> #1:EvenNat Z:Int --> #2:OddNat Y:Int --> #3:OddNat Solution 4 X:OddNat --> s^99999000001(#1:EvenNat + (#2:EvenNat + #3:EvenNat)) W:Int --> #1:EvenNat Z:Int --> #2:EvenNat Y:Int --> #3:EvenNat ========================================== unify in AC : f(X, Y) =? f(A, B) . Solution 1 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) Solution 2 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> #3:Foo Solution 3 X --> #1:Foo Y --> f(#2:Foo, #3:Foo) A --> f(#1:Foo, #2:Foo) B --> #3:Foo Solution 4 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#2:Foo, #3:Foo) Solution 5 X --> #1:Foo Y --> #2:Foo A --> #1:Foo B --> #2:Foo Solution 6 X --> #2:Foo Y --> f(#1:Foo, #3:Foo) A --> #1:Foo B --> f(#2:Foo, #3:Foo) Solution 7 X --> #2:Foo Y --> #1:Foo A --> #1:Foo B --> #2:Foo ========================================== unify in AC : f(X, Y) =? f(a, b) . Solution 1 X --> a Y --> b Solution 2 X --> b Y --> a ========================================== unify in AC : f(X, Y) =? f(a, b, c) . Solution 1 X --> f(a, b) Y --> c Solution 2 X --> f(a, c) Y --> b Solution 3 X --> a Y --> f(b, c) Solution 4 X --> f(b, c) Y --> a Solution 5 X --> b Y --> f(a, c) Solution 6 X --> c Y --> f(a, b) ========================================== match in AC : f(X, Y) <=? f(a, b, c) . Solution 1 X --> a Y --> f(b, c) Solution 2 X --> b Y --> f(a, c) Solution 3 X --> c Y --> f(a, b) Solution 4 X --> f(a, b) Y --> c Solution 5 X --> f(a, c) Y --> b Solution 6 X --> f(b, c) Y --> a ========================================== unify in AC : f(X, X, Y) =? f(X, Y, Y) . Solution 1 X --> #1:Foo Y --> #1:Foo ========================================== unify in AC : f(X, X, Y) =? f(X, Y) . No unifier. ========================================== unify in AC : f(X, X, Y) =? f(A, B, C) . Solution 1 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo, #8:Foo) Y --> f(#4:Foo, #7:Foo, #9:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo) C --> f(#3:Foo, #6:Foo, #8:Foo, #8:Foo, #9:Foo) Solution 2 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo, #8:Foo) Y --> f(#4:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo) C --> f(#3:Foo, #6:Foo, #8:Foo, #8:Foo) Solution 3 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> f(#4:Foo, #7:Foo, #8:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo) C --> f(#3:Foo, #6:Foo, #8:Foo) Solution 4 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> f(#4:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo, #7:Foo) C --> f(#3:Foo, #6:Foo) Solution 5 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo, #7:Foo) Y --> f(#4:Foo, #8:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #6:Foo, #7:Foo, #7:Foo, #8:Foo) Solution 6 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo, #7:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #6:Foo, #7:Foo, #7:Foo) Solution 7 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> f(#4:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #6:Foo, #7:Foo) Solution 8 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #6:Foo) Solution 9 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #7:Foo) Y --> f(#4:Foo, #6:Foo, #8:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #7:Foo, #7:Foo, #8:Foo) Solution 10 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #7:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #7:Foo, #7:Foo) Solution 11 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #7:Foo) Solution 12 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) C --> #3:Foo Solution 13 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> f(#4:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 14 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo, #6:Foo) Solution 15 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo) Solution 16 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #5:Foo) C --> #3:Foo Solution 17 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #7:Foo) Y --> f(#4:Foo, #6:Foo, #8:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo, #7:Foo, #7:Foo, #8:Foo) Solution 18 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #7:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo, #7:Foo, #7:Foo) Solution 19 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo, #7:Foo) Solution 20 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo) Solution 21 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> f(#4:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 22 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo, #6:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo) Solution 23 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> f(#3:Foo, #5:Foo, #6:Foo) Solution 24 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> f(#3:Foo, #5:Foo) Solution 25 X --> f(#1:Foo, #2:Foo, #3:Foo, #6:Foo) Y --> f(#4:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 26 X --> f(#1:Foo, #2:Foo, #3:Foo, #6:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo, #6:Foo) Solution 27 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo) Solution 28 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> f(#2:Foo, #5:Foo) C --> #3:Foo Solution 29 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> #2:Foo C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 30 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> #2:Foo C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 31 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> #2:Foo C --> f(#3:Foo, #5:Foo) Solution 32 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo, #4:Foo) B --> #2:Foo C --> #3:Foo Solution 33 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> f(#6:Foo, #8:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo, #7:Foo, #7:Foo, #8:Foo) Solution 34 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> #6:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo, #7:Foo, #7:Foo) Solution 35 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> f(#6:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo, #7:Foo) Solution 36 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #6:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#3:Foo, #5:Foo) Solution 37 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo, #6:Foo) Y --> #7:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #5:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 38 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #6:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #5:Foo, #6:Foo) Solution 39 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 40 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo, #6:Foo) Solution 41 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> f(#5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #6:Foo) Solution 42 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> #3:Foo Solution 43 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #6:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 44 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 45 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 46 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #4:Foo, #6:Foo, #6:Foo) Solution 47 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> f(#5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #4:Foo, #6:Foo) Solution 48 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> f(#3:Foo, #4:Foo) Solution 49 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #6:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#3:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 50 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#3:Foo, #4:Foo, #5:Foo) Solution 51 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 52 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 53 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 54 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> #3:Foo Solution 55 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #2:Foo C --> f(#3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 56 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #2:Foo C --> f(#3:Foo, #4:Foo) Solution 57 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> f(#3:Foo, #6:Foo, #8:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#5:Foo, #7:Foo, #7:Foo, #8:Foo) Solution 58 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#5:Foo, #7:Foo, #7:Foo) Solution 59 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#5:Foo, #7:Foo) Solution 60 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> #5:Foo Solution 61 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #6:Foo) Y --> f(#3:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#5:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 62 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #6:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#5:Foo, #6:Foo, #6:Foo) Solution 63 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#5:Foo, #6:Foo) Solution 64 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> #5:Foo Solution 65 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#6:Foo, #6:Foo, #7:Foo) Solution 66 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#6:Foo, #6:Foo) Solution 67 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) C --> #6:Foo Solution 68 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo, #6:Foo) Solution 69 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo) Solution 70 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #4:Foo) C --> #5:Foo Solution 71 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 72 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo) Solution 73 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo) Solution 74 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo, #5:Foo) C --> #4:Foo Solution 75 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 76 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo, #5:Foo) Solution 77 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo) Solution 78 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> #4:Foo Solution 79 X --> f(#1:Foo, #2:Foo, #5:Foo) Y --> f(#3:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo, #6:Foo) Solution 80 X --> f(#1:Foo, #2:Foo, #5:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo) Solution 81 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#2:Foo, #4:Foo) C --> #5:Foo Solution 82 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #2:Foo C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 83 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #2:Foo C --> f(#4:Foo, #4:Foo) Solution 84 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #2:Foo C --> #4:Foo Solution 85 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 86 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo) Solution 87 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> f(#5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo) Solution 88 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> #4:Foo Solution 89 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #6:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 90 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo) Solution 91 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo, #6:Foo) Solution 92 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo) Solution 93 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) C --> #5:Foo Solution 94 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 95 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #3:Foo) C --> #4:Foo Solution 96 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 97 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 98 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 99 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo, #4:Foo) C --> #3:Foo Solution 100 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 101 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo) Solution 102 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 103 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo) Solution 104 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#2:Foo, #3:Foo) C --> #4:Foo Solution 105 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #2:Foo C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 106 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #2:Foo C --> #3:Foo Solution 107 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> f(#3:Foo, #6:Foo, #8:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo, #7:Foo, #7:Foo, #8:Foo) Solution 108 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo, #7:Foo, #7:Foo) Solution 109 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo, #7:Foo) Solution 110 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo) Solution 111 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #6:Foo) Y --> f(#3:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 112 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #6:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo, #6:Foo, #6:Foo) Solution 113 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo, #6:Foo) Solution 114 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo) Solution 115 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 116 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #6:Foo, #6:Foo) Solution 117 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #6:Foo) Solution 118 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo, #5:Foo) C --> #2:Foo Solution 119 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 120 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo) Solution 121 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo) Solution 122 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #4:Foo) C --> #2:Foo Solution 123 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 124 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo) Solution 125 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo) Solution 126 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> f(#4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo) Solution 127 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> f(#2:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 128 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> f(#2:Foo, #4:Foo, #5:Foo, #5:Foo) Solution 129 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> f(#2:Foo, #4:Foo, #5:Foo) Solution 130 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> f(#2:Foo, #4:Foo) Solution 131 X --> f(#1:Foo, #2:Foo, #5:Foo) Y --> f(#3:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 132 X --> f(#1:Foo, #2:Foo, #5:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> f(#2:Foo, #5:Foo, #5:Foo) Solution 133 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> f(#2:Foo, #5:Foo) Solution 134 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) B --> #4:Foo C --> #2:Foo Solution 135 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 136 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo) Solution 137 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> f(#5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo) Solution 138 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo) Solution 139 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #6:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 140 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo, #5:Foo) Solution 141 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 142 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo) Solution 143 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo) Solution 144 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> #2:Foo Solution 145 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 146 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 147 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 148 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo, #5:Foo, #5:Foo) Solution 149 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo, #5:Foo) Solution 150 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo) Solution 151 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#2:Foo, #3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 152 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#2:Foo, #3:Foo, #4:Foo) Solution 153 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 154 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 155 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#2:Foo, #4:Foo) Solution 156 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> #2:Foo Solution 157 X --> f(#1:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#2:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 158 X --> f(#1:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo) Solution 159 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo) Solution 160 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> #4:Foo Solution 161 X --> f(#1:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> f(#2:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 162 X --> f(#1:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #2:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo, #5:Foo) Solution 163 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo) Solution 164 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> #4:Foo Solution 165 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo, #6:Foo) Solution 166 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo) Solution 167 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> #5:Foo Solution 168 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 169 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo) Solution 170 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> #4:Foo Solution 171 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 172 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 173 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 174 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> #3:Foo Solution 175 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 176 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#3:Foo, #4:Foo, #4:Foo) Solution 177 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#3:Foo, #4:Foo) Solution 178 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> #3:Foo Solution 179 X --> f(#1:Foo, #4:Foo) Y --> f(#2:Foo, #3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 180 X --> f(#1:Foo, #4:Foo) Y --> f(#2:Foo, #3:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> f(#4:Foo, #4:Foo) Solution 181 X --> #1:Foo Y --> f(#2:Foo, #3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo, #2:Foo) B --> #3:Foo C --> #4:Foo Solution 182 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 183 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 184 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 185 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> #3:Foo Solution 186 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 187 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo) Solution 188 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 189 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo) Solution 190 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo, #3:Foo) C --> #4:Foo Solution 191 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 192 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #2:Foo) C --> #3:Foo Solution 193 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 194 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 195 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 196 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo) B --> f(#2:Foo, #3:Foo) C --> #2:Foo Solution 197 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #1:Foo) B --> #2:Foo C --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 198 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #1:Foo) B --> #2:Foo C --> f(#2:Foo, #3:Foo) Solution 199 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #1:Foo) B --> #2:Foo C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 200 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> f(#1:Foo, #1:Foo) B --> #2:Foo C --> f(#3:Foo, #3:Foo) Solution 201 X --> #1:Foo Y --> f(#2:Foo, #3:Foo) A --> f(#1:Foo, #1:Foo) B --> #2:Foo C --> #3:Foo Solution 202 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> f(#3:Foo, #6:Foo, #8:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo, #7:Foo, #7:Foo, #8:Foo) Solution 203 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #7:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo, #7:Foo, #7:Foo) Solution 204 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo, #7:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo, #7:Foo) Solution 205 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo, #6:Foo) C --> f(#2:Foo, #5:Foo) Solution 206 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #6:Foo) Y --> f(#3:Foo, #7:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 207 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo, #6:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo, #6:Foo, #6:Foo) Solution 208 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo, #6:Foo) Solution 209 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #5:Foo) Solution 210 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 211 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #6:Foo, #6:Foo) Solution 212 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #6:Foo) Solution 213 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) C --> #2:Foo Solution 214 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 215 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo) Solution 216 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo) Solution 217 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #4:Foo) C --> #2:Foo Solution 218 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 219 X --> f(#1:Foo, #2:Foo, #4:Foo, #6:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo) Solution 220 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo) Solution 221 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo) Solution 222 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> f(#3:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 223 X --> f(#1:Foo, #2:Foo, #4:Foo, #5:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo, #5:Foo, #5:Foo) Solution 224 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo, #5:Foo) Solution 225 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo) Solution 226 X --> f(#1:Foo, #2:Foo, #5:Foo) Y --> f(#3:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 227 X --> f(#1:Foo, #2:Foo, #5:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo) Solution 228 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo) Solution 229 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> f(#1:Foo, #4:Foo) C --> #2:Foo Solution 230 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> #1:Foo C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 231 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> #1:Foo C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 232 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo, #3:Foo) B --> #1:Foo C --> f(#2:Foo, #4:Foo) Solution 233 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo, #3:Foo) B --> #1:Foo C --> #2:Foo Solution 234 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#5:Foo, #7:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 235 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> #5:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo, #6:Foo) Solution 236 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> f(#5:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo, #6:Foo) Solution 237 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#2:Foo, #4:Foo) Solution 238 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #6:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 239 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #4:Foo, #5:Foo) Solution 240 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 241 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo, #5:Foo) Solution 242 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #5:Foo) Solution 243 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> #2:Foo Solution 244 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 245 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 246 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 247 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo, #5:Foo, #5:Foo) Solution 248 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo, #5:Foo) Solution 249 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> f(#2:Foo, #3:Foo) Solution 250 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#2:Foo, #3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 251 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#2:Foo, #3:Foo, #4:Foo) Solution 252 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 253 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 254 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 255 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> #2:Foo Solution 256 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> f(#1:Foo, #2:Foo) B --> #1:Foo C --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 257 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> f(#1:Foo, #2:Foo) B --> #1:Foo C --> f(#2:Foo, #3:Foo) Solution 258 X --> f(#1:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#2:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 259 X --> f(#1:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo, #6:Foo) Solution 260 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#4:Foo, #6:Foo) Solution 261 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> #4:Foo Solution 262 X --> f(#1:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> f(#2:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 263 X --> f(#1:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo, #5:Foo) Solution 264 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#4:Foo, #5:Foo) Solution 265 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> #4:Foo Solution 266 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo, #6:Foo) Solution 267 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> f(#5:Foo, #5:Foo) Solution 268 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) C --> #5:Foo Solution 269 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 270 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo) Solution 271 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #3:Foo) C --> #4:Foo Solution 272 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 273 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 274 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 275 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo, #4:Foo) C --> #3:Foo Solution 276 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 277 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo, #4:Foo) Solution 278 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo) Solution 279 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> #3:Foo Solution 280 X --> f(#1:Foo, #4:Foo) Y --> f(#2:Foo, #3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 281 X --> f(#1:Foo, #4:Foo) Y --> f(#2:Foo, #3:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo) Solution 282 X --> #1:Foo Y --> f(#2:Foo, #3:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#1:Foo, #3:Foo) C --> #4:Foo Solution 283 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> #1:Foo C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 284 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> #1:Foo C --> f(#3:Foo, #3:Foo) Solution 285 X --> #1:Foo Y --> f(#2:Foo, #3:Foo) A --> f(#1:Foo, #2:Foo) B --> #1:Foo C --> #3:Foo Solution 286 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 287 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 288 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 289 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> #3:Foo Solution 290 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 291 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo) Solution 292 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 293 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo) Solution 294 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo) C --> #4:Foo Solution 295 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 296 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #2:Foo) C --> #3:Foo Solution 297 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 298 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 299 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 300 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo, #3:Foo) C --> #2:Foo Solution 301 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo) C --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 302 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo) C --> f(#2:Foo, #3:Foo) Solution 303 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 304 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> #1:Foo B --> f(#1:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo) Solution 305 X --> #1:Foo Y --> f(#2:Foo, #3:Foo) A --> #1:Foo B --> f(#1:Foo, #2:Foo) C --> #3:Foo Solution 306 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> #1:Foo C --> f(#2:Foo, #2:Foo, #3:Foo) Solution 307 X --> #1:Foo Y --> #2:Foo A --> #1:Foo B --> #1:Foo C --> #2:Foo Solution 308 X --> f(#1:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#2:Foo, #5:Foo, #7:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#1:Foo, #4:Foo, #6:Foo, #6:Foo, #7:Foo) Solution 309 X --> f(#1:Foo, #3:Foo, #4:Foo, #6:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#1:Foo, #4:Foo, #6:Foo, #6:Foo) Solution 310 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#1:Foo, #4:Foo, #6:Foo) Solution 311 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo, #5:Foo) C --> f(#1:Foo, #4:Foo) Solution 312 X --> f(#1:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> f(#2:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #4:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 313 X --> f(#1:Foo, #3:Foo, #4:Foo, #5:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #4:Foo, #5:Foo, #5:Foo) Solution 314 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #4:Foo, #5:Foo) Solution 315 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #4:Foo) Solution 316 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 317 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #5:Foo, #5:Foo) Solution 318 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #5:Foo) Solution 319 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo, #4:Foo) C --> #1:Foo Solution 320 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 321 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> f(#1:Foo, #4:Foo, #4:Foo) Solution 322 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> f(#1:Foo, #4:Foo) Solution 323 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #3:Foo) C --> #1:Foo Solution 324 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo, #6:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 325 X --> f(#1:Foo, #3:Foo, #5:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo, #5:Foo, #5:Foo) Solution 326 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo, #5:Foo) Solution 327 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> f(#3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo) Solution 328 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> f(#2:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> f(#1:Foo, #3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 329 X --> f(#1:Foo, #3:Foo, #4:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> f(#1:Foo, #3:Foo, #4:Foo, #4:Foo) Solution 330 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> f(#1:Foo, #3:Foo, #4:Foo) Solution 331 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> f(#1:Foo, #3:Foo) Solution 332 X --> f(#1:Foo, #4:Foo) Y --> f(#2:Foo, #3:Foo, #5:Foo) A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 333 X --> f(#1:Foo, #4:Foo) Y --> f(#2:Foo, #3:Foo) A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> f(#1:Foo, #4:Foo, #4:Foo) Solution 334 X --> #1:Foo Y --> f(#2:Foo, #3:Foo, #4:Foo) A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> f(#1:Foo, #4:Foo) Solution 335 X --> #1:Foo Y --> f(#2:Foo, #3:Foo) A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> #1:Foo Solution 336 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> f(#4:Foo, #6:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 337 X --> f(#1:Foo, #2:Foo, #3:Foo, #5:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo, #5:Foo, #5:Foo) Solution 338 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(#4:Foo, #5:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo, #5:Foo) Solution 339 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#1:Foo, #3:Foo) Solution 340 X --> f(#1:Foo, #2:Foo, #3:Foo, #4:Foo) Y --> #5:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#1:Foo, #3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 341 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#1:Foo, #3:Foo, #4:Foo) Solution 342 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#1:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 343 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#1:Foo, #4:Foo, #4:Foo) Solution 344 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#1:Foo, #4:Foo) Solution 345 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> #1:Foo Solution 346 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 347 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo) Solution 348 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> f(#1:Foo, #2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 349 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> f(#1:Foo, #2:Foo, #4:Foo, #4:Foo) Solution 350 X --> f(#1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> f(#1:Foo, #2:Foo, #4:Foo) Solution 351 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> f(#1:Foo, #2:Foo) Solution 352 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo A --> #1:Foo B --> #2:Foo C --> f(#1:Foo, #2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 353 X --> f(#1:Foo, #2:Foo) Y --> #3:Foo A --> #1:Foo B --> #2:Foo C --> f(#1:Foo, #2:Foo, #3:Foo) Solution 354 X --> f(#1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) A --> #1:Foo B --> #2:Foo C --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 355 X --> f(#1:Foo, #3:Foo) Y --> #2:Foo A --> #1:Foo B --> #2:Foo C --> f(#1:Foo, #3:Foo, #3:Foo) Solution 356 X --> #1:Foo Y --> f(#2:Foo, #3:Foo) A --> #1:Foo B --> #2:Foo C --> f(#1:Foo, #3:Foo) Solution 357 X --> #1:Foo Y --> #2:Foo A --> #1:Foo B --> #2:Foo C --> #1:Foo Solution 358 X --> f(#2:Foo, #3:Foo, #5:Foo) Y --> f(#1:Foo, #4:Foo, #6:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo, #6:Foo) Solution 359 X --> f(#2:Foo, #3:Foo, #5:Foo) Y --> f(#1:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo, #5:Foo) Solution 360 X --> f(#2:Foo, #3:Foo) Y --> f(#1:Foo, #4:Foo, #5:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> f(#3:Foo, #5:Foo) Solution 361 X --> f(#2:Foo, #3:Foo) Y --> f(#1:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo, #4:Foo) C --> #3:Foo Solution 362 X --> f(#2:Foo, #3:Foo, #4:Foo) Y --> f(#1:Foo, #5:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 363 X --> f(#2:Foo, #3:Foo, #4:Foo) Y --> #1:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo, #4:Foo) Solution 364 X --> f(#2:Foo, #3:Foo) Y --> f(#1:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#3:Foo, #4:Foo) Solution 365 X --> f(#2:Foo, #3:Foo) Y --> #1:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> #3:Foo Solution 366 X --> f(#2:Foo, #4:Foo) Y --> f(#1:Foo, #3:Foo, #5:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo, #5:Foo) Solution 367 X --> f(#2:Foo, #4:Foo) Y --> f(#1:Foo, #3:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> f(#4:Foo, #4:Foo) Solution 368 X --> #2:Foo Y --> f(#1:Foo, #3:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo, #3:Foo) C --> #4:Foo Solution 369 X --> f(#2:Foo, #3:Foo) Y --> f(#1:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 370 X --> f(#2:Foo, #3:Foo) Y --> #1:Foo A --> #1:Foo B --> f(#2:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo) Solution 371 X --> #2:Foo Y --> f(#1:Foo, #3:Foo) A --> #1:Foo B --> f(#2:Foo, #2:Foo) C --> #3:Foo Solution 372 X --> f(#2:Foo, #4:Foo) Y --> f(#1:Foo, #3:Foo, #5:Foo) A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 373 X --> f(#2:Foo, #4:Foo) Y --> f(#1:Foo, #3:Foo) A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 374 X --> #2:Foo Y --> f(#1:Foo, #3:Foo, #4:Foo) A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 375 X --> #2:Foo Y --> f(#1:Foo, #3:Foo) A --> #1:Foo B --> f(#2:Foo, #3:Foo) C --> #2:Foo Solution 376 X --> f(#2:Foo, #3:Foo) Y --> f(#1:Foo, #4:Foo) A --> #1:Foo B --> #2:Foo C --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 377 X --> f(#2:Foo, #3:Foo) Y --> #1:Foo A --> #1:Foo B --> #2:Foo C --> f(#2:Foo, #3:Foo, #3:Foo) Solution 378 X --> #2:Foo Y --> f(#1:Foo, #3:Foo) A --> #1:Foo B --> #2:Foo C --> f(#2:Foo, #3:Foo) Solution 379 X --> #2:Foo Y --> #1:Foo A --> #1:Foo B --> #2:Foo C --> #2:Foo Solution 380 X --> #3:Foo Y --> f(#1:Foo, #2:Foo, #4:Foo) A --> #1:Foo B --> #2:Foo C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 381 X --> #3:Foo Y --> f(#1:Foo, #2:Foo) A --> #1:Foo B --> #2:Foo C --> f(#3:Foo, #3:Foo) ========================================== unify in AC : f(X, X, Y) =? f(a, B, C) . Solution 1 X --> f(a, #1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) B --> f(a, #1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 2 X --> f(a, #1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo B --> f(a, #1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 3 X --> f(a, #1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) B --> f(a, #1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 4 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> f(a, #1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> #2:Foo Solution 5 X --> f(a, #1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo B --> f(a, #1:Foo, #1:Foo, #2:Foo) C --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 6 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> f(a, #1:Foo, #1:Foo, #2:Foo) C --> f(#2:Foo, #3:Foo) Solution 7 X --> f(a, #1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) B --> f(a, #1:Foo, #1:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 8 X --> f(a, #1:Foo, #3:Foo) Y --> #2:Foo B --> f(a, #1:Foo, #1:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo) Solution 9 X --> f(a, #1:Foo) Y --> f(#2:Foo, #3:Foo) B --> f(a, #1:Foo, #1:Foo, #2:Foo) C --> #3:Foo Solution 10 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> f(a, #1:Foo, #1:Foo) C --> f(#2:Foo, #2:Foo, #3:Foo) Solution 11 X --> f(a, #1:Foo) Y --> #2:Foo B --> f(a, #1:Foo, #1:Foo) C --> #2:Foo Solution 12 X --> f(a, #1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) B --> f(a, #1:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 13 X --> f(a, #1:Foo, #3:Foo) Y --> #2:Foo B --> f(a, #1:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo, #3:Foo) Solution 14 X --> f(a, #1:Foo) Y --> f(#2:Foo, #3:Foo) B --> f(a, #1:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo) Solution 15 X --> f(a, #1:Foo) Y --> #2:Foo B --> f(a, #1:Foo, #2:Foo) C --> #1:Foo Solution 16 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> f(a, #1:Foo) C --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo) Solution 17 X --> f(a, #1:Foo) Y --> #2:Foo B --> f(a, #1:Foo) C --> f(#1:Foo, #2:Foo) Solution 18 X --> f(a, #2:Foo) Y --> f(#1:Foo, #3:Foo) B --> f(a, #1:Foo) C --> f(#2:Foo, #2:Foo, #3:Foo) Solution 19 X --> f(a, #2:Foo) Y --> #1:Foo B --> f(a, #1:Foo) C --> f(#2:Foo, #2:Foo) Solution 20 X --> a Y --> f(#1:Foo, #2:Foo) B --> f(a, #1:Foo) C --> #2:Foo Solution 21 X --> f(a, #1:Foo) Y --> #2:Foo B --> a C --> f(#1:Foo, #1:Foo, #2:Foo) Solution 22 X --> a Y --> #1:Foo B --> a C --> #1:Foo Solution 23 X --> f(a, #1:Foo, #2:Foo, #4:Foo) Y --> f(#3:Foo, #5:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(a, #2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 24 X --> f(a, #1:Foo, #2:Foo, #4:Foo) Y --> #3:Foo B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(a, #2:Foo, #4:Foo, #4:Foo) Solution 25 X --> f(a, #1:Foo, #2:Foo) Y --> f(#3:Foo, #4:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(a, #2:Foo, #4:Foo) Solution 26 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(a, #2:Foo) Solution 27 X --> f(a, #1:Foo, #2:Foo, #3:Foo) Y --> #4:Foo B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(a, #2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 28 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(a, #2:Foo, #3:Foo) Solution 29 X --> f(a, #1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(a, #3:Foo, #3:Foo, #4:Foo) Solution 30 X --> f(a, #1:Foo, #3:Foo) Y --> #2:Foo B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(a, #3:Foo, #3:Foo) Solution 31 X --> f(a, #1:Foo) Y --> f(#2:Foo, #3:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(a, #3:Foo) Solution 32 X --> f(a, #1:Foo) Y --> #2:Foo B --> f(#1:Foo, #1:Foo, #2:Foo) C --> a Solution 33 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> f(#1:Foo, #1:Foo) C --> f(a, #2:Foo, #2:Foo, #3:Foo) Solution 34 X --> f(a, #1:Foo) Y --> #2:Foo B --> f(#1:Foo, #1:Foo) C --> f(a, #2:Foo) Solution 35 X --> f(a, #1:Foo, #3:Foo) Y --> f(#2:Foo, #4:Foo) B --> f(#1:Foo, #2:Foo) C --> f(a, #1:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 36 X --> f(a, #1:Foo, #3:Foo) Y --> #2:Foo B --> f(#1:Foo, #2:Foo) C --> f(a, #1:Foo, #3:Foo, #3:Foo) Solution 37 X --> f(a, #1:Foo) Y --> f(#2:Foo, #3:Foo) B --> f(#1:Foo, #2:Foo) C --> f(a, #1:Foo, #3:Foo) Solution 38 X --> f(a, #1:Foo) Y --> #2:Foo B --> f(#1:Foo, #2:Foo) C --> f(a, #1:Foo) Solution 39 X --> f(a, #1:Foo, #2:Foo) Y --> #3:Foo B --> #1:Foo C --> f(a, #1:Foo, #2:Foo, #2:Foo, #3:Foo) Solution 40 X --> f(a, #1:Foo) Y --> #2:Foo B --> #1:Foo C --> f(a, #1:Foo, #2:Foo) Solution 41 X --> f(a, #2:Foo) Y --> f(#1:Foo, #3:Foo) B --> #1:Foo C --> f(a, #2:Foo, #2:Foo, #3:Foo) Solution 42 X --> f(a, #2:Foo) Y --> #1:Foo B --> #1:Foo C --> f(a, #2:Foo, #2:Foo) Solution 43 X --> a Y --> f(#1:Foo, #2:Foo) B --> #1:Foo C --> f(a, #2:Foo) Solution 44 X --> a Y --> #1:Foo B --> #1:Foo C --> a Solution 45 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(a, #3:Foo, #5:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo, #5:Foo) Solution 46 X --> f(#1:Foo, #2:Foo, #4:Foo) Y --> f(a, #3:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo, #4:Foo) Solution 47 X --> f(#1:Foo, #2:Foo) Y --> f(a, #3:Foo, #4:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> f(#2:Foo, #4:Foo) Solution 48 X --> f(#1:Foo, #2:Foo) Y --> f(a, #3:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo, #3:Foo) C --> #2:Foo Solution 49 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> f(a, #4:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(#2:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 50 X --> f(#1:Foo, #2:Foo, #3:Foo) Y --> a B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(#2:Foo, #3:Foo, #3:Foo) Solution 51 X --> f(#1:Foo, #2:Foo) Y --> f(a, #3:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(#2:Foo, #3:Foo) Solution 52 X --> f(#1:Foo, #2:Foo) Y --> a B --> f(#1:Foo, #1:Foo, #2:Foo) C --> #2:Foo Solution 53 X --> f(#1:Foo, #3:Foo) Y --> f(a, #2:Foo, #4:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo, #4:Foo) Solution 54 X --> f(#1:Foo, #3:Foo) Y --> f(a, #2:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo) C --> f(#3:Foo, #3:Foo) Solution 55 X --> #1:Foo Y --> f(a, #2:Foo, #3:Foo) B --> f(#1:Foo, #1:Foo, #2:Foo) C --> #3:Foo Solution 56 X --> f(#1:Foo, #2:Foo) Y --> f(a, #3:Foo) B --> f(#1:Foo, #1:Foo) C --> f(#2:Foo, #2:Foo, #3:Foo) Solution 57 X --> f(#1:Foo, #2:Foo) Y --> a B --> f(#1:Foo, #1:Foo) C --> f(#2:Foo, #2:Foo) Solution 58 X --> #1:Foo Y --> f(a, #2:Foo) B --> f(#1:Foo, #1:Foo) C --> #2:Foo Solution 59 X --> f(#1:Foo, #3:Foo) Y --> f(a, #2:Foo, #4:Foo) B --> f(#1:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo, #3:Foo, #4:Foo) Solution 60 X --> f(#1:Foo, #3:Foo) Y --> f(a, #2:Foo) B --> f(#1:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo, #3:Foo) Solution 61 X --> #1:Foo Y --> f(a, #2:Foo, #3:Foo) B --> f(#1:Foo, #2:Foo) C --> f(#1:Foo, #3:Foo) Solution 62 X --> #1:Foo Y --> f(a, #2:Foo) B --> f(#1:Foo, #2:Foo) C --> #1:Foo Solution 63 X --> f(#1:Foo, #2:Foo) Y --> f(a, #3:Foo) B --> #1:Foo C --> f(#1:Foo, #2:Foo, #2:Foo, #3:Foo) Solution 64 X --> f(#1:Foo, #2:Foo) Y --> a B --> #1:Foo C --> f(#1:Foo, #2:Foo, #2:Foo) Solution 65 X --> #1:Foo Y --> f(a, #2:Foo) B --> #1:Foo C --> f(#1:Foo, #2:Foo) Solution 66 X --> #1:Foo Y --> a B --> #1:Foo C --> #1:Foo Solution 67 X --> #2:Foo Y --> f(a, #1:Foo, #3:Foo) B --> #1:Foo C --> f(#2:Foo, #2:Foo, #3:Foo) Solution 68 X --> #2:Foo Y --> f(a, #1:Foo) B --> #1:Foo C --> f(#2:Foo, #2:Foo) ========================================== unify in AC : f(X, X, X) =? f(a, a) . No unifier. ========================================== unify in AC : f(X, X, X, Y) =? f(a, a) . No unifier. ========================================== unify in AC2 : f(A, B) =? f(C, D) . Solution 1 A --> #1:Elt B --> #2:Elt C --> #1:Elt D --> #2:Elt Solution 2 A --> #2:Elt B --> #1:Elt C --> #1:Elt D --> #2:Elt ========================================== unify in AC2 : f(X, A) =? f(Y, B) . Solution 1 A --> #1:Elt X --> #2:Set B --> #1:Elt Y --> #2:Set Solution 2 A --> #2:Elt X --> f(#1:Elt, #3:Set) B --> #1:Elt Y --> f(#2:Elt, #3:Set) Solution 3 A --> #2:Elt X --> #1:Elt B --> #1:Elt Y --> #2:Elt ========================================== unify in AC2 : f(g(X, Y), g(X, Z), U) =? f(g(Y, Z), V) . Solution 1 U --> f(#4:Set, g(#3:Set, #2:Set)) X --> #1:Set Z --> #2:Set Y --> #3:Set V --> f(#4:Set, g(#1:Set, #2:Set), g(#1:Set, #3:Set)) Solution 2 U --> #2:Set X --> #1:Set Z --> #1:Set Y --> #1:Set V --> f(#2:Set, g(#1:Set, #1:Set)) Solution 3 U --> #3:Set X --> #2:Set Z --> #1:Set Y --> #2:Set V --> f(#3:Set, g(#2:Set, #2:Set)) Solution 4 U --> g(#3:Set, #2:Set) X --> #1:Set Z --> #2:Set Y --> #3:Set V --> f(g(#1:Set, #2:Set), g(#1:Set, #3:Set)) ========================================== unify in AC2 : g(f(X, Y), f(X, U, Z)) =? g(f(U, V), f(W, A)) . Solution 1 X --> f(#3:Set, #4:Set) Y --> f(#5:Set, #6:Set) Z --> f(#1:Elt, #2:Set) U --> f(#3:Set, #5:Set) V --> f(#4:Set, #6:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 2 X --> f(#3:Set, #4:Set) Y --> #5:Set Z --> f(#1:Elt, #2:Set) U --> f(#3:Set, #5:Set) V --> #4:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 3 X --> f(#3:Set, #4:Set) Y --> #5:Set Z --> f(#1:Elt, #2:Set) U --> #3:Set V --> f(#4:Set, #5:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 4 X --> #3:Set Y --> f(#4:Set, #5:Set) Z --> f(#1:Elt, #2:Set) U --> f(#3:Set, #4:Set) V --> #5:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 5 X --> #3:Set Y --> #4:Set Z --> f(#1:Elt, #2:Set) U --> #3:Set V --> #4:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set) Solution 6 X --> #3:Set Y --> f(#4:Set, #5:Set) Z --> f(#1:Elt, #2:Set) U --> #4:Set V --> f(#3:Set, #5:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #4:Set) Solution 7 X --> #3:Set Y --> #4:Set Z --> f(#1:Elt, #2:Set) U --> #4:Set V --> #3:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #4:Set) Solution 8 X --> f(#2:Set, #3:Set) Y --> f(#4:Set, #5:Set) Z --> #1:Elt U --> f(#2:Set, #4:Set) V --> f(#3:Set, #5:Set) A --> #1:Elt W --> f(#2:Set, #2:Set, #3:Set, #4:Set) Solution 9 X --> f(#2:Set, #3:Set) Y --> #4:Set Z --> #1:Elt U --> f(#2:Set, #4:Set) V --> #3:Set A --> #1:Elt W --> f(#2:Set, #2:Set, #3:Set, #4:Set) Solution 10 X --> f(#2:Set, #3:Set) Y --> #4:Set Z --> #1:Elt U --> #2:Set V --> f(#3:Set, #4:Set) A --> #1:Elt W --> f(#2:Set, #2:Set, #3:Set) Solution 11 X --> #2:Set Y --> f(#3:Set, #4:Set) Z --> #1:Elt U --> f(#2:Set, #3:Set) V --> #4:Set A --> #1:Elt W --> f(#2:Set, #2:Set, #3:Set) Solution 12 X --> #2:Set Y --> #3:Set Z --> #1:Elt U --> #2:Set V --> #3:Set A --> #1:Elt W --> f(#2:Set, #2:Set) Solution 13 X --> #2:Set Y --> f(#3:Set, #4:Set) Z --> #1:Elt U --> #3:Set V --> f(#2:Set, #4:Set) A --> #1:Elt W --> f(#2:Set, #3:Set) Solution 14 X --> #2:Set Y --> #3:Set Z --> #1:Elt U --> #3:Set V --> #2:Set A --> #1:Elt W --> f(#2:Set, #3:Set) Solution 15 X --> f(#1:Elt, #3:Set, #4:Set) Y --> f(#5:Set, #6:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set, #5:Set) V --> f(#4:Set, #6:Set) A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 16 X --> f(#1:Elt, #3:Set, #4:Set) Y --> #5:Set Z --> #2:Set U --> f(#1:Elt, #3:Set, #5:Set) V --> #4:Set A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 17 X --> f(#1:Elt, #3:Set, #4:Set) Y --> #5:Set Z --> #2:Set U --> f(#1:Elt, #3:Set) V --> f(#4:Set, #5:Set) A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set, #3:Set, #4:Set) Solution 18 X --> f(#1:Elt, #3:Set) Y --> f(#4:Set, #5:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set, #4:Set) V --> #5:Set A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set, #3:Set, #4:Set) Solution 19 X --> f(#1:Elt, #3:Set) Y --> #4:Set Z --> #2:Set U --> f(#1:Elt, #3:Set) V --> #4:Set A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set, #3:Set) Solution 20 X --> f(#1:Elt, #3:Set) Y --> f(#4:Set, #5:Set) Z --> #2:Set U --> f(#1:Elt, #4:Set) V --> f(#3:Set, #5:Set) A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set, #4:Set) Solution 21 X --> f(#1:Elt, #3:Set) Y --> #4:Set Z --> #2:Set U --> f(#1:Elt, #4:Set) V --> #3:Set A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set, #4:Set) Solution 22 X --> f(#1:Elt, #3:Set) Y --> #4:Set Z --> #2:Set U --> #1:Elt V --> f(#3:Set, #4:Set) A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set) Solution 23 X --> #1:Elt Y --> f(#3:Set, #4:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set) V --> #4:Set A --> #1:Elt W --> f(#1:Elt, #2:Set, #3:Set) Solution 24 X --> #1:Elt Y --> #3:Set Z --> #2:Set U --> #1:Elt V --> #3:Set A --> #1:Elt W --> f(#1:Elt, #2:Set) Solution 25 X --> f(#1:Elt, #3:Set, #4:Set) Y --> f(#5:Set, #6:Set) Z --> #2:Set U --> f(#3:Set, #5:Set) V --> f(#1:Elt, #4:Set, #6:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 26 X --> f(#1:Elt, #3:Set, #4:Set) Y --> #5:Set Z --> #2:Set U --> f(#3:Set, #5:Set) V --> f(#1:Elt, #4:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 27 X --> f(#1:Elt, #3:Set, #4:Set) Y --> #5:Set Z --> #2:Set U --> #3:Set V --> f(#1:Elt, #4:Set, #5:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 28 X --> f(#1:Elt, #3:Set) Y --> f(#4:Set, #5:Set) Z --> #2:Set U --> f(#3:Set, #4:Set) V --> f(#1:Elt, #5:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 29 X --> f(#1:Elt, #3:Set) Y --> #4:Set Z --> #2:Set U --> f(#3:Set, #4:Set) V --> #1:Elt A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 30 X --> f(#1:Elt, #3:Set) Y --> #4:Set Z --> #2:Set U --> #3:Set V --> f(#1:Elt, #4:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set) Solution 31 X --> f(#1:Elt, #3:Set) Y --> f(#4:Set, #5:Set) Z --> #2:Set U --> #4:Set V --> f(#1:Elt, #3:Set, #5:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #4:Set) Solution 32 X --> f(#1:Elt, #3:Set) Y --> #4:Set Z --> #2:Set U --> #4:Set V --> f(#1:Elt, #3:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #4:Set) Solution 33 X --> #1:Elt Y --> f(#3:Set, #4:Set) Z --> #2:Set U --> #3:Set V --> f(#1:Elt, #4:Set) A --> #1:Elt W --> f(#2:Set, #3:Set) Solution 34 X --> #1:Elt Y --> #3:Set Z --> #2:Set U --> #3:Set V --> #1:Elt A --> #1:Elt W --> f(#2:Set, #3:Set) Solution 35 X --> f(#3:Set, #4:Set) Y --> f(#1:Elt, #5:Set, #6:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set, #5:Set) V --> f(#4:Set, #6:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 36 X --> f(#3:Set, #4:Set) Y --> f(#1:Elt, #5:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set, #5:Set) V --> #4:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set, #5:Set) Solution 37 X --> f(#3:Set, #4:Set) Y --> f(#1:Elt, #5:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set) V --> f(#4:Set, #5:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 38 X --> f(#3:Set, #4:Set) Y --> #1:Elt Z --> #2:Set U --> f(#1:Elt, #3:Set) V --> #4:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 39 X --> #3:Set Y --> f(#1:Elt, #4:Set, #5:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set, #4:Set) V --> #5:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set, #4:Set) Solution 40 X --> #3:Set Y --> f(#1:Elt, #4:Set) Z --> #2:Set U --> f(#1:Elt, #3:Set) V --> #4:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #3:Set) Solution 41 X --> #3:Set Y --> f(#1:Elt, #4:Set, #5:Set) Z --> #2:Set U --> f(#1:Elt, #4:Set) V --> f(#3:Set, #5:Set) A --> #1:Elt W --> f(#2:Set, #3:Set, #4:Set) Solution 42 X --> #3:Set Y --> f(#1:Elt, #4:Set) Z --> #2:Set U --> f(#1:Elt, #4:Set) V --> #3:Set A --> #1:Elt W --> f(#2:Set, #3:Set, #4:Set) Solution 43 X --> #3:Set Y --> f(#1:Elt, #4:Set) Z --> #2:Set U --> #1:Elt V --> f(#3:Set, #4:Set) A --> #1:Elt W --> f(#2:Set, #3:Set) Solution 44 X --> #3:Set Y --> #1:Elt Z --> #2:Set U --> #1:Elt V --> #3:Set A --> #1:Elt W --> f(#2:Set, #3:Set) ========================================== unify in AC+C : f(g(X, Y), g(X, Z), U) =? f(g(Y, Z), V) . Solution 1 U --> f(#4:Set, g(#1:Set, #3:Set)) Z --> #1:Set X --> #2:Set Y --> #3:Set V --> f(#4:Set, g(#1:Set, #2:Set), g(#2:Set, #3:Set)) Solution 2 U --> #3:Set Z --> #1:Set X --> #1:Set Y --> #2:Set V --> f(#3:Set, g(#1:Set, #1:Set)) Solution 3 U --> #3:Set Z --> #1:Set X --> #2:Set Y --> #2:Set V --> f(#3:Set, g(#2:Set, #2:Set)) Solution 4 U --> g(#1:Set, #3:Set) Z --> #1:Set X --> #2:Set Y --> #3:Set V --> f(g(#1:Set, #2:Set), g(#2:Set, #3:Set)) ========================================== unify in AC+C : g(f(X, Y), f(X, U, Z)) =? g(f(U, V), f(W, A)) . Solution 1 X --> f(#2:Set, #3:Elt, #4:Set) Y --> f(#5:Set, #6:Set) Z --> #1:Set U --> f(#2:Set, #3:Elt, #5:Set) V --> f(#4:Set, #6:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Elt, #4:Set, #5:Set) A --> #3:Elt Solution 2 X --> f(#2:Set, #3:Elt, #4:Set) Y --> #5:Set Z --> #1:Set U --> f(#2:Set, #3:Elt, #5:Set) V --> #4:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Elt, #4:Set, #5:Set) A --> #3:Elt Solution 3 X --> f(#2:Set, #3:Elt, #4:Set) Y --> #5:Set Z --> #1:Set U --> f(#2:Set, #3:Elt) V --> f(#4:Set, #5:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Elt, #4:Set) A --> #3:Elt Solution 4 X --> f(#2:Set, #3:Elt) Y --> f(#4:Set, #5:Set) Z --> #1:Set U --> f(#2:Set, #3:Elt, #4:Set) V --> #5:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Elt, #4:Set) A --> #3:Elt Solution 5 X --> f(#2:Set, #3:Elt) Y --> #4:Set Z --> #1:Set U --> f(#2:Set, #3:Elt) V --> #4:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Elt) A --> #3:Elt Solution 6 X --> f(#2:Set, #3:Set) Y --> f(#4:Set, #6:Set) Z --> f(#1:Set, #5:Elt) U --> f(#2:Set, #4:Set) V --> f(#3:Set, #6:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Set, #4:Set) A --> #5:Elt Solution 7 X --> f(#2:Set, #3:Set) Y --> #4:Set Z --> f(#1:Set, #5:Elt) U --> f(#2:Set, #4:Set) V --> #3:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Set, #4:Set) A --> #5:Elt Solution 8 X --> f(#2:Set, #3:Set, #5:Elt) Y --> f(#4:Set, #6:Set) Z --> #1:Set U --> f(#2:Set, #4:Set) V --> f(#3:Set, #5:Elt, #6:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Set, #4:Set) A --> #5:Elt Solution 9 X --> f(#2:Set, #3:Set, #5:Elt) Y --> #4:Set Z --> #1:Set U --> f(#2:Set, #4:Set) V --> f(#3:Set, #5:Elt) W --> f(#1:Set, #2:Set, #2:Set, #3:Set, #4:Set) A --> #5:Elt Solution 10 X --> f(#2:Set, #3:Set) Y --> f(#4:Set, #5:Elt, #6:Set) Z --> #1:Set U --> f(#2:Set, #4:Set, #5:Elt) V --> f(#3:Set, #6:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Set, #4:Set) A --> #5:Elt Solution 11 X --> f(#2:Set, #3:Set) Y --> f(#4:Set, #5:Elt) Z --> #1:Set U --> f(#2:Set, #4:Set, #5:Elt) V --> #3:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Set, #4:Set) A --> #5:Elt Solution 12 X --> f(#2:Set, #3:Set) Y --> #5:Set Z --> f(#1:Set, #4:Elt) U --> #2:Set V --> f(#3:Set, #5:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 13 X --> f(#2:Set, #3:Set, #4:Elt) Y --> #5:Set Z --> #1:Set U --> #2:Set V --> f(#3:Set, #4:Elt, #5:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 14 X --> f(#2:Set, #3:Set) Y --> f(#4:Elt, #5:Set) Z --> #1:Set U --> f(#2:Set, #4:Elt) V --> f(#3:Set, #5:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 15 X --> f(#2:Set, #3:Set) Y --> #4:Elt Z --> #1:Set U --> f(#2:Set, #4:Elt) V --> #3:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 16 X --> #2:Set Y --> f(#3:Set, #5:Set) Z --> f(#1:Set, #4:Elt) U --> f(#2:Set, #3:Set) V --> #5:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 17 X --> f(#2:Set, #4:Elt) Y --> f(#3:Set, #5:Set) Z --> #1:Set U --> f(#2:Set, #3:Set) V --> f(#4:Elt, #5:Set) W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 18 X --> f(#2:Set, #4:Elt) Y --> #3:Set Z --> #1:Set U --> f(#2:Set, #3:Set) V --> #4:Elt W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 19 X --> #2:Set Y --> f(#3:Set, #4:Elt, #5:Set) Z --> #1:Set U --> f(#2:Set, #3:Set, #4:Elt) V --> #5:Set W --> f(#1:Set, #2:Set, #2:Set, #3:Set) A --> #4:Elt Solution 20 X --> #2:Set Y --> #4:Set Z --> f(#1:Set, #3:Elt) U --> #2:Set V --> #4:Set W --> f(#1:Set, #2:Set, #2:Set) A --> #3:Elt Solution 21 X --> f(#2:Set, #3:Elt) Y --> #4:Set Z --> #1:Set U --> #2:Set V --> f(#3:Elt, #4:Set) W --> f(#1:Set, #2:Set, #2:Set) A --> #3:Elt Solution 22 X --> #2:Set Y --> f(#3:Elt, #4:Set) Z --> #1:Set U --> f(#2:Set, #3:Elt) V --> #4:Set W --> f(#1:Set, #2:Set, #2:Set) A --> #3:Elt Solution 23 X --> f(#2:Elt, #3:Set) Y --> f(#4:Set, #5:Set) Z --> #1:Set U --> f(#2:Elt, #4:Set) V --> f(#3:Set, #5:Set) W --> f(#1:Set, #2:Elt, #3:Set, #4:Set) A --> #2:Elt Solution 24 X --> f(#2:Elt, #3:Set) Y --> #4:Set Z --> #1:Set U --> f(#2:Elt, #4:Set) V --> #3:Set W --> f(#1:Set, #2:Elt, #3:Set, #4:Set) A --> #2:Elt Solution 25 X --> f(#2:Elt, #3:Set) Y --> #4:Set Z --> #1:Set U --> #2:Elt V --> f(#3:Set, #4:Set) W --> f(#1:Set, #2:Elt, #3:Set) A --> #2:Elt Solution 26 X --> #2:Elt Y --> f(#3:Set, #4:Set) Z --> #1:Set U --> f(#2:Elt, #3:Set) V --> #4:Set W --> f(#1:Set, #2:Elt, #3:Set) A --> #2:Elt Solution 27 X --> #2:Elt Y --> #3:Set Z --> #1:Set U --> #2:Elt V --> #3:Set W --> f(#1:Set, #2:Elt) A --> #2:Elt Solution 28 X --> #2:Set Y --> f(#3:Set, #5:Set) Z --> f(#1:Set, #4:Elt) U --> #3:Set V --> f(#2:Set, #5:Set) W --> f(#1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 29 X --> #2:Set Y --> #3:Set Z --> f(#1:Set, #4:Elt) U --> #3:Set V --> #2:Set W --> f(#1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 30 X --> f(#2:Set, #4:Elt) Y --> f(#3:Set, #5:Set) Z --> #1:Set U --> #3:Set V --> f(#2:Set, #4:Elt, #5:Set) W --> f(#1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 31 X --> f(#2:Set, #4:Elt) Y --> #3:Set Z --> #1:Set U --> #3:Set V --> f(#2:Set, #4:Elt) W --> f(#1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 32 X --> #2:Set Y --> f(#3:Set, #4:Elt, #5:Set) Z --> #1:Set U --> f(#3:Set, #4:Elt) V --> f(#2:Set, #5:Set) W --> f(#1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 33 X --> #2:Set Y --> f(#3:Set, #4:Elt) Z --> #1:Set U --> f(#3:Set, #4:Elt) V --> #2:Set W --> f(#1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 34 X --> #2:Set Y --> f(#3:Elt, #4:Set) Z --> #1:Set U --> #3:Elt V --> f(#2:Set, #4:Set) W --> f(#1:Set, #2:Set) A --> #3:Elt Solution 35 X --> #2:Set Y --> #3:Elt Z --> #1:Set U --> #3:Elt V --> #2:Set W --> f(#1:Set, #2:Set) A --> #3:Elt Solution 36 X --> #3:Elt Y --> f(#2:Set, #4:Set) Z --> #1:Set U --> #2:Set V --> f(#3:Elt, #4:Set) W --> f(#1:Set, #2:Set) A --> #3:Elt Solution 37 X --> #3:Elt Y --> #2:Set Z --> #1:Set U --> #2:Set V --> #3:Elt W --> f(#1:Set, #2:Set) A --> #3:Elt Solution 38 X --> f(#1:Set, #2:Set) Y --> f(#3:Set, #5:Set) Z --> #4:Elt U --> f(#1:Set, #3:Set) V --> f(#2:Set, #5:Set) W --> f(#1:Set, #1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 39 X --> f(#1:Set, #2:Set) Y --> #3:Set Z --> #4:Elt U --> f(#1:Set, #3:Set) V --> #2:Set W --> f(#1:Set, #1:Set, #2:Set, #3:Set) A --> #4:Elt Solution 40 X --> f(#1:Set, #2:Set) Y --> #4:Set Z --> #3:Elt U --> #1:Set V --> f(#2:Set, #4:Set) W --> f(#1:Set, #1:Set, #2:Set) A --> #3:Elt Solution 41 X --> #1:Set Y --> f(#2:Set, #4:Set) Z --> #3:Elt U --> f(#1:Set, #2:Set) V --> #4:Set W --> f(#1:Set, #1:Set, #2:Set) A --> #3:Elt Solution 42 X --> #1:Set Y --> #3:Set Z --> #2:Elt U --> #1:Set V --> #3:Set W --> f(#1:Set, #1:Set) A --> #2:Elt Solution 43 X --> #1:Set Y --> f(#2:Set, #4:Set) Z --> #3:Elt U --> #2:Set V --> f(#1:Set, #4:Set) W --> f(#1:Set, #2:Set) A --> #3:Elt Solution 44 X --> #1:Set Y --> #2:Set Z --> #3:Elt U --> #2:Set V --> #1:Set W --> f(#1:Set, #2:Set) A --> #3:Elt Solution 45 X --> f(#3:Set, #4:Elt) Y --> #5:Set Z --> #2:Set U --> #1:Set V --> f(#2:Set, #3:Set, #4:Elt) W --> f(#3:Set, #5:Set) A --> #4:Elt Solution 46 X --> #3:Set Y --> f(#4:Set, #5:Elt) Z --> #2:Set U --> #1:Set V --> f(#2:Set, #3:Set) W --> f(#3:Set, #4:Set) A --> #5:Elt Solution 47 X --> #3:Set Y --> #4:Elt Z --> #2:Set U --> #1:Set V --> f(#2:Set, #3:Set) W --> #3:Set A --> #4:Elt Solution 48 X --> #3:Elt Y --> #4:Set Z --> #2:Set U --> #1:Set V --> f(#2:Set, #3:Elt) W --> #4:Set A --> #3:Elt ========================================== unify in SIMULT : g(X:Foo) =? g(Y:Foo) /\ h(X:Foo) =? h(Z:Foo) . Solution 1 X:Foo --> #1:Foo Y:Foo --> #1:Foo Z:Foo --> #1:Foo ========================================== unify in SIMULT : g(X:Foo) =? Y:Foo /\ h(X:Foo) =? h(Z:Foo) . Solution 1 X:Foo --> #1:Foo Y:Foo --> g(#1:Foo) Z:Foo --> #1:Foo ========================================== unify in SIMULT : g(X:Foo) =? Y:Foo /\ h(X:Foo) =? h(Y:Foo) . No unifier. ========================================== unify in SIMULT : g(X:Foo) =? Y:Foo /\ X:Foo =? h(Y:Foo) . No unifier. ========================================== unify [1] in SIMULT : g(X:Foo) =? Y:Foo /\ h(X:Foo) =? h(Z:Foo) . Solution 1 X:Foo --> #1:Foo Y:Foo --> g(#1:Foo) Z:Foo --> #1:Foo Maude> Bye. Maude-2.7/tests/Misc/dataStructures0000755000147300135640000000036410511603326014346 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/dataStructures.maude -no-banner -no-advise \ > dataStructures.out 2>&1 diff $srcdir/dataStructures.expected dataStructures.out > /dev/null 2>&1 Maude-2.7/tests/Misc/variantUnification0000755000147300135640000000040412006071130015152 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/variantUnification.maude -no-banner -no-advise \ > variantUnification.out 2>&1 diff $srcdir/variantUnification.expected variantUnification.out > /dev/null 2>&1 Maude-2.7/tests/Misc/unification.maude0000644000147300135640000000710011430361531014723 00000000000000set show timing off . *** order sorted free theory unification is not unitary fmod TEST is pr NAT . op f : Nat Nat -> Nat . op f : NzNat Nat -> NzNat . op f : Nat NzNat -> NzNat . endfm unify f(X:Nat, Y:Nat) ^ B:NzNat =? A:NzNat ^ f(Y:Nat, Z:Nat) . *** quite modest AC unification problems can produce a large number of *** unifiers unify [100] in NAT : X:Nat + X:Nat + Y:Nat =? A:Nat + B:Nat + C:Nat . *** built-in constants are handled; built in functions are not *** evaluated unify in CONVERSION : X:String < "foo" + Y:Char =? Z:String + string(pi) < "foo" + Z:String . *** using forbidden variable names in unificands fails with a warning unify in NAT : X:Nat ^ #1:Nat =? #2:Nat . fmod TEST2 is pr NAT . op f : Nat Nat -> Nat [assoc] . endfm *** using of a symbol from an unsupported theory above a non-gound *** term fails with a warning unify f(f(X:Nat, Y:Nat), Z:Nat) =? f(A:Nat, B:Nat) . *** all symbols are allowed in ground terms unify X:Nat + f(41, 42) =? Y:Nat + f(41, 42) . *** order sorted unification is efficient on the iter representation fmod ITER is sorts NzEvenNat EvenNat OddNat NzNat Nat EvenInt OddInt NzInt Int . subsorts OddNat < OddInt NzNat < NzInt < Int . subsorts EvenNat < EvenInt Nat < Int . subsorts NzEvenNat < NzNat EvenNat < Nat . op 0 : -> EvenNat . op s : EvenNat -> OddNat [iter] . op s : OddNat -> NzEvenNat [iter] . op s : Nat -> NzNat [iter] . op s : EvenInt -> OddInt [iter] . op s : OddInt -> EvenInt [iter] . op s : Int -> Int [iter] . op _+_ : Int Int -> Int [comm gather (E e)] . op _+_ : OddInt OddInt -> EvenInt [ditto] . op _+_ : EvenInt EvenInt -> EvenInt [ditto] . op _+_ : OddInt EvenInt -> OddInt [ditto] . op _+_ : Nat Nat -> Nat [ditto] . op _+_ : Nat NzNat -> NzNat [ditto] . op _+_ : OddNat OddNat -> NzEvenNat [ditto] . op _+_ : NzEvenNat EvenNat -> NzEvenNat [ditto] . op _+_ : EvenNat EvenNat -> EvenNat [ditto] . op _+_ : OddNat EvenNat -> OddNat [ditto] . endfm unify s^1000000(X:OddNat) =? s^100000000001(Y:Int) . unify s^1000000(X:OddNat) =? s^100000000001(Y:Int + Z:Int + W:Int) . fmod AC is sort Foo . ops a b c d e z : -> Foo . op f : Foo Foo -> Foo [assoc comm] . op g : Foo Foo -> Foo . vars W X Y Z A B C D E F : Foo . endfm unify f(X, Y) =? f(A, B) . unify f(X, Y) =? f(a, b) . unify f(X, Y) =? f(a, b, c) . match f(X, Y) <=? f(a, b, c) . unify f(X, X, Y) =? f(X, Y, Y) . unify f(X, X, Y) =? f(X, Y) . unify f(X, X, Y) =? f(A, B, C) . unify f(X, X, Y) =? f(a, B, C) . unify f(X, X, X) =? f(a, a) . unify f(X, X, X, Y) =? f(a, a) . fmod AC2 is sort Elt Set . subsort Elt < Set . ops a b c d e z : -> Elt . op f : Set Set -> Set [assoc comm] . op g : Set Set -> Set . vars U V W X Y Z : Set . vars A B C D E F : Elt . endfm unify f(A, B) =? f(C, D) . unify f(X, A) =? f(Y, B) . unify f(g(X, Y), g(X, Z), U) =? f(g(Y, Z), V) . unify g(f(X, Y), f(X, U, Z)) =? g(f(U, V), f(W, A)) . fmod AC+C is sort Elt Set . subsort Elt < Set . ops a b c d e z : -> Elt . op f : Set Set -> Set [assoc comm] . op g : Set Set -> Set [comm] . vars U V W X Y Z : Set . vars A B C D E F : Elt . endfm unify f(g(X, Y), g(X, Z), U) =? f(g(Y, Z), V) . unify g(f(X, Y), f(X, U, Z)) =? g(f(U, V), f(W, A)) . *** simultaneous unification fmod SIMULT is sort Foo . ops g h : Foo -> Foo . endfm unify g(X:Foo) =? g(Y:Foo) /\ h(X:Foo) =? h(Z:Foo) . unify g(X:Foo) =? Y:Foo /\ h(X:Foo) =? h(Z:Foo) . unify g(X:Foo) =? Y:Foo /\ h(X:Foo) =? h(Y:Foo) . unify g(X:Foo) =? Y:Foo /\ X:Foo =? h(Y:Foo) . unify [1] in SIMULT : g(X:Foo) =? Y:Foo /\ h(X:Foo) =? h(Z:Foo) . Maude-2.7/tests/Misc/Makefile.in0000644000147300135640000003164212305230426013453 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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 = tests/Misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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@ TESTS = \ dekker \ commands \ debug \ renaming \ dataStructures \ parameterization \ unification \ unification2 \ unification3 \ attributes \ diophantine \ variantUnification \ variantNarrowing \ CU_Unification \ sreduce MAUDE_FILES = \ dekker.maude \ commands.maude \ debug.maude \ renaming.maude \ dataStructures.maude \ parameterization.maude \ unification.maude \ unification2.maude \ unification3.maude \ attributes.maude \ diophantine.maude \ variantUnification.maude \ variantNarrowing.maude \ CU_Unification.maude \ sreduce.maude RESULT_FILES = \ dekker.expected \ commands.expected \ debug.expected \ renaming.expected \ dataStructures.expected \ parameterization.expected \ unification.expected \ unification2.expected \ unification3.expected \ attributes.expected \ diophantine.expected \ variantUnification.expected \ variantNarrowing.expected \ CU_Unification.expected \ sreduce.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) all: all-am .SUFFIXES: $(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 tests/Misc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Misc/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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): tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(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 $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ distclean distclean-generic 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-generic pdf pdf-am ps ps-am uninstall \ uninstall-am # 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-2.7/tests/Misc/debug.expected0000644000147300135640000000107610053003142014204 00000000000000Maude> ========================================== reduce in BAR : a . ========================================== reduce in BAR : a . rewrites: 2 result Bar: c rewrites: 2 result Bar: c ========================================== reduce in META-LEVEL : metaReduce(['BAR], 'a.Bar) . *********** equation eq [Q:Qid] = th Q:Qid is including Q:Qid . sorts none . none none none none none endth . Q:Qid --> 'BAR ['BAR] ---> th 'BAR is including 'BAR . sorts none . none none none none none endth rewrites: 4 result ResultPair: {'c.Bar,'Bar} Maude> Bye. Maude-2.7/tests/Misc/renaming.maude0000644000147300135640000000276410256611736014240 00000000000000set show timing off . fmod FOO is sorts Foo Bar . subsort Foo < Bar . endfm fmod BAR is inc FOO * (sort Foo to Baz, sort Bar to Quux) . endfm show mod . show all . fmod ONE is sorts Foo Bar . subsort Foo < Bar . endfm fmod TWO is inc ONE * (sort Foo to Baz) . sort Quux . subsort Quux < Baz . endfm fmod THREE is inc TWO * (sort Foo to Foo', sort Baz to Baz', sort Quux to Quux') . sort Jaz . subsort Jaz < Baz' . endfm show mod . show all . fmod FOO is sorts Foo Bar . subsort Foo < Bar . op a : -> Foo . endfm fmod BAR is inc FOO * (sort Foo to Baz, op a to b) . endfm show mod . show all . fmod FOO' is sorts Foo Bar Baz . subsort Foo < Bar . op a : -> Baz . op _+_ : Foo Foo -> Foo [prec 31 gather (e E) assoc comm] . op _+_ : Baz Baz -> Foo [prec 31 gather (e E)] . endfm fmod BAR' is inc FOO' * ( sort Foo to Quux, op _+_ : Foo Foo -> Foo to _*_ [prec 29 gather (E e)], op _+_ : Baz Baz -> Foo to _._ [prec 27 gather (E e)] ) . endfm show mod . show all . red a . a * a . a . fmod BAR'' is inc FOO' * ( sort Foo to Quux, op _+_ to _*_ [prec 29 gather (E E)] ) . endfm show mod . show all . red a * a * a * a . red (a * a) * (a * a) . *** Check splitting renaming over bashed together ops fmod DIFF is sorts Foo Bar . op f : Foo -> Foo . op f : Bar -> Bar . endfm fmod BASH is inc DIFF . subsort Foo < Bar . endfm fmod TEST is inc BASH * (op f : Foo -> Foo to g) . endfm show mod . show all . show modules . Maude-2.7/tests/Misc/dataStructures.expected0000644000147300135640000002251510511603752016150 00000000000000Maude> ========================================== reduce in SORTABLE-LIST-TEST : size(gen(100)) . rewrites: 504 result NzNat: 100 ========================================== reduce in SORTABLE-LIST-TEST : sort(gen(100)) . rewrites: 2627 result NeList{Nat<}: 0 0 0 0 0 0 0 0 0 0 1 1 1 1 4 4 4 4 9 9 9 9 16 16 16 16 21 21 21 21 24 24 24 24 25 25 25 25 25 25 25 25 25 25 29 29 29 29 36 36 36 36 41 41 41 41 44 44 44 44 49 49 49 49 56 56 56 56 61 61 61 61 64 64 64 64 69 69 69 69 76 76 76 76 81 81 81 81 84 84 84 84 89 89 89 89 96 96 96 96 ========================================== reduce in SORTABLE-LIST-TEST : reverse(sort(gen(100))) . rewrites: 2729 result NeList{Nat<}: 96 96 96 96 89 89 89 89 84 84 84 84 81 81 81 81 76 76 76 76 69 69 69 69 64 64 64 64 61 61 61 61 56 56 56 56 49 49 49 49 44 44 44 44 41 41 41 41 36 36 36 36 29 29 29 29 25 25 25 25 25 25 25 25 25 25 24 24 24 24 21 21 21 21 16 16 16 16 9 9 9 9 4 4 4 4 1 1 1 1 0 0 0 0 0 0 0 0 0 0 ========================================== reduce in SORTABLE-LIST-TEST : occurs(5, gen(100)) . rewrites: 603 result Bool: false ========================================== reduce in SORTABLE-LIST-TEST : occurs(24, gen(100)) . rewrites: 356 result Bool: true ========================================== reduce in SET-TEST : intersection(gen(100, 13), gen(100, 4)) . rewrites: 906 result NeSet{Nat}: 52, 104, 156, 208, 260, 312, 364 ========================================== reduce in SET-TEST : union(gen(100, 13), gen(100, 4)) . rewrites: 606 result NeSet{Nat}: 4, 8, 12, 13, 16, 20, 24, 26, 28, 32, 36, 39, 40, 44, 48, 52, 56, 60, 64, 65, 68, 72, 76, 78, 80, 84, 88, 91, 92, 96, 100, 104, 108, 112, 116, 117, 120, 124, 128, 130, 132, 136, 140, 143, 144, 148, 152, 156, 160, 164, 168, 169, 172, 176, 180, 182, 184, 188, 192, 195, 196, 200, 204, 208, 212, 216, 220, 221, 224, 228, 232, 234, 236, 240, 244, 247, 248, 252, 256, 260, 264, 268, 272, 273, 276, 280, 284, 286, 288, 292, 296, 299, 300, 304, 308, 312, 316, 320, 324, 325, 328, 332, 336, 338, 340, 344, 348, 351, 352, 356, 360, 364, 368, 372, 376, 377, 380, 384, 388, 390, 392, 396, 400, 403, 416, 429, 442, 455, 468, 481, 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, 806, 819, 832, 845, 858, 871, 884, 897, 910, 923, 936, 949, 962, 975, 988, 1001, 1014, 1027, 1040, 1053, 1066, 1079, 1092, 1105, 1118, 1131, 1144, 1157, 1170, 1183, 1196, 1209, 1222, 1235, 1248, 1261, 1274, 1287, 1300 ========================================== reduce in SET-TEST : gen(100, 13) \ gen(100, 52) . rewrites: 906 result NeSet{Nat}: 13, 26, 39, 65, 78, 91, 117, 130, 143, 169, 182, 195, 221, 234, 247, 273, 286, 299, 325, 338, 351, 377, 390, 403, 429, 442, 455, 481, 494, 507, 533, 546, 559, 585, 598, 611, 637, 650, 663, 689, 702, 715, 741, 754, 767, 793, 806, 819, 845, 858, 871, 897, 910, 923, 949, 962, 975, 1001, 1014, 1027, 1053, 1066, 1079, 1105, 1118, 1131, 1157, 1170, 1183, 1209, 1222, 1235, 1261, 1274, 1287 ========================================== reduce in SET-TEST : intersection(gen(100, 13), gen(100, 4)) \ gen(100, 52) . rewrites: 1231 result Set{Nat}: empty ========================================== reduce in SET-TEST : | gen(100, 13) | . rewrites: 504 result NzNat: 100 ========================================== reduce in SET-TEST : delete(3, (4, 3, 5)) . rewrites: 2 result NeSet{Nat}: 4, 5 ========================================== reduce in SET-TEST : 53 in union(gen(100, 13), gen(100, 4)) . rewrites: 607 result Bool: false ========================================== reduce in SET-TEST : 52 in union(gen(100, 13), gen(100, 4)) . rewrites: 607 result Bool: true ========================================== reduce in LIST-AND-SET-TEST : gen(100) . rewrites: 302 result NeList{Nat}: 1 4 9 16 25 36 49 64 81 0 21 44 69 96 25 56 89 24 61 0 41 84 29 76 25 76 29 84 41 0 61 24 89 56 25 96 69 44 21 0 81 64 49 36 25 16 9 4 1 0 1 4 9 16 25 36 49 64 81 0 21 44 69 96 25 56 89 24 61 0 41 84 29 76 25 76 29 84 41 0 61 24 89 56 25 96 69 44 21 0 81 64 49 36 25 16 9 4 1 0 ========================================== reduce in LIST-AND-SET-TEST : makeSet(gen(100)) . rewrites: 482 result NeSet{Nat}: 0, 1, 4, 9, 16, 21, 24, 25, 29, 36, 41, 44, 49, 56, 61, 64, 69, 76, 81, 84, 89, 96 ========================================== reduce in LIST-AND-SET-TEST : filter(gen(100), makeSet(gen(10))) . rewrites: 648 result NeList{Nat}: 1 4 9 16 25 36 49 64 81 0 25 0 25 0 25 0 81 64 49 36 25 16 9 4 1 0 1 4 9 16 25 36 49 64 81 0 25 0 25 0 25 0 81 64 49 36 25 16 9 4 1 0 ========================================== reduce in LIST-AND-SET-TEST : filterOut(gen(100), makeSet(gen(10))) . rewrites: 648 result NeList{Nat}: 21 44 69 96 56 89 24 61 41 84 29 76 76 29 84 41 61 24 89 56 96 69 44 21 21 44 69 96 56 89 24 61 41 84 29 76 76 29 84 41 61 24 89 56 96 69 44 21 ========================================== reduce in SORTABLE-LIST-AND-SET-TEST : makeList(makeSet(gen(100))) . rewrites: 781 result NeList{Nat<}: 0 1 4 9 16 21 24 25 29 36 41 44 49 56 61 64 69 76 81 84 89 96 ========================================== reduce in LIST*-TEST : append(a, b) . rewrites: 3 result NeList{Nat}: [[1 2 3] [] [3 4 5 6] [[1] []] 2 [1 2 3]] ========================================== reduce in LIST*-TEST : size(append(a, b)) . rewrites: 16 result NzNat: 6 ========================================== reduce in LIST*-TEST : reverse(append(a, b)) . rewrites: 9 result NeList{Nat}: [[1 2 3] 2 [[1] []] [3 4 5 6] [] [1 2 3]] ========================================== reduce in LIST*-TEST : head(a) . rewrites: 2 result NeList{Nat}: [1 2 3] ========================================== reduce in LIST*-TEST : tail(a) . rewrites: 2 result NeList{Nat}: [[] [3 4 5 6]] ========================================== reduce in LIST*-TEST : last(a) . rewrites: 2 result NeList{Nat}: [3 4 5 6] ========================================== reduce in LIST*-TEST : front(a) . rewrites: 2 result NeList{Nat}: [[1 2 3] []] ========================================== reduce in LIST*-TEST : occurs([], a) . rewrites: 7 result Bool: true ========================================== reduce in LIST*-TEST : occurs([2 3], a) . rewrites: 9 result Bool: false ========================================== reduce in SET*-TEST : zf(0) . rewrites: 1 result Set{Nat}: {} ========================================== reduce in SET*-TEST : zf(1) . rewrites: 3 result NeSet{Nat}: {{}} ========================================== reduce in SET*-TEST : zf(2) . rewrites: 5 result NeSet{Nat}: {{}, {{}}} ========================================== reduce in SET*-TEST : zf(3) . rewrites: 7 result NeSet{Nat}: {{}, {{}}, {{}, {{}}}} ========================================== reduce in SET*-TEST : zf(4) . rewrites: 9 result NeSet{Nat}: {{}, {{}}, {{}, {{}}}, {{}, {{}}, {{}, {{}}}}} ========================================== reduce in SET*-TEST : | zf(10) | . rewrites: 42 result NzNat: 10 ========================================== reduce in SET*-TEST : | zf(100) | . rewrites: 402 result NzNat: 100 ========================================== reduce in SET*-TEST : 2^ zf(4) . rewrites: 69 result NeSet{Nat}: {{}, {{}}, {{{}}}, {{{}, {{}}}}, {{{}, {{}}, {{}, {{}}}}}, { {}, {{}}}, {{}, {{}, {{}}}}, {{}, {{}, {{}}, {{}, {{}}}}}, {{{}}, {{}, {{ }}}}, {{{}}, {{}, {{}}, {{}, {{}}}}}, {{{}, {{}}}, {{}, {{}}, {{}, {{}}}}}, {{}, {{}}, {{}, {{}}}}, {{}, {{}}, {{}, {{}}, {{}, {{}}}}}, {{}, {{}, {{ }}}, {{}, {{}}, {{}, {{}}}}}, {{{}}, {{}, {{}}}, {{}, {{}}, {{}, {{}}}}}, { {}, {{}}, {{}, {{}}}, {{}, {{}}, {{}, {{}}}}}} ========================================== reduce in SET*-TEST : | 2^ zf(9) | . rewrites: 3093 result NzNat: 512 ========================================== reduce in MAP-TEST : a . rewrites: 5 result Map{String,Nat}: "one" |-> 1, "three" |-> 3, "two" |-> 2, "zero" |-> 0 ========================================== reduce in MAP-TEST : a["one"] . rewrites: 8 result NzNat: 1 ========================================== reduce in ARRAY-TEST : gen(100) . rewrites: 501 result Array{Nat,Nat0}: 1 |-> 1 ; 2 |-> 2 ; 3 |-> 3 ; 4 |-> 4 ; 5 |-> 5 ; 6 |-> 6 ; 7 |-> 7 ; 8 |-> 8 ; 9 |-> 9 ; 11 |-> 1 ; 12 |-> 2 ; 13 |-> 3 ; 14 |-> 4 ; 15 |-> 5 ; 16 |-> 6 ; 17 |-> 7 ; 18 |-> 8 ; 19 |-> 9 ; 21 |-> 1 ; 22 |-> 2 ; 23 |-> 3 ; 24 |-> 4 ; 25 |-> 5 ; 26 |-> 6 ; 27 |-> 7 ; 28 |-> 8 ; 29 |-> 9 ; 31 |-> 1 ; 32 |-> 2 ; 33 |-> 3 ; 34 |-> 4 ; 35 |-> 5 ; 36 |-> 6 ; 37 |-> 7 ; 38 |-> 8 ; 39 |-> 9 ; 41 |-> 1 ; 42 |-> 2 ; 43 |-> 3 ; 44 |-> 4 ; 45 |-> 5 ; 46 |-> 6 ; 47 |-> 7 ; 48 |-> 8 ; 49 |-> 9 ; 51 |-> 1 ; 52 |-> 2 ; 53 |-> 3 ; 54 |-> 4 ; 55 |-> 5 ; 56 |-> 6 ; 57 |-> 7 ; 58 |-> 8 ; 59 |-> 9 ; 61 |-> 1 ; 62 |-> 2 ; 63 |-> 3 ; 64 |-> 4 ; 65 |-> 5 ; 66 |-> 6 ; 67 |-> 7 ; 68 |-> 8 ; 69 |-> 9 ; 71 |-> 1 ; 72 |-> 2 ; 73 |-> 3 ; 74 |-> 4 ; 75 |-> 5 ; 76 |-> 6 ; 77 |-> 7 ; 78 |-> 8 ; 79 |-> 9 ; 81 |-> 1 ; 82 |-> 2 ; 83 |-> 3 ; 84 |-> 4 ; 85 |-> 5 ; 86 |-> 6 ; 87 |-> 7 ; 88 |-> 8 ; 89 |-> 9 ; 91 |-> 1 ; 92 |-> 2 ; 93 |-> 3 ; 94 |-> 4 ; 95 |-> 5 ; 96 |-> 6 ; 97 |-> 7 ; 98 |-> 8 ; 99 |-> 9 ========================================== reduce in ARRAY-TEST : gen(100)[55] . rewrites: 504 result NzNat: 5 ========================================== reduce in ARRAY-TEST : gen(100)[60] . rewrites: 502 result Zero: 0 ========================================== reduce in ARRAY-TEST : gen(100)[1000000000000000000000] . rewrites: 502 result Zero: 0 Maude> Bye. Maude-2.7/tests/Misc/diophantine0000755000147300135640000000035010511603045013624 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/diophantine.maude -no-banner -no-advise \ > diophantine.out 2>&1 diff $srcdir/diophantine.expected diophantine.out > /dev/null 2>&1 Maude-2.7/tests/Misc/variantUnification.expected0000644000147300135640000000654412305221416016770 00000000000000Maude> ========================================== variant unify in FOO : f(X, g(Y, Z)) =? f(X, g(Y, Z)) . Unifier #1 rewrites: 0 X --> #1:Foo Y --> #2:Foo Z --> #3:Foo No more unifiers. rewrites: 0 ========================================== variant unify in FOO : g(f(X, Y), Z) =? g(a, g(A, B)) . Unifier #1 rewrites: 2 X --> a Y --> 1f Z --> g(#1:Foo, #2:Foo) A --> #1:Foo B --> #2:Foo Unifier #2 rewrites: 2 X --> 1f Y --> a Z --> g(#1:Foo, #2:Foo) A --> #1:Foo B --> #2:Foo No more unifiers. rewrites: 2 ========================================== variant unify in FOO : f(1f, g(Y, Z)) =? g(Y, Z) . Unifier #1 rewrites: 1 Y --> #1:Foo Z --> #2:Foo No more unifiers. rewrites: 1 ========================================== variant unify in FOO : g(f(X, Y), Z) =? g(A, f(B, C)) . Unifier #1 rewrites: 4 X --> %1:Foo Y --> %2:Foo Z --> f(%3:Foo, %4:Foo) A --> f(%1:Foo, %2:Foo) B --> %3:Foo C --> %4:Foo Unifier #2 rewrites: 12 X --> #1:Foo Y --> 1f Z --> f(#2:Foo, #3:Foo) A --> #1:Foo B --> #2:Foo C --> #3:Foo Unifier #3 rewrites: 12 X --> 1f Y --> #1:Foo Z --> f(#2:Foo, #3:Foo) A --> #1:Foo B --> #2:Foo C --> #3:Foo Unifier #4 rewrites: 12 X --> #1:Foo Y --> #2:Foo Z --> #3:Foo A --> f(#1:Foo, #2:Foo) B --> #3:Foo C --> 1f Unifier #5 rewrites: 12 X --> #1:Foo Y --> #2:Foo Z --> #3:Foo A --> f(#1:Foo, #2:Foo) B --> 1f C --> #3:Foo Unifier #6 rewrites: 12 X --> %1:Foo Y --> 1f Z --> %2:Foo A --> %1:Foo B --> %2:Foo C --> 1f Unifier #7 rewrites: 12 X --> %1:Foo Y --> 1f Z --> %2:Foo A --> %1:Foo B --> 1f C --> %2:Foo Unifier #8 rewrites: 12 X --> 1f Y --> %1:Foo Z --> %2:Foo A --> %1:Foo B --> %2:Foo C --> 1f Unifier #9 rewrites: 12 X --> 1f Y --> %1:Foo Z --> %2:Foo A --> %1:Foo B --> 1f C --> %2:Foo No more unifiers. rewrites: 12 ========================================== variant unify in LEFT-ID : X:Magma a =? Y:Magma a a . Unifier #1 rewrites: 2 X:Magma --> %1:Magma a Y:Magma --> %1:Magma Unifier #2 rewrites: 4 X:Magma --> a Y:Magma --> e No more unifiers. rewrites: 4 ========================================== variant unify in LEFT-ID : a X:Magma =? a a Y:Magma . No unifiers. rewrites: 0 ========================================== variant unify in RIGHT-ID : X:Magma a =? Y:Magma a a . No unifiers. rewrites: 0 ========================================== variant unify in RIGHT-ID : a X:Magma =? a a Y:Magma . Unifier #1 rewrites: 2 X:Magma --> a %1:Magma Y:Magma --> %1:Magma Unifier #2 rewrites: 4 X:Magma --> a Y:Magma --> e No more unifiers. rewrites: 4 ========================================== variant unify in XOR : X + cst1 =? Y + cst2 . Unifier #1 rewrites: 6 X --> cst2 + %1:XOR Y --> cst1 + %1:XOR Unifier #2 rewrites: 6 X --> cst2 Y --> cst1 Unifier #3 rewrites: 24 X --> cst1 + cst2 + #1:XOR Y --> #1:XOR Unifier #4 rewrites: 24 X --> #1:XOR Y --> cst1 + cst2 + #1:XOR Unifier #5 rewrites: 24 X --> 0 Y --> cst1 + cst2 Unifier #6 rewrites: 24 X --> cst1 Y --> cst2 Unifier #7 rewrites: 24 X --> cst1 + cst2 Y --> 0 Unifier #8 rewrites: 24 X --> cst1 + %1:XOR Y --> cst2 + %1:XOR No more unifiers. rewrites: 24 ========================================== variant unify in XOR : X + cst1 =? Y + cst2 such that X + cst1 irreducible . Unifier #1 rewrites: 3 X --> cst2 + %1:XOR Y --> cst1 + %1:XOR Unifier #2 rewrites: 3 X --> cst2 Y --> cst1 Unifier #3 rewrites: 3 X --> #1:XOR Y --> cst1 + cst2 + #1:XOR No more unifiers. rewrites: 3 Maude> Bye. Maude-2.7/tests/Misc/debug.maude0000644000147300135640000000102010026174112013471 00000000000000set show timing off . set show advisories off . fmod FOO is sort Foo . endfm fmod BAR is inc FOO . sort Bar . ops a b c : -> Bar . eq a = b . eq b = c . endfm debug red a . fmod FOO is sort Foo2 . endfm debug red in BAR : a . fmod FOO is sort Foo2 . endfm resume . resume . fmod FOO is sort Foo . endfm fmod BAR is inc FOO . sort Bar . ops a b c : -> Bar . eq a = b . eq b = c . endfm debug red in META-LEVEL : metaReduce(['BAR], 'a.Bar) . step . fmod FOO is sort Foo . endfm resume . Maude-2.7/tests/Misc/commands0000755000147300135640000000033410511602743013131 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/commands.maude -no-banner -no-advise \ > commands.out 2>&1 diff $srcdir/commands.expected commands.out > /dev/null 2>&1 Maude-2.7/tests/Misc/CU_Unification.expected0000644000147300135640000001512212305221432015760 00000000000000Maude> ========================================== unify in FOO : f(X, Y) =? f(U, V) . Solution 1 X --> #1:Foo Y --> #2:Foo U --> #1:Foo V --> #2:Foo Solution 2 X --> 1f Y --> #1:Foo U --> 1f V --> #1:Foo Solution 3 X --> 1f Y --> f(#1:Foo, #2:Foo) U --> #1:Foo V --> #2:Foo Solution 4 X --> 1f Y --> #1:Foo U --> 1f V --> #1:Foo Solution 5 X --> #1:Foo Y --> #2:Foo U --> 1f V --> f(#1:Foo, #2:Foo) ========================================== variant unify in FOO : f(X, Y) =? f(U, V) . Unifier #1 rewrites: 0 X --> %1:Foo Y --> %2:Foo U --> %1:Foo V --> %2:Foo Unifier #2 rewrites: 0 X --> 1f Y --> f(%1:Foo, %2:Foo) U --> %1:Foo V --> %2:Foo Unifier #3 rewrites: 0 X --> %1:Foo Y --> %2:Foo U --> 1f V --> f(%1:Foo, %2:Foo) No more unifiers. rewrites: 0 ========================================== unify in FOO : f(X, Y) =? X . Solution 1 X --> 1f Y --> 1f ========================================== variant unify in FOO : f(X, Y) =? X . Unifier #1 rewrites: 0 X --> 1f Y --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO : f(X, Y) =? Y . Solution 1 X --> 1f Y --> #1:Foo ========================================== variant unify in FOO : f(X, Y) =? Y . Unifier #1 rewrites: 0 X --> 1f Y --> %1:Foo No more unifiers. rewrites: 0 ========================================== unify in FOO2 : f(X, Y) =? f(U, V) . Solution 1 X --> #1:Foo Y --> #2:Foo U --> #1:Foo V --> #2:Foo Solution 2 X --> #1:Foo Y --> 1f U --> #1:Foo V --> 1f Solution 3 X --> f(#1:Foo, #2:Foo) Y --> 1f U --> #1:Foo V --> #2:Foo Solution 4 X --> #1:Foo Y --> 1f U --> #1:Foo V --> 1f Solution 5 X --> #1:Foo Y --> #2:Foo U --> f(#1:Foo, #2:Foo) V --> 1f ========================================== variant unify in FOO2 : f(X, Y) =? f(U, V) . Unifier #1 rewrites: 0 X --> %1:Foo Y --> %2:Foo U --> %1:Foo V --> %2:Foo Unifier #2 rewrites: 0 X --> f(%1:Foo, %2:Foo) Y --> 1f U --> %1:Foo V --> %2:Foo Unifier #3 rewrites: 0 X --> %1:Foo Y --> %2:Foo U --> f(%1:Foo, %2:Foo) V --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO2 : f(X, Y) =? X . Solution 1 X --> #1:Foo Y --> 1f ========================================== variant unify in FOO2 : f(X, Y) =? X . Unifier #1 rewrites: 0 X --> %1:Foo Y --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO2 : f(X, Y) =? Y . Solution 1 X --> 1f Y --> 1f ========================================== variant unify in FOO2 : f(X, Y) =? Y . Unifier #1 rewrites: 0 X --> 1f Y --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO3 : f(X, Y) =? f(U, V) . Solution 1 X --> #1:Foo Y --> #2:Foo U --> #1:Foo V --> #2:Foo Solution 2 X --> 1f Y --> #1:Foo U --> 1f V --> #1:Foo Solution 3 X --> 1f Y --> #1:Foo U --> #1:Foo V --> 1f Solution 4 X --> 1f Y --> f(#1:Foo, #2:Foo) U --> #1:Foo V --> #2:Foo Solution 5 X --> #1:Foo Y --> 1f U --> 1f V --> #1:Foo Solution 6 X --> #1:Foo Y --> 1f U --> #1:Foo V --> 1f Solution 7 X --> f(#1:Foo, #2:Foo) Y --> 1f U --> #1:Foo V --> #2:Foo Solution 8 X --> 1f Y --> #1:Foo U --> 1f V --> #1:Foo Solution 9 X --> #1:Foo Y --> 1f U --> 1f V --> #1:Foo Solution 10 X --> #1:Foo Y --> #2:Foo U --> 1f V --> f(#1:Foo, #2:Foo) Solution 11 X --> 1f Y --> #1:Foo U --> #1:Foo V --> 1f Solution 12 X --> #1:Foo Y --> 1f U --> #1:Foo V --> 1f Solution 13 X --> #1:Foo Y --> #2:Foo U --> f(#1:Foo, #2:Foo) V --> 1f ========================================== variant unify in FOO3 : f(X, Y) =? f(U, V) . Unifier #1 rewrites: 0 X --> %1:Foo Y --> %2:Foo U --> %1:Foo V --> %2:Foo Unifier #2 rewrites: 0 X --> 1f Y --> f(%1:Foo, %2:Foo) U --> %1:Foo V --> %2:Foo Unifier #3 rewrites: 0 X --> f(%1:Foo, %2:Foo) Y --> 1f U --> %1:Foo V --> %2:Foo Unifier #4 rewrites: 0 X --> %1:Foo Y --> %2:Foo U --> 1f V --> f(%1:Foo, %2:Foo) Unifier #5 rewrites: 0 X --> %1:Foo Y --> %2:Foo U --> f(%1:Foo, %2:Foo) V --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO3 : f(X, Y) =? X . Solution 1 X --> 1f Y --> 1f Solution 2 X --> #1:Foo Y --> 1f ========================================== variant unify in FOO3 : f(X, Y) =? X . Unifier #1 rewrites: 0 X --> %1:Foo Y --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO3 : f(X, Y) =? Y . Solution 1 X --> 1f Y --> #1:Foo Solution 2 X --> 1f Y --> 1f ========================================== variant unify in FOO3 : f(X, Y) =? Y . Unifier #1 rewrites: 0 X --> 1f Y --> %1:Foo No more unifiers. rewrites: 0 ========================================== unify in FOO4 : f(X, Y) =? f(U, V) . Solution 1 X --> #1:Foo Y --> #2:Foo V --> #1:Foo U --> #2:Foo Solution 2 X --> #2:Foo Y --> #1:Foo V --> #1:Foo U --> #2:Foo Solution 3 X --> 1f Y --> #1:Foo V --> 1f U --> #1:Foo Solution 4 X --> 1f Y --> #1:Foo V --> #1:Foo U --> 1f Solution 5 X --> 1f Y --> f(#1:Foo, #2:Foo) V --> #1:Foo U --> #2:Foo Solution 6 X --> #1:Foo Y --> 1f V --> 1f U --> #1:Foo Solution 7 X --> #1:Foo Y --> 1f V --> #1:Foo U --> 1f Solution 8 X --> f(#1:Foo, #2:Foo) Y --> 1f V --> #1:Foo U --> #2:Foo Solution 9 X --> 1f Y --> #1:Foo V --> 1f U --> #1:Foo Solution 10 X --> #1:Foo Y --> 1f V --> 1f U --> #1:Foo Solution 11 X --> #1:Foo Y --> #2:Foo V --> 1f U --> f(#1:Foo, #2:Foo) Solution 12 X --> 1f Y --> #1:Foo V --> #1:Foo U --> 1f Solution 13 X --> #1:Foo Y --> 1f V --> #1:Foo U --> 1f Solution 14 X --> #1:Foo Y --> #2:Foo V --> f(#1:Foo, #2:Foo) U --> 1f ========================================== variant unify in FOO4 : f(X, Y) =? f(U, V) . Unifier #1 rewrites: 0 X --> %1:Foo Y --> %2:Foo V --> %1:Foo U --> %2:Foo Unifier #2 rewrites: 0 X --> %2:Foo Y --> %1:Foo V --> %1:Foo U --> %2:Foo Unifier #3 rewrites: 0 X --> 1f Y --> f(%1:Foo, %2:Foo) V --> %1:Foo U --> %2:Foo Unifier #4 rewrites: 0 X --> f(%1:Foo, %2:Foo) Y --> 1f V --> %1:Foo U --> %2:Foo Unifier #5 rewrites: 0 X --> %1:Foo Y --> %2:Foo V --> 1f U --> f(%1:Foo, %2:Foo) Unifier #6 rewrites: 0 X --> %1:Foo Y --> %2:Foo V --> f(%1:Foo, %2:Foo) U --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO4 : f(X, Y) =? X . Solution 1 X --> 1f Y --> 1f Solution 2 X --> #1:Foo Y --> 1f ========================================== variant unify in FOO4 : f(X, Y) =? X . Unifier #1 rewrites: 0 X --> %1:Foo Y --> 1f No more unifiers. rewrites: 0 ========================================== unify in FOO4 : f(X, Y) =? Y . Solution 1 X --> 1f Y --> #1:Foo Solution 2 X --> 1f Y --> 1f ========================================== variant unify in FOO4 : f(X, Y) =? Y . Unifier #1 rewrites: 0 X --> 1f Y --> %1:Foo No more unifiers. rewrites: 0 Maude> Bye. Maude-2.7/tests/Misc/Makefile.am0000744000147300135640000000175212234062075013446 00000000000000TESTS = \ dekker \ commands \ debug \ renaming \ dataStructures \ parameterization \ unification \ unification2 \ unification3 \ attributes \ diophantine \ variantUnification \ variantNarrowing \ CU_Unification \ sreduce MAUDE_FILES = \ dekker.maude \ commands.maude \ debug.maude \ renaming.maude \ dataStructures.maude \ parameterization.maude \ unification.maude \ unification2.maude \ unification3.maude \ attributes.maude \ diophantine.maude \ variantUnification.maude \ variantNarrowing.maude \ CU_Unification.maude \ sreduce.maude RESULT_FILES = \ dekker.expected \ commands.expected \ debug.expected \ renaming.expected \ dataStructures.expected \ parameterization.expected \ unification.expected \ unification2.expected \ unification3.expected \ attributes.expected \ diophantine.expected \ variantUnification.expected \ variantNarrowing.expected \ CU_Unification.expected \ sreduce.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) Maude-2.7/tests/Misc/renaming0000755000147300135640000000033410511603114013121 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/renaming.maude -no-banner -no-advise \ > renaming.out 2>&1 diff $srcdir/renaming.expected renaming.out > /dev/null 2>&1 Maude-2.7/tests/Misc/parameterization.maude0000644000147300135640000001251711064055133016002 00000000000000set show timing off . *** check renaming instantiation *** trivial case: no parameterized sorts in renaming fmod FOO{X :: TRIV, Y :: TRIV} is sort Foo{X,Y} . op f : Bool -> Bool . endfm fmod BAR{Z :: TRIV} is inc FOO{Z, Nat} . endfm fmod BAZ is inc (BAR * (op f : Bool -> Bool to g)){Rat} . endfm show all . show modules . *** parameterized sorts in renaming fmod FOO{X :: TRIV, Y :: TRIV} is sort Foo{X,Y} . op f : Foo{X,Y} -> Foo{X,Y} . endfm fmod BAR{Z :: TRIV} is inc FOO{Z, Nat} . endfm fmod BAZ is inc (BAR * (sort Foo{Z, Nat} to Bar{Nat, Z}, op f : Foo{Z, Nat} -> Foo{Z, Nat} to g) ){Rat} . endfm show all . show modules . *** parameter has the same name fmod FOO{X :: TRIV, Y :: TRIV} is sort Foo{X,Y} . op f : Foo{X,Y} -> Foo{X,Y} . endfm fmod BAR{X :: TRIV} is inc FOO{X, Nat} . endfm fmod BAZ is inc (BAR * (sort Foo{X, Nat} to Bar{Nat, X}, op f : Foo{X, Nat} -> Foo{X, Nat} to g) ){Rat} . endfm show all . show modules . *** recapture of bound parameters instantiated by a theory-view fmod FOO{X :: TRIV} is sort Foo{X} . op f : Foo{X} -> Foo{X} . endfm fmod BAR{X :: TRIV} is inc FOO{X} . sort Bar{X} . op g : Bar{X} -> Foo{X} . endfm fmod BAZ is inc (BAR * (sort Foo{X} to Foo'{X}, sort Bar{X} to Bar'{X}, op f : Foo{X} -> Foo{X} to f', op g : Bar{X} -> Foo{X} to g') ){STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} . endfm show all . show modules . *** op->term mappings fth T is sort Elt . op f : Elt -> Elt . endfth fmod M{X :: T} is op g : X$Elt -> X$Elt . var A : X$Elt . eq g(A) = f(f(A)) . endfm view V from T to NAT is sort Elt to Nat . op f(X:Elt) to term X:Nat + 1 . endv fmod TEST is inc M{V} . endfm show all . *** with terms occuring as identities fth T is sort Elt . op s : Elt -> Elt . op 0 : -> Elt . endfth fmod M{X :: T} is op _#_ : X$Elt X$Elt -> X$Elt [id: s(0)] . vars A B : X$Elt . eq s(A) # s(B) = s(s(A # B)) . endfm view V from T to NAT is sort Elt to Nat . op s(X:Elt) to term s X:Nat . endv fmod TEST is inc M{V} . endfm show all . red 0 # 1 . **** mapping iter ops to terms fth T is sort Elt . op s : Elt -> Elt [iter] . op 0 : -> Elt . endfth fmod M{X :: T} is op f : X$Elt -> X$Elt . var A : X$Elt . eq f(A) = s^10(A) . endfm view V from T to INT is sort Elt to Int . op s(X:Elt) to term - X:Int . endv fmod TEST is inc M{V} . endfm show all . fth T is sort Elt . op s : Elt -> Elt [iter] . op 0 : -> Elt . endfth fmod M{X :: T} is op f : X$Elt -> X$Elt . var A : X$Elt . eq f(A) = s^3(A) . endfm view V from T to INT is sort Elt to Int . op s(X:Elt) to term X:Int * X:Int . endv fmod TEST is inc M{V} . endfm show all . **** mapping assoc ops to terms fth T is sort Elt . op f : Elt Elt -> Elt [assoc] . endfth fmod M{X :: T} is op g : X$Elt X$Elt -> X$Elt . vars A B : X$Elt . eq g(A, B) = f(A, B, A, B) . endfm view V from T to NAT is sort Elt to Nat . op f(X:Elt, Y:Elt) to term X:Nat + Y:Nat . endv fmod TEST is inc M{V} . endfm show all . fth T is sort Elt . op f : Elt Elt -> Elt [assoc] . endfth fmod M{X :: T} is op g : X$Elt X$Elt -> X$Elt . vars A B : X$Elt . eq g(A, B) = f(A, B, A, B) . endfm view V from T to INT is sort Elt to Int . op f(X:Elt, Y:Elt) to term X:Int - s Y:Int . endv fmod TEST is inc M{V} . endfm show all . set print mixfix off . show all . set print mixfix on . **** mapping AC ops to terms fth T is sort Elt . op f : Elt Elt -> Elt [assoc comm] . endfth fmod M{X :: T} is op g : X$Elt X$Elt -> X$Elt . vars A B : X$Elt . eq g(A, B) = f(A, B, A, B) . endfm show all . view V from T to NAT is sort Elt to Nat . op f(X:Elt, Y:Elt) to term X:Nat + Y:Nat . endv fmod TEST is inc M{V} . endfm show all . set print mixfix off . show all . fth T is sort Elt . op f : Elt Elt -> Elt [assoc comm] . endfth fmod M{X :: T} is op g : X$Elt X$Elt -> X$Elt . vars A B : X$Elt . eq g(A, B) = f(A, B, A, B) . endfm show all . view V from T to INT is sort Elt to Int . op f(X:Elt, Y:Elt) to term X:Int - s Y:Int . endv fmod TEST is inc M{V} . endfm show all . set print mixfix off . show all . set print mixfix on . *** what if toTerm contains polymorph instances? fth T is sort Elt . op f : Elt Elt -> Elt [assoc comm] . endfth fmod M{X :: T} is op g : X$Elt X$Elt -> X$Elt . vars A B : X$Elt . eq g(A, B) = f(A, B, A, B) . endfm show all . view V from T to NAT is sort Elt to Nat . op f(X:Elt, Y:Elt) to term if X:Nat > Y:Nat then X:Nat else Y:Nat fi . endv fmod TEST is inc M{V} . endfm show all . set print mixfix off . show all . set print mixfix off . red g(5, 4) . *** check handling of illegal stuff *** summing modules with free parameters fmod FOO{X :: TRIV} is inc (LIST + SET){X} . endfm *** summing modules with bound parameters fmod FOO{X :: TRIV} is inc LIST{X} + SET{X} . endfm *** passing a PEM in a nonfinal instantiation fmod FOO{X :: STRICT-WEAK-ORDER, Y :: TRIV} is inc MAP{STRICT-WEAK-ORDER, Y}{X} . endfm *** illegally overriding an operator from a parameter theory fth T is sort Elt . op f : Elt -> Elt . endfth view V from T to NAT is sort Elt to NzNat . op f(X:Elt) to term X:NzNat . endv fmod MOD{M :: T} is op f : M$Elt -> M$Elt . endfm fmod TEST is protecting MOD{V} . endfm Maude-2.7/tests/Misc/parameterization0000755000147300135640000000037410511603071014705 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/parameterization.maude -no-banner -no-advise \ > parameterization.out 2>&1 diff $srcdir/parameterization.expected parameterization.out > /dev/null 2>&1 Maude-2.7/tests/Misc/dataStructures.maude0000644000147300135640000000540710502101415015430 00000000000000set show timing off . fmod SORTABLE-LIST-TEST is inc SORTABLE-LIST{Nat<} . var N : Nat . var L : List{Nat<} . op gen : Nat -> List{Nat<} . eq gen(N) = gen2(N, nil) . op gen2 : Nat List{Nat<} -> List{Nat<} . eq gen2(0, L) = L . eq gen2(s N, L) = gen2(N, ((s N * s N) rem 100) L) . endfm red size(gen(100)) . red sort(gen(100)) . red reverse(sort(gen(100))) . red occurs(5, gen(100)) . red occurs(24, gen(100)) . fmod SET-TEST is inc SET{Nat} . var N M : Nat . var A : Set{Nat} . op gen : Nat Nat -> Set{Nat} . eq gen(N, M) = gen2(N, M, empty) . op gen2 : Nat Nat Set{Nat} -> Set{Nat} . eq gen2(0, M, A) = A . eq gen2(s N, M, A) = gen2(N, M, insert(s N * M, A)) . endfm red intersection(gen(100, 13), gen(100, 4)) . red union(gen(100, 13), gen(100, 4)) . red gen(100, 13) \ gen(100, 52) . red intersection(gen(100, 13), gen(100, 4)) \ gen(100, 52) . red | gen(100, 13) | . red delete(3,(4,5,3)) . red 53 in union(gen(100, 13), gen(100, 4)) . red 52 in union(gen(100, 13), gen(100, 4)) . fmod LIST-AND-SET-TEST is inc LIST-AND-SET{Nat} . var N : Nat . var L : List{Nat} . op gen : Nat -> List{Nat} . eq gen(N) = gen2(N, nil) . op gen2 : Nat List{Nat} -> List{Nat} . eq gen2(0, L) = L . eq gen2(s N, L) = gen2(N, ((s N * s N) rem 100) L) . endfm red gen(100) . red makeSet(gen(100)) . red filter(gen(100), makeSet(gen(10))) . red filterOut(gen(100), makeSet(gen(10))) . fmod SORTABLE-LIST-AND-SET-TEST is inc SORTABLE-LIST-AND-SET{Nat<} . var N : Nat . var L : List{Nat<} . op gen : Nat -> List{Nat<} . eq gen(N) = gen2(N, nil) . op gen2 : Nat List{Nat<} -> List{Nat<} . eq gen2(0, L) = L . eq gen2(s N, L) = gen2(N, ((s N * s N) rem 100) L) . endfm red makeList(makeSet(gen(100))) . fmod LIST*-TEST is inc LIST*{Nat} . ops a b : -> List{Nat} . eq a = [[1 2 3] [] [3 4 5 6]] . eq b = [[[1] []] 2 [1 2 3]] . endfm red append(a, b) . red size(append(a, b)) . red reverse(append(a, b)) . red head(a) . red tail(a) . red last(a) . red front(a) . red occurs([], a) . red occurs([2 3], a) . fmod SET*-TEST is inc SET*{Nat} . var N : Nat . op zf : Nat -> Set{Nat} . eq zf(0) = {} . eq zf(s N) = union({zf(N)}, zf(N)) . endfm red zf(0) . red zf(1) . red zf(2) . red zf(3) . red zf(4) . red | zf(10) | . red | zf(100) | . red 2^ zf(4) . red | 2^ zf(9) | . fmod MAP-TEST is inc MAP{String, Nat} . op a : -> Map{String, Nat} . eq a = insert("three", 3, insert("two", 2, insert("one", 1, insert("zero", 0, empty)))) . endfm red a . red a["one"] . fmod ARRAY-TEST is inc ARRAY{Nat, Nat0} . var N : Nat . op gen : Nat -> Array{Nat, Nat0} . eq gen(0) = empty . eq gen(s N) = insert(s N, s N rem 10, gen(N)) . endfm red gen(100) . red gen(100)[55] . red gen(100)[60] . red gen(100)[1000000000000000000000] . Maude-2.7/tests/Misc/diophantine.expected0000644000147300135640000000233710321341404015425 00000000000000Maude> ========================================== reduce in DIOPHANTINE : natSystemSolve(0,0 |-> 1 ; 0,1 |-> 2 ; 0,2 |-> -3 ; 0,3 |-> -2 ; 0,4 |-> -4 ; 1,0 |-> 2 ; 1,1 |-> -1 ; 1,2 |-> -3 ; 1,3 |-> 2 ; 1,4 |-> 5, zeroVector, "cd") . rewrites: 1 result IntVectorSetPair: [ zeroVector | 0 |-> 9 ; 1 |-> 3 ; 2 |-> 5, 1 |-> 9 ; 2 |-> 2 ; 4 |-> 3, 1 |-> 12 ; 2 |-> 2 ; 3 |-> 9, 0 |-> 1 ; 1 |-> 3 ; 2 |-> 1 ; 3 |-> 2, 0 |-> 3 ; 1 |-> 7 ; 2 |-> 3 ; 4 |-> 2, 0 |-> 5 ; 1 |-> 3 ; 2 |-> 3 ; 3 |-> 1, 0 |-> 6 ; 1 |-> 5 ; 2 |-> 4 ; 4 |-> 1, 1 |-> 10 ; 2 |-> 2 ; 3 |-> 3 ; 4 |-> 2, 1 |-> 11 ; 2 |-> 2 ; 3 |-> 6 ; 4 |-> 1, 0 |-> 2 ; 1 |-> 5 ; 2 |-> 2 ; 3 |-> 1 ; 4 |-> 1 ] ========================================== reduce in DIOPHANTINE : natSystemSolve(0,0 |-> 1 ; 0,1 |-> -5 ; 1,1 |-> 4 ; 1,2 |-> -5 ; 2,2 |-> 4 ; 2,3 |-> -5 ; 3,3 |-> 4 ; 3,4 |-> -5 ; 4,4 |-> 4 ; 4,5 |-> -5 ; 5,5 |-> 4 ; 5,6 |-> -5, 0 |-> 1 ; 1 |-> 1 ; 2 |-> 1 ; 3 |-> 1 ; 4 |-> 1 ; 5 |-> 1, "gcd") . rewrites: 1 result IntVectorSetPair: [ 0 |-> 15621 ; 1 |-> 3124 ; 2 |-> 2499 ; 3 |-> 1999 ; 4 |-> 1599 ; 5 |-> 1279 ; 6 |-> 1023 | 0 |-> 15625 ; 1 |-> 3125 ; 2 |-> 2500 ; 3 |-> 2000 ; 4 |-> 1600 ; 5 |-> 1280 ; 6 |-> 1024 ] Maude> Bye. Maude-2.7/tests/Misc/debug0000755000147300135640000000032010511602774012415 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/debug.maude -no-banner -no-advise \ > debug.out 2>&1 diff $srcdir/debug.expected debug.out > /dev/null 2>&1 Maude-2.7/tests/Misc/attributes0000755000147300135640000000034411064250617013522 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/attributes.maude -no-banner -no-advise \ > attributes.out 2>&1 diff $srcdir/attributes.expected attributes.out > /dev/null 2>&1 Maude-2.7/tests/Misc/unification2.maude0000644000147300135640000000331711431127416015016 00000000000000*** Tricky unification problems *** 8/12/10 set show timing off . fmod TEST is sort Foo . ops 1f a b c : -> Foo . op g : Foo Foo -> Foo . op h : Foo -> Foo . op f : Foo Foo -> Foo [assoc comm id: 1f] . vars A B C X Y Z : Foo . endfm *** long running time with naive algorithm unify g( f(X, X, Y, Y, h(Z)), f(X, Y, Y, Z, Z) ) =? g( f(A, A, A, B, C), f(A, B, B, h(C)) ) . fmod FOO is sort Foo . op f : Foo Foo -> Foo [assoc comm] . vars W X Y Z : Foo . endfm *** fewer unifiers with eager variable replacement unify X =? W /\ f(X, Y) =? f(W, Z) . fmod NAT' is protecting BOOL . sorts Zero NzNat Nat . subsort Zero NzNat < Nat . op 0 : -> Zero . op s_ : Nat -> NzNat [iter] . op _*_ : NzNat NzNat -> NzNat [assoc comm id: s(0) prec 31] . op _*_ : Nat Nat -> Nat [ditto] . vars W X Y Z A B C D : Nat . endfm *** cycle breaking through S theory unify X =? s (X * Y) . unify X =? s X * Y . *** theory conflict unify s X =? s X * Y . unify s X =? X * Y . fmod COMM is sort Foo . ops a b c d : -> Foo . op f : Foo Foo -> Foo [assoc comm id: c(a, b)] . op c : Foo Foo -> Foo [comm] . vars W X Y Z A B C D : Foo . endfm *** cycle breaking through comm theory unify X =? c(f(X, Y), Z) . fmod FOO2 is sort Foo . ops a b c d : -> Foo . op f : Foo Foo -> Foo [assoc comm id: g(c, d)] . op g : Foo Foo -> Foo [assoc comm id: f(a, b)] . vars X Y : Foo . endfm *** cycle breaking with non-disjoint identities unify X =? f(Y, a, b) /\ Y =? g(X, c, d) . fmod FOO3 is sort Foo . ops a b : -> Foo . op h : Foo -> Foo . op f : Foo Foo -> Foo [assoc comm id: h(f(a, b))] . vars X Y : Foo . endfm *** cycle breaking with non-disjoint identity unify X =? f(Y, a, b) /\ Y =? h(X) . Maude-2.7/tests/Misc/dekker.maude0000644000147300135640000001161110026173401013657 00000000000000set show timing off . set show advisories off . ***( Dekker's algorithm is generally defined with two processes on a shared memory machine specified in an imperative language. Rather than give a translation of Dekker's algorithm into rewriting logic we give a deep embedding of a toy language just powerful enough to express Dekker's algorithm. ) load model-checker ***( Naive model of memory with locations named by Qids and holding Ints. ) fmod MEMORY is inc INT . inc QID . sorts Memory . op none : -> Memory . op __ : Memory Memory -> Memory [assoc comm id: none] . op [_,_] : Qid Int -> Memory . endfm ***( Equality test comparing the contents of a named memory location to a given machine integer. ) fmod TESTS is inc MEMORY . sort Test . op _=_ : Qid Int -> Test . op eval : Test Memory -> Bool . var Q : Qid . var M : Memory . vars N N' : Int . eq eval(Q = N, [Q, N'] M) = N == N' . endfm ***( Syntax for a trival sequential programming langauge. ) fmod SEQUENTIAL is inc TESTS . sorts UserStatement Program . subsort UserStatement < Program . op skip : -> Program . op _;_ : Program Program -> Program [prec 61 assoc id: skip] . op _:=_ : Qid Int -> Program . op if_then_fi : Test Program -> Program . op while_do_od : Test Program -> Program . op repeat_forever : Program -> Program . endfm ***( Processes have a process identifier and a program. The machine state is a soup of processes, a shared memory and a process identifier. The latter records the id of the last process to execute and is needed to talk about fairness. The operational semantics of the programming language running on this machine is given by just 5 rules. ) mod PARALLEL is inc SEQUENTIAL . inc TESTS . sorts Pid Process Soup MachineState . subsort Process < Soup . op [_,_] : Pid Program -> Process . op empty : -> Soup . op _|_ : Soup Soup -> Soup [prec 61 assoc comm id: empty] . op {_,_,_} : Soup Memory Pid -> MachineState . vars P R : Program . var S : Soup . var U : UserStatement . vars I J : Pid . var M : Memory . var Q : Qid . vars N X : Int . var T : Test . rl {[I, U ; R] | S, M, J} => {[I, R] | S, M, I} . rl {[I, (Q := N) ; R] | S, [Q, X] M, J} => {[I, R] | S, [Q, N] M, I} . rl {[I, if T then P fi ; R] | S, M, J} => {[I, if eval(T, M) then P else skip fi ; R] | S, M, I} . rl {[I, while T do P od ; R] | S, M, J} => {[I, if eval(T, M) then (P ; while T do P od) else skip fi ; R] | S, M, I} . rl {[I, repeat P forever ; R] | S, M, J} => {[I, P ; repeat P forever ; R] | S, M, I} . endm ***( The classical Dekker's algorithm for mutual exclusion between two processes using 3 variables, 'c1, 'c2 and 'turn, in shared memory. crit is used to represent the critical section and rem is used to represent the remainder (non-critical) part of each program. ) mod DEKKER is inc PARALLEL . subsort Int < Pid . ops crit rem : -> UserStatement . ops p1 p2 : -> Program . op initialMem : -> Memory . op initial : -> MachineState . eq p1 = repeat 'c1 := 0 ; while 'c2 = 0 do if 'turn = 2 then 'c1 := 1 ; while 'turn = 2 do skip od ; 'c1 := 0 fi od ; crit ; 'turn := 2 ; 'c1 := 1 ; rem forever . eq p2 = repeat 'c2 := 0 ; while 'c1 = 0 do if 'turn = 1 then 'c2 := 1 ; while 'turn = 1 do skip od ; 'c2 := 0 fi od ; crit ; 'turn := 1 ; 'c2 := 1 ; rem forever . eq initialMem = ['c1, 1] ['c2, 1] ['turn, 1] . eq initial = { [1, p1] | [2, p2], initialMem, 0 } . endm ***( The model check. Note how the operation enterCrit is used to represent two propositions: enterCrit(1) means process 1 is about to enter it's critical section and enterCrit(2) means process 2 is about to enter it's critical section. Similarly exec(1) means process 1 just executed and exec(2) means process 2 just executed. ) mod CHECK is inc DEKKER . inc MODEL-CHECKER . subsort MachineState < State . ops enterCrit exec : Pid -> Prop . var M : Memory . vars R : Program . var S : Soup . vars I J : Pid . eq {[I, crit ; R] | S, M, J} |= enterCrit(I) = true . eq {S, M, J} |= exec(J) = true . endm ***( Safety: we check that always we are not in a state where p1 is about to enter it's critical section and p2 is about to enter it's critical section. ) red modelCheck(initial, [] ~ (enterCrit(1) /\ enterCrit(2))) . ***( "Strong" liveness: if p1 gets to execute infinitely often then it enters it's critical section infinitely often. This is not true with Dekker's algorithm. ) red modelCheck(initial, []<> exec(1) -> []<> enterCrit(1)) . *** Counterexample has a 9 state lead in to a 2 state cycle. ***( "Weaker" liveness: if p1 and p2 both get to execute infinitely often then p1 and p2 both enter their critical sections infinitely often. ) red modelCheck(initial, ([]<> exec(1) /\ []<> exec(2)) -> ([]<> enterCrit(1) /\ []<> enterCrit(2))) . Maude-2.7/tests/Misc/unification3.expected0000644000147300135640000000303311444020476015522 00000000000000Maude> ========================================== unify in FOO : X:Big =? h(f(Y:Big, Z:Big)) . Solution 1 X:Big --> h(1f) Z:Big --> 1f Y:Big --> 1f Solution 2 X:Big --> h(#1:Small) Z:Big --> #1:Small Y:Big --> 1f Solution 3 X:Big --> h(#1:Small) Z:Big --> 1f Y:Big --> #1:Small ========================================== unify in FOO1 : X:Small =? f(Y:Big, Z:Big) . Solution 1 X:Small --> #1:Small Z:Big --> #1:Small Y:Big --> 1f Solution 2 X:Small --> #1:Small Z:Big --> 1f Y:Big --> #1:Small Solution 3 X:Small --> f(#1:Small, #2:Small) Z:Big --> #1:Small Y:Big --> #2:Small ========================================== unify in FOO2 : X:Small =? f(g(Y:Small), Z:Small) . Solution 1 X:Small --> #1:Small Z:Small --> #1:Small Y:Small --> a ========================================== unify in FOO3 : X:Small =? f(g(Y:Big), Z:Small) . Solution 1 X:Small --> #1:Small Z:Small --> #1:Small Y:Big --> a Solution 2 X:Small --> f(#2:Small, g(#1:Small)) Z:Small --> #2:Small Y:Big --> #1:Small ========================================== unify in FOO4 : X:Small =? f(g(Y:Big), Z:Small) . Solution 1 X:Small --> #1:Small Z:Small --> #1:Small Y:Big --> g^999999(a) ========================================== unify in FOO5 : X:Small =? f(g(Y:Big), Z:Small) . Solution 1 X:Small --> #1:Small Z:Small --> #1:Small Y:Big --> g^999999(a) Solution 2 X:Small --> f(#2:Small, g(#1:Small)) Z:Small --> #2:Small Y:Big --> #1:Small ========================================== unify in FOO6 : X:Big =? h(f(Y:Big, Y:Big)) . Solution 1 X:Big --> h(1f) Y:Big --> 1f Maude> Bye. Maude-2.7/tests/Misc/diophantine.maude0000644000147300135640000000112410321336430014713 00000000000000set show timing off . load linear *** 10 solution system from Domenjoud LNCS 520 red natSystemSolve( ( (0,0) |-> 1 ; (0,1) |-> 2 ; (0,2) |-> -3 ; (0,3) |-> -2 ; (0,4) |-> -4 ; (1,0) |-> 2 ; (1,1) |-> -1 ; (1,2) |-> -3 ; (1,3) |-> 2 ; (1,4) |-> 5 ), zeroVector, "cd" ) . *** sailors and monkey from Contejean and Devie 1994 red natSystemSolve( ( (0,0) |-> 1 ; (0,1) |-> -5 ; (1,1) |-> 4 ; (1,2) |-> -5 ; (2,2) |-> 4 ; (2,3) |-> -5 ; (3,3) |-> 4 ; (3,4) |-> -5 ; (4,4) |-> 4 ; (4,5) |-> -5 ; (5,5) |-> 4 ; (5,6) |-> -5 ), (0 |-> 1 ; 1 |-> 1 ; 2 |-> 1 ; 3 |-> 1 ; 4 |-> 1 ; 5 |-> 1), "gcd" ) . Maude-2.7/tests/Misc/parameterization.expected0000644000147300135640000073336411374640660016533 00000000000000Maude> fmod BAZ is sorts Bool Zero NzNat Nat NzInt Int PosRat NzRat Rat Foo{Rat,Nat} . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat NzInt < Int . subsort NzNat < PosRat . subsorts NzInt PosRat < NzRat . subsorts NzRat Int < Rat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat PosRat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat Nat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Rat Rat -> Rat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : PosRat PosRat -> PosRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzRat NzRat -> NzRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Rat Rat -> Rat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : PosRat PosRat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Rat NzRat -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : PosRat Nat -> PosRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzRat Nat -> NzRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Rat Nat -> Rat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Rat] [Rat] [Rat] -> [Rat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzRat NzRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : PosRat PosRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : PosRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzRat Rat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzRat -> NzRat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Rat -> Rat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Rat Rat -> Rat [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzRat -> PosRat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Rat -> Rat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzInt NzNat -> NzRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzNat NzNat -> PosRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : PosRat PosRat -> PosRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzRat NzRat -> NzRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op trunc : PosRat -> Nat . op trunc : Rat -> Int . op frac : Rat -> Rat . op floor : PosRat -> Nat . op floor : Rat -> Int . op ceiling : PosRat -> NzNat . op ceiling : Rat -> Int . op g : Bool -> Bool . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq 0 / Q:NzRat = 0 . eq I:NzInt / - N:NzNat = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / (J:NzInt * N:NzNat) . eq I:NzInt / N:NzNat / J:NzInt = I:NzInt / (J:NzInt * N:NzNat) . eq I:NzInt / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / J:NzInt . eq - (I:NzInt / N:NzNat) = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat + J:NzInt / M:NzNat = (I:NzInt * M:NzNat + J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int + I:NzInt / N:NzNat = (I:NzInt + N:NzNat * K:Int) / N:NzNat . eq I:NzInt / N:NzNat - J:NzInt / M:NzNat = (I:NzInt * M:NzNat - J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq I:NzInt / N:NzNat - K:Int = (I:NzInt - N:NzNat * K:Int) / N:NzNat . eq K:Int - J:NzInt / M:NzNat = (M:NzNat * K:Int - J:NzInt) / M:NzNat . eq 0 * Q:NzRat = 0 . eq (I:NzInt / N:NzNat) * (J:NzInt / M:NzNat) = (I:NzInt * J:NzInt) / (N:NzNat * M:NzNat) . eq K:Int * (I:NzInt / N:NzNat) = (I:NzInt * K:Int) / N:NzNat . eq I:NzInt / N:NzNat quo Q:NzRat = I:NzInt quo (Q:NzRat * N:NzNat) . eq K:Int quo (J:NzInt / M:NzNat) = (M:NzNat * K:Int) quo J:NzInt . eq I:NzInt / N:NzNat rem (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) rem ( J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int rem (J:NzInt / M:NzNat) = (M:NzNat * K:Int) rem J:NzInt / M:NzNat . eq I:NzInt / N:NzNat rem J:NzInt = I:NzInt rem (J:NzInt * N:NzNat) / N:NzNat . eq (I:NzInt / N:NzNat) ^ Z:Nat = I:NzInt ^ Z:Nat / N:NzNat ^ Z:Nat . eq abs(I:NzInt / N:NzNat) = abs(I:NzInt) / N:NzNat . eq gcd(R:Rat, I:NzInt / N:NzNat) = gcd(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq lcm(R:Rat, I:NzInt / N:NzNat) = lcm(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq min(R:Rat, I:NzInt / N:NzNat) = min(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq max(R:Rat, I:NzInt / N:NzNat) = max(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq I:NzInt / N:NzNat < J:NzInt / M:NzNat = I:NzInt * M:NzNat < J:NzInt * N:NzNat . eq I:NzInt / N:NzNat < K:Int = I:NzInt < N:NzNat * K:Int . eq K:Int < J:NzInt / M:NzNat = M:NzNat * K:Int < J:NzInt . eq I:NzInt / N:NzNat <= J:NzInt / M:NzNat = I:NzInt * M:NzNat <= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat <= K:Int = I:NzInt <= N:NzNat * K:Int . eq K:Int <= J:NzInt / M:NzNat = M:NzNat * K:Int <= J:NzInt . eq I:NzInt / N:NzNat > J:NzInt / M:NzNat = I:NzInt * M:NzNat > J:NzInt * N:NzNat . eq I:NzInt / N:NzNat > K:Int = I:NzInt > N:NzNat * K:Int . eq K:Int > J:NzInt / M:NzNat = M:NzNat * K:Int > J:NzInt . eq I:NzInt / N:NzNat >= J:NzInt / M:NzNat = I:NzInt * M:NzNat >= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat >= K:Int = I:NzInt >= N:NzNat * K:Int . eq K:Int >= J:NzInt / M:NzNat = M:NzNat * K:Int >= J:NzInt . eq I:NzInt / N:NzNat divides K:Int = I:NzInt divides N:NzNat * K:Int . eq Q:NzRat divides J:NzInt / M:NzNat = Q:NzRat * M:NzNat divides J:NzInt . eq trunc(K:Int) = K:Int . eq trunc(I:NzInt / N:NzNat) = I:NzInt quo N:NzNat . eq frac(K:Int) = 0 . eq frac(I:NzInt / N:NzNat) = I:NzInt rem N:NzNat / N:NzNat . eq floor(K:Int) = K:Int . eq ceiling(K:Int) = K:Int . eq floor(N:NzNat / M:NzNat) = N:NzNat quo M:NzNat . eq ceiling(N:NzNat / M:NzNat) = ((N:NzNat + M:NzNat) - 1) quo M:NzNat . eq floor(- N:NzNat / M:NzNat) = - ceiling(N:NzNat / M:NzNat) . eq ceiling(- N:NzNat / M:NzNat) = - floor(N:NzNat / M:NzNat) . endfm fmod BOOL fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL fmod NAT fmod INT fmod RAT fmod FLOAT fmod STRING fmod CONVERSION fmod RANDOM fmod QID fth TRIV fth STRICT-WEAK-ORDER fth STRICT-TOTAL-ORDER fth TOTAL-PREORDER fth TOTAL-ORDER fth DEFAULT fmod LIST fmod WEAKLY-SORTABLE-LIST fmod SORTABLE-LIST fmod WEAKLY-SORTABLE-LIST' fmod SORTABLE-LIST' fmod SET fmod LIST-AND-SET fmod SORTABLE-LIST-AND-SET fmod SORTABLE-LIST-AND-SET' fmod LIST* fmod SET* fmod MAP fmod ARRAY fmod NAT-LIST fmod QID-LIST fmod QID-SET fmod META-TERM fmod META-MODULE fmod META-VIEW fmod META-LEVEL mod COUNTER mod LOOP-MODE mod CONFIGURATION fmod FOO fmod BAR fmod BAZ fth X :: TRIV fth X :: STRICT-WEAK-ORDER fmod LIST{STRICT-WEAK-ORDER} fmod LIST{STRICT-WEAK-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{[X]} * (sort NeList{STRICT-WEAK-ORDER}{X} to NeList{X}, sort List{STRICT-WEAK-ORDER}{X} to List{X}) fth X :: STRICT-TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fth X :: TOTAL-PREORDER fmod LIST{TOTAL-PREORDER} fmod LIST{TOTAL-PREORDER}{[X]} fmod LIST{TOTAL-PREORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{X} to NeList{X}, sort List{TOTAL-PREORDER}{X} to List{X}) fth X :: TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{[X]} fmod SET{[X]} fmod SORTABLE-LIST{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}, sort NeSet{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeSet{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SORTABLE-LIST'{[X]} fmod LIST-AND-SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{ TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}, sort NeSet{TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeSet{X}, sort Set{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeSet{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeSet{X}, sort Set{TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fth Y :: TRIV fth Y :: DEFAULT fmod LIST{Nat} fmod LIST{Nat} * (sort NeList{Nat} to NeNatList, sort List{Nat} to NatList) fmod LIST{Qid} fmod LIST{Qid} * (sort NeList{Qid} to NeQidList, sort List{Qid} to QidList) fmod SET{Qid} fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) fmod QID-SET * (op _`,_ to _;_ [prec 43], op empty to none) fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) * (op _`,_ to _;_ [prec 43], op empty to none) fth Z :: TRIV fmod FOO{[Z], Nat} fmod BAR * (op f : [Bool] -> [Bool] to g) fmod FOO{[Z], Nat} * (op f : [Bool] -> [Bool] to g) fmod (BAR * (op f : [Bool] -> [Bool] to g)){Rat} fmod FOO{Rat, Nat} fmod FOO{Rat, Nat} * (op f : [Bool] -> [Bool] to g) fmod BAZ is sorts Bool Zero NzNat Nat NzInt Int PosRat NzRat Rat Bar{Nat,Rat} . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat NzInt < Int . subsort NzNat < PosRat . subsorts NzInt PosRat < NzRat . subsorts NzRat Int < Rat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat PosRat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat Nat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Rat Rat -> Rat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : PosRat PosRat -> PosRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzRat NzRat -> NzRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Rat Rat -> Rat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : PosRat PosRat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Rat NzRat -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : PosRat Nat -> PosRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzRat Nat -> NzRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Rat Nat -> Rat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Rat] [Rat] [Rat] -> [Rat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzRat NzRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : PosRat PosRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : PosRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzRat Rat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzRat -> NzRat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Rat -> Rat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Rat Rat -> Rat [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzRat -> PosRat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Rat -> Rat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzInt NzNat -> NzRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzNat NzNat -> PosRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : PosRat PosRat -> PosRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzRat NzRat -> NzRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op trunc : PosRat -> Nat . op trunc : Rat -> Int . op frac : Rat -> Rat . op floor : PosRat -> Nat . op floor : Rat -> Int . op ceiling : PosRat -> NzNat . op ceiling : Rat -> Int . op g : Bar{Nat,Rat} -> Bar{Nat,Rat} . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq 0 / Q:NzRat = 0 . eq I:NzInt / - N:NzNat = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / (J:NzInt * N:NzNat) . eq I:NzInt / N:NzNat / J:NzInt = I:NzInt / (J:NzInt * N:NzNat) . eq I:NzInt / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / J:NzInt . eq - (I:NzInt / N:NzNat) = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat + J:NzInt / M:NzNat = (I:NzInt * M:NzNat + J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int + I:NzInt / N:NzNat = (I:NzInt + N:NzNat * K:Int) / N:NzNat . eq I:NzInt / N:NzNat - J:NzInt / M:NzNat = (I:NzInt * M:NzNat - J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq I:NzInt / N:NzNat - K:Int = (I:NzInt - N:NzNat * K:Int) / N:NzNat . eq K:Int - J:NzInt / M:NzNat = (M:NzNat * K:Int - J:NzInt) / M:NzNat . eq 0 * Q:NzRat = 0 . eq (I:NzInt / N:NzNat) * (J:NzInt / M:NzNat) = (I:NzInt * J:NzInt) / (N:NzNat * M:NzNat) . eq K:Int * (I:NzInt / N:NzNat) = (I:NzInt * K:Int) / N:NzNat . eq I:NzInt / N:NzNat quo Q:NzRat = I:NzInt quo (Q:NzRat * N:NzNat) . eq K:Int quo (J:NzInt / M:NzNat) = (M:NzNat * K:Int) quo J:NzInt . eq I:NzInt / N:NzNat rem (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) rem ( J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int rem (J:NzInt / M:NzNat) = (M:NzNat * K:Int) rem J:NzInt / M:NzNat . eq I:NzInt / N:NzNat rem J:NzInt = I:NzInt rem (J:NzInt * N:NzNat) / N:NzNat . eq (I:NzInt / N:NzNat) ^ Z:Nat = I:NzInt ^ Z:Nat / N:NzNat ^ Z:Nat . eq abs(I:NzInt / N:NzNat) = abs(I:NzInt) / N:NzNat . eq gcd(R:Rat, I:NzInt / N:NzNat) = gcd(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq lcm(R:Rat, I:NzInt / N:NzNat) = lcm(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq min(R:Rat, I:NzInt / N:NzNat) = min(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq max(R:Rat, I:NzInt / N:NzNat) = max(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq I:NzInt / N:NzNat < J:NzInt / M:NzNat = I:NzInt * M:NzNat < J:NzInt * N:NzNat . eq I:NzInt / N:NzNat < K:Int = I:NzInt < N:NzNat * K:Int . eq K:Int < J:NzInt / M:NzNat = M:NzNat * K:Int < J:NzInt . eq I:NzInt / N:NzNat <= J:NzInt / M:NzNat = I:NzInt * M:NzNat <= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat <= K:Int = I:NzInt <= N:NzNat * K:Int . eq K:Int <= J:NzInt / M:NzNat = M:NzNat * K:Int <= J:NzInt . eq I:NzInt / N:NzNat > J:NzInt / M:NzNat = I:NzInt * M:NzNat > J:NzInt * N:NzNat . eq I:NzInt / N:NzNat > K:Int = I:NzInt > N:NzNat * K:Int . eq K:Int > J:NzInt / M:NzNat = M:NzNat * K:Int > J:NzInt . eq I:NzInt / N:NzNat >= J:NzInt / M:NzNat = I:NzInt * M:NzNat >= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat >= K:Int = I:NzInt >= N:NzNat * K:Int . eq K:Int >= J:NzInt / M:NzNat = M:NzNat * K:Int >= J:NzInt . eq I:NzInt / N:NzNat divides K:Int = I:NzInt divides N:NzNat * K:Int . eq Q:NzRat divides J:NzInt / M:NzNat = Q:NzRat * M:NzNat divides J:NzInt . eq trunc(K:Int) = K:Int . eq trunc(I:NzInt / N:NzNat) = I:NzInt quo N:NzNat . eq frac(K:Int) = 0 . eq frac(I:NzInt / N:NzNat) = I:NzInt rem N:NzNat / N:NzNat . eq floor(K:Int) = K:Int . eq ceiling(K:Int) = K:Int . eq floor(N:NzNat / M:NzNat) = N:NzNat quo M:NzNat . eq ceiling(N:NzNat / M:NzNat) = ((N:NzNat + M:NzNat) - 1) quo M:NzNat . eq floor(- N:NzNat / M:NzNat) = - ceiling(N:NzNat / M:NzNat) . eq ceiling(- N:NzNat / M:NzNat) = - floor(N:NzNat / M:NzNat) . endfm fmod BOOL fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL fmod NAT fmod INT fmod RAT fmod FLOAT fmod STRING fmod CONVERSION fmod RANDOM fmod QID fth TRIV fth STRICT-WEAK-ORDER fth STRICT-TOTAL-ORDER fth TOTAL-PREORDER fth TOTAL-ORDER fth DEFAULT fmod LIST fmod WEAKLY-SORTABLE-LIST fmod SORTABLE-LIST fmod WEAKLY-SORTABLE-LIST' fmod SORTABLE-LIST' fmod SET fmod LIST-AND-SET fmod SORTABLE-LIST-AND-SET fmod SORTABLE-LIST-AND-SET' fmod LIST* fmod SET* fmod MAP fmod ARRAY fmod NAT-LIST fmod QID-LIST fmod QID-SET fmod META-TERM fmod META-MODULE fmod META-VIEW fmod META-LEVEL mod COUNTER mod LOOP-MODE mod CONFIGURATION fmod FOO fmod BAR fmod BAZ fth X :: TRIV fth X :: STRICT-WEAK-ORDER fmod LIST{STRICT-WEAK-ORDER} fmod LIST{STRICT-WEAK-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{[X]} * (sort NeList{STRICT-WEAK-ORDER}{X} to NeList{X}, sort List{STRICT-WEAK-ORDER}{X} to List{X}) fth X :: STRICT-TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fth X :: TOTAL-PREORDER fmod LIST{TOTAL-PREORDER} fmod LIST{TOTAL-PREORDER}{[X]} fmod LIST{TOTAL-PREORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{X} to NeList{X}, sort List{TOTAL-PREORDER}{X} to List{X}) fth X :: TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{[X]} fmod SET{[X]} fmod SORTABLE-LIST{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}, sort NeSet{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeSet{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SORTABLE-LIST'{[X]} fmod LIST-AND-SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{ TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}, sort NeSet{TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeSet{X}, sort Set{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeSet{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeSet{X}, sort Set{TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fth Y :: TRIV fth Y :: DEFAULT fmod LIST{Nat} fmod LIST{Nat} * (sort NeList{Nat} to NeNatList, sort List{Nat} to NatList) fmod LIST{Qid} fmod LIST{Qid} * (sort NeList{Qid} to NeQidList, sort List{Qid} to QidList) fmod SET{Qid} fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) fmod QID-SET * (op _`,_ to _;_ [prec 43], op empty to none) fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) * (op _`,_ to _;_ [prec 43], op empty to none) fth Z :: TRIV fmod FOO{[Z], Nat} fmod FOO{Rat, Nat} fmod BAR * (sort Foo{Z,Nat} to Bar{Nat,Z}, op f : [Foo{Z,Nat}] -> [Foo{Z,Nat}] to g) fmod FOO{[Z], Nat} * (sort Foo{Z,Nat} to Bar{Nat,Z}, op f : [Foo{Z,Nat}] -> [ Foo{Z,Nat}] to g) fmod (BAR * (sort Foo{Z,Nat} to Bar{Nat,Z}, op f : [Foo{Z,Nat}] -> [Foo{Z,Nat}] to g)){Rat} fmod FOO{Rat, Nat} * (sort Foo{Rat,Nat} to Bar{Nat,Rat}, op f : [Foo{Rat,Nat}] -> [Foo{Rat,Nat}] to g) fmod BAZ is sorts Bool Zero NzNat Nat NzInt Int PosRat NzRat Rat Bar{Nat,Rat} . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat NzInt < Int . subsort NzNat < PosRat . subsorts NzInt PosRat < NzRat . subsorts NzRat Int < Rat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat PosRat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat Nat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Rat Rat -> Rat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : PosRat PosRat -> PosRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzRat NzRat -> NzRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Rat Rat -> Rat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : PosRat PosRat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Rat NzRat -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : PosRat Nat -> PosRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzRat Nat -> NzRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Rat Nat -> Rat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Rat] [Rat] [Rat] -> [Rat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzRat NzRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : PosRat PosRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : PosRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzRat Rat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzRat -> NzRat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Rat -> Rat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Rat Rat -> Rat [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzRat -> PosRat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Rat -> Rat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzInt NzNat -> NzRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzNat NzNat -> PosRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : PosRat PosRat -> PosRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzRat NzRat -> NzRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op trunc : PosRat -> Nat . op trunc : Rat -> Int . op frac : Rat -> Rat . op floor : PosRat -> Nat . op floor : Rat -> Int . op ceiling : PosRat -> NzNat . op ceiling : Rat -> Int . op g : Bar{Nat,Rat} -> Bar{Nat,Rat} . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq 0 / Q:NzRat = 0 . eq I:NzInt / - N:NzNat = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / (J:NzInt * N:NzNat) . eq I:NzInt / N:NzNat / J:NzInt = I:NzInt / (J:NzInt * N:NzNat) . eq I:NzInt / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / J:NzInt . eq - (I:NzInt / N:NzNat) = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat + J:NzInt / M:NzNat = (I:NzInt * M:NzNat + J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int + I:NzInt / N:NzNat = (I:NzInt + N:NzNat * K:Int) / N:NzNat . eq I:NzInt / N:NzNat - J:NzInt / M:NzNat = (I:NzInt * M:NzNat - J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq I:NzInt / N:NzNat - K:Int = (I:NzInt - N:NzNat * K:Int) / N:NzNat . eq K:Int - J:NzInt / M:NzNat = (M:NzNat * K:Int - J:NzInt) / M:NzNat . eq 0 * Q:NzRat = 0 . eq (I:NzInt / N:NzNat) * (J:NzInt / M:NzNat) = (I:NzInt * J:NzInt) / (N:NzNat * M:NzNat) . eq K:Int * (I:NzInt / N:NzNat) = (I:NzInt * K:Int) / N:NzNat . eq I:NzInt / N:NzNat quo Q:NzRat = I:NzInt quo (Q:NzRat * N:NzNat) . eq K:Int quo (J:NzInt / M:NzNat) = (M:NzNat * K:Int) quo J:NzInt . eq I:NzInt / N:NzNat rem (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) rem ( J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int rem (J:NzInt / M:NzNat) = (M:NzNat * K:Int) rem J:NzInt / M:NzNat . eq I:NzInt / N:NzNat rem J:NzInt = I:NzInt rem (J:NzInt * N:NzNat) / N:NzNat . eq (I:NzInt / N:NzNat) ^ Z:Nat = I:NzInt ^ Z:Nat / N:NzNat ^ Z:Nat . eq abs(I:NzInt / N:NzNat) = abs(I:NzInt) / N:NzNat . eq gcd(R:Rat, I:NzInt / N:NzNat) = gcd(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq lcm(R:Rat, I:NzInt / N:NzNat) = lcm(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq min(R:Rat, I:NzInt / N:NzNat) = min(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq max(R:Rat, I:NzInt / N:NzNat) = max(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq I:NzInt / N:NzNat < J:NzInt / M:NzNat = I:NzInt * M:NzNat < J:NzInt * N:NzNat . eq I:NzInt / N:NzNat < K:Int = I:NzInt < N:NzNat * K:Int . eq K:Int < J:NzInt / M:NzNat = M:NzNat * K:Int < J:NzInt . eq I:NzInt / N:NzNat <= J:NzInt / M:NzNat = I:NzInt * M:NzNat <= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat <= K:Int = I:NzInt <= N:NzNat * K:Int . eq K:Int <= J:NzInt / M:NzNat = M:NzNat * K:Int <= J:NzInt . eq I:NzInt / N:NzNat > J:NzInt / M:NzNat = I:NzInt * M:NzNat > J:NzInt * N:NzNat . eq I:NzInt / N:NzNat > K:Int = I:NzInt > N:NzNat * K:Int . eq K:Int > J:NzInt / M:NzNat = M:NzNat * K:Int > J:NzInt . eq I:NzInt / N:NzNat >= J:NzInt / M:NzNat = I:NzInt * M:NzNat >= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat >= K:Int = I:NzInt >= N:NzNat * K:Int . eq K:Int >= J:NzInt / M:NzNat = M:NzNat * K:Int >= J:NzInt . eq I:NzInt / N:NzNat divides K:Int = I:NzInt divides N:NzNat * K:Int . eq Q:NzRat divides J:NzInt / M:NzNat = Q:NzRat * M:NzNat divides J:NzInt . eq trunc(K:Int) = K:Int . eq trunc(I:NzInt / N:NzNat) = I:NzInt quo N:NzNat . eq frac(K:Int) = 0 . eq frac(I:NzInt / N:NzNat) = I:NzInt rem N:NzNat / N:NzNat . eq floor(K:Int) = K:Int . eq ceiling(K:Int) = K:Int . eq floor(N:NzNat / M:NzNat) = N:NzNat quo M:NzNat . eq ceiling(N:NzNat / M:NzNat) = ((N:NzNat + M:NzNat) - 1) quo M:NzNat . eq floor(- N:NzNat / M:NzNat) = - ceiling(N:NzNat / M:NzNat) . eq ceiling(- N:NzNat / M:NzNat) = - floor(N:NzNat / M:NzNat) . endfm fmod BOOL fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL fmod NAT fmod INT fmod RAT fmod FLOAT fmod STRING fmod CONVERSION fmod RANDOM fmod QID fth TRIV fth STRICT-WEAK-ORDER fth STRICT-TOTAL-ORDER fth TOTAL-PREORDER fth TOTAL-ORDER fth DEFAULT fmod LIST fmod WEAKLY-SORTABLE-LIST fmod SORTABLE-LIST fmod WEAKLY-SORTABLE-LIST' fmod SORTABLE-LIST' fmod SET fmod LIST-AND-SET fmod SORTABLE-LIST-AND-SET fmod SORTABLE-LIST-AND-SET' fmod LIST* fmod SET* fmod MAP fmod ARRAY fmod NAT-LIST fmod QID-LIST fmod QID-SET fmod META-TERM fmod META-MODULE fmod META-VIEW fmod META-LEVEL mod COUNTER mod LOOP-MODE mod CONFIGURATION fmod FOO fmod BAR fmod BAZ fth X :: TRIV fth X :: STRICT-WEAK-ORDER fmod LIST{STRICT-WEAK-ORDER} fmod LIST{STRICT-WEAK-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{[X]} * (sort NeList{STRICT-WEAK-ORDER}{X} to NeList{X}, sort List{STRICT-WEAK-ORDER}{X} to List{X}) fth X :: STRICT-TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fth X :: TOTAL-PREORDER fmod LIST{TOTAL-PREORDER} fmod LIST{TOTAL-PREORDER}{[X]} fmod LIST{TOTAL-PREORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{X} to NeList{X}, sort List{TOTAL-PREORDER}{X} to List{X}) fth X :: TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{[X]} fmod SET{[X]} fmod SORTABLE-LIST{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}, sort NeSet{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeSet{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SORTABLE-LIST'{[X]} fmod LIST-AND-SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{ TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}, sort NeSet{TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeSet{X}, sort Set{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeSet{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeSet{X}, sort Set{TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fth Y :: TRIV fth Y :: DEFAULT fmod LIST{Nat} fmod LIST{Nat} * (sort NeList{Nat} to NeNatList, sort List{Nat} to NatList) fmod LIST{Qid} fmod LIST{Qid} * (sort NeList{Qid} to NeQidList, sort List{Qid} to QidList) fmod SET{Qid} fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) fmod QID-SET * (op _`,_ to _;_ [prec 43], op empty to none) fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) * (op _`,_ to _;_ [prec 43], op empty to none) fmod FOO{Rat, Nat} fmod FOO{Rat, Nat} * (sort Foo{Rat,Nat} to Bar{Nat,Rat}, op f : [Foo{Rat,Nat}] -> [Foo{Rat,Nat}] to g) fmod FOO{[X], Nat} fmod BAR * (sort Foo{X,Nat} to Bar{Nat,X}, op f : [Foo{X,Nat}] -> [Foo{X,Nat}] to g) fmod FOO{[X], Nat} * (sort Foo{X,Nat} to Bar{Nat,X}, op f : [Foo{X,Nat}] -> [ Foo{X,Nat}] to g) fmod (BAR * (sort Foo{X,Nat} to Bar{Nat,X}, op f : [Foo{X,Nat}] -> [Foo{X,Nat}] to g)){Rat} fmod BAZ is sorts Bool Zero NzNat Nat Foo'{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} Bar'{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op f' : Foo'{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} -> Foo'{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} . op g' : Bar'{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} -> Foo'{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm fmod BOOL fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL fmod NAT fmod INT fmod RAT fmod FLOAT fmod STRING fmod CONVERSION fmod RANDOM fmod QID fth TRIV fth STRICT-WEAK-ORDER fth STRICT-TOTAL-ORDER fth TOTAL-PREORDER fth TOTAL-ORDER fth DEFAULT fmod LIST fmod WEAKLY-SORTABLE-LIST fmod SORTABLE-LIST fmod WEAKLY-SORTABLE-LIST' fmod SORTABLE-LIST' fmod SET fmod LIST-AND-SET fmod SORTABLE-LIST-AND-SET fmod SORTABLE-LIST-AND-SET' fmod LIST* fmod SET* fmod MAP fmod ARRAY fmod NAT-LIST fmod QID-LIST fmod QID-SET fmod META-TERM fmod META-MODULE fmod META-VIEW fmod META-LEVEL mod COUNTER mod LOOP-MODE mod CONFIGURATION fmod FOO fmod BAR fmod BAZ fth X :: TRIV fth X :: STRICT-WEAK-ORDER fmod LIST{STRICT-WEAK-ORDER} fmod LIST{STRICT-WEAK-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{[X]} * (sort NeList{STRICT-WEAK-ORDER}{X} to NeList{X}, sort List{STRICT-WEAK-ORDER}{X} to List{X}) fth X :: STRICT-TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fmod LIST{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}) fth X :: TOTAL-PREORDER fmod LIST{TOTAL-PREORDER} fmod LIST{TOTAL-PREORDER}{[X]} fmod LIST{TOTAL-PREORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{X} to NeList{X}, sort List{TOTAL-PREORDER}{X} to List{X}) fth X :: TOTAL-ORDER fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} fmod WEAKLY-SORTABLE-LIST'{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}) fmod LIST{[X]} fmod SET{[X]} fmod SORTABLE-LIST{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER} fmod SET{STRICT-WEAK-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) fmod LIST-AND-SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeList{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeList{STRICT-TOTAL-ORDER}{X}, sort List{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to List{ STRICT-TOTAL-ORDER}{X}) * (sort NeList{STRICT-TOTAL-ORDER}{X} to NeList{X}, sort List{STRICT-TOTAL-ORDER}{X} to List{X}, sort NeSet{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SET{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort NeSet{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to NeSet{X}, sort Set{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to Set{X}) fmod SORTABLE-LIST'{[X]} fmod LIST-AND-SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER} fmod SET{TOTAL-PREORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER} fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) fmod LIST-AND-SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeList{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeList{TOTAL-ORDER}{X}, sort List{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to List{TOTAL-ORDER}{X}) * (sort NeList{ TOTAL-ORDER}{X} to NeList{X}, sort List{TOTAL-ORDER}{X} to List{X}, sort NeSet{TOTAL-PREORDER}{TOTAL-ORDER}{X} to NeSet{X}, sort Set{ TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fmod SET{TOTAL-PREORDER}{TOTAL-ORDER}{[X]} * (sort NeSet{TOTAL-PREORDER}{ TOTAL-ORDER}{X} to NeSet{X}, sort Set{TOTAL-PREORDER}{TOTAL-ORDER}{X} to Set{X}) fth Y :: TRIV fth Y :: DEFAULT fmod LIST{Nat} fmod LIST{Nat} * (sort NeList{Nat} to NeNatList, sort List{Nat} to NatList) fmod LIST{Qid} fmod LIST{Qid} * (sort NeList{Qid} to NeQidList, sort List{Qid} to QidList) fmod SET{Qid} fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) fmod QID-SET * (op _`,_ to _;_ [prec 43], op empty to none) fmod SET{Qid} * (sort NeSet{Qid} to NeQidSet, sort Set{Qid} to QidSet) * (op _`,_ to _;_ [prec 43], op empty to none) fmod FOO{[X]} fmod BAR * (sort Foo{X} to Foo'{X}, sort Bar{X} to Bar'{X}, op f : [Foo{X}] -> [Foo{X}] to f', op g : [Bar{X}] -> [Foo{X}] to g') fmod FOO{[X]} * (sort Foo{X} to Foo'{X}, op f : [Foo{X}] -> [Foo{X}] to f') fmod (BAR * (sort Foo{X} to Foo'{X}, sort Bar{X} to Bar'{X}, op f : [Foo{X}] -> [Foo{X}] to f', op g : [Bar{X}] -> [Foo{X}] to g')){STRICT-WEAK-ORDER} fmod FOO{STRICT-WEAK-ORDER} fmod FOO{STRICT-WEAK-ORDER}{[X]} fmod FOO{STRICT-WEAK-ORDER}{[X]} * (sort Foo{STRICT-WEAK-ORDER}{X} to Foo'{ STRICT-WEAK-ORDER}{X}, op f : [Foo{STRICT-WEAK-ORDER}{X}] -> [Foo{ STRICT-WEAK-ORDER}{X}] to f') fmod (BAR * (sort Foo{X} to Foo'{X}, sort Bar{X} to Bar'{X}, op f : [Foo{X}] -> [Foo{X}] to f', op g : [Bar{X}] -> [Foo{X}] to g')){STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER} fmod FOO{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER} fmod FOO{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} fmod FOO{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{[X]} * (sort Foo{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X} to Foo'{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{X}, op f : [Foo{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{ X}] -> [Foo{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{X}] to f') fmod (BAR * (sort Foo{X} to Foo'{X}, sort Bar{X} to Bar'{X}, op f : [Foo{X}] -> [Foo{X}] to f', op g : [Bar{X}] -> [Foo{X}] to g')){STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{Nat<} fmod FOO{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} fmod FOO{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} * (sort Foo{ STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{Nat<} to Foo'{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{Nat<}, op f : [Foo{STRICT-WEAK-ORDER}{ STRICT-TOTAL-ORDER}{Nat<}] -> [Foo{STRICT-WEAK-ORDER}{STRICT-TOTAL-ORDER}{ Nat<}] to f') fmod TEST is sorts Bool Zero NzNat Nat . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op g : Nat -> Nat . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq g(A:Nat) = 1 + A:Nat + 1 . endfm fmod TEST is sorts Bool Zero NzNat Nat . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _#_ : Nat Nat -> Nat [id: 1 prec 41 gather (E E)] . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq s A:Nat # s B:Nat = s_^2(A:Nat # B:Nat) . endfm ========================================== reduce in TEST : 0 . rewrites: 0 result Zero: 0 fmod TEST is sorts Bool Zero NzNat Nat NzInt Int . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Int] [Int] [Int] -> [Int] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op f : Int -> Int . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq f(A:Int) = - - - - - - - - - - A:Int . endfm fmod TEST is sorts Bool Zero NzNat Nat NzInt Int . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Int] [Int] [Int] -> [Int] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op f : Int -> Int . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq f(A:Int) = ((A:Int * A:Int) * A:Int * A:Int) * (A:Int * A:Int) * A:Int * A:Int . endfm fmod TEST is sorts Bool Zero NzNat Nat . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op g : Nat Nat -> Nat . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq g(A:Nat, B:Nat) = B:Nat + A:Nat + A:Nat + B:Nat . endfm fmod TEST is sorts Bool Zero NzNat Nat NzInt Int . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Int] [Int] [Int] -> [Int] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op g : Int Int -> Int . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq g(A:Int, B:Int) = A:Int - s B:Int - s A:Int - s B:Int . endfm fmod TEST is sorts Bool Zero NzNat Nat NzInt Int . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Int] [Int] [Int] -> [Int] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op g : Int Int -> Int . eq _and_(true, A:Bool) = A:Bool . eq _and_(false, A:Bool) = false . eq _and_(A:Bool, A:Bool) = A:Bool . eq _xor_(false, A:Bool) = A:Bool . eq _xor_(A:Bool, A:Bool) = false . eq _and_(A:Bool, _xor_(B:Bool, C:Bool)) = _xor_(_and_(A:Bool, B:Bool), _and_( A:Bool, C:Bool)) . eq not_(A:Bool) = _xor_(true, A:Bool) . eq _or_(A:Bool, B:Bool) = _xor_(_and_(A:Bool, B:Bool), _xor_(A:Bool, B:Bool)) . eq _implies_(A:Bool, B:Bool) = not_(_xor_(A:Bool, _and_(A:Bool, B:Bool))) . eq g(A:Int, B:Int) = _-_(_-_(_-_(A:Int, s_(B:Int)), s_(A:Int)), s_(B:Int)) . endfm fmod M{X :: T} is sorts X$Elt Bool . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op f : X$Elt X$Elt -> X$Elt [assoc comm] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op g : X$Elt X$Elt -> X$Elt . var A : X$Elt . var B : X$Elt . eq g(A, B) = f(A, A, B, B) . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm fmod TEST is sorts Bool Zero NzNat Nat . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op g : Nat Nat -> Nat . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq g(A:Nat, B:Nat) = B:Nat + B:Nat + A:Nat + A:Nat . endfm fmod TEST is sorts Bool Zero NzNat Nat . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op g : Nat Nat -> Nat . eq _and_(true, A:Bool) = A:Bool . eq _and_(false, A:Bool) = false . eq _and_(A:Bool, A:Bool) = A:Bool . eq _xor_(false, A:Bool) = A:Bool . eq _xor_(A:Bool, A:Bool) = false . eq _and_(A:Bool, _xor_(B:Bool, C:Bool)) = _xor_(_and_(A:Bool, B:Bool), _and_( A:Bool, C:Bool)) . eq not_(A:Bool) = _xor_(true, A:Bool) . eq _or_(A:Bool, B:Bool) = _xor_(_and_(A:Bool, B:Bool), _xor_(A:Bool, B:Bool)) . eq _implies_(A:Bool, B:Bool) = not_(_xor_(A:Bool, _and_(A:Bool, B:Bool))) . eq g(A:Nat, B:Nat) = _+_(B:Nat, _+_(B:Nat, _+_(A:Nat, A:Nat))) . endfm fmod M{X :: T} is sorts X$Elt Bool . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op f : X$Elt X$Elt -> X$Elt [assoc comm] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op g : X$Elt X$Elt -> X$Elt . var A : X$Elt . var B : X$Elt . eq g(A, B) = f(A, A, B, B) . eq _and_(true, A:Bool) = A:Bool . eq _and_(false, A:Bool) = false . eq _and_(A:Bool, A:Bool) = A:Bool . eq _xor_(false, A:Bool) = A:Bool . eq _xor_(A:Bool, A:Bool) = false . eq _and_(A:Bool, _xor_(B:Bool, C:Bool)) = _xor_(_and_(A:Bool, B:Bool), _and_( A:Bool, C:Bool)) . eq not_(A:Bool) = _xor_(true, A:Bool) . eq _or_(A:Bool, B:Bool) = _xor_(_and_(A:Bool, B:Bool), _xor_(A:Bool, B:Bool)) . eq _implies_(A:Bool, B:Bool) = not_(_xor_(A:Bool, _and_(A:Bool, B:Bool))) . endfm fmod TEST is sorts Bool Zero NzNat Nat NzInt Int . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Int] [Int] [Int] -> [Int] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op g : Int Int -> Int . eq _and_(true, A:Bool) = A:Bool . eq _and_(false, A:Bool) = false . eq _and_(A:Bool, A:Bool) = A:Bool . eq _xor_(false, A:Bool) = A:Bool . eq _xor_(A:Bool, A:Bool) = false . eq _and_(A:Bool, _xor_(B:Bool, C:Bool)) = _xor_(_and_(A:Bool, B:Bool), _and_( A:Bool, C:Bool)) . eq not_(A:Bool) = _xor_(true, A:Bool) . eq _or_(A:Bool, B:Bool) = _xor_(_and_(A:Bool, B:Bool), _xor_(A:Bool, B:Bool)) . eq _implies_(A:Bool, B:Bool) = not_(_xor_(A:Bool, _and_(A:Bool, B:Bool))) . eq g(A:Int, B:Int) = _-_(_-_(_-_(A:Int, s_(A:Int)), s_(B:Int)), s_(B:Int)) . endfm fmod TEST is sorts Bool Zero NzNat Nat NzInt Int . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat < Int . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Int] [Int] [Int] -> [Int] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op g : Int Int -> Int . eq _and_(true, A:Bool) = A:Bool . eq _and_(false, A:Bool) = false . eq _and_(A:Bool, A:Bool) = A:Bool . eq _xor_(false, A:Bool) = A:Bool . eq _xor_(A:Bool, A:Bool) = false . eq _and_(A:Bool, _xor_(B:Bool, C:Bool)) = _xor_(_and_(A:Bool, B:Bool), _and_( A:Bool, C:Bool)) . eq not_(A:Bool) = _xor_(true, A:Bool) . eq _or_(A:Bool, B:Bool) = _xor_(_and_(A:Bool, B:Bool), _xor_(A:Bool, B:Bool)) . eq _implies_(A:Bool, B:Bool) = not_(_xor_(A:Bool, _and_(A:Bool, B:Bool))) . eq g(A:Int, B:Int) = _-_(_-_(_-_(A:Int, s_(A:Int)), s_(B:Int)), s_(B:Int)) . endfm fmod M{X :: T} is sorts X$Elt Bool . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op f : X$Elt X$Elt -> X$Elt [assoc comm] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op g : X$Elt X$Elt -> X$Elt . var A : X$Elt . var B : X$Elt . eq g(A, B) = f(A, A, B, B) . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . endfm fmod TEST is sorts Bool Zero NzNat Nat . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op g : Nat Nat -> Nat . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq g(A:Nat, B:Nat) = if if if A:Nat > A:Nat then A:Nat else A:Nat fi > B:Nat then if A:Nat > A:Nat then A:Nat else A:Nat fi else B:Nat fi > B:Nat then if if A:Nat > A:Nat then A:Nat else A:Nat fi > B:Nat then if A:Nat > A:Nat then A:Nat else A:Nat fi else B:Nat fi else B:Nat fi . endfm fmod TEST is sorts Bool Zero NzNat Nat . subsorts Zero NzNat < Nat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat))] . op modExp : [Nat] [Nat] [Nat] -> [Nat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) term-hook trueTerm (true) term-hook falseTerm (false))] . op g : Nat Nat -> Nat . eq _and_(true, A:Bool) = A:Bool . eq _and_(false, A:Bool) = false . eq _and_(A:Bool, A:Bool) = A:Bool . eq _xor_(false, A:Bool) = A:Bool . eq _xor_(A:Bool, A:Bool) = false . eq _and_(A:Bool, _xor_(B:Bool, C:Bool)) = _xor_(_and_(A:Bool, B:Bool), _and_( A:Bool, C:Bool)) . eq not_(A:Bool) = _xor_(true, A:Bool) . eq _or_(A:Bool, B:Bool) = _xor_(_and_(A:Bool, B:Bool), _xor_(A:Bool, B:Bool)) . eq _implies_(A:Bool, B:Bool) = not_(_xor_(A:Bool, _and_(A:Bool, B:Bool))) . eq g(A:Nat, B:Nat) = if_then_else_fi(_>_(if_then_else_fi(_>_(if_then_else_fi( _>_(A:Nat, A:Nat), A:Nat, A:Nat), B:Nat), if_then_else_fi(_>_(A:Nat, A:Nat), A:Nat, A:Nat), B:Nat), B:Nat), if_then_else_fi(_>_(if_then_else_fi( _>_(A:Nat, A:Nat), A:Nat, A:Nat), B:Nat), if_then_else_fi(_>_(A:Nat, A:Nat), A:Nat, A:Nat), B:Nat), B:Nat) . endfm ========================================== reduce in TEST : g(5, 4) . rewrites: 7 result NzNat: 5 Warning: summand module SET has parameters. Warning: summand module SET{[X]} has parameters. Warning: Instantiation MAP{STRICT-WEAK-ORDER, Y} uses both a theory-view and a parameter from enclosing module FOO. Warning: , line 355 (fmod MOD): operator declaration for operation f subsort overloads an operator of the same name from a parameter. Warning: , line 354 (fmod MOD): this module contains one or more errors that could not be patched up and thus it cannot be used or imported. Warning: , line 359 (fmod TEST): unable to use module MOD due to unpatchable errors. Maude> Bye. Maude-2.7/tests/Misc/unification0000755000147300135640000000035011002247132013627 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/unification.maude -no-banner -no-advise \ > unification.out 2>&1 diff $srcdir/unification.expected unification.out > /dev/null 2>&1 Maude-2.7/tests/Misc/variantUnification.maude0000644000147300135640000000250412006070203016244 00000000000000set show timing off . fmod FOO is sort Foo . ops a b c d e : -> Foo . ops f g h : Foo Foo -> Foo . op 1f : -> Foo . vars W X Y Z A B C D : Foo . eq f(X, 1f) = X [variant] . eq f(1f, X) = X [variant] . endfm variant unify f(X, g(Y, Z)) =? f(X, g(Y, Z)) . variant unify g(f(X, Y), Z) =? g(a, g(A, B)) . variant unify f(1f, g(Y, Z)) =? g(Y, Z) . variant unify g(f(X, Y), Z) =? g(A, f(B, C)) . fmod LEFT-ID is sorts Elt Magma . subsort Elt < Magma . op __ : Magma Magma -> Magma [gather(E e)] . ops a b c d e : -> Elt . var X : [Magma] . eq e X = X [variant] . endfm variant unify X:Magma a =? Y:Magma a a . variant unify a X:Magma =? a a Y:Magma . fmod RIGHT-ID is sorts Elt Magma . subsort Elt < Magma . op __ : Magma Magma -> Magma [gather(e E)] . ops a b c d e : -> Elt . var X : [Magma] . eq X e = X [variant] . endfm variant unify X:Magma a =? Y:Magma a a . variant unify a X:Magma =? a a Y:Magma . fmod XOR is sort XOR . sort Elem . ops cst1 cst2 cst3 cst4 : -> Elem . subsort Elem < XOR . op _+_ : XOR XOR -> XOR [ctor assoc comm] . op 0 : -> XOR . vars X Y : XOR . eq Y + 0 = Y [variant] . eq X + X = 0 [variant] . eq X + X + Y = Y [variant] . endfm variant unify X:XOR + cst1 =? Y:XOR + cst2 . variant unify X:XOR + cst1 =? Y:XOR + cst2 such that X:XOR + cst1 irreducible . Maude-2.7/tests/BuiltIn/0000755000147300135640000000000012305232005012126 500000000000000Maude-2.7/tests/BuiltIn/int.expected0000644000147300135640000001355210025661147014403 00000000000000Maude> ========================================== reduce in INT : - -1 . rewrites: 1 result NzNat: 1 ========================================== reduce in INT : - 0 . rewrites: 1 result Zero: 0 ========================================== reduce in INT : 5 + -2 . rewrites: 1 result NzNat: 3 ========================================== reduce in INT : 10 + -1 . rewrites: 1 result NzNat: 9 ========================================== reduce in INT : 10 + -11 . rewrites: 1 result NzInt: -1 ========================================== reduce in INT : 5 * -2 . rewrites: 1 result NzInt: -10 ========================================== reduce in INT : 10 - 11 . rewrites: 1 result NzInt: -1 ========================================== reduce in INT : 1 * -2 . rewrites: 1 result NzInt: -2 ========================================== reduce in INT : 1 * -1 . rewrites: 1 result NzInt: -1 ========================================== reduce in INT : 10 quo -4 . rewrites: 1 result NzInt: -2 ========================================== reduce in INT : -10 rem 4 . rewrites: 1 result NzInt: -2 ========================================== reduce in INT : -10 ^ 4 . rewrites: 1 result NzNat: 10000 ========================================== reduce in INT : -2 ^ 7 . rewrites: 1 result NzInt: -128 ========================================== reduce in INT : 2 ^ 7 . rewrites: 1 result NzNat: 128 ========================================== reduce in INT : abs(-140) . rewrites: 1 result NzNat: 140 ========================================== reduce in INT : abs(140) . rewrites: 1 result NzNat: 140 ========================================== reduce in INT : gcd(gcd(X:Nat, -120), gcd(Y:Nat, -140)) . rewrites: 1 result NzNat: gcd(X:Nat, Y:Nat, 20) ========================================== reduce in INT : gcd(124, 768, -346) . rewrites: 1 result NzNat: 2 ========================================== reduce in INT : gcd(8, -10) . rewrites: 1 result NzNat: 2 ========================================== reduce in INT : lcm(lcm(X:Nat, -120), lcm(Y:Nat, -140)) . rewrites: 1 result Nat: lcm(X:Nat, Y:Nat, 840) ========================================== reduce in INT : lcm(124, 768, -346) . rewrites: 1 result NzNat: 4118784 ========================================== reduce in INT : lcm(-8, -10) . rewrites: 1 result NzNat: 40 ========================================== reduce in INT : 1 xor -2 . rewrites: 1 result NzInt: -1 ========================================== reduce in INT : 1 xor -1 . rewrites: 1 result NzInt: -2 ========================================== reduce in INT : 1 xor -1 . rewrites: 1 result NzInt: -2 ========================================== reduce in INT : 1 & -2 . rewrites: 1 result Zero: 0 ========================================== reduce in INT : 1 & -1 . rewrites: 1 result NzNat: 1 ========================================== reduce in INT : 1 & -1 . rewrites: 1 result NzNat: 1 ========================================== reduce in INT : 1 | -2 . rewrites: 1 result NzInt: -1 ========================================== reduce in INT : 1 | -1 . rewrites: 1 result NzInt: -1 ========================================== reduce in INT : 1 | -2 . rewrites: 1 result NzInt: -1 ========================================== reduce in INT : -1 << 3 . rewrites: 1 result NzInt: -8 ========================================== reduce in INT : -128 >> 3 . rewrites: 1 result NzInt: -16 ========================================== reduce in INT : 1 < -2 . rewrites: 1 result Bool: false ========================================== reduce in INT : -1 < 1 . rewrites: 1 result Bool: true ========================================== reduce in INT : 1 <= -2 . rewrites: 1 result Bool: false ========================================== reduce in INT : -1 <= 1 . rewrites: 1 result Bool: true ========================================== reduce in INT : -1 > 2 . rewrites: 1 result Bool: false ========================================== reduce in INT : 1 > -1 . rewrites: 1 result Bool: true ========================================== reduce in INT : 1 >= -2 . rewrites: 1 result Bool: true ========================================== reduce in INT : -1 >= 1 . rewrites: 1 result Bool: false ========================================== reduce in INT : -3 divides 10 . rewrites: 1 result Bool: false ========================================== reduce in INT : 3 divides -9 . rewrites: 1 result Bool: true ========================================== reduce in INT : 1 . rewrites: 0 result NzNat: 1 ========================================== reduce in INT : -1 . rewrites: 0 result NzInt: -1 ========================================== reduce in INT : 2 + -1 . rewrites: 1 result NzNat: 1 ========================================== reduce in INT : -8888888888888888888888888888888888888888888888888888888 . rewrites: 0 result NzInt: -8888888888888888888888888888888888888888888888888888888 ========================================== reduce in INT : -42 . rewrites: 0 result NzInt: -42 ========================================== reduce in INT : - 0 . rewrites: 1 result Zero: 0 ========================================== reduce in INT : s_^2(0) ^ s_^200000000000000000000(0) . rewrites: 0 result NzNat: s_^2(0) ^ s_^200000000000000000000(0) ========================================== reduce in INT : s 0 ^ s_^200000000000000000000(0) . rewrites: 1 result NzNat: s 0 ========================================== reduce in INT : - s 0 ^ s_^200000000000000000000(0) . rewrites: 1 result NzNat: s 0 ========================================== reduce in INT : - s 0 ^ s_^200000000000000000001(0) . rewrites: 1 result NzInt: - s 0 ========================================== reduce in INT : 0 ^ s_^200000000000000000001(0) . rewrites: 1 result Zero: 0 ========================================== reduce in INT : s 0 << s_^200000000000000000001(0) . rewrites: 0 result Nat: s 0 << s_^200000000000000000001(0) ========================================== reduce in INT : 0 << s_^200000000000000000001(0) . rewrites: 1 result Zero: 0 Maude> Bye. Maude-2.7/tests/BuiltIn/rat.maude0000644000147300135640000000223510025674265013672 00000000000000set show timing off . set show advisories off . select RAT . red 2 / 3 + 1 / 4 . red 2 / 3 + -1 / 4 . red trunc(13 / 12) . red trunc(-13 / 12) . red frac(13 / 12) . red frac(-13 / 12) . red floor(13 / 12) . red floor(-13 / 12) . red ceiling(13 / 12) . red ceiling(-13 / 12) . red 2 / 3 + 1 / 3 . red 1/4 divides 1/2 . red 1/4 divides 1/12 . red 2/3 divides 3/2 . red 2/3 divides 4/3 . red 2/3 divides 5 . red 5 quo 2/3 . red -5 quo 2/3 . red -5 quo -2/3 . red 5 quo -2/3 . red 1 quo 3/100 . red 5 rem 2/3 . red -5 rem 2/3 . red -5 rem -2/3 . red 5 rem -2/3 . red 3 rem 2 . red -3 rem 2 . red 3 rem -2 . red -3 rem -2 . red 1 rem 3/100 . red 1 rem 7/100 . red 1 rem 13/100 . red gcd(1/2, 1/3) . red gcd(1/2, 0) . red gcd(5/6, 1/2, 9/13) . red lcm(1/2, 1/3) . red lcm(1/2, 2/3) . red lcm(1/2, 1/6) . red lcm(1/2, 0) . fmod RAT-BENCH is pr RAT . ops f g : Nat -> Rat . var N : Nat . eq f(0) = 1 . eq f(s N) = - f(N) + N / (s N) . eq g(0) = 1 . eq g(s N) = - g(N) * (s N / (N + 2)) . endfm red f(100) . red g(100) . fmod FOO is inc RAT . ops a b c d e : -> Rat . eq a = 42 . eq b = -42 . eq c = -42/1 . eq d = -42/29 . endfm show all FOO . Maude-2.7/tests/BuiltIn/string0000755000147300135640000000032410511602541013304 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/string.maude -no-banner -no-advise \ > string.out 2>&1 diff $srcdir/string.expected string.out > /dev/null 2>&1 Maude-2.7/tests/BuiltIn/int.maude0000644000147300135640000000277010025656463013702 00000000000000set show timing off . set show advisories off . select INT . red - - s 0 . red - 0 . red - s_^2(0) + s_^5(0) . red s_^10(0) + - s_(0) . red s_^10(0) + - s_^11(0) . red - s_^2(0) * s_^5(0) . red s_^10(0) - s_^11(0) . red s 0 * - s s 0 . red s 0 * - s 0 . red s_^10(0) quo - s_^4(0) . red - s_^10(0) rem s_^4(0) . red - s_^10(0) ^ s_^4(0) . red - s_^2(0) ^ s_^7(0) . red s_^2(0) ^ s_^7(0) . red abs(- s_^140(0)) . red abs(s_^140(0)) . red gcd(gcd(- s_^120(0), X:Nat), gcd(- s_^140(0), Y:Nat)) . red gcd(s_^124(0), - s_^346(0), s_^768(0)) . red gcd(- s_^10(0), s_^8(0)) . red lcm(lcm(- s_^120(0), X:Nat), lcm(- s_^140(0), Y:Nat)) . red lcm(s_^124(0), - s_^346(0), s_^768(0)) . red lcm(- s_^10(0), - s_^8(0)) . red s 0 xor - s s 0 . red s 0 xor - s 0 . red - s 0 xor s 0 . red s 0 & - s s 0 . red s 0 & - s 0 . red - s 0 & s 0 . red s 0 | - s s 0 . red s 0 | - s 0 . red - s s 0 | s 0 . red - s 0 << s s s 0 . red - s_^128(0) >> s s s 0 . red s 0 < - s s 0 . red - s 0 < s 0 . red s 0 <= - s s 0 . red - s 0 <= s 0 . red - s 0 > s s 0 . red s 0 > - s 0 . red s 0 >= - s s 0 . red - s 0 >= s 0 . red - s_^3(0) divides s_^10(0) . red s_^3(0) divides - s_^9(0) . red 1 . red -1 . red 2 + -1 . red -8888888888888888888888888888888888888888888888888888888 . red -42 . set print number off . red - 0 . red 2 ^ 200000000000000000000 . red 1 ^ 200000000000000000000 . red -1 ^ 200000000000000000000 . red -1 ^ 200000000000000000001 . red 0 ^ 200000000000000000001 . red 1 << 200000000000000000001 . red 0 << 200000000000000000001 . Maude-2.7/tests/BuiltIn/string.expected0000644000147300135640000001706210025702530015107 00000000000000Maude> ========================================== reduce in STRING : ascii("A") . rewrites: 1 result NzNat: 65 ========================================== reduce in STRING : ascii("AB") . rewrites: 0 result [FindResult]: ascii("AB") ========================================== reduce in STRING : length("AAA") . rewrites: 1 result NzNat: 3 ========================================== reduce in STRING : length("") . rewrites: 1 result Zero: 0 ========================================== reduce in STRING : length("abcdefghijklmnopqrstuvwxyz") . rewrites: 1 result NzNat: 26 ========================================== reduce in STRING : substr("abcdefghijklmnopqrstuvwxyz", 10, 5) . rewrites: 1 result String: "klmno" ========================================== reduce in STRING : substr("abcdefghijklmnopqrstuvwxyz", 1000000000000000000, 5) . rewrites: 1 result String: "" ========================================== reduce in STRING : substr("abcdefghijklmnopqrstuvwxyz", 10, 500000000000000000) . rewrites: 1 result String: "klmnopqrstuvwxyz" ========================================== reduce in STRING : substr("abcdefghijklmnopqrstuvwxyz", 0, 5) . rewrites: 1 result String: "abcde" ========================================== reduce in STRING : substr("abcdefghijklmnopqrstuvwxyz", 10, 0) . rewrites: 1 result String: "" ========================================== reduce in STRING : find("abcdefghijabcdefghij", "cde", 0) . rewrites: 1 result NzNat: 2 ========================================== reduce in STRING : find("abcdefghijabcdefghij", "cde", 1) . rewrites: 1 result NzNat: 2 ========================================== reduce in STRING : find("abcdefghijabcdefghij", "cde", 2) . rewrites: 1 result NzNat: 2 ========================================== reduce in STRING : find("abcdefghijabcdefghij", "cde", 3) . rewrites: 1 result NzNat: 12 ========================================== reduce in STRING : find("abcdefghijabcdefghij", "cde", 30000000000000000000000) . rewrites: 1 result FindResult: notFound ========================================== reduce in STRING : rfind("abcdefghijabcdefghij", "cde", 0) . rewrites: 1 result FindResult: notFound ========================================== reduce in STRING : rfind("abcdefghijabcdefghij", "cde", 1) . rewrites: 1 result FindResult: notFound ========================================== reduce in STRING : rfind("abcdefghijabcdefghij", "cde", 2) . rewrites: 1 result NzNat: 2 ========================================== reduce in STRING : rfind("abcdefghijabcdefghij", "cde", 12) . rewrites: 1 result NzNat: 12 ========================================== reduce in STRING : rfind("abcdefghijabcdefghij", "cde", 13) . rewrites: 1 result NzNat: 12 ========================================== reduce in STRING : rfind("abcdefghijabcdefghij", "cde", 30000000000000000000000) . rewrites: 1 result NzNat: 12 ========================================== reduce in STRING : char(65) . rewrites: 1 result Char: "A" ========================================== reduce in STRING : char(2000) . rewrites: 0 result [String]: char(2000) ========================================== reduce in STRING : char(20000000000000000000000) . rewrites: 0 result [String]: char(20000000000000000000000) ========================================== reduce in STRING : char(0) . rewrites: 1 result Char: "\000" ========================================== reduce in STRING : char(255) . rewrites: 1 result Char: "\377" ========================================== reduce in STRING : "test" . rewrites: 0 result String: "test" ========================================== reduce in STRING : "test" + "2" . rewrites: 1 result String: "test2" ========================================== reduce in STRING : substr("cat", 1, 1) . rewrites: 1 result Char: "a" ========================================== reduce in STRING : substr("\n\r\f", 1, 1) . rewrites: 1 result Char: "\r" ========================================== reduce in STRING : "\a" . rewrites: 0 result Char: "\a" ========================================== reduce in STRING : substr("a\"\"b", 0, 0) . rewrites: 1 result String: "" ========================================== reduce in STRING : substr("a\"\"b", 0, 2) . rewrites: 1 result String: "a\"" ========================================== reduce in STRING : substr("a\"\"b", 0, 100) . rewrites: 1 result String: "a\"\"b" ========================================== reduce in STRING : substr("a\"\"b", 3, 1) . rewrites: 1 result Char: "b" ========================================== reduce in STRING : substr("a\"\"b", 4, 1) . rewrites: 1 result String: "" ========================================== reduce in STRING : "abracadabra" < "aardvark" . rewrites: 1 result Bool: false ========================================== reduce in STRING : "AAA" < "aardvark" . rewrites: 1 result Bool: true ========================================== reduce in STRING : length("aardvark") . rewrites: 1 result NzNat: 8 ========================================== reduce in STRING : "abc" == "a" + "b" + "c" . rewrites: 3 result Bool: true ========================================== reduce in STRING : find("catcat", "tc", 0) . rewrites: 1 result NzNat: 2 ========================================== reduce in STRING : find("catcat", "jr", 0) . rewrites: 1 result FindResult: notFound ========================================== reduce in STRING : rfind("catcat", "t", 10) . rewrites: 1 result NzNat: 5 ========================================== reduce in STRING : rfind("catcat", "t", 4) . rewrites: 1 result NzNat: 2 ========================================== reduce in STRING : "\000" . rewrites: 0 result Char: "\000" ========================================== reduce in STRING : "\377" . rewrites: 0 result Char: "\377" ========================================== reduce in STRING : "\00399" . rewrites: 0 result String: "\00399" ========================================== reduce in STRING : "?" . rewrites: 0 result Char: "?" ========================================== reduce in STRING : " " . rewrites: 0 result Char: " " ========================================== reduce in STRING : "A" . rewrites: 0 result Char: "A" Warning: , line 80: ambiguous term, two parses are: ("this is not a string").Foo -versus- ("this is not a string").String Arbitrarily taking the first as correct. ========================================== reduce in FOO : ("this is not a string").Foo . rewrites: 0 result Foo: ("this is not a string").Foo ========================================== reduce in FOO : ("this is not a string").Foo . rewrites: 0 result Foo: ("this is not a string").Foo ========================================== reduce in FOO : ("this is not a string").String . rewrites: 0 result String: ("this is not a string").String ========================================== reduce in FOO : "this is a string" . rewrites: 0 result String: "this is a string" ========================================== reduce in STRING : "this is a really long string; this is a really long string; this is a really long string; this is a really long string; this is a really long string." . rewrites: 0 result String: "this is a really long string; this is a really long string; this is a really long string; this is a really long string; this is a really long string." ========================================== reduce in STRING : char(65) . rewrites: 1 result Char: "A" ========================================== reduce in STRING : ascii(" ") . rewrites: 1 result NzNat: 32 ========================================== reduce in STRING : ascii("aa") . rewrites: 0 result [FindResult]: ascii("aa") ========================================== reduce in STRING : char(1000) . rewrites: 0 result [String]: char(1000) Maude> Bye. Maude-2.7/tests/BuiltIn/counters.expected0000644000147300135640000001156710153437456015465 00000000000000Maude> ========================================== rewrite in COUNTER-TEST : counter . rewrites: 1 result Zero: 0 ========================================== rewrite in COUNTER-TEST : f(11) . rewrites: 23 result List: 0 1 2 3 4 5 6 7 8 9 10 ========================================== rewrite in COUNTER-TEST : f(11) . rewrites: 23 result List: 0 1 2 3 4 5 6 7 8 9 10 ========================================== rewrite in COUNTER-TEST : f(11) . rewrites: 23 result List: 11 12 13 14 15 16 17 18 19 20 21 ========================================== rewrite in COUNTER-TEST : f(11) . rewrites: 23 result List: 0 1 2 3 4 5 6 7 8 9 10 ========================================== rewrite in COUNTER-TEST2 : random(counter) . rewrites: 2 result NzNat: 2357136044 ========================================== rewrite in COUNTER-TEST2 : f(11) . rewrites: 34 result List: 2357136044 2546248239 3071714933 3626093760 2588848963 3684848379 2340255427 3638918503 1819583497 2678185683 2774094101 ========================================== rewrite in COUNTER-TEST2 : f(100) . rewrites: 301 result List: 2357136044 2546248239 3071714933 3626093760 2588848963 3684848379 2340255427 3638918503 1819583497 2678185683 2774094101 1650906866 1879422756 1277901399 3830135878 243580376 4138900056 1171049868 1646868794 2051556033 3400433126 3488238119 2271586391 2061486254 2439732824 1686997841 3975407269 3590930969 305097549 1449105480 374217481 2783877012 86837363 1581585360 3576074995 4110950085 3342157822 602801999 3736673711 3736996288 4203133778 2034131043 3432359896 3439885489 1982038771 2235433757 3352347283 2915765395 507984782 3095093671 2748439840 2499755969 615697673 2308000441 4057322111 3258229280 2241321503 454869706 1780959476 2034098327 1136257699 800291326 3325308363 3165039474 1959150775 930076700 2441405218 580757632 80701568 1392175012 2652724277 642848645 2628931110 954863080 2649711348 1659957521 4053367119 3876630916 2928395881 1932520490 1544074682 2633087519 1877037944 3875557633 2996303169 426405863 258666409 4165298233 2863741219 2805215078 2880367735 734051083 903586222 1538251858 553734235 3224172416 1354754446 2610612835 1562125877 1396067212 ========================================== rewrite in FOO : a . rewrites: 1 result Foo: b ========================================== rewrite in FOO : a . rewrites: 1 result Foo: b ========================================== rewrite in FOO : a . rewrites: 1 result Foo: c ========================================== rewrite in FOO : a . rewrites: 1 result Foo: d ========================================== rewrite in FOO : a . rewrites: 1 result Foo: e ========================================== rewrite in FOO : a . rewrites: 1 result Foo: b ========================================== rewrite in FOO : a . rewrites: 1 result Foo: b ========================================== rewrite in COUNTER-TEST3 : f(4) . *********** equation eq f(s N) = counter f(N) . N --> 3 f(4) ---> counter f(3) *********** equation eq f(s N) = counter f(N) . N --> 2 f(3) ---> counter f(2) *********** equation eq f(s N) = counter f(N) . N --> 1 f(2) ---> counter f(1) *********** equation eq f(s N) = counter f(N) . N --> 0 f(1) ---> counter f(0) *********** equation eq f(0) = nil . empty substitution f(0) ---> nil *********** rule (built-in rule for symbol counter) counter ---> 0 0 *********** rule (built-in rule for symbol counter) counter ---> 1 1 ========================================== rewrite in COUNTER-TEST3 : counter . rewrites: 1 result Zero: 0 rewrites: 9 result List: 0 1 1 2 ========================================== frewrite in COUNTER-TEST3 : f(4) . *********** equation eq f(s N) = counter f(N) . N --> 3 f(4) ---> counter f(3) *********** equation eq f(s N) = counter f(N) . N --> 2 f(3) ---> counter f(2) *********** equation eq f(s N) = counter f(N) . N --> 1 f(2) ---> counter f(1) *********** equation eq f(s N) = counter f(N) . N --> 0 f(1) ---> counter f(0) *********** equation eq f(0) = nil . empty substitution f(0) ---> nil *********** rule (built-in rule for symbol counter) counter ---> 0 0 *********** rule (built-in rule for symbol counter) counter ---> 1 1 ========================================== rewrite in COUNTER-TEST3 : counter . rewrites: 1 result Zero: 0 rewrites: 9 result List: 0 1 1 2 ========================================== rewrite [4] in COUNTER-TEST3 : f(8) . rewrites: 13 result [List]: 0 1 2 3 counter counter counter counter rewrites: 4 result List: 0 1 2 3 4 5 6 7 ========================================== rewrite in COUNTER-TEST4 : f(4) . rewrites: 13 result List: 0 0 1 1 2 2 3 3 ========================================== search in COUNTER-TEST4 : f(4) =>* L:List . No solution. states: 1 rewrites: 5 ========================================== reduce in META-LEVEL : metaRewrite(['COUNTER-TEST4], '__['counter.Nat, 'counter.Nat], 2) . rewrites: 4 result ResultPair: {'__['0.Zero,'s_['0.Zero]],'List} Maude> Bye. Maude-2.7/tests/BuiltIn/nat.maude0000644000147300135640000000331010025656407013657 00000000000000set show timing off . set show advisories off . select NAT . red s 0 + s s 0 . red s 0 + s 0 . red _+_(s 0, N:Nat, s 0) . red sd(s s 0, s s s 0) . red sd(s_^3(0), s_^10(0)) . red sd(s_^10(0), s_^4(0)) . red s 0 * s s 0 . red s 0 * s 0 . red s_^10(0) quo s_^4(0) . red s_^10(0) rem s_^4(0) . red s_^10(0) ^ s_^4(0) . red modExp(s_^37(0), s_^1000000000000002(0), s_^100(0)) . red modExp(s_^37(0), s_^1000000000000002(0), s_^1000003(0)) . red modExp(s_^100200300400(0), s_^1000000000000002(0), s_^1000003(0)) . red gcd(gcd(s_^120(0), X:Nat), gcd(s_^140(0), Y:Nat)) . red gcd(s_^124(0), s_^346(0), s_^768(0)) . red lcm(lcm(s_^120(0), X:Nat), lcm(s_^140(0), Y:Nat)) . red lcm(s_^124(0), s_^346(0), s_^768(0)) . red s 0 xor s s 0 . red s 0 xor s 0 . red s 0 & s s 0 . red s 0 & s 0 . red s 0 | s s 0 . red s 0 | s 0 . red s 0 << s s s 0 . red s_^128(0) >> s s s 0 . red s 0 < s s 0 . red s 0 < s 0 . red s 0 <= s s 0 . red s 0 <= s 0 . red s 0 > s s 0 . red s 0 > s 0 . red s 0 >= s s 0 . red s 0 >= s 0 . red s_^3(0) divides s_^10(0) . red s_^3(0) divides s_^9(0) . fmod FACT is inc NAT . op _! : Nat -> NzNat . var N : Nat . eq 0 ! = s 0 . eq (s N) ! = s N * N ! . endfm red s_^100(0) ! . red s_^1000(0) ! . fmod MOD3 is inc NAT . eq s_^3(0) = 0 . endfm red s_^4(0) . fmod FACT' is inc NAT . op _! : Nat -> NzNat . var N : Nat . eq 0 ! = 1 . eq (s N) ! = (s N) * N ! . endfm red 100 ! . red 1000 ! . fmod MOD3' is inc NAT . eq 3 = 0 . endfm red 4445 . select NAT . red 8888888888888888888888888888888888888888888888888888888 . red s_^123456789(s_^123456789(0)) . select NAT . set print graph on . red 123 . set trace on . set trace whole on . red 4 + 5 . set trace off . set print graph off . Maude-2.7/tests/BuiltIn/int0000755000147300135640000000031010511602572012567 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/int.maude -no-banner -no-advise \ > int.out 2>&1 diff $srcdir/int.expected int.out > /dev/null 2>&1 Maude-2.7/tests/BuiltIn/Makefile.in0000644000147300135640000003035212305230426014123 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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 = tests/BuiltIn DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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@ TESTS = \ nat \ int \ rat \ string \ counters MAUDE_FILES = \ nat.maude \ int.maude \ rat.maude \ string.maude \ counters.maude RESULT_FILES = \ nat.expected \ int.expected \ rat.expected \ string.expected \ counters.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) all: all-am .SUFFIXES: $(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 tests/BuiltIn/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/BuiltIn/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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): tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(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 $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ distclean distclean-generic 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-generic pdf pdf-am ps ps-am uninstall \ uninstall-am # 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-2.7/tests/BuiltIn/rat.expected0000644000147300135640000007167610162661726014417 00000000000000Maude> ========================================== reduce in RAT : 1/4 + 2/3 . rewrites: 5 result PosRat: 11/12 ========================================== reduce in RAT : 2/3 + -1/4 . rewrites: 5 result PosRat: 5/12 ========================================== reduce in RAT : trunc(13/12) . rewrites: 2 result NzNat: 1 ========================================== reduce in RAT : trunc(-13/12) . rewrites: 2 result NzInt: -1 ========================================== reduce in RAT : frac(13/12) . rewrites: 2 result PosRat: 1/12 ========================================== reduce in RAT : frac(-13/12) . rewrites: 2 result NzRat: -1/12 ========================================== reduce in RAT : floor(13/12) . rewrites: 2 result NzNat: 1 ========================================== reduce in RAT : floor(-13/12) . rewrites: 5 result NzInt: -2 ========================================== reduce in RAT : ceiling(13/12) . rewrites: 4 result NzNat: 2 ========================================== reduce in RAT : ceiling(-13/12) . rewrites: 3 result NzInt: -1 ========================================== reduce in RAT : 1/3 + 2/3 . rewrites: 6 result NzNat: 1 ========================================== reduce in RAT : 1/4 divides 1/2 . rewrites: 7 result Bool: true ========================================== reduce in RAT : 1/4 divides 1/12 . rewrites: 5 result Bool: false ========================================== reduce in RAT : 2/3 divides 3/2 . rewrites: 6 result Bool: false ========================================== reduce in RAT : 2/3 divides 4/3 . rewrites: 5 result Bool: true ========================================== reduce in RAT : 2/3 divides 5 . rewrites: 3 result Bool: false ========================================== reduce in RAT : 5 quo 2/3 . rewrites: 3 result NzNat: 7 ========================================== reduce in RAT : -5 quo 2/3 . rewrites: 3 result NzInt: -7 ========================================== reduce in RAT : -5 quo -2/3 . rewrites: 3 result NzNat: 7 ========================================== reduce in RAT : 5 quo -2/3 . rewrites: 3 result NzInt: -7 ========================================== reduce in RAT : 1 quo 3/100 . rewrites: 3 result NzNat: 33 ========================================== reduce in RAT : 5 rem 2/3 . rewrites: 3 result PosRat: 1/3 ========================================== reduce in RAT : -5 rem 2/3 . rewrites: 3 result NzRat: -1/3 ========================================== reduce in RAT : -5 rem -2/3 . rewrites: 3 result NzRat: -1/3 ========================================== reduce in RAT : 5 rem -2/3 . rewrites: 3 result PosRat: 1/3 ========================================== reduce in RAT : 3 rem 2 . rewrites: 1 result NzNat: 1 ========================================== reduce in RAT : -3 rem 2 . rewrites: 1 result NzInt: -1 ========================================== reduce in RAT : 3 rem -2 . rewrites: 1 result NzNat: 1 ========================================== reduce in RAT : -3 rem -2 . rewrites: 1 result NzInt: -1 ========================================== reduce in RAT : 1 rem 3/100 . rewrites: 3 result PosRat: 1/100 ========================================== reduce in RAT : 1 rem 7/100 . rewrites: 4 result PosRat: 1/50 ========================================== reduce in RAT : 1 rem 13/100 . rewrites: 3 result PosRat: 9/100 ========================================== reduce in RAT : gcd(1/2, 1/3) . rewrites: 8 result PosRat: 1/6 ========================================== reduce in RAT : gcd(0, 1/2) . rewrites: 3 result PosRat: 1/2 ========================================== reduce in RAT : gcd(1/2, 5/6, 9/13) . rewrites: 17 result PosRat: 1/78 ========================================== reduce in RAT : lcm(1/2, 1/3) . rewrites: 8 result NzNat: 1 ========================================== reduce in RAT : lcm(1/2, 2/3) . rewrites: 8 result NzNat: 2 ========================================== reduce in RAT : lcm(1/2, 1/6) . rewrites: 8 result PosRat: 1/2 ========================================== reduce in RAT : lcm(0, 1/2) . rewrites: 4 result Zero: 0 ========================================== reduce in RAT-BENCH : f(100) . rewrites: 818 result PosRat: 117699997793868264083012417974975201679417/69720375229712477164533808935312303556800 ========================================== reduce in RAT-BENCH : g(100) . rewrites: 748 result PosRat: 1/101 fmod FOO is sorts Bool Zero NzNat Nat NzInt Int PosRat NzRat Rat . subsorts Zero NzNat NzNat < Nat . subsort NzNat < NzInt . subsorts NzInt Nat NzInt < Int . subsort NzNat < PosRat . subsorts NzInt PosRat < NzRat . subsorts NzRat Int < Rat . op if_then_else_fi : Bool Universal Universal -> Universal [poly (2 3 0) prec 0 gather (& & &) special ( id-hook BranchSymbol term-hook 1 (true) term-hook 2 (false))] . op _==_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (true) term-hook notEqualTerm (false))] . op _=/=_ : Universal Universal -> Bool [poly (1 2) prec 51 gather (E E) special ( id-hook EqualitySymbol term-hook equalTerm (false) term-hook notEqualTerm (true))] . op true : -> Bool [ctor special ( id-hook SystemTrue)] . op false : -> Bool [ctor special ( id-hook SystemFalse)] . op _and_ : Bool Bool -> Bool [assoc comm prec 55 gather (e E)] . op _or_ : Bool Bool -> Bool [assoc comm prec 59 gather (e E)] . op _xor_ : Bool Bool -> Bool [assoc comm prec 57 gather (e E)] . op not_ : Bool -> Bool [prec 53 gather (E)] . op _implies_ : Bool Bool -> Bool [prec 61 gather (e E)] . op 0 : -> Zero [ctor] . op s_ : Nat -> NzNat [ctor iter prec 15 gather (E) special ( id-hook SuccSymbol term-hook zeroTerm (0))] . op _+_ : NzNat Nat -> NzNat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Nat Nat -> Nat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Int Int -> Int [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat PosRat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : PosRat Nat -> PosRat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _+_ : Rat Rat -> Rat [assoc comm prec 33 gather (e E) special ( id-hook ACU_NumberOpSymbol (+) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op sd : Nat Nat -> Nat [comm special ( id-hook CUI_NumberOpSymbol (sd) op-hook succSymbol (s_ : Nat ~> NzNat))] . op _*_ : NzNat NzNat -> NzNat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Nat Nat -> Nat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzInt NzInt -> NzInt [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Int Int -> Int [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : PosRat PosRat -> PosRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : NzRat NzRat -> NzRat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _*_ : Rat Rat -> Rat [assoc comm prec 31 gather (e E) special ( id-hook ACU_NumberOpSymbol (*) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : PosRat PosRat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _quo_ : Rat NzRat -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (quo) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Nat NzNat -> Nat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Int NzInt -> Int [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _rem_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook NumberOpSymbol (rem) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Nat Nat -> Nat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzNat Nat -> NzNat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Int Nat -> Int [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzInt Nat -> NzInt [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : PosRat Nat -> PosRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : NzRat Nat -> NzRat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _^_ : Rat Nat -> Rat [prec 29 gather (E e) special ( id-hook NumberOpSymbol (^) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op modExp : [Rat] [Rat] [Rat] -> [Rat] [special ( id-hook NumberOpSymbol (modExp) op-hook succSymbol (s_ : Nat ~> NzNat))] . op gcd : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzInt Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : NzRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op gcd : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (gcd) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzInt NzInt -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Int Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : NzRat NzRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op lcm : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (lcm) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzNat NzNat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : PosRat PosRat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op min : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (min) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Nat -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Nat -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzInt NzInt -> NzInt [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Int Int -> Int [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzNat Int -> NzNat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Nat Int -> Nat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : PosRat Rat -> PosRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : NzRat NzRat -> NzRat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op max : Rat Rat -> Rat [assoc comm special ( id-hook ACU_NumberOpSymbol (max) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Nat Nat -> Nat [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _xor_ : Int Int -> Int [assoc comm prec 55 gather (e E) special ( id-hook ACU_NumberOpSymbol (xor) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Nat -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Nat Int -> Nat [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _&_ : Int Int -> Int [assoc comm prec 53 gather (e E) special ( id-hook ACU_NumberOpSymbol (&) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzNat Nat -> NzNat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Nat Nat -> Nat [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : NzInt Int -> NzInt [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _|_ : Int Int -> Int [assoc comm prec 57 gather (e E) special ( id-hook ACU_NumberOpSymbol (|) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _>>_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (>>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Nat Nat -> Nat [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<<_ : Int Nat -> Int [prec 35 gather (E e) special ( id-hook NumberOpSymbol (<<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _<_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _<=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (<=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Nat Nat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Int Int -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _>=_ : Rat Rat -> Bool [prec 37 gather (E E) special ( id-hook NumberOpSymbol (>=) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzNat Nat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzInt Int -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op _divides_ : NzRat Rat -> Bool [prec 51 gather (E E) special ( id-hook NumberOpSymbol (divides) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt) term-hook trueTerm (true) term-hook falseTerm (false))] . op -_ : NzNat -> NzInt [ctor prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzInt -> NzInt [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Int -> Int [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : NzRat -> NzRat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op -_ : Rat -> Rat [prec 15 gather (E) special ( id-hook MinusSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Int Int -> Int [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _-_ : Rat Rat -> Rat [prec 33 gather (E e) special ( id-hook NumberOpSymbol (-) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzInt -> NzNat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Int -> Nat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : NzRat -> PosRat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op abs : Rat -> Rat [special ( id-hook NumberOpSymbol (abs) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op ~_ : Int -> Int [prec 15 gather (E) special ( id-hook NumberOpSymbol (~) op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzInt NzNat -> NzRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzNat NzNat -> PosRat [ctor prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : PosRat PosRat -> PosRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : NzRat NzRat -> NzRat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op _/_ : Rat NzRat -> Rat [prec 31 gather (E e) special ( id-hook DivisionSymbol op-hook succSymbol (s_ : Nat ~> NzNat) op-hook minusSymbol (-_ : NzNat ~> NzInt))] . op trunc : PosRat -> Nat . op trunc : Rat -> Int . op frac : Rat -> Rat . op floor : PosRat -> Nat . op floor : Rat -> Int . op ceiling : PosRat -> NzNat . op ceiling : Rat -> Int . op a : -> Rat . op b : -> Rat . op c : -> Rat . op d : -> Rat . op e : -> Rat . eq a = 42 . eq b = -42 . eq c = -42/1 . eq d = -42/29 . eq true and A:Bool = A:Bool . eq false and A:Bool = false . eq A:Bool and A:Bool = A:Bool . eq false xor A:Bool = A:Bool . eq A:Bool xor A:Bool = false . eq A:Bool and (B:Bool xor C:Bool) = A:Bool and B:Bool xor A:Bool and C:Bool . eq not A:Bool = true xor A:Bool . eq A:Bool or B:Bool = A:Bool and B:Bool xor A:Bool xor B:Bool . eq A:Bool implies B:Bool = not (A:Bool xor A:Bool and B:Bool) . eq 0 / Q:NzRat = 0 . eq I:NzInt / - N:NzNat = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / (J:NzInt * N:NzNat) . eq I:NzInt / N:NzNat / J:NzInt = I:NzInt / (J:NzInt * N:NzNat) . eq I:NzInt / (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) / J:NzInt . eq - (I:NzInt / N:NzNat) = - I:NzInt / N:NzNat . eq I:NzInt / N:NzNat + J:NzInt / M:NzNat = (I:NzInt * M:NzNat + J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int + I:NzInt / N:NzNat = (I:NzInt + N:NzNat * K:Int) / N:NzNat . eq I:NzInt / N:NzNat - J:NzInt / M:NzNat = (I:NzInt * M:NzNat - J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq I:NzInt / N:NzNat - K:Int = (I:NzInt - N:NzNat * K:Int) / N:NzNat . eq K:Int - J:NzInt / M:NzNat = (M:NzNat * K:Int - J:NzInt) / M:NzNat . eq 0 * Q:NzRat = 0 . eq (I:NzInt / N:NzNat) * (J:NzInt / M:NzNat) = (I:NzInt * J:NzInt) / (N:NzNat * M:NzNat) . eq K:Int * (I:NzInt / N:NzNat) = (I:NzInt * K:Int) / N:NzNat . eq I:NzInt / N:NzNat quo Q:NzRat = I:NzInt quo (Q:NzRat * N:NzNat) . eq K:Int quo (J:NzInt / M:NzNat) = (M:NzNat * K:Int) quo J:NzInt . eq I:NzInt / N:NzNat rem (J:NzInt / M:NzNat) = (I:NzInt * M:NzNat) rem ( J:NzInt * N:NzNat) / (N:NzNat * M:NzNat) . eq K:Int rem (J:NzInt / M:NzNat) = (M:NzNat * K:Int) rem J:NzInt / M:NzNat . eq I:NzInt / N:NzNat rem J:NzInt = I:NzInt rem (J:NzInt * N:NzNat) / N:NzNat . eq (I:NzInt / N:NzNat) ^ Z:Nat = I:NzInt ^ Z:Nat / N:NzNat ^ Z:Nat . eq abs(I:NzInt / N:NzNat) = abs(I:NzInt) / N:NzNat . eq gcd(R:Rat, I:NzInt / N:NzNat) = gcd(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq lcm(R:Rat, I:NzInt / N:NzNat) = lcm(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq min(R:Rat, I:NzInt / N:NzNat) = min(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq max(R:Rat, I:NzInt / N:NzNat) = max(I:NzInt, N:NzNat * R:Rat) / N:NzNat . eq I:NzInt / N:NzNat < J:NzInt / M:NzNat = I:NzInt * M:NzNat < J:NzInt * N:NzNat . eq I:NzInt / N:NzNat < K:Int = I:NzInt < N:NzNat * K:Int . eq K:Int < J:NzInt / M:NzNat = M:NzNat * K:Int < J:NzInt . eq I:NzInt / N:NzNat <= J:NzInt / M:NzNat = I:NzInt * M:NzNat <= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat <= K:Int = I:NzInt <= N:NzNat * K:Int . eq K:Int <= J:NzInt / M:NzNat = M:NzNat * K:Int <= J:NzInt . eq I:NzInt / N:NzNat > J:NzInt / M:NzNat = I:NzInt * M:NzNat > J:NzInt * N:NzNat . eq I:NzInt / N:NzNat > K:Int = I:NzInt > N:NzNat * K:Int . eq K:Int > J:NzInt / M:NzNat = M:NzNat * K:Int > J:NzInt . eq I:NzInt / N:NzNat >= J:NzInt / M:NzNat = I:NzInt * M:NzNat >= J:NzInt * N:NzNat . eq I:NzInt / N:NzNat >= K:Int = I:NzInt >= N:NzNat * K:Int . eq K:Int >= J:NzInt / M:NzNat = M:NzNat * K:Int >= J:NzInt . eq I:NzInt / N:NzNat divides K:Int = I:NzInt divides N:NzNat * K:Int . eq Q:NzRat divides J:NzInt / M:NzNat = Q:NzRat * M:NzNat divides J:NzInt . eq trunc(K:Int) = K:Int . eq trunc(I:NzInt / N:NzNat) = I:NzInt quo N:NzNat . eq frac(K:Int) = 0 . eq frac(I:NzInt / N:NzNat) = I:NzInt rem N:NzNat / N:NzNat . eq floor(K:Int) = K:Int . eq ceiling(K:Int) = K:Int . eq floor(N:NzNat / M:NzNat) = N:NzNat quo M:NzNat . eq ceiling(N:NzNat / M:NzNat) = ((N:NzNat + M:NzNat) - 1) quo M:NzNat . eq floor(- N:NzNat / M:NzNat) = - ceiling(N:NzNat / M:NzNat) . eq ceiling(- N:NzNat / M:NzNat) = - floor(N:NzNat / M:NzNat) . endfm Maude> Bye. Maude-2.7/tests/BuiltIn/nat.expected0000644000147300135640000002635210025661126014372 00000000000000Maude> ========================================== reduce in NAT : 1 + 2 . rewrites: 1 result NzNat: 3 ========================================== reduce in NAT : 1 + 1 . rewrites: 1 result NzNat: 2 ========================================== reduce in NAT : N:Nat + 1 + 1 . rewrites: 1 result NzNat: N:Nat + 2 ========================================== reduce in NAT : sd(2, 3) . rewrites: 1 result NzNat: 1 ========================================== reduce in NAT : sd(3, 10) . rewrites: 1 result NzNat: 7 ========================================== reduce in NAT : sd(4, 10) . rewrites: 1 result NzNat: 6 ========================================== reduce in NAT : 1 * 2 . rewrites: 1 result NzNat: 2 ========================================== reduce in NAT : 1 * 1 . rewrites: 1 result NzNat: 1 ========================================== reduce in NAT : 10 quo 4 . rewrites: 1 result NzNat: 2 ========================================== reduce in NAT : 10 rem 4 . rewrites: 1 result NzNat: 2 ========================================== reduce in NAT : 10 ^ 4 . rewrites: 1 result NzNat: 10000 ========================================== reduce in NAT : modExp(37, 1000000000000002, 100) . rewrites: 1 result NzNat: 69 ========================================== reduce in NAT : modExp(37, 1000000000000002, 1000003) . rewrites: 1 result NzNat: 929564 ========================================== reduce in NAT : modExp(100200300400, 1000000000000002, 1000003) . rewrites: 1 result NzNat: 85562 ========================================== reduce in NAT : gcd(gcd(X:Nat, 120), gcd(Y:Nat, 140)) . rewrites: 1 result NzNat: gcd(X:Nat, Y:Nat, 20) ========================================== reduce in NAT : gcd(124, 346, 768) . rewrites: 1 result NzNat: 2 ========================================== reduce in NAT : lcm(lcm(X:Nat, 120), lcm(Y:Nat, 140)) . rewrites: 1 result Nat: lcm(X:Nat, Y:Nat, 840) ========================================== reduce in NAT : lcm(124, 346, 768) . rewrites: 1 result NzNat: 4118784 ========================================== reduce in NAT : 1 xor 2 . rewrites: 1 result NzNat: 3 ========================================== reduce in NAT : 1 xor 1 . rewrites: 1 result Zero: 0 ========================================== reduce in NAT : 1 & 2 . rewrites: 1 result Zero: 0 ========================================== reduce in NAT : 1 & 1 . rewrites: 1 result NzNat: 1 ========================================== reduce in NAT : 1 | 2 . rewrites: 1 result NzNat: 3 ========================================== reduce in NAT : 1 | 1 . rewrites: 1 result NzNat: 1 ========================================== reduce in NAT : 1 << 3 . rewrites: 1 result NzNat: 8 ========================================== reduce in NAT : 128 >> 3 . rewrites: 1 result NzNat: 16 ========================================== reduce in NAT : 1 < 2 . rewrites: 1 result Bool: true ========================================== reduce in NAT : 1 < 1 . rewrites: 1 result Bool: false ========================================== reduce in NAT : 1 <= 2 . rewrites: 1 result Bool: true ========================================== reduce in NAT : 1 <= 1 . rewrites: 1 result Bool: true ========================================== reduce in NAT : 1 > 2 . rewrites: 1 result Bool: false ========================================== reduce in NAT : 1 > 1 . rewrites: 1 result Bool: false ========================================== reduce in NAT : 1 >= 2 . rewrites: 1 result Bool: false ========================================== reduce in NAT : 1 >= 1 . rewrites: 1 result Bool: true ========================================== reduce in NAT : 3 divides 10 . rewrites: 1 result Bool: false ========================================== reduce in NAT : 3 divides 9 . rewrites: 1 result Bool: true ========================================== reduce in FACT : 100 ! . rewrites: 201 result NzNat: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 ========================================== reduce in FACT : 1000 ! . rewrites: 2001 result NzNat: 402387260077093773543702433923003985719374864210714632543799910429938512398629020592044208486969404800479988610197196058631666872994808558901323829669944590997424504087073759918823627727188732519779505950995276120874975462497043601418278094646496291056393887437886487337119181045825783647849977012476632889835955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593201928090878297308431392844403281231558611036976801357304216168747609675871348312025478589320767169132448426236131412508780208000261683151027341827977704784635868170164365024153691398281264810213092761244896359928705114964975419909342221566832572080821333186116811553615836546984046708975602900950537616475847728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103968175921510907788019393178114194545257223865541461062892187960223838971476088506276862967146674697562911234082439208160153780889893964518263243671616762179168909779911903754031274622289988005195444414282012187361745992642956581746628302955570299024324153181617210465832036786906117260158783520751516284225540265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860788386150279465955131156552036093988180612138558600301435694527224206344631797460594682573103790084024432438465657245014402821885252470935190620929023136493273497565513958720559654228749774011413346962715422845862377387538230483865688976461927383814900140767310446640259899490222221765904339901886018566526485061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970137428531926649875337218940694281434118520158014123344828015051399694290153483077644569099073152433278288269864602789864321139083506217095002597389863554277196742822248757586765752344220207573630569498825087968928162753848863396909959826280956121450994871701244516461260379029309120889086942028510640182154399457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970027753472000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ========================================== reduce in MOD3 : 4 . rewrites: 1 result NzNat: 1 ========================================== reduce in FACT' : 100 ! . rewrites: 201 result NzNat: 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 ========================================== reduce in FACT' : 1000 ! . rewrites: 2001 result NzNat: 402387260077093773543702433923003985719374864210714632543799910429938512398629020592044208486969404800479988610197196058631666872994808558901323829669944590997424504087073759918823627727188732519779505950995276120874975462497043601418278094646496291056393887437886487337119181045825783647849977012476632889835955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593201928090878297308431392844403281231558611036976801357304216168747609675871348312025478589320767169132448426236131412508780208000261683151027341827977704784635868170164365024153691398281264810213092761244896359928705114964975419909342221566832572080821333186116811553615836546984046708975602900950537616475847728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103968175921510907788019393178114194545257223865541461062892187960223838971476088506276862967146674697562911234082439208160153780889893964518263243671616762179168909779911903754031274622289988005195444414282012187361745992642956581746628302955570299024324153181617210465832036786906117260158783520751516284225540265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860788386150279465955131156552036093988180612138558600301435694527224206344631797460594682573103790084024432438465657245014402821885252470935190620929023136493273497565513958720559654228749774011413346962715422845862377387538230483865688976461927383814900140767310446640259899490222221765904339901886018566526485061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970137428531926649875337218940694281434118520158014123344828015051399694290153483077644569099073152433278288269864602789864321139083506217095002597389863554277196742822248757586765752344220207573630569498825087968928162753848863396909959826280956121450994871701244516461260379029309120889086942028510640182154399457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970027753472000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ========================================== reduce in MOD3' : 4445 . rewrites: 1481 result NzNat: 2 ========================================== reduce in NAT : 8888888888888888888888888888888888888888888888888888888 . rewrites: 0 result NzNat: 8888888888888888888888888888888888888888888888888888888 ========================================== reduce in NAT : 246913578 . rewrites: 0 result NzNat: 246913578 ========================================== reduce in NAT : Begin{Graph Representation} [Term has 2 operator symbols while graph has 2 nodes.] #0 = s_^123(#1) #1 = 0 End{Graph Representation} . rewrites: 0 result NzNat: Begin{Graph Representation} [Term has 2 operator symbols while graph has 2 nodes.] #0 = s_^123(#1) #1 = 0 End{Graph Representation} ========================================== reduce in NAT : Begin{Graph Representation} [Term has 5 operator symbols while graph has 4 nodes.] #0 = _+_(#1, #3) #1 = s_^4(#2) #2 = 0 #3 = s_^5(#2) End{Graph Representation} . *********** equation (built-in equation for symbol _+_) Old: Begin{Graph Representation} [Term has 5 operator symbols while graph has 4 nodes.] #0 = _+_(#1, #3) #1 = s_^4(#2) #2 = 0 #3 = s_^5(#2) End{Graph Representation} Begin{Graph Representation} [Term has 5 operator symbols while graph has 4 nodes.] #0 = _+_(#1, #3) #1 = s_^4(#2) #2 = 0 #3 = s_^5(#2) End{Graph Representation} ---> Begin{Graph Representation} [Term has 2 operator symbols while graph has 2 nodes.] #0 = s_^9(#1) #1 = 0 End{Graph Representation} New: Begin{Graph Representation} [Term has 2 operator symbols while graph has 2 nodes.] #0 = s_^9(#1) #1 = 0 End{Graph Representation} rewrites: 1 result NzNat: Begin{Graph Representation} [Term has 2 operator symbols while graph has 2 nodes.] #0 = s_^9(#1) #1 = 0 End{Graph Representation} Maude> Bye. Maude-2.7/tests/BuiltIn/nat0000755000147300135640000000031010511602603012552 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/nat.maude -no-banner -no-advise \ > nat.out 2>&1 diff $srcdir/nat.expected nat.out > /dev/null 2>&1 Maude-2.7/tests/BuiltIn/counters0000755000147300135640000000033410511602374013645 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/counters.maude -no-banner -no-advise \ > counters.out 2>&1 diff $srcdir/counters.expected counters.out > /dev/null 2>&1 Maude-2.7/tests/BuiltIn/Makefile.am0000644000147300135640000000045110153435227014114 00000000000000TESTS = \ nat \ int \ rat \ string \ counters MAUDE_FILES = \ nat.maude \ int.maude \ rat.maude \ string.maude \ counters.maude RESULT_FILES = \ nat.expected \ int.expected \ rat.expected \ string.expected \ counters.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) Maude-2.7/tests/BuiltIn/counters.maude0000644000147300135640000000335310153437424014744 00000000000000set show timing off . set show advisories off . mod COUNTER-TEST is inc COUNTER . sort List . subsort Nat < List . op __ : List List -> List [assoc id: nil] . op nil : -> List . op f : Nat -> List . var N : Nat . eq f(s N) = counter f(N) . eq f(0) = nil . endm rew counter . rew f(11) . rew f(11) . set clear rules off . rew f(11) . set clear rules on . rew f(11) . mod COUNTER-TEST2 is inc COUNTER . inc RANDOM . sort List . subsort Nat < List . op __ : List List -> List [assoc id: nil] . op nil : -> List . op f : Nat -> List . var N : Nat . eq f(s N) = random(counter) f(N) . eq f(0) = nil . endm rew random(counter) . rew f(11) . rew f(100) . mod FOO is sort Foo . ops a b c d e : -> Foo . rl a => b . rl a => c . rl a => d . rl a => e . endm rew a . rew a . set clear rules off . rew a . rew a . rew a . rew a . set clear rules on . rew a . mod COUNTER-TEST3 is inc COUNTER . sort List . subsort Nat < List . op __ : List List -> List [assoc id: nil] . op nil : -> List . op f : Nat -> List . var N : Nat . eq f(s N) = counter f(N) . eq f(0) = nil . endm debug rew f(4) . step . step . step . step . step . step . step . rew counter . resume . debug frew f(4) . step . step . step . step . step . step . step . rew counter . resume . rew [4] f(8) . cont . mod COUNTER-TEST4 is inc COUNTER . inc COUNTER * (op counter to counter2) . sort List . subsort Nat < List . op __ : List List -> List [assoc id: nil] . op nil : -> List . op f : Nat -> List . var N : Nat . eq f(s N) = counter (counter2 f(N)) . eq f(0) = nil . endm rew f(4) . search f(4) =>* L:List . red in META-LEVEL : metaRewrite(['COUNTER-TEST4], '__['counter.Nat, 'counter.Nat], 2) . Maude-2.7/tests/BuiltIn/rat0000755000147300135640000000031010511602574012565 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/rat.maude -no-banner -no-advise \ > rat.out 2>&1 diff $srcdir/rat.expected rat.out > /dev/null 2>&1 Maude-2.7/tests/BuiltIn/string.maude0000644000147300135640000000413510025700020014366 00000000000000set show timing off . set show advisories off . select STRING . red ascii("A") . red ascii("AB") . red length("AAA") . red length("") . red length("abcdefghijklmnopqrstuvwxyz") . red substr("abcdefghijklmnopqrstuvwxyz", 10, 5) . red substr("abcdefghijklmnopqrstuvwxyz", 1000000000000000000, 5) . red substr("abcdefghijklmnopqrstuvwxyz", 10, 500000000000000000) . red substr("abcdefghijklmnopqrstuvwxyz", 0, 5) . red substr("abcdefghijklmnopqrstuvwxyz", 10, 0) . red find("abcdefghijabcdefghij", "cde", 0) . red find("abcdefghijabcdefghij", "cde", 1) . red find("abcdefghijabcdefghij", "cde", 2) . red find("abcdefghijabcdefghij", "cde", 3) . red find("abcdefghijabcdefghij", "cde", 30000000000000000000000) . red rfind("abcdefghijabcdefghij", "cde", 0) . red rfind("abcdefghijabcdefghij", "cde", 1) . red rfind("abcdefghijabcdefghij", "cde", 2) . red rfind("abcdefghijabcdefghij", "cde", 12) . red rfind("abcdefghijabcdefghij", "cde", 13) . red rfind("abcdefghijabcdefghij", "cde", 30000000000000000000000) . red char(65) . red char(2000) . red char(20000000000000000000000) . red char(0) . red char(255) . red "test" . red "test" + "2" . red substr("cat", 1, 1) . red substr("\n\r\f", 1, 1) . red "\007" . red substr("a\"\"b", 0, 0) . red substr("a\"\"b", 0, 2) . red substr("a\"\"b", 0, 100) . red substr("a\"\"b", 3, 1) . red substr("a\"\"b", 4, 1) . red "abracadabra" < "aardvark" . red "AAA" < "aardvark" . red length("aardvark") . red "abc" == "a" + "b" + "c" . red find("catcat", "tc", 0) . red find("catcat", "jr", 0) . red rfind("catcat", "t", 10) . red rfind("catcat", "t", 4) . red "\0" . red "\377" . red "\399" . red "\477" . red "\40" . red "\101" . fmod FOO is inc STRING . sort Foo . op "this is not a string" : -> Foo . endfm red "this is not a string" . red ("this is not a string").Foo . red ("this is not a string").String . red "this is a string" . select STRING . red "this is a really long string; this is a really long string; this is a really long string; this is a really long string; this is a really long string." . red char(65) . red ascii(" ") . red ascii("aa") . red char(1000) . Maude-2.7/tests/Makefile.in0000644000147300135640000004027312305230426012560 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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 = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-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 uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 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" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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 = BuiltIn Misc Meta ResolvedBugs all: all-recursive .SUFFIXES: $(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 tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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): # 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. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ 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 check-am: all-am check: check-recursive all-am: Makefile 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 Makefile distclean-am: clean-am distclean-generic 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 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: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic ctags \ ctags-recursive distclean 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 \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am # 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-2.7/tests/Makefile.am0000644000147300135640000000005211276665645012563 00000000000000SUBDIRS = BuiltIn Misc Meta ResolvedBugs Maude-2.7/tests/Meta/0000755000147300135640000000000012305232005011446 500000000000000Maude-2.7/tests/Meta/metaSearch.expected0000644000147300135640000001545010530446542015205 00000000000000Maude> ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat,'Z:Nat] := 'X:Nat, '*, 100, 0) . rewrites: 2 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat]],'Nat, 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]] ; 'Y:Nat <- '_+_['b.Nat,'c.Nat] ; 'Z:Nat <- 'a.Nat} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat,'Z:Nat] := 'X:Nat, '*, 100, 1) . rewrites: 2 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat]],'Nat, 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]] ; 'Y:Nat <- 'a.Nat ; 'Z:Nat <- '_+_['b.Nat,'c.Nat]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat,'Z:Nat] := 'X:Nat, '*, 100, 2) . rewrites: 6 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat,'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, '*, 100, 0) . rewrites: 2 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat]],'Nat, 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]] ; 'Y:Nat <- 'a.Nat ; 'Z:Nat <- '_+_['b.Nat,'c.Nat]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat,'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, '*, 100, 1) . rewrites: 6 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '*, 100, 0) . rewrites: 2 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat]],'Nat, 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '*, 100, 1) . rewrites: 3 result ResultTriple: {'_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat]],'Nat, 'X:Nat <- '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat]]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '*, 100, 2) . rewrites: 5 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '!, 100, 0) . rewrites: 6 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '+, 100, 0) . rewrites: 3 result ResultTriple: {'_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat]],'Nat, 'X:Nat <- '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat]]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_*_['a.Nat,'_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '+, 100, 1) . rewrites: 4 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat]],'Nat, 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat], '_*_['a.Nat,'c.Nat]], '_*_['X:Nat,'Y:Nat], nil, '*, 100, 0) . rewrites: 3 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat]],'Nat, 'X:Nat <- 'a.Nat ; 'Y:Nat <- '_+_['b.Nat,'c.Nat]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat], '_*_['a.Nat,'c.Nat]], '_*_['X:Nat,'Y:Nat], nil, '*, 100, 1) . rewrites: 2 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat]],'Nat, 'X:Nat <- '_+_['b.Nat,'c.Nat] ; 'Y:Nat <- 'a.Nat} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat], '_*_['a.Nat,'c.Nat]], '_*_['X:Nat,'Y:Nat], nil, '*, 0, 0) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat], '_*_['a.Nat,'c.Nat],'_*_['a.Nat,'d.Nat]], '_*_['X:Nat,'Y:Nat], nil, '*, 100, 0) . rewrites: 9 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat,'d.Nat]],'Nat, 'X:Nat <- 'a.Nat ; 'Y:Nat <- '_+_['b.Nat,'c.Nat,'d.Nat]} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat], '_*_['a.Nat,'c.Nat],'_*_['a.Nat,'d.Nat]], '_*_['X:Nat,'Y:Nat], nil, '*, 100, 1) . rewrites: 2 result ResultTriple: {'_*_['a.Nat,'_+_['b.Nat,'c.Nat,'d.Nat]],'Nat, 'X:Nat <- '_+_['b.Nat,'c.Nat,'d.Nat] ; 'Y:Nat <- 'a.Nat} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat], '_*_['a.Nat,'c.Nat],'_*_['a.Nat,'d.Nat]], '_*_['X:Nat,'Y:Nat], nil, '*, 1, 0) . rewrites: 8 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat], '_*_['a.Nat,'c.Nat],'_*_['a.Nat,'d.Nat]], '_*_['X:Nat,'Y:Nat], nil, '*, 1, 1) . rewrites: 8 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearch(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 0) . rewrites: 6 result ResultTriple: {'e.State,'State,(none).Substitution} ========================================== reduce in META-LEVEL : metaSearch(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 1) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaSearchPath(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 0) . rewrites: 6 result Trace: {'a.State,'State,rl 'a.State => 'c.State [label('a-move2)] .} {'c.State,'State,rl 'c.State => 'e.State [label('c-move)] .} ========================================== reduce in META-LEVEL : metaSearchPath(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 1) . rewrites: 2 result Trace?: (failure).Trace? ========================================== reduce in META-LEVEL : metaSearchPath(['ARITH], '_*_['_+_['a.Int,'b.Int],'_+_[ 'c.Int,'d.Int]], '_+_['I:Int,'J:Int,'K:Int,'L:Int], nil, '*, unbounded, 0) . rewrites: 21 result Trace: {'_*_['_+_['a.Int,'b.Int],'_+_['c.Int,'d.Int]],'Int,rl '_*_[ 'I:Int,'_+_['J:Int,'K:Int]] => '_+_['_*_['I:Int,'J:Int],'_*_['I:Int, 'K:Int]] [none] .} {'_+_['_*_['a.Int,'_+_['c.Int,'d.Int]],'_*_['b.Int,'_+_['c.Int,'d.Int]]],'Int, rl '_*_['I:Int,'_+_['J:Int,'K:Int]] => '_+_['_*_['I:Int,'J:Int],'_*_[ 'I:Int,'K:Int]] [none] .} {'_+_['_*_['a.Int,'c.Int],'_*_['a.Int,'d.Int],'_*_['b.Int,'_+_['c.Int, 'd.Int]]],'Int,rl '_*_['I:Int,'_+_['J:Int,'K:Int]] => '_+_['_*_['I:Int, 'J:Int],'_*_['I:Int,'K:Int]] [none] .} Maude> Bye. Maude-2.7/tests/Meta/metaWellFormed0000755000147300135640000000036410511605467014243 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaWellFormed.maude -no-banner -no-advise \ > metaWellFormed.out 2>&1 diff $srcdir/metaWellFormed.expected metaWellFormed.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaUpDown0000755000147300135640000000034410511605777013421 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaUpDown.maude -no-banner -no-advise \ > metaUpDown.out 2>&1 diff $srcdir/metaUpDown.expected metaUpDown.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaPolymorph.expected0000644000147300135640000001004610026164547015767 00000000000000Maude> ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'STRING . sorts 'Value . none (op 'eq : 'Universal 'Universal -> 'Value [poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'tt.Value) term-hook('notEqualTerm, 'ff.Value))] . op 'ff : nil -> 'Value [none] .) op 'tt : nil -> 'Value [none] . none none endfm, 'eq['"a".String,'"a".String]) . rewrites: 2 result ResultPair: {'tt.Value,'Value} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'STRING . sorts 'Value . none (op 'eq : 'Universal 'Universal -> 'Value [poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'tt.Value) term-hook('notEqualTerm, 'ff.Value))] . op 'ff : nil -> 'Value [none] .) op 'tt : nil -> 'Value [none] . none none endfm, 'eq['"a".String,'"b".String]) . rewrites: 2 result ResultPair: {'ff.Value,'Value} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'STRING . sorts 'Value . none (op '? : 'Value 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'tt.Value) term-hook('2, 'ff.Value))] . op 'ff : nil -> 'Value [none] .) op 'tt : nil -> 'Value [none] . none none endfm, '?['tt.Value,'"a".String,'"b".String]) . rewrites: 2 result ResultPair: {'"a".Char,'Char} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'STRING . sorts 'Value . none (op '? : 'Value 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'tt.Value) term-hook('2, 'ff.Value))] . op 'ff : nil -> 'Value [none] .) op 'tt : nil -> 'Value [none] . none none endfm, '?['ff.Value,'"a".String,'"b".String]) . rewrites: 2 result ResultPair: {'"b".Char,'Char} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'STRING . including 'META-LEVEL . sorts none . none op '^ : 'Universal -> 'Term [poly(1) special( id-hook('MetaLevelOpSymbol, 'metaUpTerm) op-hook('shareWith, 'metaReduce, 'Module 'Term, 'ResultPair))] . none none endfm, '^['"a".String]) . rewrites: 2 result ResultPair: {''"a".Char.Constant,'Constant} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'STRING . including 'META-LEVEL . sorts none . none op '! : 'Term 'Universal -> 'Universal [poly(2 0) special( id-hook('MetaLevelOpSymbol, 'metaDownTerm) op-hook('shareWith, 'metaReduce, 'Module 'Term, 'ResultPair))] . none none endfm, '![''"a".String.Constant,'"b".String]) . rewrites: 2 result ResultPair: {'"a".Char,'Char} ========================================== reduce in META-LEVEL : metaReduce(fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none op '1 : nil -> 'Foo [none] . op 'f : 'Universal 'Foo -> 'Universal [right-id('1.Foo) poly(1 0)] . none none endfm, 'f['true.Bool,'1.Foo]) . rewrites: 1 result ResultPair: {'true.Bool,'Bool} ========================================== reduce in META-LEVEL : metaReduce(fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none (op 'f : 'Universal 'Foo -> 'Universal [right-id('1.Foo) poly(1 0)] . op 'g : 'Univeral -> 'Universal [poly(1 0)] .) op '1 : nil -> 'Foo [none] . none eq 'g['f['true.Bool,'X:Foo]] = 'false.Bool [none] . endfm, 'g['true.Bool]) . rewrites: 2 result ResultPair: {'false.Bool,'Bool} ========================================== reduce in META-LEVEL : metaReduce(fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none op '1 : nil -> 'Universal [poly(0)] . none none endfm, '1.Bool) . rewrites: 1 result ResultPair: {'1.`[Bool`],'`[Bool`]} ========================================== reduce in META-LEVEL : metaReduce(fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none op '1 : nil -> 'Universal [poly(0)] . none none endfm, '1.Foo) . rewrites: 1 result ResultPair: {'1.`[Foo`],'`[Foo`]} Maude> Bye. Maude-2.7/tests/Meta/metaXmatch.maude0000644000147300135640000002370510025725631014516 00000000000000set show timing off . set show advisories off . mod SEARCH-TEST is sort Nat . op _+_ : Nat Nat -> Nat [assoc comm prec 5] . op _*_ : Nat Nat -> Nat [assoc comm prec 3] . ops a b c d e 0 1 : -> Nat . vars W X Y Z : Nat . eq 0 * X = 0 . eq 1 * X = X . eq 0 + X = X . rl X * (Y + Z) => X * Y + X * Z . rl X * Y + X * Z => X * (Y + Z) . endm select META-LEVEL . red metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_+_['Y:Nat, 'Z:Nat] := 'X:Nat, 1, 2, 0) . red metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_+_['Y:Nat, 'Z:Nat] := 'X:Nat, 1, 2, 1) . red metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_+_['Y:Nat, 'Z:Nat] := 'X:Nat, 1, 2, 2) . red metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_+_['Y:Nat, 'Z:Nat] := 'X:Nat, 1, unbounded, 0) . red metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_+_['Y:Nat, 'Z:Nat] := 'X:Nat, 1, unbounded, 1) . red metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_+_['Y:Nat, 'Z:Nat] := 'X:Nat, 1, unbounded, 2) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, 100, 0) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, unbounded, 0) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, unbounded, 1) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, unbounded, 2) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, unbounded, 3) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, 100, 0) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, 100, 1) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, 100, 2) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0, 100, 3) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 0) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 1) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 2) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 3) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 4) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 5) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 4) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 6) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 7) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 10) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 14) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 17) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 20) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 31) . red in META-LEVEL : metaXmatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo, 'c.Foo, 'c.Foo], nil, 0, 100, 30) . fmod FOO is protecting BOOL . sorts Foo Bar . subsort Bar < Foo . op a : -> Foo . op b : -> Foo . op c : -> Foo . op f : Foo Foo -> Foo [assoc comm] . endfm xmatch f(X:Foo, Y:Foo) <=? f(a, b, c, c) . Maude-2.7/tests/Meta/metaTerm.expected0000644000147300135640000000266410025726011014701 00000000000000Maude> ========================================== reduce in QID : 'a:s . rewrites: 0 result Qid: 'a:s ========================================== reduce in META-TERM : 'a:s . rewrites: 0 result Variable: 'a:s ========================================== reduce in META-TERM : ''a:b . rewrites: 0 result Variable: ''a:b ========================================== reduce in META-TERM : getName('a.s) . rewrites: 6 result Sort: 'a ========================================== reduce in META-TERM : getType('a.s) . rewrites: 7 result Sort: 's ========================================== reduce in META-TERM : getName('a:s) . rewrites: 6 result Sort: 'a ========================================== reduce in META-TERM : getType('a:s) . rewrites: 7 result Sort: 's ========================================== reduce in META-TERM : '`[s`] . rewrites: 0 result Kind: '`[s`] ========================================== reduce in META-TERM : '`[s`,t`] . rewrites: 0 result Kind: '`[s`,t`] ========================================== reduce in META-TERM : getName('a.`[s`,t`]) . rewrites: 6 result Sort: 'a ========================================== reduce in META-TERM : getType('a.`[s`,t`]) . rewrites: 7 result Kind: '`[s`,t`] ========================================== reduce in META-TERM : getName('a:`[s`,t`]) . rewrites: 6 result Sort: 'a ========================================== reduce in META-TERM : getType('a:`[s`,t`]) . rewrites: 7 result Kind: '`[s`,t`] Maude> Bye. Maude-2.7/tests/Meta/metaUp2.maude0000644000147300135640000000360510026157526013740 00000000000000set show timing off . set show advisories off . select META-LEVEL . red upSorts('META-LEVEL, true) . red upSorts('META-LEVEL, false) . red upSubsortDecls('META-LEVEL, true) . red upSubsortDecls('META-LEVEL, false) . red upImports('META-LEVEL) . red upImports('NAT) . red upImports('TRUTH-VALUE) . set trace on . red upOpDecls('TRUTH-VALUE, true) . set trace off . red upOpDecls('META-LEVEL, true) . red upOpDecls('META-LEVEL, false) . red upOpDecls('IDENTICAL, true) . red in META-LEVEL : upModule('META-LEVEL, true) . red in META-LEVEL : upModule('META-LEVEL, false) . red in META-LEVEL : upModule('BOOL, true) . red in META-LEVEL : metaReduce(upModule('BOOL, true), '_==_['true.Bool, 'false.Bool]) . red in META-LEVEL : upModule('BOOL, false) . red in META-LEVEL : metaReduce(upModule('BOOL, false), '_==_['true.Bool, 'false.Bool]) . red in META-LEVEL : upModule('TRUTH, true) . red in META-LEVEL : upModule('NAT, true) . red in META-LEVEL : metaReduce(upModule('NAT, true), '_+_[upTerm(100), upTerm(66)]) . red in META-LEVEL : upModule('NAT, false) . red in META-LEVEL : metaReduce(upModule('NAT, false), '_+_[upTerm(100), upTerm(66)]) . red in META-LEVEL : metaReduce(upModule('NAT, true), 'modExp[upTerm(100), upTerm(66), upTerm(17)]) . red in META-LEVEL : upModule('META-LEVEL, true) . red in META-LEVEL : upModule('STRING, true) . red in META-LEVEL : metaReduce(upModule('STRING, true), '_+_[upTerm("a"), upTerm("b")]) . red in META-LEVEL : metaReduce(upModule('META-LEVEL, true), 'modExp[upTerm(100), upTerm(66), upTerm(17)]) . red in META-LEVEL : metaReduce(upModule('META-LEVEL, true), 'upModule[upTerm('META-LEVEL), upTerm(true)]) . red upTerm(upModule('META-LEVEL, true)) . red {upTerm(upModule('META-LEVEL, true)), 'FModule} . red in META-LEVEL : metaReduce(upModule('META-LEVEL, true), 'upModule[upTerm('META-LEVEL), upTerm(true)]) == {upTerm(upModule('META-LEVEL, true)), 'FModule} . Maude-2.7/tests/Meta/metaReduce.maude0000644000147300135640000000276210025725410014474 00000000000000set show timing off . set show advisories off . *** *** Test the metaReduce() descent function. *** red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . none none endfm, 'a.Foo) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo -> 'Foo [strat(0)] . none eq 'a.Foo = 'b.Foo [none] . endfm, 'f['a.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo -> 'Foo [strat(1 0)] . none eq 'a.Foo = 'b.Foo [none] . endfm, 'f['a.Foo]) . select META-LEVEL . red metaReduce( fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"a".String) . red metaReduce( fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"this is a string".String) . red metaReduce( fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"this is\na string".String) . red metaReduce( fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"\n".String) . red metaReduce( fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, 'pi.Float) . select META-LEVEL . red metaReduce( fmod 'FOO is protecting 'INT . sorts 'Foo . none op 'a : nil -> 'Foo [none] . none none endfm, '_+_['s_['0.Int], 's_^12['0.Int]]) . Maude-2.7/tests/Meta/metaPrettyPrint.maude0000644000147300135640000000511210167610523015566 00000000000000set show timing off . set show advisories off . select META-LEVEL . red metaPrettyPrint( fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, '_+_['1.0.FiniteFloat,'1.0.FiniteFloat]) . red metaPrettyPrint( fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, 'X:Float) . mod TEST is inc LOOP-MODE . inc META-LEVEL . op a : -> Module . eq a = (fmod 'FOO is nil sorts 'Foo . none op 'r : nil -> 'Foo [format('r 'o)] . op 'b : nil -> 'Foo [format('b 'o)] . op 'g : nil -> 'Foo [format('g 'o)] . op '__ : 'Foo 'Foo -> 'Foo [assoc] . none none endfm) . op null : -> State . op init : -> System . var QIL : QidList . rl init => [nil, null, nil] . crl [QIL, null, nil] => [nil, null, metaPrettyPrint(a, '__['r.Foo, 'g.Foo, 'b.Foo])] if QIL =/= nil . endm loop init . (a) red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, 's_['0.Zero]) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, 's_['s_['0.Zero]], mixfix flat format number rat) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, 's_['s_['0.Zero]], none) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '-_['s_['0.Zero]]) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_['0.Zero]], 's_['0.Zero]]) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '-_['s_^22['0.Zero]]) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]], 's_^12345['0.Zero]]) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]], 's_^12345['0.Zero]], mixfix) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]], 's_^12345['0.Zero]], mixfix number) . red in META-LEVEL : metaPrettyPrint( fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]], 's_^12345['0.Zero]], mixfix rat) . Maude-2.7/tests/Meta/metaParse0000755000147300135640000000034010511605161013236 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaParse.maude -no-banner -no-advise \ > metaParse.out 2>&1 diff $srcdir/metaParse.expected metaParse.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaUpDown.expected0000644000147300135640000000761010026164547015215 00000000000000Maude> ========================================== reduce in META-LEVEL : metaReduce(['BOOL], 'true.Bool) . rewrites: 2 result ResultPair: {'true.Bool,'Bool} ========================================== reduce in META-LEVEL : upTerm(1) . rewrites: 1 result GroundTerm: 's_['0.Zero] ========================================== reduce in META-LEVEL : upTerm(X:Nat + 21) . rewrites: 1 result Term: '_+_['X:Nat,'s_^21['0.Zero]] ========================================== reduce in META-LEVEL : downTerm('s_['0.Zero], 0) . rewrites: 1 result NzNat: 1 ========================================== reduce in META-LEVEL : downTerm('_+_['X:Nat,'s_^21['0.Zero]], 0) . rewrites: 1 result NzNat: X:Nat + 21 ========================================== reduce in META-LEVEL : upTerm(upTerm(X:Nat + 21)) . rewrites: 2 result GroundTerm: '_`[_`][''_+_.Sort,'_`,_[''X:Nat.Variable,'_`[_`][ ''s_^21.Sort,''0.Zero.Constant]]] ========================================== reduce in META-LEVEL : upTerm(upTerm(upTerm(X:Nat + 21))) . rewrites: 3 result GroundTerm: '_`[_`][''_`[_`].Qid,'_`,_['''_+_.Sort.Constant,'_`[_`][ ''_`,_.Qid,'_`,_['''X:Nat.Variable.Constant,'_`[_`][''_`[_`].Qid,'_`,_[ '''s_^21.Sort.Constant,'''0.Zero.Constant.Constant]]]]]] ========================================== reduce in META-LEVEL : downTerm(upTerm(X:Nat + 21), 0) . rewrites: 2 result NzNat: X:Nat + 21 ========================================== reduce in META-LEVEL : downTerm(downTerm(upTerm(upTerm(X:Nat + 21)), X:Term), 0) . rewrites: 4 result NzNat: X:Nat + 21 ========================================== reduce in META-LEVEL : downTerm(downTerm(downTerm(upTerm(upTerm(upTerm(X:Nat + 21))), X:Term), X:Term), 0) . *********** equation (built-in equation for symbol upTerm) upTerm(X:Nat + 21) ---> '_+_['X:Nat,'s_^21['0.Zero]] *********** equation (built-in equation for symbol upTerm) upTerm('_+_['X:Nat,'s_^21['0.Zero]]) ---> '_`[_`][''_+_.Sort,'_`,_[''X:Nat.Variable,'_`[_`][''s_^21.Sort, ''0.Zero.Constant]]] *********** equation (built-in equation for symbol upTerm) upTerm('_`[_`][''_+_.Sort,'_`,_[''X:Nat.Variable,'_`[_`][''s_^21.Sort, ''0.Zero.Constant]]]) ---> '_`[_`][''_`[_`].Qid,'_`,_['''_+_.Sort.Constant,'_`[_`][''_`,_.Qid,'_`,_[ '''X:Nat.Variable.Constant,'_`[_`][''_`[_`].Qid,'_`,_[ '''s_^21.Sort.Constant,'''0.Zero.Constant.Constant]]]]]] *********** equation (built-in equation for symbol downTerm) downTerm('_`[_`][''_`[_`].Qid,'_`,_['''_+_.Sort.Constant,'_`[_`][''_`,_.Qid, '_`,_['''X:Nat.Variable.Constant,'_`[_`][''_`[_`].Qid,'_`,_[ '''s_^21.Sort.Constant,'''0.Zero.Constant.Constant]]]]]], X:Term) ---> '_`[_`][''_+_.Sort,'_`,_[''X:Nat.Variable,'_`[_`][''s_^21.Sort, ''0.Zero.Constant]]] *********** equation (built-in equation for symbol downTerm) downTerm('_`[_`][''_+_.Sort,'_`,_[''X:Nat.Variable,'_`[_`][''s_^21.Sort, ''0.Zero.Constant]]], X:Term) ---> '_+_['X:Nat,'s_^21['0.Zero]] *********** equation (built-in equation for symbol downTerm) downTerm('_+_['X:Nat,'s_^21['0.Zero]], 0) ---> X:Nat + 21 rewrites: 6 result NzNat: X:Nat + 21 ========================================== reduce in UP-DOWN-TEST : upTerm(f(a, f(b, c))) . rewrites: 2 result GroundTerm: 'f['a.Foo,'f['b.Foo,'d.Foo]] ========================================== reduce in UP-DOWN-TEST : upTerm(upTerm(f(a, f(b, c)))) . rewrites: 3 result GroundTerm: '_`[_`][''f.Sort,'_`,_[''a.Foo.Constant,'_`[_`][''f.Sort, '_`,_[''b.Foo.Constant,''d.Foo.Constant]]]] ========================================== reduce in UP-DOWN-TEST : downTerm(upTerm(upTerm(f(a, f(b, c)))), X:Term) . rewrites: 4 result GroundTerm: 'f['a.Foo,'f['b.Foo,'d.Foo]] ========================================== reduce in UP-DOWN-TEST : downTerm(downTerm(upTerm(upTerm(f(a, f(b, c)))), X:Term), a) . rewrites: 5 result Foo: f(a, f(b, d)) ========================================== reduce in UP-DOWN-TEST : downTerm('f['a.Foo,'f['b.Foo,'c.Foo]], a) . rewrites: 2 result Foo: f(a, f(b, d)) Maude> Bye. Maude-2.7/tests/Meta/metaModExp.maude0000644000147300135640000000336410026156534014466 00000000000000set show timing off . set show advisories off . red in META-LEVEL : ( fmod 'FOO is including ('NAT + 'INT) * (sort 'Nat to 'Nat2, op 'foo to 'bar [none], op 'baz : 'Quux 'Quux -> 'Quux to 'quux [prec(10)], label 'foo to 'bar) . sorts 'Foo . none none none none endfm ) . select META-LEVEL . red metaReduce( fmod 'FOO is including 'NAT + 'INT . sorts 'Foo . none none none none endfm, '0.Nat) . red metaReduce( fmod 'FOO is including 'NAT * (sort 'Zero to 'ZZ) . sorts 'Foo . none none none none endfm, '0.Nat) . red in META-LEVEL : metaReduce( fmod 'FOO is including ('NAT + 'FLOAT) * (sort 'Zero to 'ZZ, op '_+_ to 'plus [none]) . sorts 'Foo . none none none none endfm, 'plus['s_^2['0.Nat],'s_^2['0.Nat]]) . red in META-LEVEL : metaReduce( fmod 'FOO is including 'NAT * (op '_+_ to 'plus [none]) . sorts 'Foo . none none none none endfm, 'plus['s_^2['0.Nat],'s_^2['0.Nat]]) . red in META-LEVEL : metaReduce( fmod 'FOO is including 'NAT . sorts 'Foo . none none none none endfm, '_+_['s_^2['0.Nat],'s_^2['0.Nat]]) . red in META-LEVEL : metaReduce( fmod 'FOO is including 'NAT * (op '_+_ to 'plus [none]) . sorts 'Foo . none none none none endfm, '_*_['s_^2['0.Nat],'s_^2['0.Nat]]) . red in META-LEVEL : metaReduce( fmod 'FOO is including 'NAT * (sort 'Zero to 'ZZ) . sorts 'Foo . none none none none endfm, '_*_['s_^2['0.Nat],'s_^2['0.Nat]]) . red in META-LEVEL : metaReduce( fmod 'FOO is including 'NAT * (sort 'Zero to 'ZZ) . sorts 'Foo . none none none none endfm, 'sd['s_^3['0.Nat],'s_^2['0.Nat]]) . red in META-LEVEL : metaReduce( fmod 'FOO is including 'NAT * (op '_+_ to 'plus [none]) . sorts 'Foo . none none none none endfm, '0.Nat) . Maude-2.7/tests/Meta/metaSpecial0000755000147300135640000000035010511605357013554 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaSpecial.maude -no-banner -no-advise \ > metaSpecial.out 2>&1 diff $srcdir/metaSpecial.expected metaSpecial.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaModule.maude0000644000147300135640000000150710025725306014512 00000000000000set show timing off . set show advisories off . select META-MODULE . red (subsort 'Foo < 'Bar .) . red (op 'f : 'Foo -> 'Bar [none] .) . red (ceq 'f['X:Foo] = 'a.Bar if 'g['a.Foo,'Y:Foo] := 'X:Foo [none] .) . red 'g['a.Foo,'Y:Foo] := 'X:Foo . red (fmod 'FOO is including 'MACHINE-INT . sorts 'Foo ; 'Bar . subsort 'Foo < 'Bar . op 'f : 'Foo -> 'Bar [none] . op 'g : '`[Bar`] -> '`[Bar`] [none] . cmb 'X:Bar : 'Foo if 'f['Y:Bar] := 'f['X:Bar] /\ 'g['Y:Bar, 'a.Foo] = 'a.Foo [none] . eq 'f['X:Foo] = 'g['a.Foo,'X:Foo] [none] . ceq 'f['X:Foo] = 'a.Bar if 'g['a.Foo,'Y:Foo] := 'X:Foo [none] . endfm) . red (fmod 'FOO is including 'MACHINE-INT . sorts 'Foo ; 'Bar . subsort 'Foo < 'Bar . op 'f : 'Foo -> 'Bar[none]. op 'g : '`[Bar`] -> '`[Bar`][none]. none eq 'f['X:Foo] = 'g['a.Foo,'X:Foo] [none] . endfm). Maude-2.7/tests/Meta/metaVariantUnify.maude0000644000147300135640000000737612006075470015717 00000000000000set show timing off . fmod XOR is sort XOR . sort Elem . ops cst1 cst2 cst3 cst4 : -> Elem . subsort Elem < XOR . op _+_ : XOR XOR -> XOR [ctor assoc comm] . op 0 : -> XOR . vars X Y : XOR . eq Y + 0 = Y [variant] . eq X + X = 0 [variant] . eq X + X + Y = Y [variant] . endfm fmod META-TEST is inc XOR . inc META-LEVEL . endfm *** regular red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 0) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 10, 0) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 1) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 2) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 3) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 4) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 5) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 6) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 7) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), empty, 0, 8) . *** disjoint red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 0) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 10, 0) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 1) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 2) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 3) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 4) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 5) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 6) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 7) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), empty, 0, 8) . *** regular with irreducibility constraint red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), upTerm(X:XOR + cst1), 0, 0) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), upTerm(X:XOR + cst1), 10, 0) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), upTerm(X:XOR + cst1), 0, 1) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), upTerm(X:XOR + cst1), 0, 2) . red metaVariantUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(Y:XOR + cst2), upTerm(X:XOR + cst1), 0, 3) . *** disjoint with irreducibility constraint red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), upTerm(X:XOR + cst1), 0, 0) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), upTerm(X:XOR + cst1), 10, 0) . red metaVariantUDisjointnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), upTerm(X:XOR + cst1), 0, 1) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), upTerm(X:XOR + cst1), 0, 2) . red metaVariantDisjointUnify(['XOR], upTerm(X:XOR + cst1) =? upTerm(X:XOR + cst2), upTerm(X:XOR + cst1), 0, 3) . Maude-2.7/tests/Meta/metaMetadata.expected0000644000147300135640000000645410162662615015526 00000000000000Maude> fmod FOO is sorts Foo . ops a b : -> Foo [metadata "bla bla"] . eq a = b [metadata "hmm"] . endfm fmod FOO is sort Foo . op a : -> Foo [metadata "bla bla"] . op b : -> Foo [metadata "bla bla"] . eq a = b [metadata "hmm"] . endfm ========================================== reduce in META-LEVEL : upModule('FOO, false) . rewrites: 1 result FModule: fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [metadata("bla bla")] . op 'b : nil -> 'Foo [metadata("bla bla")] . none eq 'a.Foo = 'b.Foo [metadata("hmm")] . endfm Warning: , line 19 (fmod FOO2): bad value bla for metadata attribute. Warning: , line 20 (fmod FOO2): bad token hmm. Warning: , line 20 (fmod FOO2): no parse for statement eq a = b [metadata hmm] . fmod FOO2 is sorts Foo . ops a b : -> Foo . eq a = b [metadata hmm] . endfm fmod FOO2 is sort Foo . op a : -> Foo . op b : -> Foo . endfm ========================================== reduce in META-LEVEL : upModule('FOO, false) . rewrites: 1 result FModule: fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [metadata("bla bla")] . op 'b : nil -> 'Foo [metadata("bla bla")] . none eq 'a.Foo = 'b.Foo [metadata("hmm")] . endfm fmod FOO3 is sort Foo . op a : -> Foo [metadata "bla bla"] . op b : -> Foo [metadata "bla bla"] . eq a = b [metadata "hmm"] . endfm ========================================== reduce in META-LEVEL : upModule('FOO3, true) . rewrites: 1 result FModule: fmod 'FOO3 is nil sorts 'Foo . none op 'a : nil -> 'Foo [metadata("bla bla")] . op 'b : nil -> 'Foo [metadata("bla bla")] . none eq 'a.Foo = 'b.Foo [metadata("hmm")] . endfm fmod FOO4 is sorts Foo . op f : ??? -> Foo [poly (1) metadata "bla bla"] . endfm fmod FOO4 is sort Foo . op f : Universal -> Foo [poly (1) metadata "bla bla"] . endfm ========================================== reduce in META-LEVEL : upModule('FOO4, false) . rewrites: 1 result FModule: fmod 'FOO4 is nil sorts 'Foo . none op 'f : 'Universal -> 'Foo [poly(1) metadata("bla bla")] . none none endfm fmod FOO5 is sort Foo . op f : Universal -> Foo [poly (1) metadata "bla bla"] . endfm ========================================== reduce in META-LEVEL : upModule('FOO5, true) . rewrites: 1 result FModule: fmod 'FOO5 is nil sorts 'Foo . none op 'f : 'Universal -> 'Foo [poly(1) metadata("bla bla")] . none none endfm ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is protecting 'BOOL . sorts 'Foo . none op 'a : nil -> 'Foo [metadata("bla bla")] . op 'b : nil -> 'Foo [metadata("bla bla")] . none eq 'a.Foo = 'b.Foo [metadata("hmm")] . endfm, 'a.Foo) . rewrites: 2 result ResultPair: {'b.Foo,'Foo} fmod BAR is sorts Foo Bar . subsorts Foo < Bar . op f : Foo -> Foo [metadata "fooy"] . op f : Bar -> Bar [metadata "fubar"] . endfm fmod BAR is sorts Foo Bar . subsort Foo < Bar . op f : Foo -> Foo [metadata "fooy"] . op f : Bar -> Bar [metadata "fubar"] . endfm ========================================== reduce in META-LEVEL : upModule('BAR, false) . rewrites: 1 result FModule: fmod 'BAR is nil sorts 'Bar ; 'Foo . subsort 'Foo < 'Bar . op 'f : 'Bar -> 'Bar [metadata("fubar")] . op 'f : 'Foo -> 'Foo [metadata("fooy")] . none none endfm Maude> Bye. Maude-2.7/tests/Meta/metaMatch.expected0000644000147300135640000001164310025726011015023 00000000000000Maude> ========================================== reduce in META-LEVEL : metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_*_['Y:Nat,'Z:Nat] := 'X:Nat, 0) . rewrites: 2 result Substitution: 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]] ; 'Y:Nat <- '_+_['b.Nat,'c.Nat] ; 'Z:Nat <- 'a.Nat ========================================== reduce in META-LEVEL : metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_*_['Y:Nat,'Z:Nat] := 'X:Nat, 1) . rewrites: 2 result Substitution: 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]] ; 'Y:Nat <- 'a.Nat ; 'Z:Nat <- '_+_['b.Nat,'c.Nat] ========================================== reduce in META-LEVEL : metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_*_['Y:Nat,'Z:Nat] := 'X:Nat, 2) . rewrites: 2 result Substitution?: (noMatch).Substitution? ========================================== reduce in META-LEVEL : metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_*_['Y:Nat,'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, 0) . rewrites: 2 result Substitution: 'X:Nat <- '_*_['a.Nat,'_+_['b.Nat,'c.Nat]] ; 'Y:Nat <- 'a.Nat ; 'Z:Nat <- '_+_['b.Nat,'c.Nat] ========================================== reduce in META-LEVEL : metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_*_['Y:Nat,'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, 1) . rewrites: 2 result Substitution?: (noMatch).Substitution? ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['Y:Foo,'Y:Foo], 'f['b.Foo,'b.Foo], nil, 0) . rewrites: 1 result Assignment: 'Y:Foo <- 'b.Foo ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['Y:Foo,'Y:Foo], 'f['b.Foo,'b.Foo], nil, 1) . rewrites: 1 result Substitution?: (noMatch).Substitution? ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo], nil, 0) . rewrites: 1 result Substitution: 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo], nil, 1) . rewrites: 1 result Substitution: 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo], nil, 2) . rewrites: 1 result Substitution?: (noMatch).Substitution? ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0) . rewrites: 1 result Substitution: 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo ; 'Z:Foo <- 'f['c.Foo,'c.Foo] ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 2) . rewrites: 1 result Substitution: 'X:Foo <- 'c.Foo ; 'Y:Foo <- 'c.Foo ; 'Z:Foo <- 'f['a.Foo,'b.Foo] ========================================== reduce in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 1) . rewrites: 1 result Substitution: 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo ; 'Z:Foo <- 'f['c.Foo,'c.Foo] Maude> Bye. Maude-2.7/tests/Meta/metaUpDown.maude0000644000147300135640000000157510026157165014511 00000000000000set show timing off . set show advisories off . select META-LEVEL . red metaReduce(['BOOL], 'true.Bool) . red upTerm(1) . red upTerm(X:Nat + 21) . red downTerm('s_['0.Zero], 0) . red downTerm('_+_['X:Nat,'s_^21['0.Zero]], 0) . red upTerm(upTerm(X:Nat + 21)) . red upTerm(upTerm(upTerm(X:Nat + 21))) . red downTerm(upTerm(X:Nat + 21), 0) . red downTerm(downTerm(upTerm(upTerm(X:Nat + 21)), X:Term), 0) . set trace on . red downTerm(downTerm(downTerm( upTerm(upTerm(upTerm(X:Nat + 21))) , X:Term), X:Term), 0) . set trace off . fmod UP-DOWN-TEST is inc META-LEVEL . sort Foo . ops a b c d e : -> Foo . op f : Foo Foo -> Foo . eq c = d . endfm red upTerm(f(a, f(b, c))) . red upTerm(upTerm(f(a, f(b, c)))) . red downTerm(upTerm(upTerm(f(a, f(b, c)))), X:Term) . red downTerm(downTerm(upTerm(upTerm(f(a, f(b, c)))), X:Term), a) . red downTerm('f['a.Foo,'f['b.Foo,'c.Foo]], a) . Maude-2.7/tests/Meta/metaTerm.maude0000644000147300135640000000052310025725533014173 00000000000000set show timing off . set show advisories off . select QID . red 'a:s . select META-TERM . red 'a:s . red ''a:b . red getName('a.s) . red getType('a.s) . red getName('a:s) . red getType('a:s) . red '`[s`] . red '`[s`,t`] . red getName('a.`[s`,t`]) . red getType('a.`[s`,t`]) . red getName('a:`[s`,t`]) . red getType('a:`[s`,t`]) . Maude-2.7/tests/Meta/metaRewrite.expected0000644000147300135640000000554610025726011015415 00000000000000Maude> ========================================== reduce in META-LEVEL : metaRewrite(mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'a.Foo [none] . endm, 'a.Foo, 1) . rewrites: 2 result ResultPair: {'b.Foo,'Foo} ========================================== reduce in META-LEVEL : metaRewrite(mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'a.Foo [none] . endm, 'a.Foo, 2) . rewrites: 3 result ResultPair: {'a.Foo,'Foo} ========================================== reduce in META-LEVEL : metaRewrite(mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'a.Foo [none] . endm, 'a.Foo, 3) . rewrites: 4 result ResultPair: {'b.Foo,'Foo} ========================================== reduce in META-LEVEL : metaRewrite(mod 'FOO is nil sorts 'Foo . none (op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, unbounded) . rewrites: 3 result ResultPair: {'c.Foo,'Foo} ========================================== reduce in META-LEVEL : metaRewrite(mod 'FOO is nil sorts 'Foo . none (op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, 1000000000000000000000000000000000000000000000000000) . rewrites: 3 result ResultPair: {'c.Foo,'Foo} ========================================== reduce in META-LEVEL : metaRewrite(mod 'FOO is nil sorts 'Foo . none (op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, JUNK:Nat) . rewrites: 0 result [ResultPair?]: metaRewrite(mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, JUNK:Nat) ========================================== reduce in META-LEVEL : metaRewrite(mod 'FOO is nil sorts 'Foo . none (op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, 0) . rewrites: 0 result [ResultPair?]: metaRewrite(mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, 0) Maude> Bye. Maude-2.7/tests/Meta/metaXmatch0000755000147300135640000000034410511605550013416 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaXmatch.maude -no-banner -no-advise \ > metaXmatch.out 2>&1 diff $srcdir/metaXmatch.expected metaXmatch.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaModExp0000755000147300135640000000034410511605711013365 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaModExp.maude -no-banner -no-advise \ > metaModExp.out 2>&1 diff $srcdir/metaModExp.expected metaModExp.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaUpModExp.expected0000644000147300135640000002003411244662273015477 00000000000000Maude> ========================================== reduce in META-LEVEL : upImports('META-LEVEL) . rewrites: 1 result Import: protecting 'META-VIEW . ========================================== reduce in META-LEVEL : upImports('BAR) . rewrites: 1 result ImportList: including 'BOOL . including 'FOO * ( sort 'Foo to 'Baz, op 'a to 'b [none] ) . ========================================== reduce in META-LEVEL : upImports('BAR') . rewrites: 1 result ImportList: including 'BOOL . including 'FOO' * ( sort 'Foo to 'Quux, op '_+_ : 'Baz 'Baz -> 'Foo to '_._ [prec(27) gather('E 'e)], op '_+_ : 'Foo 'Foo -> 'Foo to '_*_ [prec(29) gather('E 'e)] ) . ========================================== reduce in META-LEVEL : upImports('BAZ) . rewrites: 1 result ImportList: including 'BOOL . including 'NAT + 'FOO' * ( sort 'Foo to 'Quux, label 'a to 'b, op '_+_ : 'Baz 'Baz -> 'Foo to '_._ [prec(27) gather('E 'e)], op '_+_ : 'Foo 'Foo -> 'Foo to '_*_ [prec(29) format('s 's 's 's)] ) . ========================================== reduce in META-LEVEL : upModule('BAZ, false) . rewrites: 1 result FModule: fmod 'BAZ is including 'BOOL . including 'NAT + 'FOO' * ( sort 'Foo to 'Quux, label 'a to 'b, op '_+_ : 'Baz 'Baz -> 'Foo to '_._ [prec(27) gather('E 'e)], op '_+_ : 'Foo 'Foo -> 'Foo to '_*_ [prec(29) format('s 's 's 's)] ) . sorts none . none none none none endfm ========================================== reduce in META-LEVEL : upModule('BAZ, true) . rewrites: 1 result FModule: fmod 'BAZ is nil sorts 'Bar ; 'Baz ; 'Bool ; 'Nat ; 'NzNat ; 'Quux ; 'Zero . subsort 'NzNat < 'Nat . subsort 'Quux < 'Bar . subsort 'Zero < 'Nat . op '0 : nil -> 'Zero [ctor] . op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special( id-hook('ACU_NumberOpSymbol, '&) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Quux 'Quux -> 'Quux [assoc comm prec(29) format('s 's 's 's)] . op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_._ : 'Baz 'Baz -> 'Quux [prec(27) gather('E 'e)] . op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '<<) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '>>) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] . op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special( id-hook('NumberOpSymbol, 'divides) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] . op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] . op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'quo) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'rem) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] . op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special( id-hook('ACU_NumberOpSymbol, 'xor) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'a : nil -> 'Baz [none] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'modExp : '`[Nat`] '`[Nat`] '`[Nat`] -> '`[Nat`] [special( id-hook('NumberOpSymbol, 'modExp) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'not_ : 'Bool -> 'Bool [prec(53)] . op 's_ : 'Nat -> 'NzNat [iter ctor special( id-hook('SuccSymbol, nil) term-hook('zeroTerm, '0.Zero))] . op 'sd : 'Nat 'Nat -> 'Nat [comm special( id-hook('CUI_NumberOpSymbol, 'sd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . none eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool, 'B:Bool]]] [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . endfm Maude> Bye. Maude-2.7/tests/Meta/metaParse.maude0000644000147300135640000000203410025725331014331 00000000000000set show timing off . set show advisories off . select META-LEVEL . red metaParse( fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, '1.0 '+ '1.0, anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '3 , anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '-3 , anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '-2/3 , anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, 's_^2 '`( '0 '`) , anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '-256789/387654 , anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'BOOL . sorts 'Foo . none op 's : 'Bool -> 'Bool [iter] . none none endfm, 's^1234 '`( 'true '`), anyType) . Maude-2.7/tests/Meta/metaWellFormed.expected0000644000147300135640000001121511064052540016025 00000000000000Maude> ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm) . rewrites: 1 result Bool: true ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm) . rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . subsort 'Foo < 'Bar . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm) . Warning: the connected component in the sort graph that contains sort Bar has no maximal sorts due to a cycle. rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'a.Foo) . rewrites: 1 result Bool: true ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'b.Foo) . rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo) . rewrites: 2 result Bool: true ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'a.Foo) . rewrites: 3 result Bool: true ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo) . rewrites: 1 result Bool: false Warning: , line 79: ambiguous term, two parses are: wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, (none).Substitution) -versus- wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, (none).EmptyTypeSet) Arbitrarily taking the first as correct. ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, (none).Substitution) . rewrites: 1 result Bool: true ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo ; 'X:Foo <- 'b.Foo) . rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none endfm, 'X:Bar <- 'a.Foo) . rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Bar <- 'true.Bool) . rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : wellFormed(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Bool <- 'true.Bool) . rewrites: 1 result Bool: true ========================================== reduce in META-LEVEL : wellFormed(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [label('k)] . endm, 'X:Bar <- 'true.Bool) . rewrites: 1 result Bool: false Maude> Bye. Maude-2.7/tests/Meta/metaVariantUnify0000755000147300135640000000037412006074052014612 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaVariantUnify.maude -no-banner -no-advise \ > metaVariantUnify.out 2>&1 diff $srcdir/metaVariantUnify.expected metaVariantUnify.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaUnify.maude0000644000147300135640000000421311002254673014354 00000000000000set show timing off . set show advisories off . *** 7 unifiers for most trivial elementary AC problem reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 0) . reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 1) . reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 2) . reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 3) . reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 4) . reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 5) . reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 6) . reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['X:Nat, 'Y:Nat], 0, 7) . *** variable names allow arbitrarily large numbering reduce in META-LEVEL : metaUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['A:Nat, 'B:Nat], 100000000000000000000, 0) . *** using variable names in unifications with larger numbers than *** declared by the the 3rd argument generates a warning and no *** reduction. reduce in META-LEVEL : metaUnify(['NAT], '_+_['X:Nat, 'Y:Nat] =? '_+_['#1:Nat, 'Y:Nat], 0, 0) . *** simultaneous unification fmod BAZ is sort Foo . ops a b : -> Foo . op f : Foo -> Foo . endfm red in META-LEVEL : metaDisjointUnify(['BAZ], 'f['X:Foo] =? 'f['Y:Foo] /\ 'f['X:Foo] =? 'f['Z:Foo], 0, 0) . red in META-LEVEL : metaDisjointUnify(['BAZ], 'f['Y:Foo] =? 'f['X:Foo] /\ 'f['Z:Foo] =? 'f['X:Foo], 0, 0) . red in META-LEVEL : metaDisjointUnify(['BAZ], 'f['X:Foo] =? 'f['Y:Foo] /\ 'f['Y:Foo] =? 'f['X:Foo], 0, 0) . red in META-LEVEL : metaDisjointUnify(['BAZ], 'f['X:Foo] =? 'f['a.Foo] /\ 'f['X:Foo] =? 'f['b.Foo], 0, 0) . red in META-LEVEL : metaDisjointUnify(['BAZ], 'f['a.Foo] =? 'f['X:Foo] /\ 'f['b.Foo] =? 'f['X:Foo], 0, 0) . Maude-2.7/tests/Meta/metaSort.expected0000644000147300135640000002047111757305153014732 00000000000000Maude> ========================================== reduce in META-LEVEL : sortLeq(fmod 'FOO is nil sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'NzNat, 'Int) . rewrites: 1 result Bool: true ========================================== reduce in META-LEVEL : sortLeq(fmod 'FOO is nil sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Int, 'NzInt) . rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : sameKind(fmod 'FOO is nil sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, '`[Int`], 'NzInt) . rewrites: 1 result Bool: true ========================================== reduce in META-LEVEL : sameKind(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, '`[Int`], 'Bool) . rewrites: 1 result Bool: false ========================================== reduce in META-LEVEL : leastSort(fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, 'pi.Float) . rewrites: 1 result Sort: 'FiniteFloat ========================================== reduce in META-LEVEL : completeName(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . none none none endfm, '`[NzInt`]) . rewrites: 1 result Kind: '`[NzInt`,Nat`] ========================================== reduce in META-LEVEL : completeName(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . none none none endfm, '`[NzInt`,Nat`]) . rewrites: 1 result Kind: '`[NzInt`,Nat`] ========================================== reduce in META-LEVEL : lesserSorts(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Int) . rewrites: 1 result NeSortSet: 'Nat ; 'NzInt ; 'NzNat ========================================== reduce in META-LEVEL : lesserSorts(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'NzNat) . rewrites: 1 result EmptyTypeSet: (none).EmptyTypeSet ========================================== reduce in META-LEVEL : lesserSorts(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat) . rewrites: 1 result Sort: 'NzNat ========================================== reduce in META-LEVEL : glbSorts(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat, 'NzInt) . rewrites: 1 result Sort: 'NzNat ========================================== reduce in META-LEVEL : glbSorts(fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'Int ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat, 'Int) . rewrites: 1 result Sort: 'Nat ========================================== reduce in META-LEVEL : glbSorts(fmod 'FOO is protecting 'BOOL . sorts 'Nat ; 'Int ; 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat, 'NzInt) . rewrites: 1 result EmptyTypeSet: (none).EmptyTypeSet ========================================== reduce in META-LEVEL : getKind(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'Foo) . rewrites: 1 result Kind: '`[Foo`] ========================================== reduce in META-LEVEL : getKind(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'Bar) . rewrites: 1 result Kind: '`[Foo`] ========================================== reduce in META-LEVEL : getKind(fmod 'FOO is protecting 'FLOAT . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, '`[Bar`]) . rewrites: 1 result Kind: '`[Foo`] ========================================== reduce in META-LEVEL : getKinds(fmod 'FOO is nil sorts none . none none none none endfm) . rewrites: 1 result EmptyTypeSet: (none).EmptyTypeSet ========================================== reduce in META-LEVEL : getKinds(fmod 'FOO is protecting 'BOOL . sorts none . none none none none endfm) . rewrites: 1 result Kind: '`[Bool`] ========================================== reduce in META-LEVEL : getKinds(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm) . rewrites: 1 result NeKindSet: '`[AttrSet`] ; '`[Bool`] ; '`[Condition`] ; '`[EquationSet`] ; '`[FindResult`,NatList`,Bound`] ; '`[HookList`] ; '`[ImportList`] ; '`[MatchPair?`] ; '`[MembAxSet`] ; '`[Module`] ; '`[OpDeclSet`] ; '`[OpMappingSet`] ; '`[ParameterDeclList`] ; '`[PrintOptionSet`] ; '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] ; '`[RenamingSet`] ; '`[Result4Tuple?`] ; '`[ResultPair?`] ; '`[ResultTriple?`] ; '`[RuleSet`] ; '`[SortMappingSet`] ; '`[String`] ; '`[SubsortDeclSet`] ; '`[Substitution?`] ; '`[Trace?`] ; '`[UnificationPair?`] ; '`[UnificationProblem`] ; '`[UnificationTriple?`] ; '`[Variant?`] ; '`[View`] ========================================== reduce in META-LEVEL : maximalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, '`[Qid`]) . rewrites: 1 result NeSortSet: 'GTermList ; 'Header ; 'ModuleExpression ; 'ParameterList ; 'QidList ; 'QidSet ; 'Type? ; 'TypeListSet ========================================== reduce in META-LEVEL : minimalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, '`[Qid`]) . rewrites: 1 result NeSortSet: 'Constant ; 'Context ; 'EmptyCommaList ; 'EmptyTypeSet ; 'Kind ; 'Sort ; 'Variable ========================================== reduce in META-LEVEL : maximalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, 'Qid) . rewrites: 0 result [QidSet,QidList,TypeListSet,GTermList,ParameterList,Type?, ModuleExpression,Header]: maximalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, 'Qid) ========================================== reduce in META-LEVEL : minimalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, 'Qid) . rewrites: 0 result [QidSet,QidList,TypeListSet,GTermList,ParameterList,Type?, ModuleExpression,Header]: minimalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, 'Qid) ========================================== reduce in META-LEVEL : maximalAritySet(['RAT], '_+_, 'Nat 'Nat, 'PosRat) . rewrites: 2 result TypeListSet: 'Nat 'PosRat ; 'PosRat 'Nat ; 'PosRat 'PosRat ========================================== reduce in META-LEVEL : maximalAritySet(['RAT], '_+_, 'Nat 'Nat, 'Rat) . rewrites: 2 result NeTypeList: 'Rat 'Rat ========================================== reduce in META-LEVEL : maximalAritySet(['RAT], '_/_, 'Nat 'Nat, 'Nat) . rewrites: 2 result EmptyTypeSet: (none).EmptyTypeSet ========================================== reduce in META-LEVEL : maximalAritySet(['META-LEVEL], '_;_, 'TypeSet 'TypeSet, 'KindSet) . rewrites: 2 result NeTypeList: 'KindSet 'KindSet ========================================== reduce in META-LEVEL : maximalAritySet(['NAT], '0, nil, 'Nat) . rewrites: 2 result TypeList: (nil).TypeList ========================================== reduce in META-LEVEL : glbSorts(['RAT], '`[Int`], 'Int) . rewrites: 2 result Sort: 'Int Maude> Bye. Maude-2.7/tests/Meta/metaUp0000755000147300135640000000032410511605446012560 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaUp.maude -no-banner -no-advise \ > metaUp.out 2>&1 diff $srcdir/metaUp.expected metaUp.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaVariantUnify.expected0000644000147300135640000001736612305225360016422 00000000000000Maude> ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 0) . rewrites: 10 result UnificationPair: { 'X:XOR <- '_+_['cst2.Elem,'%1:XOR] ; 'Y:XOR <- '_+_['cst1.Elem,'%1:XOR],1} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 10, 0) . rewrites: 10 result UnificationPair: { 'X:XOR <- '_+_['cst2.Elem,'%11:XOR] ; 'Y:XOR <- '_+_['cst1.Elem,'%11:XOR],11} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 1) . rewrites: 4 result UnificationPair: { 'X:XOR <- 'cst2.Elem ; 'Y:XOR <- 'cst1.Elem,(0).Zero} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 2) . rewrites: 22 result UnificationPair: { 'X:XOR <- '_+_['cst1.Elem,'cst2.Elem,'#1:XOR] ; 'Y:XOR <- '#1:XOR,1} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 3) . rewrites: 4 result UnificationPair: { 'X:XOR <- '#1:XOR ; 'Y:XOR <- '_+_['cst1.Elem,'cst2.Elem,'#1:XOR],1} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 4) . rewrites: 4 result UnificationPair: { 'X:XOR <- '0.XOR ; 'Y:XOR <- '_+_['cst1.Elem,'cst2.Elem],(0).Zero} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 5) . rewrites: 4 result UnificationPair: { 'X:XOR <- 'cst1.Elem ; 'Y:XOR <- 'cst2.Elem,(0).Zero} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 6) . rewrites: 4 result UnificationPair: { 'X:XOR <- '_+_['cst1.Elem,'cst2.Elem] ; 'Y:XOR <- '0.XOR,(0).Zero} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 7) . rewrites: 4 result UnificationPair: { 'X:XOR <- '_+_['cst1.Elem,'%1:XOR] ; 'Y:XOR <- '_+_['cst2.Elem,'%1:XOR],1} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), empty, 0, 8) . rewrites: 4 result UnificationPair?: (noUnifier).UnificationPair? ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 0) . rewrites: 10 result UnificationTriple: { 'X:XOR <- '_+_['cst2.Elem,'%1:XOR], 'X:XOR <- '_+_['cst1.Elem,'%1:XOR],1} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 10, 0) . rewrites: 10 result UnificationTriple: { 'X:XOR <- '_+_['cst2.Elem,'%11:XOR], 'X:XOR <- '_+_['cst1.Elem,'%11:XOR],11} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 1) . rewrites: 4 result UnificationTriple: { 'X:XOR <- 'cst2.Elem, 'X:XOR <- 'cst1.Elem,(0).Zero} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 2) . rewrites: 22 result UnificationTriple: { 'X:XOR <- '_+_['cst1.Elem,'cst2.Elem,'#1:XOR], 'X:XOR <- '#1:XOR,1} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 3) . rewrites: 4 result UnificationTriple: { 'X:XOR <- '#1:XOR, 'X:XOR <- '_+_['cst1.Elem,'cst2.Elem,'#1:XOR],1} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 4) . rewrites: 4 result UnificationTriple: { 'X:XOR <- '0.XOR, 'X:XOR <- '_+_['cst1.Elem,'cst2.Elem],(0).Zero} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 5) . rewrites: 4 result UnificationTriple: { 'X:XOR <- 'cst1.Elem, 'X:XOR <- 'cst2.Elem,(0).Zero} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 6) . rewrites: 4 result UnificationTriple: { 'X:XOR <- '_+_['cst1.Elem,'cst2.Elem], 'X:XOR <- '0.XOR,(0).Zero} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 7) . rewrites: 4 result UnificationTriple: { 'X:XOR <- '_+_['cst1.Elem,'%1:XOR], 'X:XOR <- '_+_['cst2.Elem,'%1:XOR],1} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), empty, 0, 8) . rewrites: 4 result UnificationTriple?: (noUnifier).UnificationTriple? ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), upTerm(cst1 + X:XOR), 0, 0) . rewrites: 7 result UnificationPair: { 'X:XOR <- '_+_['cst2.Elem,'%1:XOR] ; 'Y:XOR <- '_+_['cst1.Elem,'%1:XOR],1} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), upTerm(cst1 + X:XOR), 10, 0) . rewrites: 7 result UnificationPair: { 'X:XOR <- '_+_['cst2.Elem,'%11:XOR] ; 'Y:XOR <- '_+_['cst1.Elem,'%11:XOR],11} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), upTerm(cst1 + X:XOR), 0, 1) . rewrites: 4 result UnificationPair: { 'X:XOR <- 'cst2.Elem ; 'Y:XOR <- 'cst1.Elem,(0).Zero} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), upTerm(cst1 + X:XOR), 0, 2) . rewrites: 4 result UnificationPair: { 'X:XOR <- '#1:XOR ; 'Y:XOR <- '_+_['cst1.Elem,'cst2.Elem,'#1:XOR],1} ========================================== reduce in META-TEST : metaVariantUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm( cst2 + Y:XOR), upTerm(cst1 + X:XOR), 0, 3) . rewrites: 4 result UnificationPair?: (noUnifier).UnificationPair? ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), upTerm(cst1 + X:XOR), 0, 0) . rewrites: 7 result UnificationTriple: { 'X:XOR <- '_+_['cst2.Elem,'%1:XOR], 'X:XOR <- '_+_['cst1.Elem,'%1:XOR],1} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), upTerm(cst1 + X:XOR), 10, 0) . rewrites: 7 result UnificationTriple: { 'X:XOR <- '_+_['cst2.Elem,'%11:XOR], 'X:XOR <- '_+_['cst1.Elem,'%11:XOR],11} Warning: , line 169: bad token metaVariantUDisjointnify. Warning: , line 169: no parse for term. ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), upTerm(cst1 + X:XOR), 0, 2) . rewrites: 4 result UnificationTriple: { 'X:XOR <- '#1:XOR, 'X:XOR <- '_+_['cst1.Elem,'cst2.Elem,'#1:XOR],1} ========================================== reduce in META-TEST : metaVariantDisjointUnify(['XOR], upTerm(cst1 + X:XOR) =? upTerm(cst2 + X:XOR), upTerm(cst1 + X:XOR), 0, 3) . rewrites: 4 result UnificationTriple?: (noUnifier).UnificationTriple? Maude> Bye. Maude-2.7/tests/Meta/metaFrewrite0000755000147300135640000000035410511604770013765 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaFrewrite.maude -no-banner -no-advise \ > metaFrewrite.out 2>&1 diff $srcdir/metaFrewrite.expected metaFrewrite.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaReduce.expected0000644000147300135640000000454510025726011015201 00000000000000Maude> ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . none none endfm, 'a.Foo) . rewrites: 1 result ResultPair: {'a.Foo,'Foo} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Foo . none (op 'b : nil -> 'Foo [none] . op 'f : 'Foo -> 'Foo [strat(0)] .) op 'a : nil -> 'Foo [none] . none eq 'a.Foo = 'b.Foo [none] . endfm, 'f['a.Foo]) . rewrites: 1 result ResultPair: {'f['a.Foo],'Foo} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Foo . none (op 'b : nil -> 'Foo [none] . op 'f : 'Foo -> 'Foo [strat(1 0)] .) op 'a : nil -> 'Foo [none] . none eq 'a.Foo = 'b.Foo [none] . endfm, 'f['a.Foo]) . rewrites: 2 result ResultPair: {'f['b.Foo],'Foo} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"a".String) . rewrites: 1 result ResultPair: {'"a".Char,'Char} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"this is a string".String) . rewrites: 1 result ResultPair: {'"this is a string".String,'String} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"this is\na string".String) . rewrites: 1 result ResultPair: {'"this is\na string".String,'String} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is protecting 'STRING . sorts none . none none none none endfm, '"\n".String) . rewrites: 1 result ResultPair: {'"\n".Char,'Char} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, 'pi.Float) . rewrites: 2 result ResultPair: {'3.1415926535897931.FiniteFloat,'FiniteFloat} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is protecting 'INT . sorts 'Foo . none op 'a : nil -> 'Foo [none] . none none endfm, '_+_['s_['0.Int],'s_^12['0.Int]]) . rewrites: 2 result ResultPair: {'s_^13['0.Zero],'NzNat} Maude> Bye. Maude-2.7/tests/Meta/metaGetVariant.maude0000644000147300135640000000217012006107160015317 00000000000000set show timing off . fmod XOR is sort XOR . sort Elem . ops cst1 cst2 cst3 cst4 : -> Elem . subsort Elem < XOR . op _+_ : XOR XOR -> XOR [ctor assoc comm] . op 0 : -> XOR . op a : -> XOR . vars X Y : XOR . eq Y + 0 = Y [variant] . eq X + X = 0 [variant] . eq X + X + Y = Y [variant] . endfm fmod TEST is inc XOR . inc META-LEVEL . endfm red metaGetVariant(['XOR], upTerm(X:XOR + cst1), empty, 0, 0) . red metaGetVariant(upModule('XOR, false), upTerm(X:XOR + cst1), empty, 0, 0) . red metaGetVariant(['XOR], upTerm(X:XOR + cst1), empty, 10, 0) . red metaGetVariant(['XOR], upTerm(X:XOR + cst1), empty, 0, 1) . red metaGetVariant(['XOR], upTerm(X:XOR + cst1), empty, 0, 2) . red metaGetVariant(['XOR], upTerm(X:XOR + cst1), empty, 0, 3) . red metaGetVariant(['XOR], upTerm(X:XOR + cst1), empty, 0, 4) . red metaGetVariant(['XOR], upTerm(X:XOR + cst2), upTerm(X:XOR + a), 0, 0) . red metaGetVariant(['XOR], upTerm(X:XOR + cst2), upTerm(X:XOR + a), 0, 1) . red metaGetVariant(['XOR], upTerm(X:XOR + cst2), upTerm(X:XOR + a), 0, 2) . red metaGetVariant(['XOR], upTerm(X:XOR + cst2), upTerm(X:XOR + a), 0, 3) . Maude-2.7/tests/Meta/metaXapply0000755000147300135640000000034510511605520013445 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaXapply.maude -no-banner -no-advise \ > metaXapply.out 2>&1 diff $srcdir/metaXapply.expected metaXapply.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaApply0000755000147300135640000000034010511604742013255 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaApply.maude -no-banner -no-advise \ > metaApply.out 2>&1 diff $srcdir/metaApply.expected metaApply.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaPolymorph0000755000147300135640000000036010511605744014166 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaPolymorph.maude -no-banner -no-advise \ > metaPolymorph.out 2>&1 diff $srcdir/metaPolymorph.expected metaPolymorph.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaRewrite0000755000147300135640000000035010511605260013606 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaRewrite.maude -no-banner -no-advise \ > metaRewrite.out 2>&1 diff $srcdir/metaRewrite.expected metaRewrite.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaSearch.maude0000644000147300135640000000717610153435615014505 00000000000000set show timing off . set show advisories off . mod SEARCH-TEST is sort Nat . op _+_ : Nat Nat -> Nat [assoc comm prec 5] . op _*_ : Nat Nat -> Nat [assoc comm prec 3] . ops a b c d e 0 1 : -> Nat . vars W X Y Z : Nat . eq 0 * X = 0 . eq 1 * X = X . eq 0 + X = X . rl X * (Y + Z) => X * Y + X * Z . rl X * Y + X * Z => X * (Y + Z) . endm select META-LEVEL . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat, 'Z:Nat] := 'X:Nat, '*, 100, 0) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat, 'Z:Nat] := 'X:Nat, '*, 100, 1) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat, 'Z:Nat] := 'X:Nat, '*, 100, 2) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat, 'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, '*, 100, 0) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, '_*_['Y:Nat, 'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, '*, 100, 1) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '*, 100, 0) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '*, 100, 1) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '*, 100, 2) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '!, 100, 0) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '+, 100, 0) . red metaSearch(['SEARCH-TEST], '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], 'X:Nat, nil, '+, 100, 1) . red metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat]], '_*_['X:Nat, 'Y:Nat], nil, '*, 100, 0) . red metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat]], '_*_['X:Nat, 'Y:Nat], nil, '*, 100, 1) . red metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat]], '_*_['X:Nat, 'Y:Nat], nil, '*, 0, 0) . red metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat], '_*_['a.Nat,'d.Nat]], '_*_['X:Nat, 'Y:Nat], nil, '*, 100, 0) . red metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat], '_*_['a.Nat,'d.Nat]], '_*_['X:Nat, 'Y:Nat], nil, '*, 100, 1) . red metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat], '_*_['a.Nat,'d.Nat]], '_*_['X:Nat, 'Y:Nat], nil, '*, 1, 0) . red metaSearch(['SEARCH-TEST], '_+_['_*_['a.Nat,'b.Nat],'_*_['a.Nat,'c.Nat], '_*_['a.Nat,'d.Nat]], '_*_['X:Nat, 'Y:Nat], nil, '*, 1, 1) . mod SEARCH is sort State . ops a b c d e : -> State . rl [a-move1] : a => b . rl [a-move2] : a => c . rl [b-move] : b => d . rl [c-move] : c => e . endm select META-LEVEL . red metaSearch(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 0) . red metaSearch(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 1) . red metaSearchPath(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 0) . red metaSearchPath(['SEARCH], 'a.State, 'e.State, nil, '*, unbounded, 1) . mod ARITH is inc INT . vars I J K L : Int . rl I * (J + K) => I * J + I * K . rl I * J + I * K => I * (J + K) . ops a b c d e : -> Int . endm select META-LEVEL . red metaSearchPath(['ARITH], '_*_[ '_+_['a.Int, 'b.Int], '_+_['c.Int, 'd.Int] ], '_+_['I:Int, 'J:Int, 'K:Int, 'L:Int], nil, '*, unbounded, 0) . Maude-2.7/tests/Meta/metaUnify.expected0000644000147300135640000001065511431125453015070 00000000000000Maude> ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 0) . rewrites: 2 result UnificationTriple: { 'X:Nat <- '_+_['#1:Nat,'#3:Nat] ; 'Y:Nat <- '_+_['#2:Nat,'#4:Nat], 'X:Nat <- '_+_['#1:Nat,'#2:Nat] ; 'Y:Nat <- '_+_['#3:Nat,'#4:Nat],4} ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 1) . rewrites: 2 result UnificationTriple: { 'X:Nat <- '_+_['#1:Nat,'#3:Nat] ; 'Y:Nat <- '#2:Nat, 'X:Nat <- '_+_['#1:Nat,'#2:Nat] ; 'Y:Nat <- '#3:Nat,3} ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 2) . rewrites: 2 result UnificationTriple: { 'X:Nat <- '#1:Nat ; 'Y:Nat <- '_+_['#2:Nat,'#3:Nat], 'X:Nat <- '_+_['#1:Nat,'#2:Nat] ; 'Y:Nat <- '#3:Nat,3} ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 3) . rewrites: 2 result UnificationTriple: { 'X:Nat <- '_+_['#1:Nat,'#2:Nat] ; 'Y:Nat <- '#3:Nat, 'X:Nat <- '#1:Nat ; 'Y:Nat <- '_+_['#2:Nat,'#3:Nat],3} ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 4) . rewrites: 2 result UnificationTriple: { 'X:Nat <- '#1:Nat ; 'Y:Nat <- '#2:Nat, 'X:Nat <- '#1:Nat ; 'Y:Nat <- '#2:Nat,2} ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 5) . rewrites: 2 result UnificationTriple: { 'X:Nat <- '#2:Nat ; 'Y:Nat <- '_+_['#1:Nat,'#3:Nat], 'X:Nat <- '#1:Nat ; 'Y:Nat <- '_+_['#2:Nat,'#3:Nat],3} ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 6) . rewrites: 2 result UnificationTriple: { 'X:Nat <- '#2:Nat ; 'Y:Nat <- '#1:Nat, 'X:Nat <- '#1:Nat ; 'Y:Nat <- '#2:Nat,2} ========================================== reduce in META-LEVEL : metaDisjointUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_[ 'X:Nat,'Y:Nat], 0, 7) . rewrites: 2 result UnificationTriple?: (noUnifier).UnificationTriple? ========================================== reduce in META-LEVEL : metaUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_['A:Nat, 'B:Nat], 100000000000000000000, 0) . rewrites: 2 result UnificationPair: { 'A:Nat <- '_+_['#100000000000000000001:Nat,'#100000000000000000002:Nat] ; 'B:Nat <- '_+_['#100000000000000000003:Nat,'#100000000000000000004:Nat] ; 'X:Nat <- '_+_['#100000000000000000001:Nat,'#100000000000000000003:Nat] ; 'Y:Nat <- '_+_['#100000000000000000002:Nat, '#100000000000000000004:Nat],100000000000000000004} ========================================== reduce in META-LEVEL : metaUnify(['NAT], '_+_['X:Nat,'Y:Nat] =? '_+_['#1:Nat, 'Y:Nat], 0, 0) . Warning: unsafe variable name #1:Nat in unification problem. rewrites: 1 result [UnificationPair?]: metaUnify(th 'NAT is including 'NAT . sorts none . none none none none none endth, '_+_['X:Nat,'Y:Nat] =? '_+_['#1:Nat,'Y:Nat], 0, 0) ========================================== reduce in META-LEVEL : metaDisjointUnify(['BAZ], 'f['X:Foo] =? 'f['Y:Foo] /\ 'f['X:Foo] =? 'f['Z:Foo], 0, 0) . rewrites: 2 result UnificationTriple: { 'X:Foo <- '#1:Foo, 'Y:Foo <- '#1:Foo ; 'Z:Foo <- '#1:Foo,1} ========================================== reduce in META-LEVEL : metaDisjointUnify(['BAZ], 'f['Y:Foo] =? 'f['X:Foo] /\ 'f['Z:Foo] =? 'f['X:Foo], 0, 0) . rewrites: 2 result UnificationTriple: { 'Y:Foo <- '#1:Foo ; 'Z:Foo <- '#1:Foo, 'X:Foo <- '#1:Foo,1} ========================================== reduce in META-LEVEL : metaDisjointUnify(['BAZ], 'f['X:Foo] =? 'f['Y:Foo] /\ 'f['Y:Foo] =? 'f['X:Foo], 0, 0) . rewrites: 2 result UnificationTriple: { 'X:Foo <- '#1:Foo ; 'Y:Foo <- '#2:Foo, 'X:Foo <- '#2:Foo ; 'Y:Foo <- '#1:Foo,2} ========================================== reduce in META-LEVEL : metaDisjointUnify(['BAZ], 'f['X:Foo] =? 'f['a.Foo] /\ 'f['X:Foo] =? 'f['b.Foo], 0, 0) . rewrites: 2 result UnificationTriple?: (noUnifier).UnificationTriple? ========================================== reduce in META-LEVEL : metaDisjointUnify(['BAZ], 'f['a.Foo] =? 'f['X:Foo] /\ 'f['b.Foo] =? 'f['X:Foo], 0, 0) . rewrites: 2 result UnificationTriple?: (noUnifier).UnificationTriple? Maude> Bye. Maude-2.7/tests/Meta/metaMeta0000755000147300135640000000033410511605055013057 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaMeta.maude -no-banner -no-advise \ > metaMeta.out 2>&1 diff $srcdir/metaMeta.expected metaMeta.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaUp20000755000147300135640000000033010511605614012634 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaUp2.maude -no-banner -no-advise \ > metaUp2.out 2>&1 diff $srcdir/metaUp2.expected metaUp2.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaFrewrite.expected0000644000147300135640000000606010025703300015547 00000000000000Maude> ========================================== reduce in TEST : metaFrewrite(m, t, 1, 1) . rewrites: 5 result ResultPair: {'f['f['i['s_['0.Zero]],'i['s_['0.Zero]]],'f['i['s_^3[ '0.Zero]],'i['s_^2['0.Zero]]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 2, 1) . rewrites: 7 result ResultPair: {'f['f['i['s_['0.Zero]],'i['0.Zero]],'f['i['s_^3['0.Zero]], 'i['s_^2['0.Zero]]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 3, 1) . rewrites: 8 result ResultPair: {'f['i['s_['0.Zero]],'f['i['s_^3['0.Zero]],'i['s_^2[ '0.Zero]]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 4, 1) . rewrites: 10 result ResultPair: {'f['i['s_['0.Zero]],'f['i['s_^2['0.Zero]],'i['s_^2[ '0.Zero]]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 5, 1) . rewrites: 12 result ResultPair: {'f['i['s_['0.Zero]],'f['i['s_^2['0.Zero]],'i['s_[ '0.Zero]]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 6, 1) . rewrites: 14 result ResultPair: {'f['i['0.Zero],'f['i['s_^2['0.Zero]],'i['s_['0.Zero]]]], 'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 7, 1) . rewrites: 16 result ResultPair: {'f['i['0.Zero],'f['i['s_['0.Zero]],'i['s_['0.Zero]]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 8, 1) . rewrites: 18 result ResultPair: {'f['i['0.Zero],'f['i['s_['0.Zero]],'i['0.Zero]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 9, 1) . rewrites: 19 result ResultPair: {'f['i['0.Zero],'i['s_['0.Zero]]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 10, 1) . rewrites: 21 result ResultPair: {'f['i['0.Zero],'i['0.Zero]],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 11, 1) . rewrites: 22 result ResultPair: {'i['0.Zero],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, unbounded, 1) . rewrites: 22 result ResultPair: {'i['0.Zero],'Foo} ========================================== reduce in TEST : metaFrewrite(m, t, 0, 1) . rewrites: 2 result [ResultPair?]: metaFrewrite(mod 'FAIR is protecting 'INT . sorts 'Foo . none op 'f : 'Foo 'Foo -> 'Foo [none] . op 'i : 'Int -> 'Foo [none] . none none rl 'f['X:Foo,'i['0.Nat]] => 'X:Foo [none] . rl 'i['M:NzInt] => 'i['_-_['M:NzInt,'s_['0.Nat]]] [none] . endm, 'f['f['i['s_^2['0.Nat]],'i['s_['0.Nat]]],'f['i['s_^3['0.Nat]],'i['s_^2[ '0.Nat]]]], 0, 1) ========================================== reduce in TEST : metaFrewrite(m, t, 1, 0) . rewrites: 2 result [ResultPair?]: metaFrewrite(mod 'FAIR is protecting 'INT . sorts 'Foo . none op 'f : 'Foo 'Foo -> 'Foo [none] . op 'i : 'Int -> 'Foo [none] . none none rl 'f['X:Foo,'i['0.Nat]] => 'X:Foo [none] . rl 'i['M:NzInt] => 'i['_-_['M:NzInt,'s_['0.Nat]]] [none] . endm, 'f['f['i['s_^2['0.Nat]],'i['s_['0.Nat]]],'f['i['s_^3['0.Nat]],'i['s_^2[ '0.Nat]]]], 1, 0) Maude> Bye. Maude-2.7/tests/Meta/metaUp2.expected0000644000147300135640000233220312305225474014447 00000000000000Maude> ========================================== reduce in META-LEVEL : upSorts('META-LEVEL, true) . rewrites: 1 result NeSortSet: 'Assignment ; 'Attr ; 'AttrSet ; 'Bool ; 'Bound ; 'Char ; 'Condition ; 'Constant ; 'Context ; 'EmptyCommaList ; 'EmptyTypeSet ; 'EqCondition ; 'Equation ; 'EquationSet ; 'FModule ; 'FTheory ; 'FindResult ; 'GTermList ; 'GroundTerm ; 'GroundTermList ; 'Header ; 'Hook ; 'HookList ; 'Import ; 'ImportList ; 'Kind ; 'KindSet ; 'MatchPair ; 'MatchPair? ; 'MembAx ; 'MembAxSet ; 'Module ; 'ModuleExpression ; 'Nat ; 'NatList ; 'NeCTermList ; 'NeGroundTermList ; 'NeHookList ; 'NeKindSet ; 'NeNatList ; 'NeParameterDeclList ; 'NeParameterList ; 'NeQidList ; 'NeQidSet ; 'NeSortSet ; 'NeTermList ; 'NeTypeList ; 'NeTypeSet ; 'NzNat ; 'OpDecl ; 'OpDeclSet ; 'OpMapping ; 'OpMappingSet ; 'ParameterDecl ; 'ParameterDeclList ; 'ParameterList ; 'PrintOption ; 'PrintOptionSet ; 'Qid ; 'QidList ; 'QidSet ; 'Renaming ; 'RenamingSet ; 'Result4Tuple ; 'Result4Tuple? ; 'ResultPair ; 'ResultPair? ; 'ResultTriple ; 'ResultTriple? ; 'Rule ; 'RuleSet ; 'SModule ; 'STheory ; 'Sort ; 'SortMapping ; 'SortMappingSet ; 'SortSet ; 'String ; 'SubsortDecl ; 'SubsortDeclSet ; 'Substitution ; 'Substitution? ; 'Term ; 'TermList ; 'TermQid ; 'Trace ; 'Trace? ; 'TraceStep ; 'Type ; 'Type? ; 'TypeList ; 'TypeListSet ; 'TypeSet ; 'UnificandPair ; 'UnificationPair ; 'UnificationPair? ; 'UnificationProblem ; 'UnificationTriple ; 'UnificationTriple? ; 'Variable ; 'Variant ; 'Variant? ; 'View ; 'Zero ========================================== reduce in META-LEVEL : upSorts('META-LEVEL, false) . rewrites: 1 result NeSortSet: 'Bound ; 'MatchPair ; 'MatchPair? ; 'PrintOption ; 'PrintOptionSet ; 'Result4Tuple ; 'Result4Tuple? ; 'ResultPair ; 'ResultPair? ; 'ResultTriple ; 'ResultTriple? ; 'Substitution? ; 'Trace ; 'Trace? ; 'TraceStep ; 'Type? ; 'UnificandPair ; 'UnificationPair ; 'UnificationPair? ; 'UnificationProblem ; 'UnificationTriple ; 'UnificationTriple? ; 'Variant ; 'Variant? ========================================== reduce in META-LEVEL : upSubsortDecls('META-LEVEL, true) . rewrites: 2 result SubsortDeclSet: subsort 'Assignment < 'Substitution . subsort 'Attr < 'AttrSet . subsort 'Char < 'String . subsort 'Constant < 'GroundTerm . subsort 'Constant < 'TermQid . subsort 'Context < 'NeCTermList . subsort 'EmptyCommaList < 'GroundTermList . subsort 'EmptyCommaList < 'ParameterList . subsort 'EmptyTypeSet < 'KindSet . subsort 'EmptyTypeSet < 'SortSet . subsort 'EqCondition < 'Condition . subsort 'Equation < 'EquationSet . subsort 'FModule < 'SModule . subsort 'FTheory < 'STheory . subsort 'GroundTerm < 'NeGroundTermList . subsort 'GroundTerm < 'Term . subsort 'GroundTermList < 'TermList . subsort 'Hook < 'NeHookList . subsort 'Import < 'ImportList . subsort 'Kind < 'NeKindSet . subsort 'Kind < 'Type . subsort 'KindSet < 'TypeSet . subsort 'MatchPair < 'MatchPair? . subsort 'MembAx < 'MembAxSet . subsort 'Nat < 'Bound . subsort 'Nat < 'FindResult . subsort 'Nat < 'NeNatList . subsort 'NeCTermList < 'GTermList . subsort 'NeGroundTermList < 'GroundTermList . subsort 'NeGroundTermList < 'NeTermList . subsort 'NeHookList < 'HookList . subsort 'NeKindSet < 'KindSet . subsort 'NeKindSet < 'NeTypeSet . subsort 'NeNatList < 'NatList . subsort 'NeParameterDeclList < 'ParameterDeclList . subsort 'NeParameterList < 'ParameterList . subsort 'NeQidList < 'QidList . subsort 'NeQidSet < 'QidSet . subsort 'NeSortSet < 'NeTypeSet . subsort 'NeSortSet < 'SortSet . subsort 'NeTermList < 'TermList . subsort 'NeTypeList < 'NeQidList . subsort 'NeTypeList < 'TypeList . subsort 'NeTypeSet < 'NeQidSet . subsort 'NeTypeSet < 'TypeSet . subsort 'NzNat < 'Nat . subsort 'OpDecl < 'OpDeclSet . subsort 'OpMapping < 'OpMappingSet . subsort 'ParameterDecl < 'NeParameterDeclList . subsort 'PrintOption < 'PrintOptionSet . subsort 'Qid < 'Header . subsort 'Qid < 'ModuleExpression . subsort 'Qid < 'NeQidList . subsort 'Qid < 'NeQidSet . subsort 'Renaming < 'RenamingSet . subsort 'Result4Tuple < 'Result4Tuple? . subsort 'ResultPair < 'ResultPair? . subsort 'ResultTriple < 'ResultTriple? . subsort 'Rule < 'RuleSet . subsort 'SModule < 'Module . subsort 'STheory < 'Module . subsort 'Sort < 'NeParameterList . subsort 'Sort < 'NeSortSet . subsort 'Sort < 'Type . subsort 'SortMapping < 'SortMappingSet . subsort 'SortSet < 'TypeSet . subsort 'SubsortDecl < 'SubsortDeclSet . subsort 'Substitution < 'Substitution? . subsort 'Term < 'NeTermList . subsort 'TermList < 'GTermList . subsort 'TermQid < 'Qid . subsort 'TermQid < 'Term . subsort 'Trace < 'Trace? . subsort 'TraceStep < 'Trace . subsort 'Type < 'NeTypeList . subsort 'Type < 'NeTypeSet . subsort 'Type < 'Qid . subsort 'Type < 'Type? . subsort 'TypeList < 'QidList . subsort 'TypeList < 'TypeListSet . subsort 'TypeSet < 'QidSet . subsort 'TypeSet < 'TypeListSet . subsort 'UnificandPair < 'UnificationProblem . subsort 'UnificationPair < 'UnificationPair? . subsort 'UnificationTriple < 'UnificationTriple? . subsort 'Variable < 'TermQid . subsort 'Variant < 'Variant? . subsort 'Zero < 'Nat . ========================================== reduce in META-LEVEL : upSubsortDecls('META-LEVEL, false) . rewrites: 1 result SubsortDeclSet: subsort 'MatchPair < 'MatchPair? . subsort 'Nat < 'Bound . subsort 'PrintOption < 'PrintOptionSet . subsort 'Result4Tuple < 'Result4Tuple? . subsort 'ResultPair < 'ResultPair? . subsort 'ResultTriple < 'ResultTriple? . subsort 'Substitution < 'Substitution? . subsort 'Trace < 'Trace? . subsort 'TraceStep < 'Trace . subsort 'Type < 'Type? . subsort 'UnificandPair < 'UnificationProblem . subsort 'UnificationPair < 'UnificationPair? . subsort 'UnificationTriple < 'UnificationTriple? . subsort 'Variant < 'Variant? . ========================================== reduce in META-LEVEL : upImports('META-LEVEL) . rewrites: 1 result Import: protecting 'META-VIEW . ========================================== reduce in META-LEVEL : upImports('NAT) . rewrites: 1 result Import: protecting 'BOOL . ========================================== reduce in META-LEVEL : upImports('TRUTH-VALUE) . rewrites: 1 result ImportList: (nil).ImportList ========================================== reduce in META-LEVEL : upOpDecls('TRUTH-VALUE, true) . *********** equation (built-in equation for symbol upOpDecls) upOpDecls('TRUTH-VALUE, true) ---> op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . rewrites: 1 result OpDeclSet: op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . ========================================== reduce in META-LEVEL : upOpDecls('META-LEVEL, true) . rewrites: 1 result OpDeclSet: op '$card : 'QidSet 'Nat -> 'Nat [none] . op '$diff : 'QidSet 'QidSet 'QidSet -> 'QidSet [none] . op '$intersect : 'QidSet 'QidSet 'QidSet -> 'QidSet [none] . op '$reverse : 'NatList 'NatList -> 'NatList [none] . op '$reverse : 'QidList 'QidList -> 'QidList [none] . op '$size : 'NatList 'Nat -> 'Nat [none] . op '$size : 'QidList 'Nat -> 'Nat [none] . op '0 : nil -> 'Zero [ctor] . op ' : nil -> 'Constant [special( id-hook('QuotedIdentifierSymbol, 'constantQid))] . op ' : nil -> 'Kind [special( id-hook('QuotedIdentifierSymbol, 'kindQid))] . op ' : nil -> 'Qid [special( id-hook('QuotedIdentifierSymbol, nil))] . op ' : nil -> 'Sort [special( id-hook('QuotedIdentifierSymbol, 'sortQid))] . op ' : nil -> 'Variable [special( id-hook('QuotedIdentifierSymbol, 'variableQid))] . op ' : nil -> 'Char [special( id-hook('StringSymbol, nil))] . op ' : nil -> 'String [special( id-hook('StringSymbol, nil))] . op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special( id-hook('ACU_NumberOpSymbol, '&) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*`(_`) : 'ModuleExpression 'RenamingSet -> 'ModuleExpression [ctor prec( 39) format('d 'd 's 'n++i 'n--i 'd)] . op '_+_ : 'ModuleExpression 'ModuleExpression -> 'ModuleExpression [assoc comm ctor] . op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'String 'String -> 'String [prec(33) gather('E 'e) special( id-hook('StringOpSymbol, '+) op-hook('stringSymbol, ', nil, 'Char))] . op '_/\_ : 'Condition 'Condition -> 'Condition [assoc ctor id('nil.EqCondition) prec(73)] . op '_/\_ : 'EqCondition 'EqCondition -> 'EqCondition [assoc ctor id( 'nil.EqCondition) prec(73)] . op '_/\_ : 'UnificationProblem 'UnificationProblem -> 'UnificationProblem [ assoc comm ctor prec(73)] . op '_::_ : 'Sort 'ModuleExpression -> 'ParameterDecl [none] . op '_:=_ : 'Term 'Term -> 'EqCondition [ctor prec(71)] . op '_:_ : 'Term 'Sort -> 'EqCondition [ctor prec(71)] . op '_;_ : 'EmptyTypeSet 'EmptyTypeSet -> 'EmptyTypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'KindSet 'KindSet -> 'KindSet [assoc comm ctor id('none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeKindSet 'KindSet -> 'NeKindSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeQidSet 'QidSet -> 'NeQidSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeSortSet 'SortSet -> 'NeSortSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeTypeSet 'TypeSet -> 'NeTypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'QidSet 'QidSet -> 'QidSet [assoc comm ctor id('none.EmptyTypeSet) prec(43)] . op '_;_ : 'SortSet 'SortSet -> 'SortSet [assoc comm ctor id('none.EmptyTypeSet) prec(43)] . op '_;_ : 'Substitution 'Substitution -> 'Substitution [assoc comm ctor id( 'none.Substitution) prec(65)] . op '_;_ : 'TypeListSet 'TypeListSet -> 'TypeListSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'TypeSet 'TypeSet -> 'TypeSet [assoc comm ctor id('none.EmptyTypeSet) prec(43)] . op '_<-_ : 'Variable 'Term -> 'Assignment [ctor prec(63) format('nt 'd 'd 'd)] . op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '<<) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op '_=>_ : 'Term 'Term -> 'Condition [ctor prec(71)] . op '_=?_ : 'Term 'Term -> 'UnificandPair [ctor prec(71)] . op '_=_ : 'Term 'Term -> 'EqCondition [ctor prec(71)] . op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '>>) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_\_ : 'QidSet 'QidSet -> 'QidSet [gather('E 'e)] . op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '__ : 'AttrSet 'AttrSet -> 'AttrSet [assoc comm ctor id('none.AttrSet)] . op '__ : 'EquationSet 'EquationSet -> 'EquationSet [assoc comm ctor id( 'none.EquationSet) format('d 'ni 'd)] . op '__ : 'HookList 'HookList -> 'HookList [assoc ctor id('nil.HookList)] . op '__ : 'HookList 'NeHookList -> 'NeHookList [assoc ctor id('nil.HookList)] . op '__ : 'ImportList 'ImportList -> 'ImportList [assoc ctor id('nil.ImportList) format('d 'ni 'd)] . op '__ : 'MembAxSet 'MembAxSet -> 'MembAxSet [assoc comm ctor id( 'none.MembAxSet) format('d 'ni 'd)] . op '__ : 'NatList 'NatList -> 'NatList [assoc ctor id('nil.NatList) prec(25)] . op '__ : 'NatList 'NeNatList -> 'NeNatList [assoc ctor id('nil.NatList) prec( 25)] . op '__ : 'NeHookList 'HookList -> 'NeHookList [assoc ctor id('nil.HookList)] . op '__ : 'NeNatList 'NatList -> 'NeNatList [assoc ctor id('nil.NatList) prec( 25)] . op '__ : 'NeQidList 'QidList -> 'NeQidList [assoc ctor id('nil.TypeList) prec( 25)] . op '__ : 'NeTypeList 'TypeList -> 'NeTypeList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'OpDeclSet 'OpDeclSet -> 'OpDeclSet [assoc comm ctor id( 'none.OpDeclSet) format('d 'ni 'd)] . op '__ : 'OpMappingSet 'OpMappingSet -> 'OpMappingSet [assoc comm ctor id( 'none.OpMappingSet) format('d 'ni 'd)] . op '__ : 'PrintOptionSet 'PrintOptionSet -> 'PrintOptionSet [assoc comm ctor id('none.PrintOptionSet)] . op '__ : 'QidList 'NeQidList -> 'NeQidList [assoc ctor id('nil.TypeList) prec( 25)] . op '__ : 'QidList 'QidList -> 'QidList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'RuleSet 'RuleSet -> 'RuleSet [assoc comm ctor id('none.RuleSet) format('d 'ni 'd)] . op '__ : 'SortMappingSet 'SortMappingSet -> 'SortMappingSet [assoc comm ctor id('none.SortMappingSet) format('d 'ni 'd)] . op '__ : 'SubsortDeclSet 'SubsortDeclSet -> 'SubsortDeclSet [assoc comm ctor id('none.SubsortDeclSet) format('d 'ni 'd)] . op '__ : 'Trace 'Trace -> 'Trace [assoc ctor id('nil.Trace) format('d 'n 'd)] . op '__ : 'TypeList 'NeTypeList -> 'NeTypeList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'TypeList 'TypeList -> 'TypeList [assoc ctor id('nil.TypeList) prec( 25)] . op '_`,_ : 'EmptyCommaList 'EmptyCommaList -> 'EmptyCommaList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GTermList 'GTermList -> 'GTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GroundTermList 'GroundTermList -> 'GroundTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GroundTermList 'NeGroundTermList -> 'NeGroundTermList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeCTermList 'TermList -> 'NeCTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeGroundTermList 'GroundTermList -> 'NeGroundTermList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeParameterDeclList 'ParameterDeclList -> 'NeParameterDeclList [ assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'NeParameterList 'ParameterList -> 'NeParameterList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeTermList 'TermList -> 'NeTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'ParameterDeclList 'NeParameterDeclList -> 'NeParameterDeclList [ assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'ParameterDeclList 'ParameterDeclList -> 'ParameterDeclList [assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'ParameterList 'NeParameterList -> 'NeParameterList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'ParameterList 'ParameterList -> 'ParameterList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'RenamingSet 'RenamingSet -> 'RenamingSet [assoc comm ctor prec(43) format('d 'd 'ni 'd)] . op '_`,_ : 'TermList 'NeCTermList -> 'NeCTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'TermList 'NeTermList -> 'NeTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'TermList 'TermList -> 'TermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`[_`] : 'Qid 'NeCTermList -> 'Context [ctor] . op '_`[_`] : 'Qid 'NeGroundTermList -> 'GroundTerm [ctor] . op '_`[_`] : 'Qid 'NeTermList -> 'Term [ctor] . op '_`{_`} : 'ModuleExpression 'ParameterList -> 'ModuleExpression [ctor prec( 37)] . op '_`{_`} : 'Qid 'ParameterDeclList -> 'Header [ctor] . op '_and-then_ : 'Bool 'Bool -> 'Bool [strat(1 0) prec(55) gather('e 'E)] . op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] . op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special( id-hook('NumberOpSymbol, 'divides) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] . op '_in_ : 'Qid 'QidSet -> 'Bool [none] . op '_or-else_ : 'Bool 'Bool -> 'Bool [strat(1 0) prec(59) gather('e 'E)] . op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] . op '_psubset_ : 'QidSet 'QidSet -> 'Bool [none] . op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'quo) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'rem) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_subset_ : 'QidSet 'QidSet -> 'Bool [none] . op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] . op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special( id-hook('ACU_NumberOpSymbol, 'xor) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '`[_`] : 'Qid -> 'Module [none] . op '`[`] : nil -> 'Context [ctor] . op '`{_`,_`,_`,_`} : 'Term 'Type 'Substitution 'Context -> 'Result4Tuple [ctor] . op '`{_`,_`,_`} : 'Substitution 'Substitution 'Nat -> 'UnificationTriple [ctor] . op '`{_`,_`,_`} : 'Term 'Substitution 'Nat -> 'Variant [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Rule -> 'TraceStep [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Substitution -> 'ResultTriple [ctor] . op '`{_`,_`} : 'Substitution 'Context -> 'MatchPair [ctor] . op '`{_`,_`} : 'Substitution 'Nat -> 'UnificationPair [ctor] . op '`{_`,_`} : 'Term 'Type -> 'ResultPair [ctor] . op 'ambiguity : 'ResultPair 'ResultPair -> 'ResultPair? [ctor] . op 'anyType : nil -> 'Type? [ctor] . op 'append : 'NatList 'NatList -> 'NatList [none] . op 'append : 'NatList 'NeNatList -> 'NeNatList [none] . op 'append : 'NeNatList 'NatList -> 'NeNatList [none] . op 'append : 'NeQidList 'QidList -> 'NeQidList [none] . op 'append : 'QidList 'NeQidList -> 'NeQidList [none] . op 'append : 'QidList 'QidList -> 'QidList [none] . op 'ascii : 'Char -> 'Nat [special( id-hook('StringOpSymbol, 'ascii) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'assoc : nil -> 'Attr [ctor] . op 'ceq_=_if_`[_`]. : 'Term 'Term 'EqCondition 'AttrSet -> 'Equation [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'char : '`[FindResult`,NatList`,Bound`] -> '`[String`] [special( id-hook('StringOpSymbol, 'char) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'cmb_:_if_`[_`]. : 'Term 'Sort 'EqCondition 'AttrSet -> 'MembAx [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'comm : nil -> 'Attr [ctor] . op 'completeName : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaCompleteName) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'config : nil -> 'Attr [ctor] . op 'crl_=>_if_`[_`]. : 'Term 'Term 'Condition 'AttrSet -> 'Rule [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'ctor : nil -> 'Attr [ctor] . op 'delete : 'Qid 'QidSet -> 'QidSet [none] . op 'downTerm : 'Term 'Universal -> 'Universal [poly(2 0) special( id-hook('MetaLevelOpSymbol, 'metaDownTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'empty : nil -> 'EmptyCommaList [ctor] . op 'empty : nil -> 'GroundTermList [ctor] . op 'eq_=_`[_`]. : 'Term 'Term 'AttrSet -> 'Equation [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 'extending_. : 'ModuleExpression -> 'Import [ctor] . op 'failure : nil -> 'Result4Tuple? [ctor] . op 'failure : nil -> 'ResultPair? [ctor] . op 'failure : nil -> 'ResultTriple? [ctor] . op 'failure : nil -> 'Trace? [ctor] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'find : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'find) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 'flat : nil -> 'PrintOption [ctor] . op 'fmod_is_sorts_.____endfm : 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet -> 'FModule [ctor gather('& '& '& '& '& '& '&) format('d 'd 's 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'format : 'QidList -> 'Attr [ctor] . op 'format : nil -> 'PrintOption [ctor] . op 'front : 'NeNatList -> 'NatList [none] . op 'front : 'NeQidList -> 'QidList [none] . op 'frozen : 'NeNatList -> 'Attr [ctor] . op 'fth_is_sorts_.____endfth : 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet -> 'FTheory [ctor gather('& '& '& '& '& '& '&) format('d 'd 'd 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'gather : 'QidList -> 'Attr [ctor] . op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'getContext : 'MatchPair -> 'Context [none] . op 'getContext : 'Result4Tuple -> 'Context [none] . op 'getEqs : 'Module -> 'EquationSet [none] . op 'getFrom : 'View -> 'ModuleExpression [none] . op 'getImports : 'Module -> 'ImportList [none] . op 'getKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getKinds : '`[Module`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKinds) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getMbs : 'Module -> 'MembAxSet [none] . op 'getName : 'Constant -> 'Qid [none] . op 'getName : 'Module -> 'Qid [none] . op 'getName : 'Variable -> 'Qid [none] . op 'getName : 'View -> 'Qid [none] . op 'getOpMappings : 'View -> 'OpMappingSet [none] . op 'getOps : 'Module -> 'OpDeclSet [none] . op 'getRls : 'Module -> 'RuleSet [none] . op 'getSortMappings : 'View -> 'SortMappingSet [none] . op 'getSorts : 'Module -> 'SortSet [none] . op 'getSubsorts : 'Module -> 'SubsortDeclSet [none] . op 'getSubstitution : 'MatchPair -> 'Substitution [none] . op 'getSubstitution : 'Result4Tuple -> 'Substitution [none] . op 'getSubstitution : 'ResultTriple -> 'Substitution [none] . op 'getTerm : 'Result4Tuple -> 'Term [none] . op 'getTerm : 'ResultPair -> 'Term [none] . op 'getTerm : 'ResultTriple -> 'Term [none] . op 'getTo : 'View -> 'ModuleExpression [none] . op 'getType : 'Constant -> 'Type [none] . op 'getType : 'Result4Tuple -> 'Type [none] . op 'getType : 'ResultPair -> 'Type [none] . op 'getType : 'ResultTriple -> 'Type [none] . op 'getType : 'Variable -> 'Type [none] . op 'glbSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGlbSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'head : 'NeNatList -> 'Nat [none] . op 'head : 'NeQidList -> 'Qid [none] . op 'id : 'Term -> 'Attr [ctor] . op 'id-hook : 'Qid 'QidList -> 'Hook [ctor format('nssss 'd)] . op 'idem : nil -> 'Attr [ctor] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'including_. : 'ModuleExpression -> 'Import [ctor] . op 'insert : 'Qid 'QidSet -> 'QidSet [none] . op 'intersection : 'QidSet 'QidSet -> 'QidSet [none] . op 'iter : nil -> 'Attr [ctor] . op 'label : 'Qid -> 'Attr [ctor] . op 'label_to_ : 'Qid 'Qid -> 'Renaming [ctor] . op 'last : 'NeNatList -> 'Nat [none] . op 'last : 'NeQidList -> 'Qid [none] . op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'leastSort : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLeastSort) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'left-id : 'Term -> 'Attr [ctor] . op 'length : 'String -> 'Nat [special( id-hook('StringOpSymbol, 'length) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lesserSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLesserSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'max : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'maximalAritySet : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalAritySet) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'maximalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mb_:_`[_`]. : 'Term 'Sort 'AttrSet -> 'MembAx [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 'memo : nil -> 'Attr [ctor] . op 'metaApply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaApply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaFrewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaFrewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetIrredundantVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetIrredundantVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaMatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] -> '`[Substitution?`] [special( id-hook('MetaLevelOpSymbol, 'metaMatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[Bool`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow2) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNormalize : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNormalize) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaParse : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [ special( id-hook('MetaLevelOpSymbol, 'metaParse) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [none] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[PrintOptionSet`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaPrettyPrint) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaReduce : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaReduce) op-hook('qidSymbol, ', nil, 'Qid) op-hook('metaTermSymbol, '_`[_`], 'Qid 'NeGroundTermList, 'GroundTerm) op-hook('metaArgSymbol, '_`,_, 'NeGroundTermList 'GroundTermList, 'NeGroundTermList) op-hook('emptyTermListSymbol, 'empty, nil, 'GroundTermList) op-hook('assignmentSymbol, '_<-_, 'Variable 'Term, 'Assignment) op-hook('emptySubstitutionSymbol, 'none, nil, 'Substitution) op-hook('substitutionSymbol, '_;_, 'Substitution 'Substitution, 'Substitution) op-hook('holeSymbol, '`[`], nil, 'Context) op-hook('headerSymbol, '_`{_`}, 'Qid 'ParameterDeclList, 'Header) op-hook('parameterDeclSymbol, '_::_, 'Sort 'ModuleExpression, 'ParameterDecl) op-hook('parameterDeclListSymbol, '_`,_, 'ParameterDeclList 'ParameterDeclList, 'ParameterDeclList) op-hook('protectingSymbol, 'protecting_., 'ModuleExpression, 'Import) op-hook('extendingSymbol, 'extending_., 'ModuleExpression, 'Import) op-hook('includingSymbol, 'including_., 'ModuleExpression, 'Import) op-hook('nilImportListSymbol, 'nil, nil, 'ImportList) op-hook('importListSymbol, '__, 'ImportList 'ImportList, 'ImportList) op-hook('emptySortSetSymbol, 'none, nil, 'QidSet) op-hook('sortSetSymbol, '_;_, 'QidSet 'QidSet, 'QidSet) op-hook('subsortSymbol, 'subsort_<_., 'Sort 'Sort, 'SubsortDecl) op-hook('emptySubsortDeclSetSymbol, 'none, nil, 'SubsortDeclSet) op-hook('subsortDeclSetSymbol, '__, 'SubsortDeclSet 'SubsortDeclSet, 'SubsortDeclSet) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) op-hook('qidListSymbol, '__, 'QidList 'QidList, 'QidList) op-hook('succSymbol, 's_, 'Nat, 'NzNat) op-hook('natListSymbol, '__, 'NatList 'NatList, 'NatList) op-hook('unboundedSymbol, 'unbounded, nil, 'Bound) op-hook('stringSymbol, ', nil, 'Char) op-hook('sortRenamingSymbol, 'sort_to_, 'Qid 'Qid, 'Renaming) op-hook('opRenamingSymbol, 'op_to_`[_`], 'Qid 'Qid 'AttrSet, 'Renaming) op-hook('opRenamingSymbol2, 'op_:_->_to_`[_`], 'Qid 'TypeList 'Type 'Qid 'AttrSet, 'Renaming) op-hook('labelRenamingSymbol, 'label_to_, 'Qid 'Qid, 'Renaming) op-hook('renamingSetSymbol, '_`,_, 'RenamingSet 'RenamingSet, 'RenamingSet) op-hook('sumSymbol, '_+_, 'ModuleExpression 'ModuleExpression, 'ModuleExpression) op-hook('renamingSymbol, '_*`(_`), 'ModuleExpression 'RenamingSet, 'ModuleExpression) op-hook('instantiationSymbol, '_`{_`}, 'ModuleExpression 'ParameterList, 'ModuleExpression) op-hook('termHookSymbol, 'term-hook, 'Qid 'Term, 'Hook) op-hook('hookListSymbol, '__, 'HookList 'HookList, 'HookList) op-hook('idHookSymbol, 'id-hook, 'Qid 'QidList, 'Hook) op-hook('opHookSymbol, 'op-hook, 'Qid 'Qid 'QidList 'Qid, 'Hook) op-hook('assocSymbol, 'assoc, nil, 'Attr) op-hook('commSymbol, 'comm, nil, 'Attr) op-hook('idemSymbol, 'idem, nil, 'Attr) op-hook('iterSymbol, 'iter, nil, 'Attr) op-hook('idSymbol, 'id, 'Term, 'Attr) op-hook('leftIdSymbol, 'left-id, 'Term, 'Attr) op-hook('rightIdSymbol, 'right-id, 'Term, 'Attr) op-hook('stratSymbol, 'strat, 'NeNatList, 'Attr) op-hook('memoSymbol, 'memo, nil, 'Attr) op-hook('precSymbol, 'prec, 'Nat, 'Attr) op-hook('gatherSymbol, 'gather, 'QidList, 'Attr) op-hook('formatSymbol, 'format, 'QidList, 'Attr) op-hook('ctorSymbol, 'ctor, nil, 'Attr) op-hook('frozenSymbol, 'frozen, 'NeNatList, 'Attr) op-hook('polySymbol, 'poly, 'NeNatList, 'Attr) op-hook('configSymbol, 'config, nil, 'Attr) op-hook('objectSymbol, 'object, nil, 'Attr) op-hook('msgSymbol, 'msg, nil, 'Attr) op-hook('specialSymbol, 'special, 'NeHookList, 'Attr) op-hook('labelSymbol, 'label, 'Qid, 'Attr) op-hook('metadataSymbol, 'metadata, 'String, 'Attr) op-hook('owiseSymbol, 'owise, nil, 'Attr) op-hook('variantAttrSymbol, 'variant, nil, 'Attr) op-hook('nonexecSymbol, 'nonexec, nil, 'Attr) op-hook('printSymbol, 'print, 'QidList, 'Attr) op-hook('emptyAttrSetSymbol, 'none, nil, 'AttrSet) op-hook('attrSetSymbol, '__, 'AttrSet 'AttrSet, 'AttrSet) op-hook('opDeclSymbol, 'op_:_->_`[_`]., 'Qid 'TypeList 'Type 'AttrSet, 'OpDecl) op-hook('opDeclSetSymbol, '__, 'OpDeclSet 'OpDeclSet, 'OpDeclSet) op-hook('emptyOpDeclSetSymbol, 'none, nil, 'OpDeclSet) op-hook('noConditionSymbol, 'nil, nil, 'EqCondition) op-hook('equalityConditionSymbol, '_=_, 'Term 'Term, 'EqCondition) op-hook('sortTestConditionSymbol, '_:_, 'Term 'Sort, 'EqCondition) op-hook('matchConditionSymbol, '_:=_, 'Term 'Term, 'EqCondition) op-hook('rewriteConditionSymbol, '_=>_, 'Term 'Term, 'Condition) op-hook('conjunctionSymbol, '_/\_, 'EqCondition 'EqCondition, 'EqCondition) op-hook('mbSymbol, 'mb_:_`[_`]., 'Term 'Sort 'AttrSet, 'MembAx) op-hook('cmbSymbol, 'cmb_:_if_`[_`]., 'Term 'Sort 'EqCondition 'AttrSet, 'MembAx) op-hook('emptyMembAxSetSymbol, 'none, nil, 'MembAxSet) op-hook('membAxSetSymbol, '__, 'MembAxSet 'MembAxSet, 'MembAxSet) op-hook('eqSymbol, 'eq_=_`[_`]., 'Term 'Term 'AttrSet, 'Equation) op-hook('ceqSymbol, 'ceq_=_if_`[_`]., 'Term 'Term 'EqCondition 'AttrSet, 'Equation) op-hook('emptyEquationSetSymbol, 'none, nil, 'EquationSet) op-hook('equationSetSymbol, '__, 'EquationSet 'EquationSet, 'EquationSet) op-hook('rlSymbol, 'rl_=>_`[_`]., 'Term 'Term 'AttrSet, 'Rule) op-hook('crlSymbol, 'crl_=>_if_`[_`]., 'Term 'Term 'Condition 'AttrSet, 'Rule) op-hook('emptyRuleSetSymbol, 'none, nil, 'RuleSet) op-hook('ruleSetSymbol, '__, 'RuleSet 'RuleSet, 'RuleSet) op-hook('fmodSymbol, 'fmod_is_sorts_.____endfm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FModule) op-hook('fthSymbol, 'fth_is_sorts_.____endfth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FTheory) op-hook('modSymbol, 'mod_is_sorts_._____endm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'SModule) op-hook('thSymbol, 'th_is_sorts_._____endth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'STheory) op-hook('sortMappingSymbol, 'sort_to_., 'Sort 'Sort, 'SortMapping) op-hook('emptySortMappingSetSymbol, 'none, nil, 'SortMappingSet) op-hook('sortMappingSetSymbol, '__, 'SortMappingSet 'SortMappingSet, 'SortMappingSet) op-hook('opMappingSymbol, 'op_to_., 'Qid 'Qid, 'OpMapping) op-hook('opSpecificMappingSymbol, 'op_:_->_to_., 'Qid 'TypeList 'Type 'Qid, 'OpMapping) op-hook('opTermMappingSymbol, 'op_to`term_., 'Term 'Term, 'OpMapping) op-hook('emptyOpMappingSetSymbol, 'none, nil, 'OpMappingSet) op-hook('opMappingSetSymbol, '__, 'OpMappingSet 'OpMappingSet, 'OpMappingSet) op-hook('viewSymbol, 'view_from_to_is__endv, 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet, 'View) op-hook('anyTypeSymbol, 'anyType, nil, 'Type?) op-hook('unificandPairSymbol, '_=?_, 'Term 'Term, 'UnificandPair) op-hook('unificationConjunctionSymbol, '_/\_, 'UnificationProblem 'UnificationProblem, 'UnificationProblem) op-hook('resultPairSymbol, '`{_`,_`}, 'Term 'Type, 'ResultPair) op-hook('resultTripleSymbol, '`{_`,_`,_`}, 'Term 'Type 'Substitution, 'ResultTriple) op-hook('result4TupleSymbol, '`{_`,_`,_`,_`}, 'Term 'Type 'Substitution 'Context, 'Result4Tuple) op-hook('matchPairSymbol, '`{_`,_`}, 'Substitution 'Context, 'MatchPair) op-hook('unificationPairSymbol, '`{_`,_`}, 'Substitution 'Nat, 'UnificationPair) op-hook('unificationTripleSymbol, '`{_`,_`,_`}, 'Substitution 'Substitution 'Nat, 'UnificationTriple) op-hook('variantSymbol, '`{_`,_`,_`}, 'Term 'Substitution 'Nat, 'Variant) op-hook('traceStepSymbol, '`{_`,_`,_`}, 'Term 'Type 'Rule, 'TraceStep) op-hook('nilTraceSymbol, 'nil, nil, 'Trace) op-hook('traceSymbol, '__, 'Trace 'Trace, 'Trace) op-hook('noParseSymbol, 'noParse, 'Nat, 'ResultPair?) op-hook('ambiguitySymbol, 'ambiguity, 'ResultPair 'ResultPair, 'ResultPair?) op-hook('failure2Symbol, 'failure, nil, 'ResultPair?) op-hook('failure3Symbol, 'failure, nil, 'ResultTriple?) op-hook('failure4Symbol, 'failure, nil, 'Result4Tuple?) op-hook('noUnifierPairSymbol, 'noUnifier, nil, 'UnificationPair?) op-hook('noUnifierTripleSymbol, 'noUnifier, nil, 'UnificationTriple?) op-hook('noVariantSymbol, 'noVariant, nil, 'Variant?) op-hook('noMatchSubstSymbol, 'noMatch, nil, 'Substitution?) op-hook('noMatchPairSymbol, 'noMatch, nil, 'MatchPair?) op-hook('failureTraceSymbol, 'failure, nil, 'Trace?) op-hook('mixfixSymbol, 'mixfix, nil, 'PrintOption) op-hook('withParensSymbol, 'with-parens, nil, 'PrintOption) op-hook('flatSymbol, 'flat, nil, 'PrintOption) op-hook('formatPrintOptionSymbol, 'format, nil, 'PrintOption) op-hook('numberSymbol, 'number, nil, 'PrintOption) op-hook('ratSymbol, 'rat, nil, 'PrintOption) op-hook('emptyPrintOptionSetSymbol, 'none, nil, 'PrintOptionSet) op-hook('printOptionSetSymbol, '__, 'PrintOptionSet 'PrintOptionSet, 'PrintOptionSet) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'metaRewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaRewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearchPath : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Trace?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearchPath) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXapply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Result4Tuple?`] [special( id-hook('MetaLevelOpSymbol, 'metaXapply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXmatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[MatchPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaXmatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metadata : 'String -> 'Attr [ctor] . op 'min : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'minimalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMinimalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mixfix : nil -> 'PrintOption [ctor] . op 'modExp : '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[FindResult`,NatList`,Bound`] [ special( id-hook('NumberOpSymbol, 'modExp) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'mod_is_sorts_._____endm : 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet -> 'SModule [ctor gather('& '& '& '& '& '& '& '&) format('d 'd 's 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'msg : nil -> 'Attr [ctor] . op 'nil : nil -> 'EqCondition [ctor] . op 'nil : nil -> 'HookList [ctor] . op 'nil : nil -> 'ImportList [ctor] . op 'nil : nil -> 'NatList [ctor] . op 'nil : nil -> 'ParameterDeclList [ctor] . op 'nil : nil -> 'QidList [ctor] . op 'nil : nil -> 'Trace [ctor] . op 'nil : nil -> 'TypeList [ctor] . op 'noMatch : nil -> 'MatchPair? [ctor] . op 'noMatch : nil -> 'Substitution? [ctor] . op 'noParse : 'Nat -> 'ResultPair? [ctor] . op 'noUnifier : nil -> 'UnificationPair? [ctor] . op 'noUnifier : nil -> 'UnificationTriple? [ctor] . op 'noVariant : nil -> 'Variant? [ctor] . op 'none : nil -> 'AttrSet [ctor] . op 'none : nil -> 'EmptyTypeSet [ctor] . op 'none : nil -> 'EquationSet [ctor] . op 'none : nil -> 'MembAxSet [ctor] . op 'none : nil -> 'OpDeclSet [ctor] . op 'none : nil -> 'OpMappingSet [ctor] . op 'none : nil -> 'PrintOptionSet [ctor] . op 'none : nil -> 'QidSet [ctor] . op 'none : nil -> 'RuleSet [ctor] . op 'none : nil -> 'SortMappingSet [ctor] . op 'none : nil -> 'SubsortDeclSet [ctor] . op 'none : nil -> 'Substitution [ctor] . op 'nonexec : nil -> 'Attr [ctor] . op 'notFound : nil -> 'FindResult [ctor] . op 'not_ : 'Bool -> 'Bool [prec(53)] . op 'number : nil -> 'PrintOption [ctor] . op 'object : nil -> 'Attr [ctor] . op 'occurs : 'Nat 'NatList -> 'Bool [none] . op 'occurs : 'Qid 'QidList -> 'Bool [none] . op 'op-hook : 'Qid 'Qid 'QidList 'Qid -> 'Hook [ctor format('nssss 'd)] . op 'op_:_->_`[_`]. : 'Qid 'TypeList 'Type 'AttrSet -> 'OpDecl [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'op_:_->_to_. : 'Qid 'TypeList 'Type 'Qid -> 'OpMapping [ctor] . op 'op_:_->_to_`[_`] : 'Qid 'TypeList 'Type 'Qid 'AttrSet -> 'Renaming [ctor format('d 'd 'd 'd 'd 'd 'd 'd 's 'd 'd 'd)] . op 'op_to_. : 'Qid 'Qid -> 'OpMapping [ctor] . op 'op_to_`[_`] : 'Qid 'Qid 'AttrSet -> 'Renaming [ctor format('d 'd 'd 'd 's 'd 'd 'd)] . op 'op_to`term_. : 'Term 'Term -> 'OpMapping [ctor] . op 'owise : nil -> 'Attr [ctor] . op 'poly : 'NeNatList -> 'Attr [ctor] . op 'prec : 'Nat -> 'Attr [ctor] . op 'print : 'QidList -> 'Attr [ctor] . op 'protecting_. : 'ModuleExpression -> 'Import [ctor] . op 'qid : '`[String`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('QuotedIdentifierOpSymbol, 'qid) op-hook('quotedIdentifierSymbol, ', nil, 'Qid) op-hook('stringSymbol, ', nil, 'Char))] . op 'rat : nil -> 'PrintOption [ctor] . op 'reverse : 'NatList -> 'NatList [none] . op 'reverse : 'NeNatList -> 'NeNatList [none] . op 'reverse : 'NeQidList -> 'NeQidList [none] . op 'reverse : 'QidList -> 'QidList [none] . op 'rfind : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'rfind) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 'right-id : 'Term -> 'Attr [ctor] . op 'rl_=>_`[_`]. : 'Term 'Term 'AttrSet -> 'Rule [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 's_ : 'Nat -> 'NzNat [iter ctor special( id-hook('SuccSymbol, nil) term-hook('zeroTerm, '0.Zero))] . op 'sameKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSameKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sd : 'Nat 'Nat -> 'Nat [comm special( id-hook('CUI_NumberOpSymbol, 'sd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'size : 'NatList -> 'Nat [none] . op 'size : 'NeNatList -> 'NzNat [none] . op 'size : 'NeQidList -> 'NzNat [none] . op 'size : 'QidList -> 'Nat [none] . op 'sortLeq : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSortLeq) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sort_to_ : 'Qid 'Qid -> 'Renaming [ctor] . op 'sort_to_. : 'Sort 'Sort -> 'SortMapping [ctor] . op 'special : 'NeHookList -> 'Attr [ctor] . op 'strat : 'NeNatList -> 'Attr [ctor] . op 'string : 'Qid -> 'String [special( id-hook('QuotedIdentifierOpSymbol, 'string) op-hook('quotedIdentifierSymbol, ', nil, 'Qid) op-hook('stringSymbol, ', nil, 'Char))] . op 'subsort_<_. : 'Sort 'Sort -> 'SubsortDecl [ctor] . op 'substr : 'String 'Nat 'Nat -> 'String [special( id-hook('StringOpSymbol, 'substr) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'tail : 'NeNatList -> 'NatList [none] . op 'tail : 'NeQidList -> 'QidList [none] . op 'term-hook : 'Qid 'Term -> 'Hook [ctor format('nssss 'd)] . op 'th_is_sorts_._____endth : 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet -> 'STheory [ctor gather('& '& '& '& '& '& '& '&) format('d 'd 'd 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . op 'unbounded : nil -> 'Bound [ctor] . op 'union : 'NeQidSet 'QidSet -> 'NeQidSet [none] . op 'union : 'QidSet 'NeQidSet -> 'NeQidSet [none] . op 'union : 'QidSet 'QidSet -> 'QidSet [none] . op 'upEqs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[EquationSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpEqs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upImports : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ImportList`] [special( id-hook('MetaLevelOpSymbol, 'metaUpImports) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upMbs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[MembAxSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpMbs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upModule : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[Module`] [special( id-hook('MetaLevelOpSymbol, 'metaUpModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upOpDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[OpDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpOpDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upRls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[RuleSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpRls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSorts : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSubsortDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[SubsortDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSubsortDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upTerm : 'Universal -> 'Term [poly(1) special( id-hook('MetaLevelOpSymbol, 'metaUpTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upView : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[View`] [special( id-hook('MetaLevelOpSymbol, 'metaUpView) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'variant : nil -> 'Attr [ctor] . op 'view_from_to_is__endv : 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet -> 'View [ctor gather('& '& '& '& '&) format( 'd 'd 'd 'd 'd 'd 'd 'n++i 'ni 'n--i 'd)] . op 'wellFormed : 'Module -> 'Bool [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[Substitution?`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedSubstitution) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'with-parens : nil -> 'PrintOption [ctor] . op '|_| : 'NeQidSet -> 'NzNat [none] . op '|_| : 'QidSet -> 'Nat [none] . ========================================== reduce in META-LEVEL : upOpDecls('META-LEVEL, false) . rewrites: 1 result OpDeclSet: op '_/\_ : 'UnificationProblem 'UnificationProblem -> 'UnificationProblem [assoc comm ctor prec(73)] . op '_=?_ : 'Term 'Term -> 'UnificandPair [ctor prec(71)] . op '__ : 'PrintOptionSet 'PrintOptionSet -> 'PrintOptionSet [assoc comm ctor id('none.PrintOptionSet)] . op '__ : 'Trace 'Trace -> 'Trace [assoc ctor id('nil.Trace) format('d 'n 'd)] . op '`{_`,_`,_`,_`} : 'Term 'Type 'Substitution 'Context -> 'Result4Tuple [ctor] . op '`{_`,_`,_`} : 'Substitution 'Substitution 'Nat -> 'UnificationTriple [ctor] . op '`{_`,_`,_`} : 'Term 'Substitution 'Nat -> 'Variant [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Rule -> 'TraceStep [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Substitution -> 'ResultTriple [ctor] . op '`{_`,_`} : 'Substitution 'Context -> 'MatchPair [ctor] . op '`{_`,_`} : 'Substitution 'Nat -> 'UnificationPair [ctor] . op '`{_`,_`} : 'Term 'Type -> 'ResultPair [ctor] . op 'ambiguity : 'ResultPair 'ResultPair -> 'ResultPair? [ctor] . op 'anyType : nil -> 'Type? [ctor] . op 'completeName : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaCompleteName) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'downTerm : 'Term 'Universal -> 'Universal [poly(2 0) special( id-hook('MetaLevelOpSymbol, 'metaDownTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'failure : nil -> 'Result4Tuple? [ctor] . op 'failure : nil -> 'ResultPair? [ctor] . op 'failure : nil -> 'ResultTriple? [ctor] . op 'failure : nil -> 'Trace? [ctor] . op 'flat : nil -> 'PrintOption [ctor] . op 'format : nil -> 'PrintOption [ctor] . op 'getContext : 'MatchPair -> 'Context [none] . op 'getContext : 'Result4Tuple -> 'Context [none] . op 'getKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getKinds : '`[Module`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKinds) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getSubstitution : 'MatchPair -> 'Substitution [none] . op 'getSubstitution : 'Result4Tuple -> 'Substitution [none] . op 'getSubstitution : 'ResultTriple -> 'Substitution [none] . op 'getTerm : 'Result4Tuple -> 'Term [none] . op 'getTerm : 'ResultPair -> 'Term [none] . op 'getTerm : 'ResultTriple -> 'Term [none] . op 'getType : 'Result4Tuple -> 'Type [none] . op 'getType : 'ResultPair -> 'Type [none] . op 'getType : 'ResultTriple -> 'Type [none] . op 'glbSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGlbSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'leastSort : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLeastSort) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'lesserSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLesserSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'maximalAritySet : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalAritySet) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'maximalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaApply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaApply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaFrewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaFrewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetIrredundantVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetIrredundantVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaMatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] -> '`[Substitution?`] [special( id-hook('MetaLevelOpSymbol, 'metaMatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[Bool`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow2) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNormalize : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNormalize) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaParse : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [ special( id-hook('MetaLevelOpSymbol, 'metaParse) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [none] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[PrintOptionSet`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaPrettyPrint) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaReduce : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaReduce) op-hook('qidSymbol, ', nil, 'Qid) op-hook('metaTermSymbol, '_`[_`], 'Qid 'NeGroundTermList, 'GroundTerm) op-hook('metaArgSymbol, '_`,_, 'NeGroundTermList 'GroundTermList, 'NeGroundTermList) op-hook('emptyTermListSymbol, 'empty, nil, 'GroundTermList) op-hook('assignmentSymbol, '_<-_, 'Variable 'Term, 'Assignment) op-hook('emptySubstitutionSymbol, 'none, nil, 'Substitution) op-hook('substitutionSymbol, '_;_, 'Substitution 'Substitution, 'Substitution) op-hook('holeSymbol, '`[`], nil, 'Context) op-hook('headerSymbol, '_`{_`}, 'Qid 'ParameterDeclList, 'Header) op-hook('parameterDeclSymbol, '_::_, 'Sort 'ModuleExpression, 'ParameterDecl) op-hook('parameterDeclListSymbol, '_`,_, 'ParameterDeclList 'ParameterDeclList, 'ParameterDeclList) op-hook('protectingSymbol, 'protecting_., 'ModuleExpression, 'Import) op-hook('extendingSymbol, 'extending_., 'ModuleExpression, 'Import) op-hook('includingSymbol, 'including_., 'ModuleExpression, 'Import) op-hook('nilImportListSymbol, 'nil, nil, 'ImportList) op-hook('importListSymbol, '__, 'ImportList 'ImportList, 'ImportList) op-hook('emptySortSetSymbol, 'none, nil, 'QidSet) op-hook('sortSetSymbol, '_;_, 'QidSet 'QidSet, 'QidSet) op-hook('subsortSymbol, 'subsort_<_., 'Sort 'Sort, 'SubsortDecl) op-hook('emptySubsortDeclSetSymbol, 'none, nil, 'SubsortDeclSet) op-hook('subsortDeclSetSymbol, '__, 'SubsortDeclSet 'SubsortDeclSet, 'SubsortDeclSet) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) op-hook('qidListSymbol, '__, 'QidList 'QidList, 'QidList) op-hook('succSymbol, 's_, 'Nat, 'NzNat) op-hook('natListSymbol, '__, 'NatList 'NatList, 'NatList) op-hook('unboundedSymbol, 'unbounded, nil, 'Bound) op-hook('stringSymbol, ', nil, 'Char) op-hook('sortRenamingSymbol, 'sort_to_, 'Qid 'Qid, 'Renaming) op-hook('opRenamingSymbol, 'op_to_`[_`], 'Qid 'Qid 'AttrSet, 'Renaming) op-hook('opRenamingSymbol2, 'op_:_->_to_`[_`], 'Qid 'TypeList 'Type 'Qid 'AttrSet, 'Renaming) op-hook('labelRenamingSymbol, 'label_to_, 'Qid 'Qid, 'Renaming) op-hook('renamingSetSymbol, '_`,_, 'RenamingSet 'RenamingSet, 'RenamingSet) op-hook('sumSymbol, '_+_, 'ModuleExpression 'ModuleExpression, 'ModuleExpression) op-hook('renamingSymbol, '_*`(_`), 'ModuleExpression 'RenamingSet, 'ModuleExpression) op-hook('instantiationSymbol, '_`{_`}, 'ModuleExpression 'ParameterList, 'ModuleExpression) op-hook('termHookSymbol, 'term-hook, 'Qid 'Term, 'Hook) op-hook('hookListSymbol, '__, 'HookList 'HookList, 'HookList) op-hook('idHookSymbol, 'id-hook, 'Qid 'QidList, 'Hook) op-hook('opHookSymbol, 'op-hook, 'Qid 'Qid 'QidList 'Qid, 'Hook) op-hook('assocSymbol, 'assoc, nil, 'Attr) op-hook('commSymbol, 'comm, nil, 'Attr) op-hook('idemSymbol, 'idem, nil, 'Attr) op-hook('iterSymbol, 'iter, nil, 'Attr) op-hook('idSymbol, 'id, 'Term, 'Attr) op-hook('leftIdSymbol, 'left-id, 'Term, 'Attr) op-hook('rightIdSymbol, 'right-id, 'Term, 'Attr) op-hook('stratSymbol, 'strat, 'NeNatList, 'Attr) op-hook('memoSymbol, 'memo, nil, 'Attr) op-hook('precSymbol, 'prec, 'Nat, 'Attr) op-hook('gatherSymbol, 'gather, 'QidList, 'Attr) op-hook('formatSymbol, 'format, 'QidList, 'Attr) op-hook('ctorSymbol, 'ctor, nil, 'Attr) op-hook('frozenSymbol, 'frozen, 'NeNatList, 'Attr) op-hook('polySymbol, 'poly, 'NeNatList, 'Attr) op-hook('configSymbol, 'config, nil, 'Attr) op-hook('objectSymbol, 'object, nil, 'Attr) op-hook('msgSymbol, 'msg, nil, 'Attr) op-hook('specialSymbol, 'special, 'NeHookList, 'Attr) op-hook('labelSymbol, 'label, 'Qid, 'Attr) op-hook('metadataSymbol, 'metadata, 'String, 'Attr) op-hook('owiseSymbol, 'owise, nil, 'Attr) op-hook('variantAttrSymbol, 'variant, nil, 'Attr) op-hook('nonexecSymbol, 'nonexec, nil, 'Attr) op-hook('printSymbol, 'print, 'QidList, 'Attr) op-hook('emptyAttrSetSymbol, 'none, nil, 'AttrSet) op-hook('attrSetSymbol, '__, 'AttrSet 'AttrSet, 'AttrSet) op-hook('opDeclSymbol, 'op_:_->_`[_`]., 'Qid 'TypeList 'Type 'AttrSet, 'OpDecl) op-hook('opDeclSetSymbol, '__, 'OpDeclSet 'OpDeclSet, 'OpDeclSet) op-hook('emptyOpDeclSetSymbol, 'none, nil, 'OpDeclSet) op-hook('noConditionSymbol, 'nil, nil, 'EqCondition) op-hook('equalityConditionSymbol, '_=_, 'Term 'Term, 'EqCondition) op-hook('sortTestConditionSymbol, '_:_, 'Term 'Sort, 'EqCondition) op-hook('matchConditionSymbol, '_:=_, 'Term 'Term, 'EqCondition) op-hook('rewriteConditionSymbol, '_=>_, 'Term 'Term, 'Condition) op-hook('conjunctionSymbol, '_/\_, 'EqCondition 'EqCondition, 'EqCondition) op-hook('mbSymbol, 'mb_:_`[_`]., 'Term 'Sort 'AttrSet, 'MembAx) op-hook('cmbSymbol, 'cmb_:_if_`[_`]., 'Term 'Sort 'EqCondition 'AttrSet, 'MembAx) op-hook('emptyMembAxSetSymbol, 'none, nil, 'MembAxSet) op-hook('membAxSetSymbol, '__, 'MembAxSet 'MembAxSet, 'MembAxSet) op-hook('eqSymbol, 'eq_=_`[_`]., 'Term 'Term 'AttrSet, 'Equation) op-hook('ceqSymbol, 'ceq_=_if_`[_`]., 'Term 'Term 'EqCondition 'AttrSet, 'Equation) op-hook('emptyEquationSetSymbol, 'none, nil, 'EquationSet) op-hook('equationSetSymbol, '__, 'EquationSet 'EquationSet, 'EquationSet) op-hook('rlSymbol, 'rl_=>_`[_`]., 'Term 'Term 'AttrSet, 'Rule) op-hook('crlSymbol, 'crl_=>_if_`[_`]., 'Term 'Term 'Condition 'AttrSet, 'Rule) op-hook('emptyRuleSetSymbol, 'none, nil, 'RuleSet) op-hook('ruleSetSymbol, '__, 'RuleSet 'RuleSet, 'RuleSet) op-hook('fmodSymbol, 'fmod_is_sorts_.____endfm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FModule) op-hook('fthSymbol, 'fth_is_sorts_.____endfth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FTheory) op-hook('modSymbol, 'mod_is_sorts_._____endm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'SModule) op-hook('thSymbol, 'th_is_sorts_._____endth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'STheory) op-hook('sortMappingSymbol, 'sort_to_., 'Sort 'Sort, 'SortMapping) op-hook('emptySortMappingSetSymbol, 'none, nil, 'SortMappingSet) op-hook('sortMappingSetSymbol, '__, 'SortMappingSet 'SortMappingSet, 'SortMappingSet) op-hook('opMappingSymbol, 'op_to_., 'Qid 'Qid, 'OpMapping) op-hook('opSpecificMappingSymbol, 'op_:_->_to_., 'Qid 'TypeList 'Type 'Qid, 'OpMapping) op-hook('opTermMappingSymbol, 'op_to`term_., 'Term 'Term, 'OpMapping) op-hook('emptyOpMappingSetSymbol, 'none, nil, 'OpMappingSet) op-hook('opMappingSetSymbol, '__, 'OpMappingSet 'OpMappingSet, 'OpMappingSet) op-hook('viewSymbol, 'view_from_to_is__endv, 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet, 'View) op-hook('anyTypeSymbol, 'anyType, nil, 'Type?) op-hook('unificandPairSymbol, '_=?_, 'Term 'Term, 'UnificandPair) op-hook('unificationConjunctionSymbol, '_/\_, 'UnificationProblem 'UnificationProblem, 'UnificationProblem) op-hook('resultPairSymbol, '`{_`,_`}, 'Term 'Type, 'ResultPair) op-hook('resultTripleSymbol, '`{_`,_`,_`}, 'Term 'Type 'Substitution, 'ResultTriple) op-hook('result4TupleSymbol, '`{_`,_`,_`,_`}, 'Term 'Type 'Substitution 'Context, 'Result4Tuple) op-hook('matchPairSymbol, '`{_`,_`}, 'Substitution 'Context, 'MatchPair) op-hook('unificationPairSymbol, '`{_`,_`}, 'Substitution 'Nat, 'UnificationPair) op-hook('unificationTripleSymbol, '`{_`,_`,_`}, 'Substitution 'Substitution 'Nat, 'UnificationTriple) op-hook('variantSymbol, '`{_`,_`,_`}, 'Term 'Substitution 'Nat, 'Variant) op-hook('traceStepSymbol, '`{_`,_`,_`}, 'Term 'Type 'Rule, 'TraceStep) op-hook('nilTraceSymbol, 'nil, nil, 'Trace) op-hook('traceSymbol, '__, 'Trace 'Trace, 'Trace) op-hook('noParseSymbol, 'noParse, 'Nat, 'ResultPair?) op-hook('ambiguitySymbol, 'ambiguity, 'ResultPair 'ResultPair, 'ResultPair?) op-hook('failure2Symbol, 'failure, nil, 'ResultPair?) op-hook('failure3Symbol, 'failure, nil, 'ResultTriple?) op-hook('failure4Symbol, 'failure, nil, 'Result4Tuple?) op-hook('noUnifierPairSymbol, 'noUnifier, nil, 'UnificationPair?) op-hook('noUnifierTripleSymbol, 'noUnifier, nil, 'UnificationTriple?) op-hook('noVariantSymbol, 'noVariant, nil, 'Variant?) op-hook('noMatchSubstSymbol, 'noMatch, nil, 'Substitution?) op-hook('noMatchPairSymbol, 'noMatch, nil, 'MatchPair?) op-hook('failureTraceSymbol, 'failure, nil, 'Trace?) op-hook('mixfixSymbol, 'mixfix, nil, 'PrintOption) op-hook('withParensSymbol, 'with-parens, nil, 'PrintOption) op-hook('flatSymbol, 'flat, nil, 'PrintOption) op-hook('formatPrintOptionSymbol, 'format, nil, 'PrintOption) op-hook('numberSymbol, 'number, nil, 'PrintOption) op-hook('ratSymbol, 'rat, nil, 'PrintOption) op-hook('emptyPrintOptionSetSymbol, 'none, nil, 'PrintOptionSet) op-hook('printOptionSetSymbol, '__, 'PrintOptionSet 'PrintOptionSet, 'PrintOptionSet) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'metaRewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaRewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearchPath : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Trace?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearchPath) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXapply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Result4Tuple?`] [special( id-hook('MetaLevelOpSymbol, 'metaXapply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXmatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[MatchPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaXmatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'minimalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMinimalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mixfix : nil -> 'PrintOption [ctor] . op 'nil : nil -> 'Trace [ctor] . op 'noMatch : nil -> 'MatchPair? [ctor] . op 'noMatch : nil -> 'Substitution? [ctor] . op 'noParse : 'Nat -> 'ResultPair? [ctor] . op 'noUnifier : nil -> 'UnificationPair? [ctor] . op 'noUnifier : nil -> 'UnificationTriple? [ctor] . op 'noVariant : nil -> 'Variant? [ctor] . op 'none : nil -> 'PrintOptionSet [ctor] . op 'number : nil -> 'PrintOption [ctor] . op 'rat : nil -> 'PrintOption [ctor] . op 'sameKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSameKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sortLeq : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSortLeq) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'unbounded : nil -> 'Bound [ctor] . op 'upEqs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[EquationSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpEqs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upImports : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ImportList`] [special( id-hook('MetaLevelOpSymbol, 'metaUpImports) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upMbs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[MembAxSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpMbs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upModule : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[Module`] [special( id-hook('MetaLevelOpSymbol, 'metaUpModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upOpDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[OpDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpOpDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upRls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[RuleSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpRls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSorts : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSubsortDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[SubsortDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSubsortDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upTerm : 'Universal -> 'Term [poly(1) special( id-hook('MetaLevelOpSymbol, 'metaUpTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upView : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[View`] [special( id-hook('MetaLevelOpSymbol, 'metaUpView) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : 'Module -> 'Bool [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[Substitution?`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedSubstitution) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'with-parens : nil -> 'PrintOption [ctor] . ========================================== reduce in META-LEVEL : upOpDecls('IDENTICAL, true) . rewrites: 0 result [OpDeclSet]: upOpDecls('IDENTICAL, true) ========================================== reduce in META-LEVEL : upModule('META-LEVEL, true) . rewrites: 2 result FModule: fmod 'META-LEVEL is nil sorts 'Assignment ; 'Attr ; 'AttrSet ; 'Bool ; 'Bound ; 'Char ; 'Condition ; 'Constant ; 'Context ; 'EmptyCommaList ; 'EmptyTypeSet ; 'EqCondition ; 'Equation ; 'EquationSet ; 'FModule ; 'FTheory ; 'FindResult ; 'GTermList ; 'GroundTerm ; 'GroundTermList ; 'Header ; 'Hook ; 'HookList ; 'Import ; 'ImportList ; 'Kind ; 'KindSet ; 'MatchPair ; 'MatchPair? ; 'MembAx ; 'MembAxSet ; 'Module ; 'ModuleExpression ; 'Nat ; 'NatList ; 'NeCTermList ; 'NeGroundTermList ; 'NeHookList ; 'NeKindSet ; 'NeNatList ; 'NeParameterDeclList ; 'NeParameterList ; 'NeQidList ; 'NeQidSet ; 'NeSortSet ; 'NeTermList ; 'NeTypeList ; 'NeTypeSet ; 'NzNat ; 'OpDecl ; 'OpDeclSet ; 'OpMapping ; 'OpMappingSet ; 'ParameterDecl ; 'ParameterDeclList ; 'ParameterList ; 'PrintOption ; 'PrintOptionSet ; 'Qid ; 'QidList ; 'QidSet ; 'Renaming ; 'RenamingSet ; 'Result4Tuple ; 'Result4Tuple? ; 'ResultPair ; 'ResultPair? ; 'ResultTriple ; 'ResultTriple? ; 'Rule ; 'RuleSet ; 'SModule ; 'STheory ; 'Sort ; 'SortMapping ; 'SortMappingSet ; 'SortSet ; 'String ; 'SubsortDecl ; 'SubsortDeclSet ; 'Substitution ; 'Substitution? ; 'Term ; 'TermList ; 'TermQid ; 'Trace ; 'Trace? ; 'TraceStep ; 'Type ; 'Type? ; 'TypeList ; 'TypeListSet ; 'TypeSet ; 'UnificandPair ; 'UnificationPair ; 'UnificationPair? ; 'UnificationProblem ; 'UnificationTriple ; 'UnificationTriple? ; 'Variable ; 'Variant ; 'Variant? ; 'View ; 'Zero . subsort 'Assignment < 'Substitution . subsort 'Attr < 'AttrSet . subsort 'Char < 'String . subsort 'Constant < 'GroundTerm . subsort 'Constant < 'TermQid . subsort 'Context < 'NeCTermList . subsort 'EmptyCommaList < 'GroundTermList . subsort 'EmptyCommaList < 'ParameterList . subsort 'EmptyTypeSet < 'KindSet . subsort 'EmptyTypeSet < 'SortSet . subsort 'EqCondition < 'Condition . subsort 'Equation < 'EquationSet . subsort 'FModule < 'SModule . subsort 'FTheory < 'STheory . subsort 'GroundTerm < 'NeGroundTermList . subsort 'GroundTerm < 'Term . subsort 'GroundTermList < 'TermList . subsort 'Hook < 'NeHookList . subsort 'Import < 'ImportList . subsort 'Kind < 'NeKindSet . subsort 'Kind < 'Type . subsort 'KindSet < 'TypeSet . subsort 'MatchPair < 'MatchPair? . subsort 'MembAx < 'MembAxSet . subsort 'Nat < 'Bound . subsort 'Nat < 'FindResult . subsort 'Nat < 'NeNatList . subsort 'NeCTermList < 'GTermList . subsort 'NeGroundTermList < 'GroundTermList . subsort 'NeGroundTermList < 'NeTermList . subsort 'NeHookList < 'HookList . subsort 'NeKindSet < 'KindSet . subsort 'NeKindSet < 'NeTypeSet . subsort 'NeNatList < 'NatList . subsort 'NeParameterDeclList < 'ParameterDeclList . subsort 'NeParameterList < 'ParameterList . subsort 'NeQidList < 'QidList . subsort 'NeQidSet < 'QidSet . subsort 'NeSortSet < 'NeTypeSet . subsort 'NeSortSet < 'SortSet . subsort 'NeTermList < 'TermList . subsort 'NeTypeList < 'NeQidList . subsort 'NeTypeList < 'TypeList . subsort 'NeTypeSet < 'NeQidSet . subsort 'NeTypeSet < 'TypeSet . subsort 'NzNat < 'Nat . subsort 'OpDecl < 'OpDeclSet . subsort 'OpMapping < 'OpMappingSet . subsort 'ParameterDecl < 'NeParameterDeclList . subsort 'PrintOption < 'PrintOptionSet . subsort 'Qid < 'Header . subsort 'Qid < 'ModuleExpression . subsort 'Qid < 'NeQidList . subsort 'Qid < 'NeQidSet . subsort 'Renaming < 'RenamingSet . subsort 'Result4Tuple < 'Result4Tuple? . subsort 'ResultPair < 'ResultPair? . subsort 'ResultTriple < 'ResultTriple? . subsort 'Rule < 'RuleSet . subsort 'SModule < 'Module . subsort 'STheory < 'Module . subsort 'Sort < 'NeParameterList . subsort 'Sort < 'NeSortSet . subsort 'Sort < 'Type . subsort 'SortMapping < 'SortMappingSet . subsort 'SortSet < 'TypeSet . subsort 'SubsortDecl < 'SubsortDeclSet . subsort 'Substitution < 'Substitution? . subsort 'Term < 'NeTermList . subsort 'TermList < 'GTermList . subsort 'TermQid < 'Qid . subsort 'TermQid < 'Term . subsort 'Trace < 'Trace? . subsort 'TraceStep < 'Trace . subsort 'Type < 'NeTypeList . subsort 'Type < 'NeTypeSet . subsort 'Type < 'Qid . subsort 'Type < 'Type? . subsort 'TypeList < 'QidList . subsort 'TypeList < 'TypeListSet . subsort 'TypeSet < 'QidSet . subsort 'TypeSet < 'TypeListSet . subsort 'UnificandPair < 'UnificationProblem . subsort 'UnificationPair < 'UnificationPair? . subsort 'UnificationTriple < 'UnificationTriple? . subsort 'Variable < 'TermQid . subsort 'Variant < 'Variant? . subsort 'Zero < 'Nat . op '$card : 'QidSet 'Nat -> 'Nat [none] . op '$diff : 'QidSet 'QidSet 'QidSet -> 'QidSet [none] . op '$intersect : 'QidSet 'QidSet 'QidSet -> 'QidSet [none] . op '$reverse : 'NatList 'NatList -> 'NatList [none] . op '$reverse : 'QidList 'QidList -> 'QidList [none] . op '$size : 'NatList 'Nat -> 'Nat [none] . op '$size : 'QidList 'Nat -> 'Nat [none] . op '0 : nil -> 'Zero [ctor] . op ' : nil -> 'Constant [special( id-hook('QuotedIdentifierSymbol, 'constantQid))] . op ' : nil -> 'Kind [special( id-hook('QuotedIdentifierSymbol, 'kindQid))] . op ' : nil -> 'Qid [special( id-hook('QuotedIdentifierSymbol, nil))] . op ' : nil -> 'Sort [special( id-hook('QuotedIdentifierSymbol, 'sortQid))] . op ' : nil -> 'Variable [special( id-hook('QuotedIdentifierSymbol, 'variableQid))] . op ' : nil -> 'Char [special( id-hook('StringSymbol, nil))] . op ' : nil -> 'String [special( id-hook('StringSymbol, nil))] . op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special( id-hook('ACU_NumberOpSymbol, '&) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*`(_`) : 'ModuleExpression 'RenamingSet -> 'ModuleExpression [ctor prec( 39) format('d 'd 's 'n++i 'n--i 'd)] . op '_+_ : 'ModuleExpression 'ModuleExpression -> 'ModuleExpression [assoc comm ctor] . op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'String 'String -> 'String [prec(33) gather('E 'e) special( id-hook('StringOpSymbol, '+) op-hook('stringSymbol, ', nil, 'Char))] . op '_/\_ : 'Condition 'Condition -> 'Condition [assoc ctor id( 'nil.EqCondition) prec(73)] . op '_/\_ : 'EqCondition 'EqCondition -> 'EqCondition [assoc ctor id( 'nil.EqCondition) prec(73)] . op '_/\_ : 'UnificationProblem 'UnificationProblem -> 'UnificationProblem [ assoc comm ctor prec(73)] . op '_::_ : 'Sort 'ModuleExpression -> 'ParameterDecl [none] . op '_:=_ : 'Term 'Term -> 'EqCondition [ctor prec(71)] . op '_:_ : 'Term 'Sort -> 'EqCondition [ctor prec(71)] . op '_;_ : 'EmptyTypeSet 'EmptyTypeSet -> 'EmptyTypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'KindSet 'KindSet -> 'KindSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeKindSet 'KindSet -> 'NeKindSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeQidSet 'QidSet -> 'NeQidSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeSortSet 'SortSet -> 'NeSortSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeTypeSet 'TypeSet -> 'NeTypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'QidSet 'QidSet -> 'QidSet [assoc comm ctor id('none.EmptyTypeSet) prec(43)] . op '_;_ : 'SortSet 'SortSet -> 'SortSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'Substitution 'Substitution -> 'Substitution [assoc comm ctor id( 'none.Substitution) prec(65)] . op '_;_ : 'TypeListSet 'TypeListSet -> 'TypeListSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'TypeSet 'TypeSet -> 'TypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_<-_ : 'Variable 'Term -> 'Assignment [ctor prec(63) format('nt 'd 'd 'd)] . op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '<<) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op '_=>_ : 'Term 'Term -> 'Condition [ctor prec(71)] . op '_=?_ : 'Term 'Term -> 'UnificandPair [ctor prec(71)] . op '_=_ : 'Term 'Term -> 'EqCondition [ctor prec(71)] . op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '>>) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_\_ : 'QidSet 'QidSet -> 'QidSet [gather('E 'e)] . op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '__ : 'AttrSet 'AttrSet -> 'AttrSet [assoc comm ctor id('none.AttrSet)] . op '__ : 'EquationSet 'EquationSet -> 'EquationSet [assoc comm ctor id( 'none.EquationSet) format('d 'ni 'd)] . op '__ : 'HookList 'HookList -> 'HookList [assoc ctor id('nil.HookList)] . op '__ : 'HookList 'NeHookList -> 'NeHookList [assoc ctor id('nil.HookList)] . op '__ : 'ImportList 'ImportList -> 'ImportList [assoc ctor id( 'nil.ImportList) format('d 'ni 'd)] . op '__ : 'MembAxSet 'MembAxSet -> 'MembAxSet [assoc comm ctor id( 'none.MembAxSet) format('d 'ni 'd)] . op '__ : 'NatList 'NatList -> 'NatList [assoc ctor id('nil.NatList) prec(25)] . op '__ : 'NatList 'NeNatList -> 'NeNatList [assoc ctor id('nil.NatList) prec( 25)] . op '__ : 'NeHookList 'HookList -> 'NeHookList [assoc ctor id('nil.HookList)] . op '__ : 'NeNatList 'NatList -> 'NeNatList [assoc ctor id('nil.NatList) prec( 25)] . op '__ : 'NeQidList 'QidList -> 'NeQidList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'NeTypeList 'TypeList -> 'NeTypeList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'OpDeclSet 'OpDeclSet -> 'OpDeclSet [assoc comm ctor id( 'none.OpDeclSet) format('d 'ni 'd)] . op '__ : 'OpMappingSet 'OpMappingSet -> 'OpMappingSet [assoc comm ctor id( 'none.OpMappingSet) format('d 'ni 'd)] . op '__ : 'PrintOptionSet 'PrintOptionSet -> 'PrintOptionSet [assoc comm ctor id('none.PrintOptionSet)] . op '__ : 'QidList 'NeQidList -> 'NeQidList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'QidList 'QidList -> 'QidList [assoc ctor id('nil.TypeList) prec( 25)] . op '__ : 'RuleSet 'RuleSet -> 'RuleSet [assoc comm ctor id('none.RuleSet) format('d 'ni 'd)] . op '__ : 'SortMappingSet 'SortMappingSet -> 'SortMappingSet [assoc comm ctor id('none.SortMappingSet) format('d 'ni 'd)] . op '__ : 'SubsortDeclSet 'SubsortDeclSet -> 'SubsortDeclSet [assoc comm ctor id('none.SubsortDeclSet) format('d 'ni 'd)] . op '__ : 'Trace 'Trace -> 'Trace [assoc ctor id('nil.Trace) format('d 'n 'd)] . op '__ : 'TypeList 'NeTypeList -> 'NeTypeList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'TypeList 'TypeList -> 'TypeList [assoc ctor id('nil.TypeList) prec( 25)] . op '_`,_ : 'EmptyCommaList 'EmptyCommaList -> 'EmptyCommaList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GTermList 'GTermList -> 'GTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GroundTermList 'GroundTermList -> 'GroundTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GroundTermList 'NeGroundTermList -> 'NeGroundTermList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeCTermList 'TermList -> 'NeCTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeGroundTermList 'GroundTermList -> 'NeGroundTermList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeParameterDeclList 'ParameterDeclList -> 'NeParameterDeclList [ assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'NeParameterList 'ParameterList -> 'NeParameterList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeTermList 'TermList -> 'NeTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'ParameterDeclList 'NeParameterDeclList -> 'NeParameterDeclList [ assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'ParameterDeclList 'ParameterDeclList -> 'ParameterDeclList [assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'ParameterList 'NeParameterList -> 'NeParameterList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'ParameterList 'ParameterList -> 'ParameterList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'RenamingSet 'RenamingSet -> 'RenamingSet [assoc comm ctor prec( 43) format('d 'd 'ni 'd)] . op '_`,_ : 'TermList 'NeCTermList -> 'NeCTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'TermList 'NeTermList -> 'NeTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'TermList 'TermList -> 'TermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`[_`] : 'Qid 'NeCTermList -> 'Context [ctor] . op '_`[_`] : 'Qid 'NeGroundTermList -> 'GroundTerm [ctor] . op '_`[_`] : 'Qid 'NeTermList -> 'Term [ctor] . op '_`{_`} : 'ModuleExpression 'ParameterList -> 'ModuleExpression [ctor prec(37)] . op '_`{_`} : 'Qid 'ParameterDeclList -> 'Header [ctor] . op '_and-then_ : 'Bool 'Bool -> 'Bool [strat(1 0) prec(55) gather('e 'E)] . op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] . op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special( id-hook('NumberOpSymbol, 'divides) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] . op '_in_ : 'Qid 'QidSet -> 'Bool [none] . op '_or-else_ : 'Bool 'Bool -> 'Bool [strat(1 0) prec(59) gather('e 'E)] . op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] . op '_psubset_ : 'QidSet 'QidSet -> 'Bool [none] . op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'quo) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'rem) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_subset_ : 'QidSet 'QidSet -> 'Bool [none] . op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] . op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special( id-hook('ACU_NumberOpSymbol, 'xor) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '`[_`] : 'Qid -> 'Module [none] . op '`[`] : nil -> 'Context [ctor] . op '`{_`,_`,_`,_`} : 'Term 'Type 'Substitution 'Context -> 'Result4Tuple [ ctor] . op '`{_`,_`,_`} : 'Substitution 'Substitution 'Nat -> 'UnificationTriple [ ctor] . op '`{_`,_`,_`} : 'Term 'Substitution 'Nat -> 'Variant [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Rule -> 'TraceStep [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Substitution -> 'ResultTriple [ctor] . op '`{_`,_`} : 'Substitution 'Context -> 'MatchPair [ctor] . op '`{_`,_`} : 'Substitution 'Nat -> 'UnificationPair [ctor] . op '`{_`,_`} : 'Term 'Type -> 'ResultPair [ctor] . op 'ambiguity : 'ResultPair 'ResultPair -> 'ResultPair? [ctor] . op 'anyType : nil -> 'Type? [ctor] . op 'append : 'NatList 'NatList -> 'NatList [none] . op 'append : 'NatList 'NeNatList -> 'NeNatList [none] . op 'append : 'NeNatList 'NatList -> 'NeNatList [none] . op 'append : 'NeQidList 'QidList -> 'NeQidList [none] . op 'append : 'QidList 'NeQidList -> 'NeQidList [none] . op 'append : 'QidList 'QidList -> 'QidList [none] . op 'ascii : 'Char -> 'Nat [special( id-hook('StringOpSymbol, 'ascii) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'assoc : nil -> 'Attr [ctor] . op 'ceq_=_if_`[_`]. : 'Term 'Term 'EqCondition 'AttrSet -> 'Equation [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'char : '`[FindResult`,NatList`,Bound`] -> '`[String`] [special( id-hook('StringOpSymbol, 'char) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'cmb_:_if_`[_`]. : 'Term 'Sort 'EqCondition 'AttrSet -> 'MembAx [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'comm : nil -> 'Attr [ctor] . op 'completeName : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaCompleteName) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'config : nil -> 'Attr [ctor] . op 'crl_=>_if_`[_`]. : 'Term 'Term 'Condition 'AttrSet -> 'Rule [ctor format( 'd 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'ctor : nil -> 'Attr [ctor] . op 'delete : 'Qid 'QidSet -> 'QidSet [none] . op 'downTerm : 'Term 'Universal -> 'Universal [poly(2 0) special( id-hook('MetaLevelOpSymbol, 'metaDownTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'empty : nil -> 'EmptyCommaList [ctor] . op 'empty : nil -> 'GroundTermList [ctor] . op 'eq_=_`[_`]. : 'Term 'Term 'AttrSet -> 'Equation [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 'extending_. : 'ModuleExpression -> 'Import [ctor] . op 'failure : nil -> 'Result4Tuple? [ctor] . op 'failure : nil -> 'ResultPair? [ctor] . op 'failure : nil -> 'ResultTriple? [ctor] . op 'failure : nil -> 'Trace? [ctor] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'find : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'find) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 'flat : nil -> 'PrintOption [ctor] . op 'fmod_is_sorts_.____endfm : 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet -> 'FModule [ctor gather('& '& '& '& '& '& '&) format('d 'd 's 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'format : 'QidList -> 'Attr [ctor] . op 'format : nil -> 'PrintOption [ctor] . op 'front : 'NeNatList -> 'NatList [none] . op 'front : 'NeQidList -> 'QidList [none] . op 'frozen : 'NeNatList -> 'Attr [ctor] . op 'fth_is_sorts_.____endfth : 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet -> 'FTheory [ctor gather('& '& '& '& '& '& '&) format('d 'd 'd 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'gather : 'QidList -> 'Attr [ctor] . op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'getContext : 'MatchPair -> 'Context [none] . op 'getContext : 'Result4Tuple -> 'Context [none] . op 'getEqs : 'Module -> 'EquationSet [none] . op 'getFrom : 'View -> 'ModuleExpression [none] . op 'getImports : 'Module -> 'ImportList [none] . op 'getKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getKinds : '`[Module`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKinds) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getMbs : 'Module -> 'MembAxSet [none] . op 'getName : 'Constant -> 'Qid [none] . op 'getName : 'Module -> 'Qid [none] . op 'getName : 'Variable -> 'Qid [none] . op 'getName : 'View -> 'Qid [none] . op 'getOpMappings : 'View -> 'OpMappingSet [none] . op 'getOps : 'Module -> 'OpDeclSet [none] . op 'getRls : 'Module -> 'RuleSet [none] . op 'getSortMappings : 'View -> 'SortMappingSet [none] . op 'getSorts : 'Module -> 'SortSet [none] . op 'getSubsorts : 'Module -> 'SubsortDeclSet [none] . op 'getSubstitution : 'MatchPair -> 'Substitution [none] . op 'getSubstitution : 'Result4Tuple -> 'Substitution [none] . op 'getSubstitution : 'ResultTriple -> 'Substitution [none] . op 'getTerm : 'Result4Tuple -> 'Term [none] . op 'getTerm : 'ResultPair -> 'Term [none] . op 'getTerm : 'ResultTriple -> 'Term [none] . op 'getTo : 'View -> 'ModuleExpression [none] . op 'getType : 'Constant -> 'Type [none] . op 'getType : 'Result4Tuple -> 'Type [none] . op 'getType : 'ResultPair -> 'Type [none] . op 'getType : 'ResultTriple -> 'Type [none] . op 'getType : 'Variable -> 'Type [none] . op 'glbSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [ special( id-hook('MetaLevelOpSymbol, 'metaGlbSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'head : 'NeNatList -> 'Nat [none] . op 'head : 'NeQidList -> 'Qid [none] . op 'id : 'Term -> 'Attr [ctor] . op 'id-hook : 'Qid 'QidList -> 'Hook [ctor format('nssss 'd)] . op 'idem : nil -> 'Attr [ctor] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'including_. : 'ModuleExpression -> 'Import [ctor] . op 'insert : 'Qid 'QidSet -> 'QidSet [none] . op 'intersection : 'QidSet 'QidSet -> 'QidSet [none] . op 'iter : nil -> 'Attr [ctor] . op 'label : 'Qid -> 'Attr [ctor] . op 'label_to_ : 'Qid 'Qid -> 'Renaming [ctor] . op 'last : 'NeNatList -> 'Nat [none] . op 'last : 'NeQidList -> 'Qid [none] . op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'leastSort : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLeastSort) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'left-id : 'Term -> 'Attr [ctor] . op 'length : 'String -> 'Nat [special( id-hook('StringOpSymbol, 'length) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lesserSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLesserSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'max : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'maximalAritySet : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalAritySet) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'maximalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mb_:_`[_`]. : 'Term 'Sort 'AttrSet -> 'MembAx [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 'memo : nil -> 'Attr [ctor] . op 'metaApply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaApply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaFrewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaFrewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetIrredundantVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetIrredundantVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaMatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] -> '`[Substitution?`] [special( id-hook('MetaLevelOpSymbol, 'metaMatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[Bool`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow2) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNormalize : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNormalize) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaParse : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [ special( id-hook('MetaLevelOpSymbol, 'metaParse) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [none] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[PrintOptionSet`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaPrettyPrint) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaReduce : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaReduce) op-hook('qidSymbol, ', nil, 'Qid) op-hook('metaTermSymbol, '_`[_`], 'Qid 'NeGroundTermList, 'GroundTerm) op-hook('metaArgSymbol, '_`,_, 'NeGroundTermList 'GroundTermList, 'NeGroundTermList) op-hook('emptyTermListSymbol, 'empty, nil, 'GroundTermList) op-hook('assignmentSymbol, '_<-_, 'Variable 'Term, 'Assignment) op-hook('emptySubstitutionSymbol, 'none, nil, 'Substitution) op-hook('substitutionSymbol, '_;_, 'Substitution 'Substitution, 'Substitution) op-hook('holeSymbol, '`[`], nil, 'Context) op-hook('headerSymbol, '_`{_`}, 'Qid 'ParameterDeclList, 'Header) op-hook('parameterDeclSymbol, '_::_, 'Sort 'ModuleExpression, 'ParameterDecl) op-hook('parameterDeclListSymbol, '_`,_, 'ParameterDeclList 'ParameterDeclList, 'ParameterDeclList) op-hook('protectingSymbol, 'protecting_., 'ModuleExpression, 'Import) op-hook('extendingSymbol, 'extending_., 'ModuleExpression, 'Import) op-hook('includingSymbol, 'including_., 'ModuleExpression, 'Import) op-hook('nilImportListSymbol, 'nil, nil, 'ImportList) op-hook('importListSymbol, '__, 'ImportList 'ImportList, 'ImportList) op-hook('emptySortSetSymbol, 'none, nil, 'QidSet) op-hook('sortSetSymbol, '_;_, 'QidSet 'QidSet, 'QidSet) op-hook('subsortSymbol, 'subsort_<_., 'Sort 'Sort, 'SubsortDecl) op-hook('emptySubsortDeclSetSymbol, 'none, nil, 'SubsortDeclSet) op-hook('subsortDeclSetSymbol, '__, 'SubsortDeclSet 'SubsortDeclSet, 'SubsortDeclSet) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) op-hook('qidListSymbol, '__, 'QidList 'QidList, 'QidList) op-hook('succSymbol, 's_, 'Nat, 'NzNat) op-hook('natListSymbol, '__, 'NatList 'NatList, 'NatList) op-hook('unboundedSymbol, 'unbounded, nil, 'Bound) op-hook('stringSymbol, ', nil, 'Char) op-hook('sortRenamingSymbol, 'sort_to_, 'Qid 'Qid, 'Renaming) op-hook('opRenamingSymbol, 'op_to_`[_`], 'Qid 'Qid 'AttrSet, 'Renaming) op-hook('opRenamingSymbol2, 'op_:_->_to_`[_`], 'Qid 'TypeList 'Type 'Qid 'AttrSet, 'Renaming) op-hook('labelRenamingSymbol, 'label_to_, 'Qid 'Qid, 'Renaming) op-hook('renamingSetSymbol, '_`,_, 'RenamingSet 'RenamingSet, 'RenamingSet) op-hook('sumSymbol, '_+_, 'ModuleExpression 'ModuleExpression, 'ModuleExpression) op-hook('renamingSymbol, '_*`(_`), 'ModuleExpression 'RenamingSet, 'ModuleExpression) op-hook('instantiationSymbol, '_`{_`}, 'ModuleExpression 'ParameterList, 'ModuleExpression) op-hook('termHookSymbol, 'term-hook, 'Qid 'Term, 'Hook) op-hook('hookListSymbol, '__, 'HookList 'HookList, 'HookList) op-hook('idHookSymbol, 'id-hook, 'Qid 'QidList, 'Hook) op-hook('opHookSymbol, 'op-hook, 'Qid 'Qid 'QidList 'Qid, 'Hook) op-hook('assocSymbol, 'assoc, nil, 'Attr) op-hook('commSymbol, 'comm, nil, 'Attr) op-hook('idemSymbol, 'idem, nil, 'Attr) op-hook('iterSymbol, 'iter, nil, 'Attr) op-hook('idSymbol, 'id, 'Term, 'Attr) op-hook('leftIdSymbol, 'left-id, 'Term, 'Attr) op-hook('rightIdSymbol, 'right-id, 'Term, 'Attr) op-hook('stratSymbol, 'strat, 'NeNatList, 'Attr) op-hook('memoSymbol, 'memo, nil, 'Attr) op-hook('precSymbol, 'prec, 'Nat, 'Attr) op-hook('gatherSymbol, 'gather, 'QidList, 'Attr) op-hook('formatSymbol, 'format, 'QidList, 'Attr) op-hook('ctorSymbol, 'ctor, nil, 'Attr) op-hook('frozenSymbol, 'frozen, 'NeNatList, 'Attr) op-hook('polySymbol, 'poly, 'NeNatList, 'Attr) op-hook('configSymbol, 'config, nil, 'Attr) op-hook('objectSymbol, 'object, nil, 'Attr) op-hook('msgSymbol, 'msg, nil, 'Attr) op-hook('specialSymbol, 'special, 'NeHookList, 'Attr) op-hook('labelSymbol, 'label, 'Qid, 'Attr) op-hook('metadataSymbol, 'metadata, 'String, 'Attr) op-hook('owiseSymbol, 'owise, nil, 'Attr) op-hook('variantAttrSymbol, 'variant, nil, 'Attr) op-hook('nonexecSymbol, 'nonexec, nil, 'Attr) op-hook('printSymbol, 'print, 'QidList, 'Attr) op-hook('emptyAttrSetSymbol, 'none, nil, 'AttrSet) op-hook('attrSetSymbol, '__, 'AttrSet 'AttrSet, 'AttrSet) op-hook('opDeclSymbol, 'op_:_->_`[_`]., 'Qid 'TypeList 'Type 'AttrSet, 'OpDecl) op-hook('opDeclSetSymbol, '__, 'OpDeclSet 'OpDeclSet, 'OpDeclSet) op-hook('emptyOpDeclSetSymbol, 'none, nil, 'OpDeclSet) op-hook('noConditionSymbol, 'nil, nil, 'EqCondition) op-hook('equalityConditionSymbol, '_=_, 'Term 'Term, 'EqCondition) op-hook('sortTestConditionSymbol, '_:_, 'Term 'Sort, 'EqCondition) op-hook('matchConditionSymbol, '_:=_, 'Term 'Term, 'EqCondition) op-hook('rewriteConditionSymbol, '_=>_, 'Term 'Term, 'Condition) op-hook('conjunctionSymbol, '_/\_, 'EqCondition 'EqCondition, 'EqCondition) op-hook('mbSymbol, 'mb_:_`[_`]., 'Term 'Sort 'AttrSet, 'MembAx) op-hook('cmbSymbol, 'cmb_:_if_`[_`]., 'Term 'Sort 'EqCondition 'AttrSet, 'MembAx) op-hook('emptyMembAxSetSymbol, 'none, nil, 'MembAxSet) op-hook('membAxSetSymbol, '__, 'MembAxSet 'MembAxSet, 'MembAxSet) op-hook('eqSymbol, 'eq_=_`[_`]., 'Term 'Term 'AttrSet, 'Equation) op-hook('ceqSymbol, 'ceq_=_if_`[_`]., 'Term 'Term 'EqCondition 'AttrSet, 'Equation) op-hook('emptyEquationSetSymbol, 'none, nil, 'EquationSet) op-hook('equationSetSymbol, '__, 'EquationSet 'EquationSet, 'EquationSet) op-hook('rlSymbol, 'rl_=>_`[_`]., 'Term 'Term 'AttrSet, 'Rule) op-hook('crlSymbol, 'crl_=>_if_`[_`]., 'Term 'Term 'Condition 'AttrSet, 'Rule) op-hook('emptyRuleSetSymbol, 'none, nil, 'RuleSet) op-hook('ruleSetSymbol, '__, 'RuleSet 'RuleSet, 'RuleSet) op-hook('fmodSymbol, 'fmod_is_sorts_.____endfm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FModule) op-hook('fthSymbol, 'fth_is_sorts_.____endfth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FTheory) op-hook('modSymbol, 'mod_is_sorts_._____endm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'SModule) op-hook('thSymbol, 'th_is_sorts_._____endth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'STheory) op-hook('sortMappingSymbol, 'sort_to_., 'Sort 'Sort, 'SortMapping) op-hook('emptySortMappingSetSymbol, 'none, nil, 'SortMappingSet) op-hook('sortMappingSetSymbol, '__, 'SortMappingSet 'SortMappingSet, 'SortMappingSet) op-hook('opMappingSymbol, 'op_to_., 'Qid 'Qid, 'OpMapping) op-hook('opSpecificMappingSymbol, 'op_:_->_to_., 'Qid 'TypeList 'Type 'Qid, 'OpMapping) op-hook('opTermMappingSymbol, 'op_to`term_., 'Term 'Term, 'OpMapping) op-hook('emptyOpMappingSetSymbol, 'none, nil, 'OpMappingSet) op-hook('opMappingSetSymbol, '__, 'OpMappingSet 'OpMappingSet, 'OpMappingSet) op-hook('viewSymbol, 'view_from_to_is__endv, 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet, 'View) op-hook('anyTypeSymbol, 'anyType, nil, 'Type?) op-hook('unificandPairSymbol, '_=?_, 'Term 'Term, 'UnificandPair) op-hook('unificationConjunctionSymbol, '_/\_, 'UnificationProblem 'UnificationProblem, 'UnificationProblem) op-hook('resultPairSymbol, '`{_`,_`}, 'Term 'Type, 'ResultPair) op-hook('resultTripleSymbol, '`{_`,_`,_`}, 'Term 'Type 'Substitution, 'ResultTriple) op-hook('result4TupleSymbol, '`{_`,_`,_`,_`}, 'Term 'Type 'Substitution 'Context, 'Result4Tuple) op-hook('matchPairSymbol, '`{_`,_`}, 'Substitution 'Context, 'MatchPair) op-hook('unificationPairSymbol, '`{_`,_`}, 'Substitution 'Nat, 'UnificationPair) op-hook('unificationTripleSymbol, '`{_`,_`,_`}, 'Substitution 'Substitution 'Nat, 'UnificationTriple) op-hook('variantSymbol, '`{_`,_`,_`}, 'Term 'Substitution 'Nat, 'Variant) op-hook('traceStepSymbol, '`{_`,_`,_`}, 'Term 'Type 'Rule, 'TraceStep) op-hook('nilTraceSymbol, 'nil, nil, 'Trace) op-hook('traceSymbol, '__, 'Trace 'Trace, 'Trace) op-hook('noParseSymbol, 'noParse, 'Nat, 'ResultPair?) op-hook('ambiguitySymbol, 'ambiguity, 'ResultPair 'ResultPair, 'ResultPair?) op-hook('failure2Symbol, 'failure, nil, 'ResultPair?) op-hook('failure3Symbol, 'failure, nil, 'ResultTriple?) op-hook('failure4Symbol, 'failure, nil, 'Result4Tuple?) op-hook('noUnifierPairSymbol, 'noUnifier, nil, 'UnificationPair?) op-hook('noUnifierTripleSymbol, 'noUnifier, nil, 'UnificationTriple?) op-hook('noVariantSymbol, 'noVariant, nil, 'Variant?) op-hook('noMatchSubstSymbol, 'noMatch, nil, 'Substitution?) op-hook('noMatchPairSymbol, 'noMatch, nil, 'MatchPair?) op-hook('failureTraceSymbol, 'failure, nil, 'Trace?) op-hook('mixfixSymbol, 'mixfix, nil, 'PrintOption) op-hook('withParensSymbol, 'with-parens, nil, 'PrintOption) op-hook('flatSymbol, 'flat, nil, 'PrintOption) op-hook('formatPrintOptionSymbol, 'format, nil, 'PrintOption) op-hook('numberSymbol, 'number, nil, 'PrintOption) op-hook('ratSymbol, 'rat, nil, 'PrintOption) op-hook('emptyPrintOptionSetSymbol, 'none, nil, 'PrintOptionSet) op-hook('printOptionSetSymbol, '__, 'PrintOptionSet 'PrintOptionSet, 'PrintOptionSet) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'metaRewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaRewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearchPath : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Trace?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearchPath) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXapply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Result4Tuple?`] [special( id-hook('MetaLevelOpSymbol, 'metaXapply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXmatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[MatchPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaXmatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metadata : 'String -> 'Attr [ctor] . op 'min : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'minimalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMinimalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mixfix : nil -> 'PrintOption [ctor] . op 'modExp : '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[FindResult`,NatList`,Bound`] [ special( id-hook('NumberOpSymbol, 'modExp) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'mod_is_sorts_._____endm : 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet -> 'SModule [ctor gather('& '& '& '& '& '& '& '&) format('d 'd 's 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'msg : nil -> 'Attr [ctor] . op 'nil : nil -> 'EqCondition [ctor] . op 'nil : nil -> 'HookList [ctor] . op 'nil : nil -> 'ImportList [ctor] . op 'nil : nil -> 'NatList [ctor] . op 'nil : nil -> 'ParameterDeclList [ctor] . op 'nil : nil -> 'QidList [ctor] . op 'nil : nil -> 'Trace [ctor] . op 'nil : nil -> 'TypeList [ctor] . op 'noMatch : nil -> 'MatchPair? [ctor] . op 'noMatch : nil -> 'Substitution? [ctor] . op 'noParse : 'Nat -> 'ResultPair? [ctor] . op 'noUnifier : nil -> 'UnificationPair? [ctor] . op 'noUnifier : nil -> 'UnificationTriple? [ctor] . op 'noVariant : nil -> 'Variant? [ctor] . op 'none : nil -> 'AttrSet [ctor] . op 'none : nil -> 'EmptyTypeSet [ctor] . op 'none : nil -> 'EquationSet [ctor] . op 'none : nil -> 'MembAxSet [ctor] . op 'none : nil -> 'OpDeclSet [ctor] . op 'none : nil -> 'OpMappingSet [ctor] . op 'none : nil -> 'PrintOptionSet [ctor] . op 'none : nil -> 'QidSet [ctor] . op 'none : nil -> 'RuleSet [ctor] . op 'none : nil -> 'SortMappingSet [ctor] . op 'none : nil -> 'SubsortDeclSet [ctor] . op 'none : nil -> 'Substitution [ctor] . op 'nonexec : nil -> 'Attr [ctor] . op 'notFound : nil -> 'FindResult [ctor] . op 'not_ : 'Bool -> 'Bool [prec(53)] . op 'number : nil -> 'PrintOption [ctor] . op 'object : nil -> 'Attr [ctor] . op 'occurs : 'Nat 'NatList -> 'Bool [none] . op 'occurs : 'Qid 'QidList -> 'Bool [none] . op 'op-hook : 'Qid 'Qid 'QidList 'Qid -> 'Hook [ctor format('nssss 'd)] . op 'op_:_->_`[_`]. : 'Qid 'TypeList 'Type 'AttrSet -> 'OpDecl [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'op_:_->_to_. : 'Qid 'TypeList 'Type 'Qid -> 'OpMapping [ctor] . op 'op_:_->_to_`[_`] : 'Qid 'TypeList 'Type 'Qid 'AttrSet -> 'Renaming [ctor format('d 'd 'd 'd 'd 'd 'd 'd 's 'd 'd 'd)] . op 'op_to_. : 'Qid 'Qid -> 'OpMapping [ctor] . op 'op_to_`[_`] : 'Qid 'Qid 'AttrSet -> 'Renaming [ctor format('d 'd 'd 'd 's 'd 'd 'd)] . op 'op_to`term_. : 'Term 'Term -> 'OpMapping [ctor] . op 'owise : nil -> 'Attr [ctor] . op 'poly : 'NeNatList -> 'Attr [ctor] . op 'prec : 'Nat -> 'Attr [ctor] . op 'print : 'QidList -> 'Attr [ctor] . op 'protecting_. : 'ModuleExpression -> 'Import [ctor] . op 'qid : '`[String`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('QuotedIdentifierOpSymbol, 'qid) op-hook('quotedIdentifierSymbol, ', nil, 'Qid) op-hook('stringSymbol, ', nil, 'Char))] . op 'rat : nil -> 'PrintOption [ctor] . op 'reverse : 'NatList -> 'NatList [none] . op 'reverse : 'NeNatList -> 'NeNatList [none] . op 'reverse : 'NeQidList -> 'NeQidList [none] . op 'reverse : 'QidList -> 'QidList [none] . op 'rfind : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'rfind) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 'right-id : 'Term -> 'Attr [ctor] . op 'rl_=>_`[_`]. : 'Term 'Term 'AttrSet -> 'Rule [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 's_ : 'Nat -> 'NzNat [iter ctor special( id-hook('SuccSymbol, nil) term-hook('zeroTerm, '0.Zero))] . op 'sameKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSameKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sd : 'Nat 'Nat -> 'Nat [comm special( id-hook('CUI_NumberOpSymbol, 'sd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'size : 'NatList -> 'Nat [none] . op 'size : 'NeNatList -> 'NzNat [none] . op 'size : 'NeQidList -> 'NzNat [none] . op 'size : 'QidList -> 'Nat [none] . op 'sortLeq : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSortLeq) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sort_to_ : 'Qid 'Qid -> 'Renaming [ctor] . op 'sort_to_. : 'Sort 'Sort -> 'SortMapping [ctor] . op 'special : 'NeHookList -> 'Attr [ctor] . op 'strat : 'NeNatList -> 'Attr [ctor] . op 'string : 'Qid -> 'String [special( id-hook('QuotedIdentifierOpSymbol, 'string) op-hook('quotedIdentifierSymbol, ', nil, 'Qid) op-hook('stringSymbol, ', nil, 'Char))] . op 'subsort_<_. : 'Sort 'Sort -> 'SubsortDecl [ctor] . op 'substr : 'String 'Nat 'Nat -> 'String [special( id-hook('StringOpSymbol, 'substr) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'tail : 'NeNatList -> 'NatList [none] . op 'tail : 'NeQidList -> 'QidList [none] . op 'term-hook : 'Qid 'Term -> 'Hook [ctor format('nssss 'd)] . op 'th_is_sorts_._____endth : 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet -> 'STheory [ctor gather('& '& '& '& '& '& '& '&) format('d 'd 'd 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . op 'unbounded : nil -> 'Bound [ctor] . op 'union : 'NeQidSet 'QidSet -> 'NeQidSet [none] . op 'union : 'QidSet 'NeQidSet -> 'NeQidSet [none] . op 'union : 'QidSet 'QidSet -> 'QidSet [none] . op 'upEqs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[EquationSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpEqs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upImports : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ImportList`] [special( id-hook('MetaLevelOpSymbol, 'metaUpImports) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upMbs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[MembAxSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpMbs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upModule : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[Module`] [special( id-hook('MetaLevelOpSymbol, 'metaUpModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upOpDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[OpDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpOpDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upRls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[RuleSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpRls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSorts : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSubsortDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[SubsortDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSubsortDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upTerm : 'Universal -> 'Term [poly(1) special( id-hook('MetaLevelOpSymbol, 'metaUpTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upView : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[View`] [special( id-hook('MetaLevelOpSymbol, 'metaUpView) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'variant : nil -> 'Attr [ctor] . op 'view_from_to_is__endv : 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet -> 'View [ctor gather('& '& '& '& '&) format( 'd 'd 'd 'd 'd 'd 'd 'n++i 'ni 'n--i 'd)] . op 'wellFormed : 'Module -> 'Bool [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[Substitution?`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedSubstitution) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'with-parens : nil -> 'PrintOption [ctor] . op '|_| : 'NeQidSet -> 'NzNat [none] . op '|_| : 'QidSet -> 'Nat [none] . none eq '$card['none.EmptyTypeSet,'C:Nat] = 'C:Nat [none] . eq '$card['_;_['E:Qid,'S:QidSet],'C:Nat] = '$card['S:QidSet,'_+_['C:Nat,'s_[ '0.Zero]]] [owise] . eq '$card['_;_['N:NeQidSet,'N:NeQidSet,'S:QidSet],'C:Nat] = '$card['_;_[ 'N:NeQidSet,'S:QidSet],'C:Nat] [none] . eq '$diff['none.EmptyTypeSet,'S':QidSet,'A:QidSet] = 'A:QidSet [none] . eq '$diff['_;_['E:Qid,'S:QidSet],'S':QidSet,'A:QidSet] = '$diff['S:QidSet, 'S':QidSet,'if_then_else_fi['_in_['E:Qid,'S':QidSet],'A:QidSet,'_;_['E:Qid, 'A:QidSet]]] [none] . eq '$intersect['none.EmptyTypeSet,'S':QidSet,'A:QidSet] = 'A:QidSet [none] . eq '$intersect['_;_['E:Qid,'S:QidSet],'S':QidSet,'A:QidSet] = '$intersect[ 'S:QidSet,'S':QidSet,'if_then_else_fi['_in_['E:Qid,'S':QidSet],'_;_['E:Qid, 'A:QidSet],'A:QidSet]] [none] . eq '$reverse['nil.NatList,'A:NatList] = 'A:NatList [none] . eq '$reverse['nil.TypeList,'A:QidList] = 'A:QidList [none] . eq '$reverse['__['E:Nat,'L:NatList],'A:NatList] = '$reverse['L:NatList,'__[ 'E:Nat,'A:NatList]] [none] . eq '$reverse['__['E:Qid,'L:QidList],'A:QidList] = '$reverse['L:QidList,'__[ 'E:Qid,'A:QidList]] [none] . eq '$size['nil.NatList,'C:Nat] = 'C:Nat [none] . eq '$size['nil.TypeList,'C:Nat] = 'C:Nat [none] . eq '$size['__['E:Nat,'L:NatList],'C:Nat] = '$size['L:NatList,'_+_['C:Nat,'s_[ '0.Zero]]] [none] . eq '$size['__['E:Qid,'L:QidList],'C:Nat] = '$size['L:QidList,'_+_['C:Nat,'s_[ '0.Zero]]] [none] . eq '_;_['A:Assignment,'A:Assignment] = 'A:Assignment [none] . eq '_;_['N:NeQidSet,'N:NeQidSet] = 'N:NeQidSet [none] . eq '_;_['T:TypeList,'T:TypeList] = 'T:TypeList [none] . eq '_\_['S:QidSet,'N:NeQidSet] = '$diff['S:QidSet,'N:NeQidSet, 'none.EmptyTypeSet] [none] . eq '_\_['S:QidSet,'none.EmptyTypeSet] = 'S:QidSet [none] . eq '__['A:Attr,'A:Attr] = 'A:Attr [none] . eq '__['E:Equation,'E:Equation] = 'E:Equation [none] . eq '__['M:MembAx,'M:MembAx] = 'M:MembAx [none] . eq '__['O:OpDecl,'O:OpDecl] = 'O:OpDecl [none] . eq '__['O:OpMapping,'O:OpMapping] = 'O:OpMapping [none] . eq '__['R:Rule,'R:Rule] = 'R:Rule [none] . eq '__['S:SortMapping,'S:SortMapping] = 'S:SortMapping [none] . eq '__['S:SubsortDecl,'S:SubsortDecl] = 'S:SubsortDecl [none] . eq '_and-then_['false.Bool,'B:`[Bool`]] = 'false.Bool [none] . eq '_and-then_['true.Bool,'B:`[Bool`]] = 'B:`[Bool`] [none] . eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool, 'B:Bool]]] [none] . eq '_in_['E:Qid,'S:QidSet] = 'false.Bool [owise] . eq '_in_['E:Qid,'_;_['E:Qid,'S:QidSet]] = 'true.Bool [none] . eq '_or-else_['false.Bool,'B:`[Bool`]] = 'B:`[Bool`] [none] . eq '_or-else_['true.Bool,'B:`[Bool`]] = 'true.Bool [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_psubset_['S:QidSet,'S':QidSet] = '_and-then_['_=/=_['S:QidSet, 'S':QidSet],'_subset_['S:QidSet,'S':QidSet]] [none] . eq '_subset_['none.EmptyTypeSet,'S':QidSet] = 'true.Bool [none] . eq '_subset_['_;_['E:Qid,'S:QidSet],'S':QidSet] = '_and-then_['_in_['E:Qid, 'S':QidSet],'_subset_['S:QidSet,'S':QidSet]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq '`[_`]['Q:Qid] = 'th_is_sorts_._____endth['Q:Qid,'including_.['Q:Qid], 'none.EmptyTypeSet,'none.SubsortDeclSet,'none.OpDeclSet,'none.MembAxSet, 'none.EquationSet,'none.RuleSet] [none] . eq 'append['A:NatList,'L:NatList] = '__['A:NatList,'L:NatList] [none] . eq 'append['A:QidList,'L:QidList] = '__['A:QidList,'L:QidList] [none] . eq 'delete['E:Qid,'S:QidSet] = 'S:QidSet [owise] . eq 'delete['E:Qid,'_;_['E:Qid,'S:QidSet]] = 'delete['E:Qid,'S:QidSet] [none] . eq 'front['__['L:NatList,'E:Nat]] = 'L:NatList [none] . eq 'front['__['L:QidList,'E:Qid]] = 'L:QidList [none] . eq 'getContext['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getContext['`{_`,_`}['S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getEqs['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'EQS:EquationSet [none] . eq 'getEqs['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'EQS:EquationSet [none] . eq 'getEqs['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'EQS:EquationSet [none] . eq 'getEqs['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'EQS:EquationSet [none] . eq 'getFrom['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'ME:ModuleExpression [none] . eq 'getImports['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList, 'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet, 'EQS:EquationSet]] = 'IL:ImportList [none] . eq 'getImports['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'IL:ImportList [none] . eq 'getImports['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'IL:ImportList [none] . eq 'getImports['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'IL:ImportList [none] . eq 'getMbs['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'MAS:MembAxSet [none] . eq 'getName['C:Constant] = 'qid['substr['string['C:Constant],'0.Zero,'rfind[ 'string['C:Constant],'".".Char,'length['string['C:Constant]]]]] [none] . eq 'getName['V:Variable] = 'qid['substr['string['V:Variable],'0.Zero,'rfind[ 'string['V:Variable],'":".Char,'length['string['V:Variable]]]]] [none] . eq 'getName['fmod_is_sorts_.____endfm['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['fmod_is_sorts_.____endfm['_`{_`}['Q:Qid,'PDL:ParameterDeclList], 'IL:ImportList,'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet, 'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['mod_is_sorts_._____endm['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['mod_is_sorts_._____endm['_`{_`}['Q:Qid,'PDL:ParameterDeclList], 'IL:ImportList,'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet, 'MAS:MembAxSet,'EQS:EquationSet,'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'Q:Qid [ none] . eq 'getOpMappings['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'OMS:OpMappingSet [none] . eq 'getOps['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'OPDS:OpDeclSet [none] . eq 'getRls['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'none.RuleSet [none] . eq 'getRls['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'none.RuleSet [none] . eq 'getRls['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'RLS:RuleSet [none] . eq 'getRls['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'RLS:RuleSet [none] . eq 'getSortMappings['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'SMS:SortMappingSet [none] . eq 'getSorts['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SS:SortSet [none] . eq 'getSorts['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SS:SortSet [none] . eq 'getSorts['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SS:SortSet [none] . eq 'getSorts['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SS:SortSet [none] . eq 'getSubsorts['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList, 'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet, 'EQS:EquationSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['mod_is_sorts_._____endm['H:Header,'IL:ImportList, 'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet, 'EQS:EquationSet,'RLS:RuleSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubstitution['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution, 'C:Context]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`}['S:Substitution,'C:Context]] = 'S:Substitution [none] . eq 'getTerm['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Term [none] . eq 'getTerm['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Term [none] . eq 'getTerm['`{_`,_`}['T:Term,'T:Type]] = 'T:Term [none] . eq 'getTo['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'ME':ModuleExpression [none] . eq 'getType['C:Constant] = 'qid['substr['string['C:Constant],'_+_['s_[ '0.Zero],'rfind['string['C:Constant],'".".Char,'length['string[ 'C:Constant]]]],'length['string['C:Constant]]]] [none] . eq 'getType['V:Variable] = 'qid['substr['string['V:Variable],'_+_['s_[ '0.Zero],'rfind['string['V:Variable],'":".Char,'length['string[ 'V:Variable]]]],'length['string['V:Variable]]]] [none] . eq 'getType['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Type [none] . eq 'getType['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Type [none] . eq 'getType['`{_`,_`}['T:Term,'T:Type]] = 'T:Type [none] . eq 'head['__['E:Nat,'L:NatList]] = 'E:Nat [none] . eq 'head['__['E:Qid,'L:QidList]] = 'E:Qid [none] . eq 'insert['E:Qid,'S:QidSet] = '_;_['E:Qid,'S:QidSet] [none] . eq 'intersection['S:QidSet,'N:NeQidSet] = '$intersect['S:QidSet,'N:NeQidSet, 'none.EmptyTypeSet] [none] . eq 'intersection['S:QidSet,'none.EmptyTypeSet] = 'none.EmptyTypeSet [none] . eq 'last['__['L:NatList,'E:Nat]] = 'E:Nat [none] . eq 'last['__['L:QidList,'E:Qid]] = 'E:Qid [none] . eq 'metaPrettyPrint['M:Module,'T:Term] = 'metaPrettyPrint['M:Module,'T:Term, '__['mixfix.PrintOption,'__['flat.PrintOption,'__['format.PrintOption,'__[ 'number.PrintOption,'rat.PrintOption]]]]] [none] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . eq 'occurs['E:Nat,'nil.NatList] = 'false.Bool [none] . eq 'occurs['E:Nat,'__['E':Nat,'L:NatList]] = 'if_then_else_fi['_==_['E:Nat, 'E':Nat],'true.Bool,'occurs['E:Nat,'L:NatList]] [none] . eq 'occurs['E:Qid,'nil.TypeList] = 'false.Bool [none] . eq 'occurs['E:Qid,'__['E':Qid,'L:QidList]] = 'if_then_else_fi['_==_['E:Qid, 'E':Qid],'true.Bool,'occurs['E:Qid,'L:QidList]] [none] . eq 'reverse['L:NatList] = '$reverse['L:NatList,'nil.NatList] [none] . eq 'reverse['L:QidList] = '$reverse['L:QidList,'nil.TypeList] [none] . eq 'size['L:NatList] = '$size['L:NatList,'0.Zero] [none] . eq 'size['L:QidList] = '$size['L:QidList,'0.Zero] [none] . eq 'tail['__['E:Nat,'L:NatList]] = 'L:NatList [none] . eq 'tail['__['E:Qid,'L:QidList]] = 'L:QidList [none] . eq 'union['S:QidSet,'S':QidSet] = '_;_['S:QidSet,'S':QidSet] [none] . eq '|_|['S:QidSet] = '$card['S:QidSet,'0.Zero] [none] . endfm ========================================== reduce in META-LEVEL : upModule('META-LEVEL, false) . rewrites: 1 result FModule: fmod 'META-LEVEL is protecting 'META-VIEW . sorts 'Bound ; 'MatchPair ; 'MatchPair? ; 'PrintOption ; 'PrintOptionSet ; 'Result4Tuple ; 'Result4Tuple? ; 'ResultPair ; 'ResultPair? ; 'ResultTriple ; 'ResultTriple? ; 'Substitution? ; 'Trace ; 'Trace? ; 'TraceStep ; 'Type? ; 'UnificandPair ; 'UnificationPair ; 'UnificationPair? ; 'UnificationProblem ; 'UnificationTriple ; 'UnificationTriple? ; 'Variant ; 'Variant? . subsort 'MatchPair < 'MatchPair? . subsort 'Nat < 'Bound . subsort 'PrintOption < 'PrintOptionSet . subsort 'Result4Tuple < 'Result4Tuple? . subsort 'ResultPair < 'ResultPair? . subsort 'ResultTriple < 'ResultTriple? . subsort 'Substitution < 'Substitution? . subsort 'Trace < 'Trace? . subsort 'TraceStep < 'Trace . subsort 'Type < 'Type? . subsort 'UnificandPair < 'UnificationProblem . subsort 'UnificationPair < 'UnificationPair? . subsort 'UnificationTriple < 'UnificationTriple? . subsort 'Variant < 'Variant? . op '_/\_ : 'UnificationProblem 'UnificationProblem -> 'UnificationProblem [ assoc comm ctor prec(73)] . op '_=?_ : 'Term 'Term -> 'UnificandPair [ctor prec(71)] . op '__ : 'PrintOptionSet 'PrintOptionSet -> 'PrintOptionSet [assoc comm ctor id('none.PrintOptionSet)] . op '__ : 'Trace 'Trace -> 'Trace [assoc ctor id('nil.Trace) format('d 'n 'd)] . op '`{_`,_`,_`,_`} : 'Term 'Type 'Substitution 'Context -> 'Result4Tuple [ ctor] . op '`{_`,_`,_`} : 'Substitution 'Substitution 'Nat -> 'UnificationTriple [ ctor] . op '`{_`,_`,_`} : 'Term 'Substitution 'Nat -> 'Variant [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Rule -> 'TraceStep [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Substitution -> 'ResultTriple [ctor] . op '`{_`,_`} : 'Substitution 'Context -> 'MatchPair [ctor] . op '`{_`,_`} : 'Substitution 'Nat -> 'UnificationPair [ctor] . op '`{_`,_`} : 'Term 'Type -> 'ResultPair [ctor] . op 'ambiguity : 'ResultPair 'ResultPair -> 'ResultPair? [ctor] . op 'anyType : nil -> 'Type? [ctor] . op 'completeName : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaCompleteName) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'downTerm : 'Term 'Universal -> 'Universal [poly(2 0) special( id-hook('MetaLevelOpSymbol, 'metaDownTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'failure : nil -> 'Result4Tuple? [ctor] . op 'failure : nil -> 'ResultPair? [ctor] . op 'failure : nil -> 'ResultTriple? [ctor] . op 'failure : nil -> 'Trace? [ctor] . op 'flat : nil -> 'PrintOption [ctor] . op 'format : nil -> 'PrintOption [ctor] . op 'getContext : 'MatchPair -> 'Context [none] . op 'getContext : 'Result4Tuple -> 'Context [none] . op 'getKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getKinds : '`[Module`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKinds) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getSubstitution : 'MatchPair -> 'Substitution [none] . op 'getSubstitution : 'Result4Tuple -> 'Substitution [none] . op 'getSubstitution : 'ResultTriple -> 'Substitution [none] . op 'getTerm : 'Result4Tuple -> 'Term [none] . op 'getTerm : 'ResultPair -> 'Term [none] . op 'getTerm : 'ResultTriple -> 'Term [none] . op 'getType : 'Result4Tuple -> 'Type [none] . op 'getType : 'ResultPair -> 'Type [none] . op 'getType : 'ResultTriple -> 'Type [none] . op 'glbSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [ special( id-hook('MetaLevelOpSymbol, 'metaGlbSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'leastSort : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLeastSort) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'lesserSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLesserSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'maximalAritySet : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalAritySet) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'maximalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaApply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaApply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaFrewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaFrewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetIrredundantVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetIrredundantVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaMatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] -> '`[Substitution?`] [special( id-hook('MetaLevelOpSymbol, 'metaMatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[Bool`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow2) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNormalize : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNormalize) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaParse : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [ special( id-hook('MetaLevelOpSymbol, 'metaParse) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [none] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[PrintOptionSet`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaPrettyPrint) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaReduce : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaReduce) op-hook('qidSymbol, ', nil, 'Qid) op-hook('metaTermSymbol, '_`[_`], 'Qid 'NeGroundTermList, 'GroundTerm) op-hook('metaArgSymbol, '_`,_, 'NeGroundTermList 'GroundTermList, 'NeGroundTermList) op-hook('emptyTermListSymbol, 'empty, nil, 'GroundTermList) op-hook('assignmentSymbol, '_<-_, 'Variable 'Term, 'Assignment) op-hook('emptySubstitutionSymbol, 'none, nil, 'Substitution) op-hook('substitutionSymbol, '_;_, 'Substitution 'Substitution, 'Substitution) op-hook('holeSymbol, '`[`], nil, 'Context) op-hook('headerSymbol, '_`{_`}, 'Qid 'ParameterDeclList, 'Header) op-hook('parameterDeclSymbol, '_::_, 'Sort 'ModuleExpression, 'ParameterDecl) op-hook('parameterDeclListSymbol, '_`,_, 'ParameterDeclList 'ParameterDeclList, 'ParameterDeclList) op-hook('protectingSymbol, 'protecting_., 'ModuleExpression, 'Import) op-hook('extendingSymbol, 'extending_., 'ModuleExpression, 'Import) op-hook('includingSymbol, 'including_., 'ModuleExpression, 'Import) op-hook('nilImportListSymbol, 'nil, nil, 'ImportList) op-hook('importListSymbol, '__, 'ImportList 'ImportList, 'ImportList) op-hook('emptySortSetSymbol, 'none, nil, 'QidSet) op-hook('sortSetSymbol, '_;_, 'QidSet 'QidSet, 'QidSet) op-hook('subsortSymbol, 'subsort_<_., 'Sort 'Sort, 'SubsortDecl) op-hook('emptySubsortDeclSetSymbol, 'none, nil, 'SubsortDeclSet) op-hook('subsortDeclSetSymbol, '__, 'SubsortDeclSet 'SubsortDeclSet, 'SubsortDeclSet) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) op-hook('qidListSymbol, '__, 'QidList 'QidList, 'QidList) op-hook('succSymbol, 's_, 'Nat, 'NzNat) op-hook('natListSymbol, '__, 'NatList 'NatList, 'NatList) op-hook('unboundedSymbol, 'unbounded, nil, 'Bound) op-hook('stringSymbol, ', nil, 'Char) op-hook('sortRenamingSymbol, 'sort_to_, 'Qid 'Qid, 'Renaming) op-hook('opRenamingSymbol, 'op_to_`[_`], 'Qid 'Qid 'AttrSet, 'Renaming) op-hook('opRenamingSymbol2, 'op_:_->_to_`[_`], 'Qid 'TypeList 'Type 'Qid 'AttrSet, 'Renaming) op-hook('labelRenamingSymbol, 'label_to_, 'Qid 'Qid, 'Renaming) op-hook('renamingSetSymbol, '_`,_, 'RenamingSet 'RenamingSet, 'RenamingSet) op-hook('sumSymbol, '_+_, 'ModuleExpression 'ModuleExpression, 'ModuleExpression) op-hook('renamingSymbol, '_*`(_`), 'ModuleExpression 'RenamingSet, 'ModuleExpression) op-hook('instantiationSymbol, '_`{_`}, 'ModuleExpression 'ParameterList, 'ModuleExpression) op-hook('termHookSymbol, 'term-hook, 'Qid 'Term, 'Hook) op-hook('hookListSymbol, '__, 'HookList 'HookList, 'HookList) op-hook('idHookSymbol, 'id-hook, 'Qid 'QidList, 'Hook) op-hook('opHookSymbol, 'op-hook, 'Qid 'Qid 'QidList 'Qid, 'Hook) op-hook('assocSymbol, 'assoc, nil, 'Attr) op-hook('commSymbol, 'comm, nil, 'Attr) op-hook('idemSymbol, 'idem, nil, 'Attr) op-hook('iterSymbol, 'iter, nil, 'Attr) op-hook('idSymbol, 'id, 'Term, 'Attr) op-hook('leftIdSymbol, 'left-id, 'Term, 'Attr) op-hook('rightIdSymbol, 'right-id, 'Term, 'Attr) op-hook('stratSymbol, 'strat, 'NeNatList, 'Attr) op-hook('memoSymbol, 'memo, nil, 'Attr) op-hook('precSymbol, 'prec, 'Nat, 'Attr) op-hook('gatherSymbol, 'gather, 'QidList, 'Attr) op-hook('formatSymbol, 'format, 'QidList, 'Attr) op-hook('ctorSymbol, 'ctor, nil, 'Attr) op-hook('frozenSymbol, 'frozen, 'NeNatList, 'Attr) op-hook('polySymbol, 'poly, 'NeNatList, 'Attr) op-hook('configSymbol, 'config, nil, 'Attr) op-hook('objectSymbol, 'object, nil, 'Attr) op-hook('msgSymbol, 'msg, nil, 'Attr) op-hook('specialSymbol, 'special, 'NeHookList, 'Attr) op-hook('labelSymbol, 'label, 'Qid, 'Attr) op-hook('metadataSymbol, 'metadata, 'String, 'Attr) op-hook('owiseSymbol, 'owise, nil, 'Attr) op-hook('variantAttrSymbol, 'variant, nil, 'Attr) op-hook('nonexecSymbol, 'nonexec, nil, 'Attr) op-hook('printSymbol, 'print, 'QidList, 'Attr) op-hook('emptyAttrSetSymbol, 'none, nil, 'AttrSet) op-hook('attrSetSymbol, '__, 'AttrSet 'AttrSet, 'AttrSet) op-hook('opDeclSymbol, 'op_:_->_`[_`]., 'Qid 'TypeList 'Type 'AttrSet, 'OpDecl) op-hook('opDeclSetSymbol, '__, 'OpDeclSet 'OpDeclSet, 'OpDeclSet) op-hook('emptyOpDeclSetSymbol, 'none, nil, 'OpDeclSet) op-hook('noConditionSymbol, 'nil, nil, 'EqCondition) op-hook('equalityConditionSymbol, '_=_, 'Term 'Term, 'EqCondition) op-hook('sortTestConditionSymbol, '_:_, 'Term 'Sort, 'EqCondition) op-hook('matchConditionSymbol, '_:=_, 'Term 'Term, 'EqCondition) op-hook('rewriteConditionSymbol, '_=>_, 'Term 'Term, 'Condition) op-hook('conjunctionSymbol, '_/\_, 'EqCondition 'EqCondition, 'EqCondition) op-hook('mbSymbol, 'mb_:_`[_`]., 'Term 'Sort 'AttrSet, 'MembAx) op-hook('cmbSymbol, 'cmb_:_if_`[_`]., 'Term 'Sort 'EqCondition 'AttrSet, 'MembAx) op-hook('emptyMembAxSetSymbol, 'none, nil, 'MembAxSet) op-hook('membAxSetSymbol, '__, 'MembAxSet 'MembAxSet, 'MembAxSet) op-hook('eqSymbol, 'eq_=_`[_`]., 'Term 'Term 'AttrSet, 'Equation) op-hook('ceqSymbol, 'ceq_=_if_`[_`]., 'Term 'Term 'EqCondition 'AttrSet, 'Equation) op-hook('emptyEquationSetSymbol, 'none, nil, 'EquationSet) op-hook('equationSetSymbol, '__, 'EquationSet 'EquationSet, 'EquationSet) op-hook('rlSymbol, 'rl_=>_`[_`]., 'Term 'Term 'AttrSet, 'Rule) op-hook('crlSymbol, 'crl_=>_if_`[_`]., 'Term 'Term 'Condition 'AttrSet, 'Rule) op-hook('emptyRuleSetSymbol, 'none, nil, 'RuleSet) op-hook('ruleSetSymbol, '__, 'RuleSet 'RuleSet, 'RuleSet) op-hook('fmodSymbol, 'fmod_is_sorts_.____endfm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FModule) op-hook('fthSymbol, 'fth_is_sorts_.____endfth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FTheory) op-hook('modSymbol, 'mod_is_sorts_._____endm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'SModule) op-hook('thSymbol, 'th_is_sorts_._____endth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'STheory) op-hook('sortMappingSymbol, 'sort_to_., 'Sort 'Sort, 'SortMapping) op-hook('emptySortMappingSetSymbol, 'none, nil, 'SortMappingSet) op-hook('sortMappingSetSymbol, '__, 'SortMappingSet 'SortMappingSet, 'SortMappingSet) op-hook('opMappingSymbol, 'op_to_., 'Qid 'Qid, 'OpMapping) op-hook('opSpecificMappingSymbol, 'op_:_->_to_., 'Qid 'TypeList 'Type 'Qid, 'OpMapping) op-hook('opTermMappingSymbol, 'op_to`term_., 'Term 'Term, 'OpMapping) op-hook('emptyOpMappingSetSymbol, 'none, nil, 'OpMappingSet) op-hook('opMappingSetSymbol, '__, 'OpMappingSet 'OpMappingSet, 'OpMappingSet) op-hook('viewSymbol, 'view_from_to_is__endv, 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet, 'View) op-hook('anyTypeSymbol, 'anyType, nil, 'Type?) op-hook('unificandPairSymbol, '_=?_, 'Term 'Term, 'UnificandPair) op-hook('unificationConjunctionSymbol, '_/\_, 'UnificationProblem 'UnificationProblem, 'UnificationProblem) op-hook('resultPairSymbol, '`{_`,_`}, 'Term 'Type, 'ResultPair) op-hook('resultTripleSymbol, '`{_`,_`,_`}, 'Term 'Type 'Substitution, 'ResultTriple) op-hook('result4TupleSymbol, '`{_`,_`,_`,_`}, 'Term 'Type 'Substitution 'Context, 'Result4Tuple) op-hook('matchPairSymbol, '`{_`,_`}, 'Substitution 'Context, 'MatchPair) op-hook('unificationPairSymbol, '`{_`,_`}, 'Substitution 'Nat, 'UnificationPair) op-hook('unificationTripleSymbol, '`{_`,_`,_`}, 'Substitution 'Substitution 'Nat, 'UnificationTriple) op-hook('variantSymbol, '`{_`,_`,_`}, 'Term 'Substitution 'Nat, 'Variant) op-hook('traceStepSymbol, '`{_`,_`,_`}, 'Term 'Type 'Rule, 'TraceStep) op-hook('nilTraceSymbol, 'nil, nil, 'Trace) op-hook('traceSymbol, '__, 'Trace 'Trace, 'Trace) op-hook('noParseSymbol, 'noParse, 'Nat, 'ResultPair?) op-hook('ambiguitySymbol, 'ambiguity, 'ResultPair 'ResultPair, 'ResultPair?) op-hook('failure2Symbol, 'failure, nil, 'ResultPair?) op-hook('failure3Symbol, 'failure, nil, 'ResultTriple?) op-hook('failure4Symbol, 'failure, nil, 'Result4Tuple?) op-hook('noUnifierPairSymbol, 'noUnifier, nil, 'UnificationPair?) op-hook('noUnifierTripleSymbol, 'noUnifier, nil, 'UnificationTriple?) op-hook('noVariantSymbol, 'noVariant, nil, 'Variant?) op-hook('noMatchSubstSymbol, 'noMatch, nil, 'Substitution?) op-hook('noMatchPairSymbol, 'noMatch, nil, 'MatchPair?) op-hook('failureTraceSymbol, 'failure, nil, 'Trace?) op-hook('mixfixSymbol, 'mixfix, nil, 'PrintOption) op-hook('withParensSymbol, 'with-parens, nil, 'PrintOption) op-hook('flatSymbol, 'flat, nil, 'PrintOption) op-hook('formatPrintOptionSymbol, 'format, nil, 'PrintOption) op-hook('numberSymbol, 'number, nil, 'PrintOption) op-hook('ratSymbol, 'rat, nil, 'PrintOption) op-hook('emptyPrintOptionSetSymbol, 'none, nil, 'PrintOptionSet) op-hook('printOptionSetSymbol, '__, 'PrintOptionSet 'PrintOptionSet, 'PrintOptionSet) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'metaRewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaRewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearchPath : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Trace?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearchPath) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXapply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Result4Tuple?`] [special( id-hook('MetaLevelOpSymbol, 'metaXapply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXmatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[MatchPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaXmatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'minimalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMinimalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mixfix : nil -> 'PrintOption [ctor] . op 'nil : nil -> 'Trace [ctor] . op 'noMatch : nil -> 'MatchPair? [ctor] . op 'noMatch : nil -> 'Substitution? [ctor] . op 'noParse : 'Nat -> 'ResultPair? [ctor] . op 'noUnifier : nil -> 'UnificationPair? [ctor] . op 'noUnifier : nil -> 'UnificationTriple? [ctor] . op 'noVariant : nil -> 'Variant? [ctor] . op 'none : nil -> 'PrintOptionSet [ctor] . op 'number : nil -> 'PrintOption [ctor] . op 'rat : nil -> 'PrintOption [ctor] . op 'sameKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSameKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sortLeq : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSortLeq) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'unbounded : nil -> 'Bound [ctor] . op 'upEqs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[EquationSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpEqs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upImports : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ImportList`] [special( id-hook('MetaLevelOpSymbol, 'metaUpImports) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upMbs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[MembAxSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpMbs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upModule : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[Module`] [special( id-hook('MetaLevelOpSymbol, 'metaUpModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upOpDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[OpDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpOpDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upRls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[RuleSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpRls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSorts : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSubsortDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[SubsortDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSubsortDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upTerm : 'Universal -> 'Term [poly(1) special( id-hook('MetaLevelOpSymbol, 'metaUpTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upView : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[View`] [special( id-hook('MetaLevelOpSymbol, 'metaUpView) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : 'Module -> 'Bool [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[Substitution?`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedSubstitution) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'with-parens : nil -> 'PrintOption [ctor] . none eq 'getContext['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getContext['`{_`,_`}['S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getSubstitution['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution, 'C:Context]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`}['S:Substitution,'C:Context]] = 'S:Substitution [none] . eq 'getTerm['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Term [none] . eq 'getTerm['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Term [none] . eq 'getTerm['`{_`,_`}['T:Term,'T:Type]] = 'T:Term [none] . eq 'getType['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Type [none] . eq 'getType['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Type [none] . eq 'getType['`{_`,_`}['T:Term,'T:Type]] = 'T:Type [none] . eq 'metaPrettyPrint['M:Module,'T:Term] = 'metaPrettyPrint['M:Module,'T:Term, '__['mixfix.PrintOption,'__['flat.PrintOption,'__['format.PrintOption,'__[ 'number.PrintOption,'rat.PrintOption]]]]] [none] . endfm ========================================== reduce in META-LEVEL : upModule('BOOL, true) . rewrites: 1 result FModule: fmod 'BOOL is nil sorts 'Bool . none op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] . op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] . op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] . op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'not_ : 'Bool -> 'Bool [prec(53)] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . none eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool, 'B:Bool]]] [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . endfm ========================================== reduce in META-LEVEL : metaReduce(upModule('BOOL, true), '_==_['true.Bool, 'false.Bool]) . rewrites: 3 result ResultPair: {'false.Bool,'Bool} ========================================== reduce in META-LEVEL : upModule('BOOL, false) . rewrites: 1 result FModule: fmod 'BOOL is protecting 'BOOL-OPS . protecting 'TRUTH . sorts none . none none none none endfm ========================================== reduce in META-LEVEL : metaReduce(upModule('BOOL, false), '_==_['true.Bool, 'false.Bool]) . rewrites: 3 result ResultPair: {'false.Bool,'Bool} ========================================== reduce in META-LEVEL : upModule('TRUTH, true) . rewrites: 1 result FModule: fmod 'TRUTH is nil sorts 'Bool . none op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . none none endfm ========================================== reduce in META-LEVEL : upModule('NAT, true) . rewrites: 1 result FModule: fmod 'NAT is nil sorts 'Bool ; 'Nat ; 'NzNat ; 'Zero . subsort 'NzNat < 'Nat . subsort 'Zero < 'Nat . op '0 : nil -> 'Zero [ctor] . op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special( id-hook('ACU_NumberOpSymbol, '&) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '<<) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '>>) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] . op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special( id-hook('NumberOpSymbol, 'divides) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] . op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] . op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'quo) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'rem) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] . op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special( id-hook('ACU_NumberOpSymbol, 'xor) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'modExp : '`[Nat`] '`[Nat`] '`[Nat`] -> '`[Nat`] [special( id-hook('NumberOpSymbol, 'modExp) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'not_ : 'Bool -> 'Bool [prec(53)] . op 's_ : 'Nat -> 'NzNat [iter ctor special( id-hook('SuccSymbol, nil) term-hook('zeroTerm, '0.Zero))] . op 'sd : 'Nat 'Nat -> 'Nat [comm special( id-hook('CUI_NumberOpSymbol, 'sd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . none eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool, 'B:Bool]]] [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . endfm ========================================== reduce in META-LEVEL : metaReduce(upModule('NAT, true), '_+_[upTerm(100), upTerm(66)]) . rewrites: 5 result ResultPair: {'s_^166['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : upModule('NAT, false) . rewrites: 1 result FModule: fmod 'NAT is protecting 'BOOL . sorts 'Nat ; 'NzNat ; 'Zero . subsort 'NzNat < 'Nat . subsort 'Zero < 'Nat . op '0 : nil -> 'Zero [ctor] . op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special( id-hook('ACU_NumberOpSymbol, '&) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '<<) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '>>) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special( id-hook('NumberOpSymbol, 'divides) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'quo) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'rem) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special( id-hook('ACU_NumberOpSymbol, 'xor) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'modExp : '`[Nat`] '`[Nat`] '`[Nat`] -> '`[Nat`] [special( id-hook('NumberOpSymbol, 'modExp) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 's_ : 'Nat -> 'NzNat [iter ctor special( id-hook('SuccSymbol, nil) term-hook('zeroTerm, '0.Zero))] . op 'sd : 'Nat 'Nat -> 'Nat [comm special( id-hook('CUI_NumberOpSymbol, 'sd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . none none endfm ========================================== reduce in META-LEVEL : metaReduce(upModule('NAT, false), '_+_[upTerm(100), upTerm(66)]) . rewrites: 5 result ResultPair: {'s_^166['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(upModule('NAT, true), 'modExp[upTerm(100), upTerm(66),upTerm(17)]) . rewrites: 6 result ResultPair: {'s_^4['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : upModule('META-LEVEL, true) . rewrites: 2 result FModule: fmod 'META-LEVEL is nil sorts 'Assignment ; 'Attr ; 'AttrSet ; 'Bool ; 'Bound ; 'Char ; 'Condition ; 'Constant ; 'Context ; 'EmptyCommaList ; 'EmptyTypeSet ; 'EqCondition ; 'Equation ; 'EquationSet ; 'FModule ; 'FTheory ; 'FindResult ; 'GTermList ; 'GroundTerm ; 'GroundTermList ; 'Header ; 'Hook ; 'HookList ; 'Import ; 'ImportList ; 'Kind ; 'KindSet ; 'MatchPair ; 'MatchPair? ; 'MembAx ; 'MembAxSet ; 'Module ; 'ModuleExpression ; 'Nat ; 'NatList ; 'NeCTermList ; 'NeGroundTermList ; 'NeHookList ; 'NeKindSet ; 'NeNatList ; 'NeParameterDeclList ; 'NeParameterList ; 'NeQidList ; 'NeQidSet ; 'NeSortSet ; 'NeTermList ; 'NeTypeList ; 'NeTypeSet ; 'NzNat ; 'OpDecl ; 'OpDeclSet ; 'OpMapping ; 'OpMappingSet ; 'ParameterDecl ; 'ParameterDeclList ; 'ParameterList ; 'PrintOption ; 'PrintOptionSet ; 'Qid ; 'QidList ; 'QidSet ; 'Renaming ; 'RenamingSet ; 'Result4Tuple ; 'Result4Tuple? ; 'ResultPair ; 'ResultPair? ; 'ResultTriple ; 'ResultTriple? ; 'Rule ; 'RuleSet ; 'SModule ; 'STheory ; 'Sort ; 'SortMapping ; 'SortMappingSet ; 'SortSet ; 'String ; 'SubsortDecl ; 'SubsortDeclSet ; 'Substitution ; 'Substitution? ; 'Term ; 'TermList ; 'TermQid ; 'Trace ; 'Trace? ; 'TraceStep ; 'Type ; 'Type? ; 'TypeList ; 'TypeListSet ; 'TypeSet ; 'UnificandPair ; 'UnificationPair ; 'UnificationPair? ; 'UnificationProblem ; 'UnificationTriple ; 'UnificationTriple? ; 'Variable ; 'Variant ; 'Variant? ; 'View ; 'Zero . subsort 'Assignment < 'Substitution . subsort 'Attr < 'AttrSet . subsort 'Char < 'String . subsort 'Constant < 'GroundTerm . subsort 'Constant < 'TermQid . subsort 'Context < 'NeCTermList . subsort 'EmptyCommaList < 'GroundTermList . subsort 'EmptyCommaList < 'ParameterList . subsort 'EmptyTypeSet < 'KindSet . subsort 'EmptyTypeSet < 'SortSet . subsort 'EqCondition < 'Condition . subsort 'Equation < 'EquationSet . subsort 'FModule < 'SModule . subsort 'FTheory < 'STheory . subsort 'GroundTerm < 'NeGroundTermList . subsort 'GroundTerm < 'Term . subsort 'GroundTermList < 'TermList . subsort 'Hook < 'NeHookList . subsort 'Import < 'ImportList . subsort 'Kind < 'NeKindSet . subsort 'Kind < 'Type . subsort 'KindSet < 'TypeSet . subsort 'MatchPair < 'MatchPair? . subsort 'MembAx < 'MembAxSet . subsort 'Nat < 'Bound . subsort 'Nat < 'FindResult . subsort 'Nat < 'NeNatList . subsort 'NeCTermList < 'GTermList . subsort 'NeGroundTermList < 'GroundTermList . subsort 'NeGroundTermList < 'NeTermList . subsort 'NeHookList < 'HookList . subsort 'NeKindSet < 'KindSet . subsort 'NeKindSet < 'NeTypeSet . subsort 'NeNatList < 'NatList . subsort 'NeParameterDeclList < 'ParameterDeclList . subsort 'NeParameterList < 'ParameterList . subsort 'NeQidList < 'QidList . subsort 'NeQidSet < 'QidSet . subsort 'NeSortSet < 'NeTypeSet . subsort 'NeSortSet < 'SortSet . subsort 'NeTermList < 'TermList . subsort 'NeTypeList < 'NeQidList . subsort 'NeTypeList < 'TypeList . subsort 'NeTypeSet < 'NeQidSet . subsort 'NeTypeSet < 'TypeSet . subsort 'NzNat < 'Nat . subsort 'OpDecl < 'OpDeclSet . subsort 'OpMapping < 'OpMappingSet . subsort 'ParameterDecl < 'NeParameterDeclList . subsort 'PrintOption < 'PrintOptionSet . subsort 'Qid < 'Header . subsort 'Qid < 'ModuleExpression . subsort 'Qid < 'NeQidList . subsort 'Qid < 'NeQidSet . subsort 'Renaming < 'RenamingSet . subsort 'Result4Tuple < 'Result4Tuple? . subsort 'ResultPair < 'ResultPair? . subsort 'ResultTriple < 'ResultTriple? . subsort 'Rule < 'RuleSet . subsort 'SModule < 'Module . subsort 'STheory < 'Module . subsort 'Sort < 'NeParameterList . subsort 'Sort < 'NeSortSet . subsort 'Sort < 'Type . subsort 'SortMapping < 'SortMappingSet . subsort 'SortSet < 'TypeSet . subsort 'SubsortDecl < 'SubsortDeclSet . subsort 'Substitution < 'Substitution? . subsort 'Term < 'NeTermList . subsort 'TermList < 'GTermList . subsort 'TermQid < 'Qid . subsort 'TermQid < 'Term . subsort 'Trace < 'Trace? . subsort 'TraceStep < 'Trace . subsort 'Type < 'NeTypeList . subsort 'Type < 'NeTypeSet . subsort 'Type < 'Qid . subsort 'Type < 'Type? . subsort 'TypeList < 'QidList . subsort 'TypeList < 'TypeListSet . subsort 'TypeSet < 'QidSet . subsort 'TypeSet < 'TypeListSet . subsort 'UnificandPair < 'UnificationProblem . subsort 'UnificationPair < 'UnificationPair? . subsort 'UnificationTriple < 'UnificationTriple? . subsort 'Variable < 'TermQid . subsort 'Variant < 'Variant? . subsort 'Zero < 'Nat . op '$card : 'QidSet 'Nat -> 'Nat [none] . op '$diff : 'QidSet 'QidSet 'QidSet -> 'QidSet [none] . op '$intersect : 'QidSet 'QidSet 'QidSet -> 'QidSet [none] . op '$reverse : 'NatList 'NatList -> 'NatList [none] . op '$reverse : 'QidList 'QidList -> 'QidList [none] . op '$size : 'NatList 'Nat -> 'Nat [none] . op '$size : 'QidList 'Nat -> 'Nat [none] . op '0 : nil -> 'Zero [ctor] . op ' : nil -> 'Constant [special( id-hook('QuotedIdentifierSymbol, 'constantQid))] . op ' : nil -> 'Kind [special( id-hook('QuotedIdentifierSymbol, 'kindQid))] . op ' : nil -> 'Qid [special( id-hook('QuotedIdentifierSymbol, nil))] . op ' : nil -> 'Sort [special( id-hook('QuotedIdentifierSymbol, 'sortQid))] . op ' : nil -> 'Variable [special( id-hook('QuotedIdentifierSymbol, 'variableQid))] . op ' : nil -> 'Char [special( id-hook('StringSymbol, nil))] . op ' : nil -> 'String [special( id-hook('StringSymbol, nil))] . op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special( id-hook('ACU_NumberOpSymbol, '&) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*`(_`) : 'ModuleExpression 'RenamingSet -> 'ModuleExpression [ctor prec( 39) format('d 'd 's 'n++i 'n--i 'd)] . op '_+_ : 'ModuleExpression 'ModuleExpression -> 'ModuleExpression [assoc comm ctor] . op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'String 'String -> 'String [prec(33) gather('E 'e) special( id-hook('StringOpSymbol, '+) op-hook('stringSymbol, ', nil, 'Char))] . op '_/\_ : 'Condition 'Condition -> 'Condition [assoc ctor id( 'nil.EqCondition) prec(73)] . op '_/\_ : 'EqCondition 'EqCondition -> 'EqCondition [assoc ctor id( 'nil.EqCondition) prec(73)] . op '_/\_ : 'UnificationProblem 'UnificationProblem -> 'UnificationProblem [ assoc comm ctor prec(73)] . op '_::_ : 'Sort 'ModuleExpression -> 'ParameterDecl [none] . op '_:=_ : 'Term 'Term -> 'EqCondition [ctor prec(71)] . op '_:_ : 'Term 'Sort -> 'EqCondition [ctor prec(71)] . op '_;_ : 'EmptyTypeSet 'EmptyTypeSet -> 'EmptyTypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'KindSet 'KindSet -> 'KindSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeKindSet 'KindSet -> 'NeKindSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeQidSet 'QidSet -> 'NeQidSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeSortSet 'SortSet -> 'NeSortSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'NeTypeSet 'TypeSet -> 'NeTypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'QidSet 'QidSet -> 'QidSet [assoc comm ctor id('none.EmptyTypeSet) prec(43)] . op '_;_ : 'SortSet 'SortSet -> 'SortSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'Substitution 'Substitution -> 'Substitution [assoc comm ctor id( 'none.Substitution) prec(65)] . op '_;_ : 'TypeListSet 'TypeListSet -> 'TypeListSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_;_ : 'TypeSet 'TypeSet -> 'TypeSet [assoc comm ctor id( 'none.EmptyTypeSet) prec(43)] . op '_<-_ : 'Variable 'Term -> 'Assignment [ctor prec(63) format('nt 'd 'd 'd)] . op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '<<) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op '_=>_ : 'Term 'Term -> 'Condition [ctor prec(71)] . op '_=?_ : 'Term 'Term -> 'UnificandPair [ctor prec(71)] . op '_=_ : 'Term 'Term -> 'EqCondition [ctor prec(71)] . op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '>>) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_\_ : 'QidSet 'QidSet -> 'QidSet [gather('E 'e)] . op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '__ : 'AttrSet 'AttrSet -> 'AttrSet [assoc comm ctor id('none.AttrSet)] . op '__ : 'EquationSet 'EquationSet -> 'EquationSet [assoc comm ctor id( 'none.EquationSet) format('d 'ni 'd)] . op '__ : 'HookList 'HookList -> 'HookList [assoc ctor id('nil.HookList)] . op '__ : 'HookList 'NeHookList -> 'NeHookList [assoc ctor id('nil.HookList)] . op '__ : 'ImportList 'ImportList -> 'ImportList [assoc ctor id( 'nil.ImportList) format('d 'ni 'd)] . op '__ : 'MembAxSet 'MembAxSet -> 'MembAxSet [assoc comm ctor id( 'none.MembAxSet) format('d 'ni 'd)] . op '__ : 'NatList 'NatList -> 'NatList [assoc ctor id('nil.NatList) prec(25)] . op '__ : 'NatList 'NeNatList -> 'NeNatList [assoc ctor id('nil.NatList) prec( 25)] . op '__ : 'NeHookList 'HookList -> 'NeHookList [assoc ctor id('nil.HookList)] . op '__ : 'NeNatList 'NatList -> 'NeNatList [assoc ctor id('nil.NatList) prec( 25)] . op '__ : 'NeQidList 'QidList -> 'NeQidList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'NeTypeList 'TypeList -> 'NeTypeList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'OpDeclSet 'OpDeclSet -> 'OpDeclSet [assoc comm ctor id( 'none.OpDeclSet) format('d 'ni 'd)] . op '__ : 'OpMappingSet 'OpMappingSet -> 'OpMappingSet [assoc comm ctor id( 'none.OpMappingSet) format('d 'ni 'd)] . op '__ : 'PrintOptionSet 'PrintOptionSet -> 'PrintOptionSet [assoc comm ctor id('none.PrintOptionSet)] . op '__ : 'QidList 'NeQidList -> 'NeQidList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'QidList 'QidList -> 'QidList [assoc ctor id('nil.TypeList) prec( 25)] . op '__ : 'RuleSet 'RuleSet -> 'RuleSet [assoc comm ctor id('none.RuleSet) format('d 'ni 'd)] . op '__ : 'SortMappingSet 'SortMappingSet -> 'SortMappingSet [assoc comm ctor id('none.SortMappingSet) format('d 'ni 'd)] . op '__ : 'SubsortDeclSet 'SubsortDeclSet -> 'SubsortDeclSet [assoc comm ctor id('none.SubsortDeclSet) format('d 'ni 'd)] . op '__ : 'Trace 'Trace -> 'Trace [assoc ctor id('nil.Trace) format('d 'n 'd)] . op '__ : 'TypeList 'NeTypeList -> 'NeTypeList [assoc ctor id('nil.TypeList) prec(25)] . op '__ : 'TypeList 'TypeList -> 'TypeList [assoc ctor id('nil.TypeList) prec( 25)] . op '_`,_ : 'EmptyCommaList 'EmptyCommaList -> 'EmptyCommaList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GTermList 'GTermList -> 'GTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GroundTermList 'GroundTermList -> 'GroundTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'GroundTermList 'NeGroundTermList -> 'NeGroundTermList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeCTermList 'TermList -> 'NeCTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeGroundTermList 'GroundTermList -> 'NeGroundTermList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeParameterDeclList 'ParameterDeclList -> 'NeParameterDeclList [ assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'NeParameterList 'ParameterList -> 'NeParameterList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'NeTermList 'TermList -> 'NeTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'ParameterDeclList 'NeParameterDeclList -> 'NeParameterDeclList [ assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'ParameterDeclList 'ParameterDeclList -> 'ParameterDeclList [assoc ctor id('nil.ParameterDeclList) prec(121)] . op '_`,_ : 'ParameterList 'NeParameterList -> 'NeParameterList [assoc ctor id('empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'ParameterList 'ParameterList -> 'ParameterList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'RenamingSet 'RenamingSet -> 'RenamingSet [assoc comm ctor prec( 43) format('d 'd 'ni 'd)] . op '_`,_ : 'TermList 'NeCTermList -> 'NeCTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'TermList 'NeTermList -> 'NeTermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`,_ : 'TermList 'TermList -> 'TermList [assoc ctor id( 'empty.EmptyCommaList) prec(121) gather('e 'E)] . op '_`[_`] : 'Qid 'NeCTermList -> 'Context [ctor] . op '_`[_`] : 'Qid 'NeGroundTermList -> 'GroundTerm [ctor] . op '_`[_`] : 'Qid 'NeTermList -> 'Term [ctor] . op '_`{_`} : 'ModuleExpression 'ParameterList -> 'ModuleExpression [ctor prec(37)] . op '_`{_`} : 'Qid 'ParameterDeclList -> 'Header [ctor] . op '_and-then_ : 'Bool 'Bool -> 'Bool [strat(1 0) prec(55) gather('e 'E)] . op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] . op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special( id-hook('NumberOpSymbol, 'divides) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] . op '_in_ : 'Qid 'QidSet -> 'Bool [none] . op '_or-else_ : 'Bool 'Bool -> 'Bool [strat(1 0) prec(59) gather('e 'E)] . op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] . op '_psubset_ : 'QidSet 'QidSet -> 'Bool [none] . op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'quo) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'rem) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_subset_ : 'QidSet 'QidSet -> 'Bool [none] . op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] . op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special( id-hook('ACU_NumberOpSymbol, 'xor) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '`[_`] : 'Qid -> 'Module [none] . op '`[`] : nil -> 'Context [ctor] . op '`{_`,_`,_`,_`} : 'Term 'Type 'Substitution 'Context -> 'Result4Tuple [ ctor] . op '`{_`,_`,_`} : 'Substitution 'Substitution 'Nat -> 'UnificationTriple [ ctor] . op '`{_`,_`,_`} : 'Term 'Substitution 'Nat -> 'Variant [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Rule -> 'TraceStep [ctor] . op '`{_`,_`,_`} : 'Term 'Type 'Substitution -> 'ResultTriple [ctor] . op '`{_`,_`} : 'Substitution 'Context -> 'MatchPair [ctor] . op '`{_`,_`} : 'Substitution 'Nat -> 'UnificationPair [ctor] . op '`{_`,_`} : 'Term 'Type -> 'ResultPair [ctor] . op 'ambiguity : 'ResultPair 'ResultPair -> 'ResultPair? [ctor] . op 'anyType : nil -> 'Type? [ctor] . op 'append : 'NatList 'NatList -> 'NatList [none] . op 'append : 'NatList 'NeNatList -> 'NeNatList [none] . op 'append : 'NeNatList 'NatList -> 'NeNatList [none] . op 'append : 'NeQidList 'QidList -> 'NeQidList [none] . op 'append : 'QidList 'NeQidList -> 'NeQidList [none] . op 'append : 'QidList 'QidList -> 'QidList [none] . op 'ascii : 'Char -> 'Nat [special( id-hook('StringOpSymbol, 'ascii) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'assoc : nil -> 'Attr [ctor] . op 'ceq_=_if_`[_`]. : 'Term 'Term 'EqCondition 'AttrSet -> 'Equation [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'char : '`[FindResult`,NatList`,Bound`] -> '`[String`] [special( id-hook('StringOpSymbol, 'char) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'cmb_:_if_`[_`]. : 'Term 'Sort 'EqCondition 'AttrSet -> 'MembAx [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'comm : nil -> 'Attr [ctor] . op 'completeName : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaCompleteName) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'config : nil -> 'Attr [ctor] . op 'crl_=>_if_`[_`]. : 'Term 'Term 'Condition 'AttrSet -> 'Rule [ctor format( 'd 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'ctor : nil -> 'Attr [ctor] . op 'delete : 'Qid 'QidSet -> 'QidSet [none] . op 'downTerm : 'Term 'Universal -> 'Universal [poly(2 0) special( id-hook('MetaLevelOpSymbol, 'metaDownTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'empty : nil -> 'EmptyCommaList [ctor] . op 'empty : nil -> 'GroundTermList [ctor] . op 'eq_=_`[_`]. : 'Term 'Term 'AttrSet -> 'Equation [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 'extending_. : 'ModuleExpression -> 'Import [ctor] . op 'failure : nil -> 'Result4Tuple? [ctor] . op 'failure : nil -> 'ResultPair? [ctor] . op 'failure : nil -> 'ResultTriple? [ctor] . op 'failure : nil -> 'Trace? [ctor] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'find : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'find) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 'flat : nil -> 'PrintOption [ctor] . op 'fmod_is_sorts_.____endfm : 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet -> 'FModule [ctor gather('& '& '& '& '& '& '&) format('d 'd 's 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'format : 'QidList -> 'Attr [ctor] . op 'format : nil -> 'PrintOption [ctor] . op 'front : 'NeNatList -> 'NatList [none] . op 'front : 'NeQidList -> 'QidList [none] . op 'frozen : 'NeNatList -> 'Attr [ctor] . op 'fth_is_sorts_.____endfth : 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet -> 'FTheory [ctor gather('& '& '& '& '& '& '&) format('d 'd 'd 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'gather : 'QidList -> 'Attr [ctor] . op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'getContext : 'MatchPair -> 'Context [none] . op 'getContext : 'Result4Tuple -> 'Context [none] . op 'getEqs : 'Module -> 'EquationSet [none] . op 'getFrom : 'View -> 'ModuleExpression [none] . op 'getImports : 'Module -> 'ImportList [none] . op 'getKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getKinds : '`[Module`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaGetKinds) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'getMbs : 'Module -> 'MembAxSet [none] . op 'getName : 'Constant -> 'Qid [none] . op 'getName : 'Module -> 'Qid [none] . op 'getName : 'Variable -> 'Qid [none] . op 'getName : 'View -> 'Qid [none] . op 'getOpMappings : 'View -> 'OpMappingSet [none] . op 'getOps : 'Module -> 'OpDeclSet [none] . op 'getRls : 'Module -> 'RuleSet [none] . op 'getSortMappings : 'View -> 'SortMappingSet [none] . op 'getSorts : 'Module -> 'SortSet [none] . op 'getSubsorts : 'Module -> 'SubsortDeclSet [none] . op 'getSubstitution : 'MatchPair -> 'Substitution [none] . op 'getSubstitution : 'Result4Tuple -> 'Substitution [none] . op 'getSubstitution : 'ResultTriple -> 'Substitution [none] . op 'getTerm : 'Result4Tuple -> 'Term [none] . op 'getTerm : 'ResultPair -> 'Term [none] . op 'getTerm : 'ResultTriple -> 'Term [none] . op 'getTo : 'View -> 'ModuleExpression [none] . op 'getType : 'Constant -> 'Type [none] . op 'getType : 'Result4Tuple -> 'Type [none] . op 'getType : 'ResultPair -> 'Type [none] . op 'getType : 'ResultTriple -> 'Type [none] . op 'getType : 'Variable -> 'Type [none] . op 'glbSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [ special( id-hook('MetaLevelOpSymbol, 'metaGlbSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'head : 'NeNatList -> 'Nat [none] . op 'head : 'NeQidList -> 'Qid [none] . op 'id : 'Term -> 'Attr [ctor] . op 'id-hook : 'Qid 'QidList -> 'Hook [ctor format('nssss 'd)] . op 'idem : nil -> 'Attr [ctor] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'including_. : 'ModuleExpression -> 'Import [ctor] . op 'insert : 'Qid 'QidSet -> 'QidSet [none] . op 'intersection : 'QidSet 'QidSet -> 'QidSet [none] . op 'iter : nil -> 'Attr [ctor] . op 'label : 'Qid -> 'Attr [ctor] . op 'label_to_ : 'Qid 'Qid -> 'Renaming [ctor] . op 'last : 'NeNatList -> 'Nat [none] . op 'last : 'NeQidList -> 'Qid [none] . op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'leastSort : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLeastSort) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'left-id : 'Term -> 'Attr [ctor] . op 'length : 'String -> 'Nat [special( id-hook('StringOpSymbol, 'length) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lesserSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaLesserSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'max : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'maximalAritySet : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalAritySet) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'maximalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMaximalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mb_:_`[_`]. : 'Term 'Sort 'AttrSet -> 'MembAx [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 'memo : nil -> 'Attr [ctor] . op 'metaApply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaApply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaFrewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaFrewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetIrredundantVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetIrredundantVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaGetVariant : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Variant?`] [special( id-hook('MetaLevelOpSymbol, 'metaGetVariant) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaMatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] -> '`[Substitution?`] [special( id-hook('MetaLevelOpSymbol, 'metaMatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[Bool`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow2) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNarrow : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaNarrow) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaNormalize : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaNormalize) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaParse : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [ special( id-hook('MetaLevelOpSymbol, 'metaParse) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [none] . op 'metaPrettyPrint : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[PrintOptionSet`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaPrettyPrint) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaReduce : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaReduce) op-hook('qidSymbol, ', nil, 'Qid) op-hook('metaTermSymbol, '_`[_`], 'Qid 'NeGroundTermList, 'GroundTerm) op-hook('metaArgSymbol, '_`,_, 'NeGroundTermList 'GroundTermList, 'NeGroundTermList) op-hook('emptyTermListSymbol, 'empty, nil, 'GroundTermList) op-hook('assignmentSymbol, '_<-_, 'Variable 'Term, 'Assignment) op-hook('emptySubstitutionSymbol, 'none, nil, 'Substitution) op-hook('substitutionSymbol, '_;_, 'Substitution 'Substitution, 'Substitution) op-hook('holeSymbol, '`[`], nil, 'Context) op-hook('headerSymbol, '_`{_`}, 'Qid 'ParameterDeclList, 'Header) op-hook('parameterDeclSymbol, '_::_, 'Sort 'ModuleExpression, 'ParameterDecl) op-hook('parameterDeclListSymbol, '_`,_, 'ParameterDeclList 'ParameterDeclList, 'ParameterDeclList) op-hook('protectingSymbol, 'protecting_., 'ModuleExpression, 'Import) op-hook('extendingSymbol, 'extending_., 'ModuleExpression, 'Import) op-hook('includingSymbol, 'including_., 'ModuleExpression, 'Import) op-hook('nilImportListSymbol, 'nil, nil, 'ImportList) op-hook('importListSymbol, '__, 'ImportList 'ImportList, 'ImportList) op-hook('emptySortSetSymbol, 'none, nil, 'QidSet) op-hook('sortSetSymbol, '_;_, 'QidSet 'QidSet, 'QidSet) op-hook('subsortSymbol, 'subsort_<_., 'Sort 'Sort, 'SubsortDecl) op-hook('emptySubsortDeclSetSymbol, 'none, nil, 'SubsortDeclSet) op-hook('subsortDeclSetSymbol, '__, 'SubsortDeclSet 'SubsortDeclSet, 'SubsortDeclSet) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) op-hook('qidListSymbol, '__, 'QidList 'QidList, 'QidList) op-hook('succSymbol, 's_, 'Nat, 'NzNat) op-hook('natListSymbol, '__, 'NatList 'NatList, 'NatList) op-hook('unboundedSymbol, 'unbounded, nil, 'Bound) op-hook('stringSymbol, ', nil, 'Char) op-hook('sortRenamingSymbol, 'sort_to_, 'Qid 'Qid, 'Renaming) op-hook('opRenamingSymbol, 'op_to_`[_`], 'Qid 'Qid 'AttrSet, 'Renaming) op-hook('opRenamingSymbol2, 'op_:_->_to_`[_`], 'Qid 'TypeList 'Type 'Qid 'AttrSet, 'Renaming) op-hook('labelRenamingSymbol, 'label_to_, 'Qid 'Qid, 'Renaming) op-hook('renamingSetSymbol, '_`,_, 'RenamingSet 'RenamingSet, 'RenamingSet) op-hook('sumSymbol, '_+_, 'ModuleExpression 'ModuleExpression, 'ModuleExpression) op-hook('renamingSymbol, '_*`(_`), 'ModuleExpression 'RenamingSet, 'ModuleExpression) op-hook('instantiationSymbol, '_`{_`}, 'ModuleExpression 'ParameterList, 'ModuleExpression) op-hook('termHookSymbol, 'term-hook, 'Qid 'Term, 'Hook) op-hook('hookListSymbol, '__, 'HookList 'HookList, 'HookList) op-hook('idHookSymbol, 'id-hook, 'Qid 'QidList, 'Hook) op-hook('opHookSymbol, 'op-hook, 'Qid 'Qid 'QidList 'Qid, 'Hook) op-hook('assocSymbol, 'assoc, nil, 'Attr) op-hook('commSymbol, 'comm, nil, 'Attr) op-hook('idemSymbol, 'idem, nil, 'Attr) op-hook('iterSymbol, 'iter, nil, 'Attr) op-hook('idSymbol, 'id, 'Term, 'Attr) op-hook('leftIdSymbol, 'left-id, 'Term, 'Attr) op-hook('rightIdSymbol, 'right-id, 'Term, 'Attr) op-hook('stratSymbol, 'strat, 'NeNatList, 'Attr) op-hook('memoSymbol, 'memo, nil, 'Attr) op-hook('precSymbol, 'prec, 'Nat, 'Attr) op-hook('gatherSymbol, 'gather, 'QidList, 'Attr) op-hook('formatSymbol, 'format, 'QidList, 'Attr) op-hook('ctorSymbol, 'ctor, nil, 'Attr) op-hook('frozenSymbol, 'frozen, 'NeNatList, 'Attr) op-hook('polySymbol, 'poly, 'NeNatList, 'Attr) op-hook('configSymbol, 'config, nil, 'Attr) op-hook('objectSymbol, 'object, nil, 'Attr) op-hook('msgSymbol, 'msg, nil, 'Attr) op-hook('specialSymbol, 'special, 'NeHookList, 'Attr) op-hook('labelSymbol, 'label, 'Qid, 'Attr) op-hook('metadataSymbol, 'metadata, 'String, 'Attr) op-hook('owiseSymbol, 'owise, nil, 'Attr) op-hook('variantAttrSymbol, 'variant, nil, 'Attr) op-hook('nonexecSymbol, 'nonexec, nil, 'Attr) op-hook('printSymbol, 'print, 'QidList, 'Attr) op-hook('emptyAttrSetSymbol, 'none, nil, 'AttrSet) op-hook('attrSetSymbol, '__, 'AttrSet 'AttrSet, 'AttrSet) op-hook('opDeclSymbol, 'op_:_->_`[_`]., 'Qid 'TypeList 'Type 'AttrSet, 'OpDecl) op-hook('opDeclSetSymbol, '__, 'OpDeclSet 'OpDeclSet, 'OpDeclSet) op-hook('emptyOpDeclSetSymbol, 'none, nil, 'OpDeclSet) op-hook('noConditionSymbol, 'nil, nil, 'EqCondition) op-hook('equalityConditionSymbol, '_=_, 'Term 'Term, 'EqCondition) op-hook('sortTestConditionSymbol, '_:_, 'Term 'Sort, 'EqCondition) op-hook('matchConditionSymbol, '_:=_, 'Term 'Term, 'EqCondition) op-hook('rewriteConditionSymbol, '_=>_, 'Term 'Term, 'Condition) op-hook('conjunctionSymbol, '_/\_, 'EqCondition 'EqCondition, 'EqCondition) op-hook('mbSymbol, 'mb_:_`[_`]., 'Term 'Sort 'AttrSet, 'MembAx) op-hook('cmbSymbol, 'cmb_:_if_`[_`]., 'Term 'Sort 'EqCondition 'AttrSet, 'MembAx) op-hook('emptyMembAxSetSymbol, 'none, nil, 'MembAxSet) op-hook('membAxSetSymbol, '__, 'MembAxSet 'MembAxSet, 'MembAxSet) op-hook('eqSymbol, 'eq_=_`[_`]., 'Term 'Term 'AttrSet, 'Equation) op-hook('ceqSymbol, 'ceq_=_if_`[_`]., 'Term 'Term 'EqCondition 'AttrSet, 'Equation) op-hook('emptyEquationSetSymbol, 'none, nil, 'EquationSet) op-hook('equationSetSymbol, '__, 'EquationSet 'EquationSet, 'EquationSet) op-hook('rlSymbol, 'rl_=>_`[_`]., 'Term 'Term 'AttrSet, 'Rule) op-hook('crlSymbol, 'crl_=>_if_`[_`]., 'Term 'Term 'Condition 'AttrSet, 'Rule) op-hook('emptyRuleSetSymbol, 'none, nil, 'RuleSet) op-hook('ruleSetSymbol, '__, 'RuleSet 'RuleSet, 'RuleSet) op-hook('fmodSymbol, 'fmod_is_sorts_.____endfm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FModule) op-hook('fthSymbol, 'fth_is_sorts_.____endfth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet, 'FTheory) op-hook('modSymbol, 'mod_is_sorts_._____endm, 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'SModule) op-hook('thSymbol, 'th_is_sorts_._____endth, 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet, 'STheory) op-hook('sortMappingSymbol, 'sort_to_., 'Sort 'Sort, 'SortMapping) op-hook('emptySortMappingSetSymbol, 'none, nil, 'SortMappingSet) op-hook('sortMappingSetSymbol, '__, 'SortMappingSet 'SortMappingSet, 'SortMappingSet) op-hook('opMappingSymbol, 'op_to_., 'Qid 'Qid, 'OpMapping) op-hook('opSpecificMappingSymbol, 'op_:_->_to_., 'Qid 'TypeList 'Type 'Qid, 'OpMapping) op-hook('opTermMappingSymbol, 'op_to`term_., 'Term 'Term, 'OpMapping) op-hook('emptyOpMappingSetSymbol, 'none, nil, 'OpMappingSet) op-hook('opMappingSetSymbol, '__, 'OpMappingSet 'OpMappingSet, 'OpMappingSet) op-hook('viewSymbol, 'view_from_to_is__endv, 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet, 'View) op-hook('anyTypeSymbol, 'anyType, nil, 'Type?) op-hook('unificandPairSymbol, '_=?_, 'Term 'Term, 'UnificandPair) op-hook('unificationConjunctionSymbol, '_/\_, 'UnificationProblem 'UnificationProblem, 'UnificationProblem) op-hook('resultPairSymbol, '`{_`,_`}, 'Term 'Type, 'ResultPair) op-hook('resultTripleSymbol, '`{_`,_`,_`}, 'Term 'Type 'Substitution, 'ResultTriple) op-hook('result4TupleSymbol, '`{_`,_`,_`,_`}, 'Term 'Type 'Substitution 'Context, 'Result4Tuple) op-hook('matchPairSymbol, '`{_`,_`}, 'Substitution 'Context, 'MatchPair) op-hook('unificationPairSymbol, '`{_`,_`}, 'Substitution 'Nat, 'UnificationPair) op-hook('unificationTripleSymbol, '`{_`,_`,_`}, 'Substitution 'Substitution 'Nat, 'UnificationTriple) op-hook('variantSymbol, '`{_`,_`,_`}, 'Term 'Substitution 'Nat, 'Variant) op-hook('traceStepSymbol, '`{_`,_`,_`}, 'Term 'Type 'Rule, 'TraceStep) op-hook('nilTraceSymbol, 'nil, nil, 'Trace) op-hook('traceSymbol, '__, 'Trace 'Trace, 'Trace) op-hook('noParseSymbol, 'noParse, 'Nat, 'ResultPair?) op-hook('ambiguitySymbol, 'ambiguity, 'ResultPair 'ResultPair, 'ResultPair?) op-hook('failure2Symbol, 'failure, nil, 'ResultPair?) op-hook('failure3Symbol, 'failure, nil, 'ResultTriple?) op-hook('failure4Symbol, 'failure, nil, 'Result4Tuple?) op-hook('noUnifierPairSymbol, 'noUnifier, nil, 'UnificationPair?) op-hook('noUnifierTripleSymbol, 'noUnifier, nil, 'UnificationTriple?) op-hook('noVariantSymbol, 'noVariant, nil, 'Variant?) op-hook('noMatchSubstSymbol, 'noMatch, nil, 'Substitution?) op-hook('noMatchPairSymbol, 'noMatch, nil, 'MatchPair?) op-hook('failureTraceSymbol, 'failure, nil, 'Trace?) op-hook('mixfixSymbol, 'mixfix, nil, 'PrintOption) op-hook('withParensSymbol, 'with-parens, nil, 'PrintOption) op-hook('flatSymbol, 'flat, nil, 'PrintOption) op-hook('formatPrintOptionSymbol, 'format, nil, 'PrintOption) op-hook('numberSymbol, 'number, nil, 'PrintOption) op-hook('ratSymbol, 'rat, nil, 'PrintOption) op-hook('emptyPrintOptionSetSymbol, 'none, nil, 'PrintOptionSet) op-hook('printOptionSetSymbol, '__, 'PrintOptionSet 'PrintOptionSet, 'PrintOptionSet) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'metaRewrite : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] -> '`[ResultPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaRewrite) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[ResultTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaSearchPath : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Trace?`] [special( id-hook('MetaLevelOpSymbol, 'metaSearchPath) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaUnify : '`[Module`] '`[UnificationProblem`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantDisjointUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationTriple?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantDisjointUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaVariantUnify : '`[Module`] '`[UnificationProblem`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[UnificationPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaVariantUnify) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXapply : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Substitution?`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[Result4Tuple?`] [special( id-hook('MetaLevelOpSymbol, 'metaXapply) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metaXmatch : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Condition`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[MatchPair?`] [special( id-hook('MetaLevelOpSymbol, 'metaXmatch) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'metadata : 'String -> 'Attr [ctor] . op 'min : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'minimalSorts : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaMinimalSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'mixfix : nil -> 'PrintOption [ctor] . op 'modExp : '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] '`[FindResult`,NatList`,Bound`] -> '`[FindResult`,NatList`,Bound`] [ special( id-hook('NumberOpSymbol, 'modExp) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'mod_is_sorts_._____endm : 'Header 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet -> 'SModule [ctor gather('& '& '& '& '& '& '& '&) format('d 'd 's 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'msg : nil -> 'Attr [ctor] . op 'nil : nil -> 'EqCondition [ctor] . op 'nil : nil -> 'HookList [ctor] . op 'nil : nil -> 'ImportList [ctor] . op 'nil : nil -> 'NatList [ctor] . op 'nil : nil -> 'ParameterDeclList [ctor] . op 'nil : nil -> 'QidList [ctor] . op 'nil : nil -> 'Trace [ctor] . op 'nil : nil -> 'TypeList [ctor] . op 'noMatch : nil -> 'MatchPair? [ctor] . op 'noMatch : nil -> 'Substitution? [ctor] . op 'noParse : 'Nat -> 'ResultPair? [ctor] . op 'noUnifier : nil -> 'UnificationPair? [ctor] . op 'noUnifier : nil -> 'UnificationTriple? [ctor] . op 'noVariant : nil -> 'Variant? [ctor] . op 'none : nil -> 'AttrSet [ctor] . op 'none : nil -> 'EmptyTypeSet [ctor] . op 'none : nil -> 'EquationSet [ctor] . op 'none : nil -> 'MembAxSet [ctor] . op 'none : nil -> 'OpDeclSet [ctor] . op 'none : nil -> 'OpMappingSet [ctor] . op 'none : nil -> 'PrintOptionSet [ctor] . op 'none : nil -> 'QidSet [ctor] . op 'none : nil -> 'RuleSet [ctor] . op 'none : nil -> 'SortMappingSet [ctor] . op 'none : nil -> 'SubsortDeclSet [ctor] . op 'none : nil -> 'Substitution [ctor] . op 'nonexec : nil -> 'Attr [ctor] . op 'notFound : nil -> 'FindResult [ctor] . op 'not_ : 'Bool -> 'Bool [prec(53)] . op 'number : nil -> 'PrintOption [ctor] . op 'object : nil -> 'Attr [ctor] . op 'occurs : 'Nat 'NatList -> 'Bool [none] . op 'occurs : 'Qid 'QidList -> 'Bool [none] . op 'op-hook : 'Qid 'Qid 'QidList 'Qid -> 'Hook [ctor format('nssss 'd)] . op 'op_:_->_`[_`]. : 'Qid 'TypeList 'Type 'AttrSet -> 'OpDecl [ctor format('d 'd 'd 'd 'd 'd 's 'd 'd 's 'd)] . op 'op_:_->_to_. : 'Qid 'TypeList 'Type 'Qid -> 'OpMapping [ctor] . op 'op_:_->_to_`[_`] : 'Qid 'TypeList 'Type 'Qid 'AttrSet -> 'Renaming [ctor format('d 'd 'd 'd 'd 'd 'd 'd 's 'd 'd 'd)] . op 'op_to_. : 'Qid 'Qid -> 'OpMapping [ctor] . op 'op_to_`[_`] : 'Qid 'Qid 'AttrSet -> 'Renaming [ctor format('d 'd 'd 'd 's 'd 'd 'd)] . op 'op_to`term_. : 'Term 'Term -> 'OpMapping [ctor] . op 'owise : nil -> 'Attr [ctor] . op 'poly : 'NeNatList -> 'Attr [ctor] . op 'prec : 'Nat -> 'Attr [ctor] . op 'print : 'QidList -> 'Attr [ctor] . op 'protecting_. : 'ModuleExpression -> 'Import [ctor] . op 'qid : '`[String`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('QuotedIdentifierOpSymbol, 'qid) op-hook('quotedIdentifierSymbol, ', nil, 'Qid) op-hook('stringSymbol, ', nil, 'Char))] . op 'rat : nil -> 'PrintOption [ctor] . op 'reverse : 'NatList -> 'NatList [none] . op 'reverse : 'NeNatList -> 'NeNatList [none] . op 'reverse : 'NeQidList -> 'NeQidList [none] . op 'reverse : 'QidList -> 'QidList [none] . op 'rfind : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'rfind) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 'right-id : 'Term -> 'Attr [ctor] . op 'rl_=>_`[_`]. : 'Term 'Term 'AttrSet -> 'Rule [ctor format('d 'd 'd 'd 's 'd 'd 's 'd)] . op 's_ : 'Nat -> 'NzNat [iter ctor special( id-hook('SuccSymbol, nil) term-hook('zeroTerm, '0.Zero))] . op 'sameKind : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSameKind) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sd : 'Nat 'Nat -> 'Nat [comm special( id-hook('CUI_NumberOpSymbol, 'sd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'size : 'NatList -> 'Nat [none] . op 'size : 'NeNatList -> 'NzNat [none] . op 'size : 'NeQidList -> 'NzNat [none] . op 'size : 'QidList -> 'Nat [none] . op 'sortLeq : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaSortLeq) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'sort_to_ : 'Qid 'Qid -> 'Renaming [ctor] . op 'sort_to_. : 'Sort 'Sort -> 'SortMapping [ctor] . op 'special : 'NeHookList -> 'Attr [ctor] . op 'strat : 'NeNatList -> 'Attr [ctor] . op 'string : 'Qid -> 'String [special( id-hook('QuotedIdentifierOpSymbol, 'string) op-hook('quotedIdentifierSymbol, ', nil, 'Qid) op-hook('stringSymbol, ', nil, 'Char))] . op 'subsort_<_. : 'Sort 'Sort -> 'SubsortDecl [ctor] . op 'substr : 'String 'Nat 'Nat -> 'String [special( id-hook('StringOpSymbol, 'substr) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'tail : 'NeNatList -> 'NatList [none] . op 'tail : 'NeQidList -> 'QidList [none] . op 'term-hook : 'Qid 'Term -> 'Hook [ctor format('nssss 'd)] . op 'th_is_sorts_._____endth : 'Qid 'ImportList 'SortSet 'SubsortDeclSet 'OpDeclSet 'MembAxSet 'EquationSet 'RuleSet -> 'STheory [ctor gather('& '& '& '& '& '& '& '&) format('d 'd 'd 'n++i 'ni 'd 'd 'ni 'ni 'ni 'ni 'ni 'n--i 'd)] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . op 'unbounded : nil -> 'Bound [ctor] . op 'union : 'NeQidSet 'QidSet -> 'NeQidSet [none] . op 'union : 'QidSet 'NeQidSet -> 'NeQidSet [none] . op 'union : 'QidSet 'QidSet -> 'QidSet [none] . op 'upEqs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[EquationSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpEqs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upImports : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[ImportList`] [special( id-hook('MetaLevelOpSymbol, 'metaUpImports) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upMbs : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[MembAxSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpMbs) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upModule : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[Module`] [special( id-hook('MetaLevelOpSymbol, 'metaUpModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upOpDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[OpDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpOpDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upRls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[RuleSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpRls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSorts : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSorts) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upSubsortDecls : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] '`[Bool`] -> '`[SubsortDeclSet`] [special( id-hook('MetaLevelOpSymbol, 'metaUpSubsortDecls) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upTerm : 'Universal -> 'Term [poly(1) special( id-hook('MetaLevelOpSymbol, 'metaUpTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'upView : '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[View`] [special( id-hook('MetaLevelOpSymbol, 'metaUpView) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'variant : nil -> 'Attr [ctor] . op 'view_from_to_is__endv : 'Header 'ModuleExpression 'ModuleExpression 'SortMappingSet 'OpMappingSet -> 'View [ctor gather('& '& '& '& '&) format( 'd 'd 'd 'd 'd 'd 'd 'n++i 'ni 'n--i 'd)] . op 'wellFormed : 'Module -> 'Bool [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedModule) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedTerm) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'wellFormed : '`[Module`] '`[Substitution?`] -> '`[Bool`] [special( id-hook('MetaLevelOpSymbol, 'metaWellFormedSubstitution) op-hook('shareWith, 'metaReduce, 'Module 'QidSet, 'ResultPair?))] . op 'with-parens : nil -> 'PrintOption [ctor] . op '|_| : 'NeQidSet -> 'NzNat [none] . op '|_| : 'QidSet -> 'Nat [none] . none eq '$card['none.EmptyTypeSet,'C:Nat] = 'C:Nat [none] . eq '$card['_;_['E:Qid,'S:QidSet],'C:Nat] = '$card['S:QidSet,'_+_['C:Nat,'s_[ '0.Zero]]] [owise] . eq '$card['_;_['N:NeQidSet,'N:NeQidSet,'S:QidSet],'C:Nat] = '$card['_;_[ 'N:NeQidSet,'S:QidSet],'C:Nat] [none] . eq '$diff['none.EmptyTypeSet,'S':QidSet,'A:QidSet] = 'A:QidSet [none] . eq '$diff['_;_['E:Qid,'S:QidSet],'S':QidSet,'A:QidSet] = '$diff['S:QidSet, 'S':QidSet,'if_then_else_fi['_in_['E:Qid,'S':QidSet],'A:QidSet,'_;_['E:Qid, 'A:QidSet]]] [none] . eq '$intersect['none.EmptyTypeSet,'S':QidSet,'A:QidSet] = 'A:QidSet [none] . eq '$intersect['_;_['E:Qid,'S:QidSet],'S':QidSet,'A:QidSet] = '$intersect[ 'S:QidSet,'S':QidSet,'if_then_else_fi['_in_['E:Qid,'S':QidSet],'_;_['E:Qid, 'A:QidSet],'A:QidSet]] [none] . eq '$reverse['nil.NatList,'A:NatList] = 'A:NatList [none] . eq '$reverse['nil.TypeList,'A:QidList] = 'A:QidList [none] . eq '$reverse['__['E:Nat,'L:NatList],'A:NatList] = '$reverse['L:NatList,'__[ 'E:Nat,'A:NatList]] [none] . eq '$reverse['__['E:Qid,'L:QidList],'A:QidList] = '$reverse['L:QidList,'__[ 'E:Qid,'A:QidList]] [none] . eq '$size['nil.NatList,'C:Nat] = 'C:Nat [none] . eq '$size['nil.TypeList,'C:Nat] = 'C:Nat [none] . eq '$size['__['E:Nat,'L:NatList],'C:Nat] = '$size['L:NatList,'_+_['C:Nat,'s_[ '0.Zero]]] [none] . eq '$size['__['E:Qid,'L:QidList],'C:Nat] = '$size['L:QidList,'_+_['C:Nat,'s_[ '0.Zero]]] [none] . eq '_;_['A:Assignment,'A:Assignment] = 'A:Assignment [none] . eq '_;_['N:NeQidSet,'N:NeQidSet] = 'N:NeQidSet [none] . eq '_;_['T:TypeList,'T:TypeList] = 'T:TypeList [none] . eq '_\_['S:QidSet,'N:NeQidSet] = '$diff['S:QidSet,'N:NeQidSet, 'none.EmptyTypeSet] [none] . eq '_\_['S:QidSet,'none.EmptyTypeSet] = 'S:QidSet [none] . eq '__['A:Attr,'A:Attr] = 'A:Attr [none] . eq '__['E:Equation,'E:Equation] = 'E:Equation [none] . eq '__['M:MembAx,'M:MembAx] = 'M:MembAx [none] . eq '__['O:OpDecl,'O:OpDecl] = 'O:OpDecl [none] . eq '__['O:OpMapping,'O:OpMapping] = 'O:OpMapping [none] . eq '__['R:Rule,'R:Rule] = 'R:Rule [none] . eq '__['S:SortMapping,'S:SortMapping] = 'S:SortMapping [none] . eq '__['S:SubsortDecl,'S:SubsortDecl] = 'S:SubsortDecl [none] . eq '_and-then_['false.Bool,'B:`[Bool`]] = 'false.Bool [none] . eq '_and-then_['true.Bool,'B:`[Bool`]] = 'B:`[Bool`] [none] . eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool, 'B:Bool]]] [none] . eq '_in_['E:Qid,'S:QidSet] = 'false.Bool [owise] . eq '_in_['E:Qid,'_;_['E:Qid,'S:QidSet]] = 'true.Bool [none] . eq '_or-else_['false.Bool,'B:`[Bool`]] = 'B:`[Bool`] [none] . eq '_or-else_['true.Bool,'B:`[Bool`]] = 'true.Bool [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_psubset_['S:QidSet,'S':QidSet] = '_and-then_['_=/=_['S:QidSet, 'S':QidSet],'_subset_['S:QidSet,'S':QidSet]] [none] . eq '_subset_['none.EmptyTypeSet,'S':QidSet] = 'true.Bool [none] . eq '_subset_['_;_['E:Qid,'S:QidSet],'S':QidSet] = '_and-then_['_in_['E:Qid, 'S':QidSet],'_subset_['S:QidSet,'S':QidSet]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq '`[_`]['Q:Qid] = 'th_is_sorts_._____endth['Q:Qid,'including_.['Q:Qid], 'none.EmptyTypeSet,'none.SubsortDeclSet,'none.OpDeclSet,'none.MembAxSet, 'none.EquationSet,'none.RuleSet] [none] . eq 'append['A:NatList,'L:NatList] = '__['A:NatList,'L:NatList] [none] . eq 'append['A:QidList,'L:QidList] = '__['A:QidList,'L:QidList] [none] . eq 'delete['E:Qid,'S:QidSet] = 'S:QidSet [owise] . eq 'delete['E:Qid,'_;_['E:Qid,'S:QidSet]] = 'delete['E:Qid,'S:QidSet] [none] . eq 'front['__['L:NatList,'E:Nat]] = 'L:NatList [none] . eq 'front['__['L:QidList,'E:Qid]] = 'L:QidList [none] . eq 'getContext['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getContext['`{_`,_`}['S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getEqs['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'EQS:EquationSet [none] . eq 'getEqs['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'EQS:EquationSet [none] . eq 'getEqs['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'EQS:EquationSet [none] . eq 'getEqs['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'EQS:EquationSet [none] . eq 'getFrom['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'ME:ModuleExpression [none] . eq 'getImports['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList, 'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet, 'EQS:EquationSet]] = 'IL:ImportList [none] . eq 'getImports['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'IL:ImportList [none] . eq 'getImports['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'IL:ImportList [none] . eq 'getImports['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'IL:ImportList [none] . eq 'getMbs['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'MAS:MembAxSet [none] . eq 'getName['C:Constant] = 'qid['substr['string['C:Constant],'0.Zero,'rfind[ 'string['C:Constant],'".".Char,'length['string['C:Constant]]]]] [none] . eq 'getName['V:Variable] = 'qid['substr['string['V:Variable],'0.Zero,'rfind[ 'string['V:Variable],'":".Char,'length['string['V:Variable]]]]] [none] . eq 'getName['fmod_is_sorts_.____endfm['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['fmod_is_sorts_.____endfm['_`{_`}['Q:Qid,'PDL:ParameterDeclList], 'IL:ImportList,'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet, 'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['mod_is_sorts_._____endm['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['mod_is_sorts_._____endm['_`{_`}['Q:Qid,'PDL:ParameterDeclList], 'IL:ImportList,'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet, 'MAS:MembAxSet,'EQS:EquationSet,'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'Q:Qid [ none] . eq 'getOpMappings['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'OMS:OpMappingSet [none] . eq 'getOps['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'OPDS:OpDeclSet [none] . eq 'getRls['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'none.RuleSet [none] . eq 'getRls['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'none.RuleSet [none] . eq 'getRls['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'RLS:RuleSet [none] . eq 'getRls['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'RLS:RuleSet [none] . eq 'getSortMappings['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'SMS:SortMappingSet [none] . eq 'getSorts['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SS:SortSet [none] . eq 'getSorts['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SS:SortSet [none] . eq 'getSorts['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SS:SortSet [none] . eq 'getSorts['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SS:SortSet [none] . eq 'getSubsorts['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList, 'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet, 'EQS:EquationSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['mod_is_sorts_._____endm['H:Header,'IL:ImportList, 'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet, 'EQS:EquationSet,'RLS:RuleSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubstitution['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution, 'C:Context]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`}['S:Substitution,'C:Context]] = 'S:Substitution [none] . eq 'getTerm['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Term [none] . eq 'getTerm['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Term [none] . eq 'getTerm['`{_`,_`}['T:Term,'T:Type]] = 'T:Term [none] . eq 'getTo['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'ME':ModuleExpression [none] . eq 'getType['C:Constant] = 'qid['substr['string['C:Constant],'_+_['s_[ '0.Zero],'rfind['string['C:Constant],'".".Char,'length['string[ 'C:Constant]]]],'length['string['C:Constant]]]] [none] . eq 'getType['V:Variable] = 'qid['substr['string['V:Variable],'_+_['s_[ '0.Zero],'rfind['string['V:Variable],'":".Char,'length['string[ 'V:Variable]]]],'length['string['V:Variable]]]] [none] . eq 'getType['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Type [none] . eq 'getType['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Type [none] . eq 'getType['`{_`,_`}['T:Term,'T:Type]] = 'T:Type [none] . eq 'head['__['E:Nat,'L:NatList]] = 'E:Nat [none] . eq 'head['__['E:Qid,'L:QidList]] = 'E:Qid [none] . eq 'insert['E:Qid,'S:QidSet] = '_;_['E:Qid,'S:QidSet] [none] . eq 'intersection['S:QidSet,'N:NeQidSet] = '$intersect['S:QidSet,'N:NeQidSet, 'none.EmptyTypeSet] [none] . eq 'intersection['S:QidSet,'none.EmptyTypeSet] = 'none.EmptyTypeSet [none] . eq 'last['__['L:NatList,'E:Nat]] = 'E:Nat [none] . eq 'last['__['L:QidList,'E:Qid]] = 'E:Qid [none] . eq 'metaPrettyPrint['M:Module,'T:Term] = 'metaPrettyPrint['M:Module,'T:Term, '__['mixfix.PrintOption,'__['flat.PrintOption,'__['format.PrintOption,'__[ 'number.PrintOption,'rat.PrintOption]]]]] [none] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . eq 'occurs['E:Nat,'nil.NatList] = 'false.Bool [none] . eq 'occurs['E:Nat,'__['E':Nat,'L:NatList]] = 'if_then_else_fi['_==_['E:Nat, 'E':Nat],'true.Bool,'occurs['E:Nat,'L:NatList]] [none] . eq 'occurs['E:Qid,'nil.TypeList] = 'false.Bool [none] . eq 'occurs['E:Qid,'__['E':Qid,'L:QidList]] = 'if_then_else_fi['_==_['E:Qid, 'E':Qid],'true.Bool,'occurs['E:Qid,'L:QidList]] [none] . eq 'reverse['L:NatList] = '$reverse['L:NatList,'nil.NatList] [none] . eq 'reverse['L:QidList] = '$reverse['L:QidList,'nil.TypeList] [none] . eq 'size['L:NatList] = '$size['L:NatList,'0.Zero] [none] . eq 'size['L:QidList] = '$size['L:QidList,'0.Zero] [none] . eq 'tail['__['E:Nat,'L:NatList]] = 'L:NatList [none] . eq 'tail['__['E:Qid,'L:QidList]] = 'L:QidList [none] . eq 'union['S:QidSet,'S':QidSet] = '_;_['S:QidSet,'S':QidSet] [none] . eq '|_|['S:QidSet] = '$card['S:QidSet,'0.Zero] [none] . endfm ========================================== reduce in META-LEVEL : upModule('STRING, true) . rewrites: 1 result FModule: fmod 'STRING is nil sorts 'Bool ; 'Char ; 'FindResult ; 'Nat ; 'NzNat ; 'String ; 'Zero . subsort 'Char < 'String . subsort 'Nat < 'FindResult . subsort 'NzNat < 'Nat . subsort 'Zero < 'Nat . op '0 : nil -> 'Zero [ctor] . op ' : nil -> 'Char [special( id-hook('StringSymbol, nil))] . op ' : nil -> 'String [special( id-hook('StringSymbol, nil))] . op '_&_ : 'Nat 'Nat -> 'Nat [assoc comm prec(53) special( id-hook('ACU_NumberOpSymbol, '&) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'Nat 'Nat -> 'Nat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_*_ : 'NzNat 'NzNat -> 'NzNat [assoc comm prec(31) special( id-hook('ACU_NumberOpSymbol, '*) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'Nat 'Nat -> 'Nat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(33) special( id-hook('ACU_NumberOpSymbol, '+) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_+_ : 'String 'String -> 'String [prec(33) gather('E 'e) special( id-hook('StringOpSymbol, '+) op-hook('stringSymbol, ', nil, 'Char))] . op '_<<_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '<<) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_<=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '<) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_<_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '<) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_=/=_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'false.Bool) term-hook('notEqualTerm, 'true.Bool))] . op '_==_ : 'Universal 'Universal -> 'Bool [prec(51) poly(1 2) special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'true.Bool) term-hook('notEqualTerm, 'false.Bool))] . op '_>=_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>=) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>=_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>=) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>>_ : 'Nat 'Nat -> 'Nat [prec(35) gather('E 'e) special( id-hook('NumberOpSymbol, '>>) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_>_ : 'Nat 'Nat -> 'Bool [prec(37) special( id-hook('NumberOpSymbol, '>) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_>_ : 'String 'String -> 'Bool [prec(37) special( id-hook('StringOpSymbol, '>) op-hook('stringSymbol, ', nil, 'Char) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_^_ : 'Nat 'Nat -> 'Nat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_^_ : 'NzNat 'Nat -> 'NzNat [prec(29) gather('E 'e) special( id-hook('NumberOpSymbol, '^) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_and_ : 'Bool 'Bool -> 'Bool [assoc comm prec(55)] . op '_divides_ : 'NzNat 'Nat -> 'Bool [prec(51) special( id-hook('NumberOpSymbol, 'divides) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] . op '_or_ : 'Bool 'Bool -> 'Bool [assoc comm prec(59)] . op '_quo_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'quo) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_rem_ : 'Nat 'NzNat -> 'Nat [prec(31) gather('E 'e) special( id-hook('NumberOpSymbol, 'rem) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_xor_ : 'Bool 'Bool -> 'Bool [assoc comm prec(57)] . op '_xor_ : 'Nat 'Nat -> 'Nat [assoc comm prec(55) special( id-hook('ACU_NumberOpSymbol, 'xor) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'Nat 'Nat -> 'Nat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op '_|_ : 'NzNat 'Nat -> 'NzNat [assoc comm prec(57) special( id-hook('ACU_NumberOpSymbol, '|) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'ascii : 'Char -> 'Nat [special( id-hook('StringOpSymbol, 'ascii) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'char : '`[FindResult`] -> '`[String`] [special( id-hook('StringOpSymbol, 'char) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'false : nil -> 'Bool [ctor special( id-hook('SystemFalse, nil))] . op 'find : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'find) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 'gcd : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'gcd : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'gcd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0) special( id-hook('BranchSymbol, nil) term-hook('1, 'true.Bool) term-hook('2, 'false.Bool))] . op 'lcm : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'lcm : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'lcm) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'length : 'String -> 'Nat [special( id-hook('StringOpSymbol, 'length) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'max : 'NzNat 'Nat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'max) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'Nat 'Nat -> 'Nat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'min : 'NzNat 'NzNat -> 'NzNat [assoc comm special( id-hook('ACU_NumberOpSymbol, 'min) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'modExp : '`[FindResult`] '`[FindResult`] '`[FindResult`] -> '`[FindResult`] [special( id-hook('NumberOpSymbol, 'modExp) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'notFound : nil -> 'FindResult [ctor] . op 'not_ : 'Bool -> 'Bool [prec(53)] . op 'rfind : 'String 'String 'Nat -> 'FindResult [special( id-hook('StringOpSymbol, 'rfind) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat) term-hook('notFoundTerm, 'notFound.FindResult))] . op 's_ : 'Nat -> 'NzNat [iter ctor special( id-hook('SuccSymbol, nil) term-hook('zeroTerm, '0.Zero))] . op 'sd : 'Nat 'Nat -> 'Nat [comm special( id-hook('CUI_NumberOpSymbol, 'sd) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'substr : 'String 'Nat 'Nat -> 'String [special( id-hook('StringOpSymbol, 'substr) op-hook('stringSymbol, ', nil, 'Char) op-hook('succSymbol, 's_, 'Nat, 'NzNat))] . op 'true : nil -> 'Bool [ctor special( id-hook('SystemTrue, nil))] . none eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool, 'B:Bool]]] [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . endfm ========================================== reduce in META-LEVEL : metaReduce(upModule('STRING, true), '_+_[upTerm("a"), upTerm("b")]) . rewrites: 5 result ResultPair: {'"ab".String,'String} ========================================== reduce in META-LEVEL : metaReduce(upModule('META-LEVEL, true), 'modExp[upTerm( 100),upTerm(66),upTerm(17)]) . rewrites: 7 result ResultPair: {'s_^4['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(upModule('META-LEVEL, true), 'upModule[ upTerm('META-LEVEL),upTerm(true)]) . rewrites: 7 result ResultPair: {'fmod_is_sorts_.____endfm[''META-LEVEL.Sort, 'nil.ImportList,'_;_[''Assignment.Sort,''Attr.Sort,''AttrSet.Sort, ''Bool.Sort,''Bound.Sort,''Char.Sort,''Condition.Sort,''Constant.Sort, ''Context.Sort,''EmptyCommaList.Sort,''EmptyTypeSet.Sort, ''EqCondition.Sort,''Equation.Sort,''EquationSet.Sort,''FModule.Sort, ''FTheory.Sort,''FindResult.Sort,''GTermList.Sort,''GroundTerm.Sort, ''GroundTermList.Sort,''Header.Sort,''Hook.Sort,''HookList.Sort, ''Import.Sort,''ImportList.Sort,''Kind.Sort,''KindSet.Sort, ''MatchPair.Sort,''MatchPair?.Sort,''MembAx.Sort,''MembAxSet.Sort, ''Module.Sort,''ModuleExpression.Sort,''Nat.Sort,''NatList.Sort, ''NeCTermList.Sort,''NeGroundTermList.Sort,''NeHookList.Sort, ''NeKindSet.Sort,''NeNatList.Sort,''NeParameterDeclList.Sort, ''NeParameterList.Sort,''NeQidList.Sort,''NeQidSet.Sort,''NeSortSet.Sort, ''NeTermList.Sort,''NeTypeList.Sort,''NeTypeSet.Sort,''NzNat.Sort, ''OpDecl.Sort,''OpDeclSet.Sort,''OpMapping.Sort,''OpMappingSet.Sort, ''ParameterDecl.Sort,''ParameterDeclList.Sort,''ParameterList.Sort, ''PrintOption.Sort,''PrintOptionSet.Sort,''Qid.Sort,''QidList.Sort, ''QidSet.Sort,''Renaming.Sort,''RenamingSet.Sort,''Result4Tuple.Sort, ''Result4Tuple?.Sort,''ResultPair.Sort,''ResultPair?.Sort, ''ResultTriple.Sort,''ResultTriple?.Sort,''Rule.Sort,''RuleSet.Sort, ''SModule.Sort,''STheory.Sort,''Sort.Sort,''SortMapping.Sort, ''SortMappingSet.Sort,''SortSet.Sort,''String.Sort,''SubsortDecl.Sort, ''SubsortDeclSet.Sort,''Substitution.Sort,''Substitution?.Sort,''Term.Sort, ''TermList.Sort,''TermQid.Sort,''Trace.Sort,''Trace?.Sort,''TraceStep.Sort, ''Type.Sort,''Type?.Sort,''TypeList.Sort,''TypeListSet.Sort,''TypeSet.Sort, ''UnificandPair.Sort,''UnificationPair.Sort,''UnificationPair?.Sort, ''UnificationProblem.Sort,''UnificationTriple.Sort, ''UnificationTriple?.Sort,''Variable.Sort,''Variant.Sort,''Variant?.Sort, ''View.Sort,''Zero.Sort],'__['subsort_<_.[''Assignment.Sort, ''Substitution.Sort],'subsort_<_.[''Attr.Sort,''AttrSet.Sort],'subsort_<_.[ ''Char.Sort,''String.Sort],'subsort_<_.[''Constant.Sort,''GroundTerm.Sort], 'subsort_<_.[''Constant.Sort,''TermQid.Sort],'subsort_<_.[''Context.Sort, ''NeCTermList.Sort],'subsort_<_.[''EmptyCommaList.Sort, ''GroundTermList.Sort],'subsort_<_.[''EmptyCommaList.Sort, ''ParameterList.Sort],'subsort_<_.[''EmptyTypeSet.Sort,''KindSet.Sort], 'subsort_<_.[''EmptyTypeSet.Sort,''SortSet.Sort],'subsort_<_.[ ''EqCondition.Sort,''Condition.Sort],'subsort_<_.[''Equation.Sort, ''EquationSet.Sort],'subsort_<_.[''FModule.Sort,''SModule.Sort], 'subsort_<_.[''FTheory.Sort,''STheory.Sort],'subsort_<_.[''GroundTerm.Sort, ''NeGroundTermList.Sort],'subsort_<_.[''GroundTerm.Sort,''Term.Sort], 'subsort_<_.[''GroundTermList.Sort,''TermList.Sort],'subsort_<_.[ ''Hook.Sort,''NeHookList.Sort],'subsort_<_.[''Import.Sort, ''ImportList.Sort],'subsort_<_.[''Kind.Sort,''NeKindSet.Sort],'subsort_<_.[ ''Kind.Sort,''Type.Sort],'subsort_<_.[''KindSet.Sort,''TypeSet.Sort], 'subsort_<_.[''MatchPair.Sort,''MatchPair?.Sort],'subsort_<_.[ ''MembAx.Sort,''MembAxSet.Sort],'subsort_<_.[''Nat.Sort,''Bound.Sort], 'subsort_<_.[''Nat.Sort,''FindResult.Sort],'subsort_<_.[''Nat.Sort, ''NeNatList.Sort],'subsort_<_.[''NeCTermList.Sort,''GTermList.Sort], 'subsort_<_.[''NeGroundTermList.Sort,''GroundTermList.Sort],'subsort_<_.[ ''NeGroundTermList.Sort,''NeTermList.Sort],'subsort_<_.[''NeHookList.Sort, ''HookList.Sort],'subsort_<_.[''NeKindSet.Sort,''KindSet.Sort], 'subsort_<_.[''NeKindSet.Sort,''NeTypeSet.Sort],'subsort_<_.[ ''NeNatList.Sort,''NatList.Sort],'subsort_<_.[''NeParameterDeclList.Sort, ''ParameterDeclList.Sort],'subsort_<_.[''NeParameterList.Sort, ''ParameterList.Sort],'subsort_<_.[''NeQidList.Sort,''QidList.Sort], 'subsort_<_.[''NeQidSet.Sort,''QidSet.Sort],'subsort_<_.[''NeSortSet.Sort, ''NeTypeSet.Sort],'subsort_<_.[''NeSortSet.Sort,''SortSet.Sort], 'subsort_<_.[''NeTermList.Sort,''TermList.Sort],'subsort_<_.[ ''NeTypeList.Sort,''NeQidList.Sort],'subsort_<_.[''NeTypeList.Sort, ''TypeList.Sort],'subsort_<_.[''NeTypeSet.Sort,''NeQidSet.Sort], 'subsort_<_.[''NeTypeSet.Sort,''TypeSet.Sort],'subsort_<_.[''NzNat.Sort, ''Nat.Sort],'subsort_<_.[''OpDecl.Sort,''OpDeclSet.Sort],'subsort_<_.[ ''OpMapping.Sort,''OpMappingSet.Sort],'subsort_<_.[''ParameterDecl.Sort, ''NeParameterDeclList.Sort],'subsort_<_.[''PrintOption.Sort, ''PrintOptionSet.Sort],'subsort_<_.[''Qid.Sort,''Header.Sort],'subsort_<_.[ ''Qid.Sort,''ModuleExpression.Sort],'subsort_<_.[''Qid.Sort, ''NeQidList.Sort],'subsort_<_.[''Qid.Sort,''NeQidSet.Sort],'subsort_<_.[ ''Renaming.Sort,''RenamingSet.Sort],'subsort_<_.[''Result4Tuple.Sort, ''Result4Tuple?.Sort],'subsort_<_.[''ResultPair.Sort,''ResultPair?.Sort], 'subsort_<_.[''ResultTriple.Sort,''ResultTriple?.Sort],'subsort_<_.[ ''Rule.Sort,''RuleSet.Sort],'subsort_<_.[''SModule.Sort,''Module.Sort], 'subsort_<_.[''STheory.Sort,''Module.Sort],'subsort_<_.[''Sort.Sort, ''NeParameterList.Sort],'subsort_<_.[''Sort.Sort,''NeSortSet.Sort], 'subsort_<_.[''Sort.Sort,''Type.Sort],'subsort_<_.[''SortMapping.Sort, ''SortMappingSet.Sort],'subsort_<_.[''SortSet.Sort,''TypeSet.Sort], 'subsort_<_.[''SubsortDecl.Sort,''SubsortDeclSet.Sort],'subsort_<_.[ ''Substitution.Sort,''Substitution?.Sort],'subsort_<_.[''Term.Sort, ''NeTermList.Sort],'subsort_<_.[''TermList.Sort,''GTermList.Sort], 'subsort_<_.[''TermQid.Sort,''Qid.Sort],'subsort_<_.[''TermQid.Sort, ''Term.Sort],'subsort_<_.[''Trace.Sort,''Trace?.Sort],'subsort_<_.[ ''TraceStep.Sort,''Trace.Sort],'subsort_<_.[''Type.Sort,''NeTypeList.Sort], 'subsort_<_.[''Type.Sort,''NeTypeSet.Sort],'subsort_<_.[''Type.Sort, ''Qid.Sort],'subsort_<_.[''Type.Sort,''Type?.Sort],'subsort_<_.[ ''TypeList.Sort,''QidList.Sort],'subsort_<_.[''TypeList.Sort, ''TypeListSet.Sort],'subsort_<_.[''TypeSet.Sort,''QidSet.Sort], 'subsort_<_.[''TypeSet.Sort,''TypeListSet.Sort],'subsort_<_.[ ''UnificandPair.Sort,''UnificationProblem.Sort],'subsort_<_.[ ''UnificationPair.Sort,''UnificationPair?.Sort],'subsort_<_.[ ''UnificationTriple.Sort,''UnificationTriple?.Sort],'subsort_<_.[ ''Variable.Sort,''TermQid.Sort],'subsort_<_.[''Variant.Sort, ''Variant?.Sort],'subsort_<_.[''Zero.Sort,''Nat.Sort]],'__['op_:_->_`[_`].[ ''$card.Sort,'__[''QidSet.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''$diff.Sort,'__[''QidSet.Sort,''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''$intersect.Sort,'__[''QidSet.Sort,''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''$reverse.Sort,'__[ ''NatList.Sort,''NatList.Sort],''NatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''$reverse.Sort,'__[''QidList.Sort,''QidList.Sort], ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''$size.Sort,'__[ ''NatList.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''$size.Sort,'__[''QidList.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''0.Sort,'nil.TypeList,''Zero.Sort,'ctor.Attr], 'op_:_->_`[_`].[''.Sort,'nil.TypeList,''Constant.Sort,'special[ 'id-hook[''QuotedIdentifierSymbol.Sort,''constantQid.Sort]]], 'op_:_->_`[_`].[''.Sort,'nil.TypeList,''Kind.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''kindQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Qid.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,'nil.TypeList]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Sort.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''sortQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Variable.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''variableQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Char.Sort,'special['id-hook[ ''StringSymbol.Sort,'nil.TypeList]]],'op_:_->_`[_`].[''.Sort, 'nil.TypeList,''String.Sort,'special['id-hook[''StringSymbol.Sort, 'nil.TypeList]]],'op_:_->_`[_`].[''_&_.Sort,'__[''Nat.Sort,''Nat.Sort], ''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^53['0.Zero]],'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''&.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_*_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^31[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''*.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_*_.Sort,'__[''NzNat.Sort,''NzNat.Sort],''NzNat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^31['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''*.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_*`(_`).Sort,'__[ ''ModuleExpression.Sort,''RenamingSet.Sort],''ModuleExpression.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''s.Sort,''n++i.Sort,''n--i.Sort, ''d.Sort]],'prec['s_^39['0.Zero]]]],'op_:_->_`[_`].[''_+_.Sort,'__[ ''ModuleExpression.Sort,''ModuleExpression.Sort],''ModuleExpression.Sort, '__['assoc.Attr,'comm.Attr,'ctor.Attr]],'op_:_->_`[_`].[''_+_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^33[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''+.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_+_.Sort,'__[''NzNat.Sort,''Nat.Sort],''NzNat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^33['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''+.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_+_.Sort,'__[''String.Sort, ''String.Sort],''String.Sort,'__['gather['__[''E.Sort,''e.Sort]],'prec[ 's_^33['0.Zero]],'special['__['id-hook[''StringOpSymbol.Sort,''+.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort]]]]],'op_:_->_`[_`].[''_/\_.Sort,'__[''Condition.Sort, ''Condition.Sort],''Condition.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.EqCondition.Constant],'prec['s_^73['0.Zero]]]],'op_:_->_`[_`].[ ''_/\_.Sort,'__[''EqCondition.Sort,''EqCondition.Sort],''EqCondition.Sort, '__['assoc.Attr,'ctor.Attr,'id[''nil.EqCondition.Constant],'prec['s_^73[ '0.Zero]]]],'op_:_->_`[_`].[''_/\_.Sort,'__[''UnificationProblem.Sort, ''UnificationProblem.Sort],''UnificationProblem.Sort,'__['assoc.Attr, 'comm.Attr,'ctor.Attr,'prec['s_^73['0.Zero]]]],'op_:_->_`[_`].[ ''_::_.Variable,'__[''Sort.Sort,''ModuleExpression.Sort], ''ParameterDecl.Sort,'none.AttrSet],'op_:_->_`[_`].[''_:=_.Variable,'__[ ''Term.Sort,''Term.Sort],''EqCondition.Sort,'__['ctor.Attr,'prec['s_^71[ '0.Zero]]]],'op_:_->_`[_`].[''_:_.Variable,'__[''Term.Sort,''Sort.Sort], ''EqCondition.Sort,'__['ctor.Attr,'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''EmptyTypeSet.Sort,''EmptyTypeSet.Sort], ''EmptyTypeSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''KindSet.Sort,''KindSet.Sort],''KindSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''NeKindSet.Sort, ''KindSet.Sort],''NeKindSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''NeQidSet.Sort,''QidSet.Sort],''NeQidSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''NeSortSet.Sort, ''SortSet.Sort],''NeSortSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''NeTypeSet.Sort,''TypeSet.Sort],''NeTypeSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''SortSet.Sort,''SortSet.Sort],''SortSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''Substitution.Sort, ''Substitution.Sort],''Substitution.Sort,'__['assoc.Attr,'comm.Attr, 'ctor.Attr,'id[''none.Substitution.Constant],'prec['s_^65['0.Zero]]]], 'op_:_->_`[_`].[''_;_.Sort,'__[''TypeListSet.Sort,''TypeListSet.Sort], ''TypeListSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''TypeSet.Sort,''TypeSet.Sort],''TypeSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_<-_.Sort,'__[''Variable.Sort, ''Term.Sort],''Assignment.Sort,'__['ctor.Attr,'format['__[''nt.Sort, ''d.Sort,''d.Sort,''d.Sort]],'prec['s_^63['0.Zero]]]],'op_:_->_`[_`].[ ''_<<_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['gather['__[''E.Sort, ''e.Sort]],'prec['s_^35['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<<.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_<=_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<=.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_<=_.Sort,'__[''String.Sort,''String.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''StringOpSymbol.Sort,''<=.Sort],'op-hook[ ''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_<_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_<_.Sort,'__[''String.Sort,''String.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''StringOpSymbol.Sort,''<.Sort],'op-hook[ ''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_=/=_.Sort,'__[ ''Universal.Sort,''Universal.Sort],''Bool.Sort,'__['poly['__['s_['0.Zero], 's_^2['0.Zero]]],'prec['s_^51['0.Zero]],'special['__['id-hook[ ''EqualitySymbol.Sort,'nil.TypeList],'term-hook[''equalTerm.Sort, ''false.Bool.Constant],'term-hook[''notEqualTerm.Sort, ''true.Bool.Constant]]]]],'op_:_->_`[_`].[''_==_.Sort,'__[''Universal.Sort, ''Universal.Sort],''Bool.Sort,'__['poly['__['s_['0.Zero],'s_^2['0.Zero]]], 'prec['s_^51['0.Zero]],'special['__['id-hook[''EqualitySymbol.Sort, 'nil.TypeList],'term-hook[''equalTerm.Sort,''true.Bool.Constant], 'term-hook[''notEqualTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_=>_.Sort,'__[''Term.Sort,''Term.Sort],''Condition.Sort,'__['ctor.Attr, 'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[''_=?_.Sort,'__[''Term.Sort, ''Term.Sort],''UnificandPair.Sort,'__['ctor.Attr,'prec['s_^71['0.Zero]]]], 'op_:_->_`[_`].[''_=_.Sort,'__[''Term.Sort,''Term.Sort],''EqCondition.Sort, '__['ctor.Attr,'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[''_>=_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''NumberOpSymbol.Sort,''>=.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>=_.Sort,'__[''String.Sort, ''String.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''StringOpSymbol.Sort,''>=.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>>_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Nat.Sort,'__['gather['__[''E.Sort,''e.Sort]],'prec['s_^35[ '0.Zero]],'special['__['id-hook[''NumberOpSymbol.Sort,''>>.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''_>_.Sort,'__[''Nat.Sort,''Nat.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''NumberOpSymbol.Sort,''>.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>_.Sort,'__[''String.Sort, ''String.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''StringOpSymbol.Sort,''>.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_\_.Sort,'__[''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'gather['__[''E.Sort,''e.Sort]]], 'op_:_->_`[_`].[''_^_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'gather['__[''E.Sort,''e.Sort]],'prec['s_^29['0.Zero]],'special['__[ 'id-hook[''NumberOpSymbol.Sort,''^.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_^_.Sort,'__[ ''NzNat.Sort,''Nat.Sort],''NzNat.Sort,'__['gather['__[''E.Sort,''e.Sort]], 'prec['s_^29['0.Zero]],'special['__['id-hook[''NumberOpSymbol.Sort, ''^.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]]],'op_:_->_`[_`].[''__.Sort,'__[''AttrSet.Sort, ''AttrSet.Sort],''AttrSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.AttrSet.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''EquationSet.Sort,''EquationSet.Sort],''EquationSet.Sort,'__['assoc.Attr, 'comm.Attr,'ctor.Attr,'format['__[''d.Sort,''ni.Sort,''d.Sort]],'id[ ''none.EquationSet.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''HookList.Sort,''HookList.Sort],''HookList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.HookList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''HookList.Sort,''NeHookList.Sort],''NeHookList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.HookList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''ImportList.Sort,''ImportList.Sort],''ImportList.Sort,'__['assoc.Attr, 'ctor.Attr,'format['__[''d.Sort,''ni.Sort,''d.Sort]],'id[ ''nil.ImportList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''MembAxSet.Sort,''MembAxSet.Sort],''MembAxSet.Sort,'__['assoc.Attr, 'comm.Attr,'ctor.Attr,'format['__[''d.Sort,''ni.Sort,''d.Sort]],'id[ ''none.MembAxSet.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[''NatList.Sort, ''NatList.Sort],''NatList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.NatList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort, '__[''NatList.Sort,''NeNatList.Sort],''NeNatList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.NatList.Constant],'prec['s_^25['0.Zero]]]], 'op_:_->_`[_`].[''__.Sort,'__[''NeHookList.Sort,''HookList.Sort], ''NeHookList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.HookList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[''NeNatList.Sort, ''NatList.Sort],''NeNatList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.NatList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort, '__[''NeQidList.Sort,''QidList.Sort],''NeQidList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]], 'op_:_->_`[_`].[''__.Sort,'__[''NeTypeList.Sort,''TypeList.Sort], ''NeTypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''OpDeclSet.Sort, ''OpDeclSet.Sort],''OpDeclSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr, 'format['__[''d.Sort,''ni.Sort,''d.Sort]],'id[''none.OpDeclSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''OpMappingSet.Sort,''OpMappingSet.Sort], ''OpMappingSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'format['__[ ''d.Sort,''ni.Sort,''d.Sort]],'id[''none.OpMappingSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''PrintOptionSet.Sort,''PrintOptionSet.Sort], ''PrintOptionSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.PrintOptionSet.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''QidList.Sort,''NeQidList.Sort],''NeQidList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]], 'op_:_->_`[_`].[''__.Sort,'__[''QidList.Sort,''QidList.Sort], ''QidList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''RuleSet.Sort, ''RuleSet.Sort],''RuleSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr, 'format['__[''d.Sort,''ni.Sort,''d.Sort]],'id[''none.RuleSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''SortMappingSet.Sort,''SortMappingSet.Sort], ''SortMappingSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'format['__[ ''d.Sort,''ni.Sort,''d.Sort]],'id[''none.SortMappingSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''SubsortDeclSet.Sort,''SubsortDeclSet.Sort], ''SubsortDeclSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'format['__[ ''d.Sort,''ni.Sort,''d.Sort]],'id[''none.SubsortDeclSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''Trace.Sort,''Trace.Sort],''Trace.Sort,'__[ 'assoc.Attr,'ctor.Attr,'format['__[''d.Sort,''n.Sort,''d.Sort]],'id[ ''nil.Trace.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[''TypeList.Sort, ''NeTypeList.Sort],''NeTypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[ ''__.Sort,'__[''TypeList.Sort,''TypeList.Sort],''TypeList.Sort,'__[ 'assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant],'prec['s_^25[ '0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''EmptyCommaList.Sort, ''EmptyCommaList.Sort],''EmptyCommaList.Sort,'__['assoc.Attr,'ctor.Attr, 'gather['__[''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec[ 's_^121['0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GTermList.Sort, ''GTermList.Sort],''GTermList.Sort,'__['assoc.Attr,'ctor.Attr,'gather['__[ ''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec['s_^121[ '0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GroundTermList.Sort, ''GroundTermList.Sort],''GroundTermList.Sort,'__['assoc.Attr,'ctor.Attr, 'gather['__[''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec[ 's_^121['0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GroundTermList.Sort, ''NeGroundTermList.Sort],''NeGroundTermList.Sort,'__['assoc.Attr, 'ctor.Attr,'gather['__[''e.Sort,''E.Sort]],'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]]]],'op_:_->_`[_`].[ ''_`,_.Qid,'__[''NeCTermList.Sort,''TermList.Sort],''NeCTermList.Sort,'__[ 'assoc.Attr,'ctor.Attr,'gather['__[''e.Sort,''E.Sort]],'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]]]],'op_:_->_`[_`].[ ''_`,_.Qid,'__[''NeGroundTermList.Sort,''GroundTermList.Sort], ''NeGroundTermList.Sort,'__['assoc.Attr,'ctor.Attr,'gather['__[''e.Sort, ''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''NeParameterDeclList.Sort, ''ParameterDeclList.Sort],''NeParameterDeclList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''NeParameterList.Sort, ''ParameterList.Sort],''NeParameterList.Sort,'__['assoc.Attr,'ctor.Attr, 'gather['__[''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec[ 's_^121['0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''NeTermList.Sort, ''TermList.Sort],''NeTermList.Sort,'__['assoc.Attr,'ctor.Attr,'gather['__[ ''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec['s_^121[ '0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterDeclList.Sort, ''NeParameterDeclList.Sort],''NeParameterDeclList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterDeclList.Sort, ''ParameterDeclList.Sort],''ParameterDeclList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterList.Sort, ''NeParameterList.Sort],''NeParameterList.Sort,'__['assoc.Attr,'ctor.Attr, 'gather['__[''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec[ 's_^121['0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterList.Sort, ''ParameterList.Sort],''ParameterList.Sort,'__['assoc.Attr,'ctor.Attr, 'gather['__[''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec[ 's_^121['0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''RenamingSet.Sort, ''RenamingSet.Sort],''RenamingSet.Sort,'__['assoc.Attr,'comm.Attr, 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''ni.Sort,''d.Sort]],'prec['s_^43[ '0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''NeCTermList.Sort],''NeCTermList.Sort,'__['assoc.Attr,'ctor.Attr,'gather[ '__[''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec['s_^121[ '0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''NeTermList.Sort],''NeTermList.Sort,'__['assoc.Attr,'ctor.Attr,'gather[ '__[''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec['s_^121[ '0.Zero]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''TermList.Sort],''TermList.Sort,'__['assoc.Attr,'ctor.Attr,'gather['__[ ''e.Sort,''E.Sort]],'id[''empty.EmptyCommaList.Constant],'prec['s_^121[ '0.Zero]]]],'op_:_->_`[_`].[''_`[_`].Qid,'__[''Qid.Sort, ''NeCTermList.Sort],''Context.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''_`[_`].Qid,'__[''Qid.Sort,''NeGroundTermList.Sort],''GroundTerm.Sort, 'ctor.Attr],'op_:_->_`[_`].[''_`[_`].Qid,'__[''Qid.Sort,''NeTermList.Sort], ''Term.Sort,'ctor.Attr],'op_:_->_`[_`].[''_`{_`}.Sort,'__[ ''ModuleExpression.Sort,''ParameterList.Sort],''ModuleExpression.Sort,'__[ 'ctor.Attr,'prec['s_^37['0.Zero]]]],'op_:_->_`[_`].[''_`{_`}.Sort,'__[ ''Qid.Sort,''ParameterDeclList.Sort],''Header.Sort,'ctor.Attr], 'op_:_->_`[_`].[''_and-then_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort, '__['gather['__[''e.Sort,''E.Sort]],'prec['s_^55['0.Zero]],'strat['__['s_[ '0.Zero],'0.Zero]]]],'op_:_->_`[_`].[''_and_.Sort,'__[''Bool.Sort, ''Bool.Sort],''Bool.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^55[ '0.Zero]]]],'op_:_->_`[_`].[''_divides_.Sort,'__[''NzNat.Sort,''Nat.Sort], ''Bool.Sort,'__['prec['s_^51['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''divides.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_implies_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['gather['__[ ''e.Sort,''E.Sort]],'prec['s_^61['0.Zero]]]],'op_:_->_`[_`].[''_in_.Sort, '__[''Qid.Sort,''QidSet.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''_or-else_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['gather['__[ ''e.Sort,''E.Sort]],'prec['s_^59['0.Zero]],'strat['__['s_['0.Zero], '0.Zero]]]],'op_:_->_`[_`].[''_or_.Sort,'__[''Bool.Sort,''Bool.Sort], ''Bool.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^59['0.Zero]]]], 'op_:_->_`[_`].[''_psubset_.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[''_quo_.Sort,'__[''Nat.Sort, ''NzNat.Sort],''Nat.Sort,'__['gather['__[''E.Sort,''e.Sort]],'prec['s_^31[ '0.Zero]],'special['__['id-hook[''NumberOpSymbol.Sort,''quo.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''_rem_.Sort,'__[''Nat.Sort,''NzNat.Sort],''Nat.Sort,'__['gather['__[ ''E.Sort,''e.Sort]],'prec['s_^31['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''rem.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_subset_.Sort,'__[ ''QidSet.Sort,''QidSet.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''_xor_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['assoc.Attr, 'comm.Attr,'prec['s_^57['0.Zero]]]],'op_:_->_`[_`].[''_xor_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^55[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''xor.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_|_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^57['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''|.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_|_.Sort,'__[''NzNat.Sort, ''Nat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^57['0.Zero]], 'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''|.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''`[_`].Kind,''Qid.Sort,''Module.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''`[`].Kind,'nil.TypeList,''Context.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort,''Substitution.Sort, ''Context.Sort],''Result4Tuple.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`,_`}.Qid,'__[''Substitution.Sort,''Substitution.Sort,''Nat.Sort], ''UnificationTriple.Sort,'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[ ''Term.Sort,''Substitution.Sort,''Nat.Sort],''Variant.Sort,'ctor.Attr], 'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort,''Rule.Sort], ''TraceStep.Sort,'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[ ''Term.Sort,''Type.Sort,''Substitution.Sort],''ResultTriple.Sort, 'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`}.Qid,'__[''Substitution.Sort, ''Context.Sort],''MatchPair.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`}.Qid,'__[''Substitution.Sort,''Nat.Sort],''UnificationPair.Sort, 'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`}.Qid,'__[''Term.Sort,''Type.Sort], ''ResultPair.Sort,'ctor.Attr],'op_:_->_`[_`].[''ambiguity.Sort,'__[ ''ResultPair.Sort,''ResultPair.Sort],''ResultPair?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''anyType.Sort,'nil.TypeList,''Type?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''append.Sort,'__[''NatList.Sort,''NatList.Sort], ''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''NatList.Sort,''NeNatList.Sort],''NeNatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''append.Sort,'__[''NeNatList.Sort,''NatList.Sort], ''NeNatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''NeQidList.Sort,''QidList.Sort],''NeQidList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''append.Sort,'__[''QidList.Sort,''NeQidList.Sort], ''NeQidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''QidList.Sort,''QidList.Sort],''QidList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''ascii.Sort,''Char.Sort,''Nat.Sort,'special['__['id-hook[ ''StringOpSymbol.Sort,''ascii.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[''assoc.Sort, 'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''ceq_=_if_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''EqCondition.Sort, ''AttrSet.Sort],''Equation.Sort,'__['ctor.Attr,'format['__[''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''char.Sort, ''`[FindResult`,NatList`,Bound`].Kind,''`[String`].Kind,'special['__[ 'id-hook[''StringOpSymbol.Sort,''char.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[ ''cmb_:_if_`[_`]..Qid,'__[''Term.Sort,''Sort.Sort,''EqCondition.Sort, ''AttrSet.Sort],''MembAx.Sort,'__['ctor.Attr,'format['__[''d.Sort,''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort, ''d.Sort]]]],'op_:_->_`[_`].[''comm.Sort,'nil.TypeList,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''completeName.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaCompleteName.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''config.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''crl_=>_if_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''Condition.Sort,''AttrSet.Sort],''Rule.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''ctor.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''delete.Sort,'__[''Qid.Sort,''QidSet.Sort],''QidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''downTerm.Sort,'__[''Term.Sort,''Universal.Sort], ''Universal.Sort,'__['poly['__['s_^2['0.Zero],'0.Zero]],'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaDownTerm.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]]],'op_:_->_`[_`].[''empty.Sort,'nil.TypeList, ''EmptyCommaList.Sort,'ctor.Attr],'op_:_->_`[_`].[''empty.Sort, 'nil.TypeList,''GroundTermList.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''eq_=_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''AttrSet.Sort], ''Equation.Sort,'__['ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''extending_..Qid,''ModuleExpression.Sort,''Import.Sort,'ctor.Attr], 'op_:_->_`[_`].[''failure.Sort,'nil.TypeList,''Result4Tuple?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''failure.Sort,'nil.TypeList, ''ResultPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[''failure.Sort, 'nil.TypeList,''ResultTriple?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''failure.Sort,'nil.TypeList,''Trace?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''false.Sort,'nil.TypeList,''Bool.Sort,'__['ctor.Attr,'special['id-hook[ ''SystemFalse.Sort,'nil.TypeList]]]],'op_:_->_`[_`].[''find.Sort,'__[ ''String.Sort,''String.Sort,''Nat.Sort],''FindResult.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''find.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''notFoundTerm.Sort, ''notFound.FindResult.Constant]]]],'op_:_->_`[_`].[''flat.Sort, 'nil.TypeList,''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''fmod_is_sorts_.____endfm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FModule.Sort,'__['ctor.Attr,'format['__[''d.Sort, ''d.Sort,''s.Sort,''n++i.Sort,''ni.Sort,''d.Sort,''d.Sort,''ni.Sort, ''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort,''d.Sort]],'gather['__[''&.Sort, ''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort]]]],'op_:_->_`[_`].[ ''format.Sort,''QidList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''format.Sort,'nil.TypeList,''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''front.Sort,''NeNatList.Sort,''NatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''front.Sort,''NeQidList.Sort,''QidList.Sort, 'none.AttrSet],'op_:_->_`[_`].[''frozen.Sort,''NeNatList.Sort,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''fth_is_sorts_.____endfth.Constant,'__[ ''Qid.Sort,''ImportList.Sort,''SortSet.Sort,''SubsortDeclSet.Sort, ''OpDeclSet.Sort,''MembAxSet.Sort,''EquationSet.Sort],''FTheory.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort,''n++i.Sort,''ni.Sort, ''d.Sort,''d.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort, ''d.Sort]],'gather['__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort, ''&.Sort,''&.Sort]]]],'op_:_->_`[_`].[''gather.Sort,''QidList.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''gcd.Sort,'__[''Nat.Sort, ''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''gcd.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''gcd.Sort,'__[''NzNat.Sort, ''Nat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''gcd.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''getContext.Sort, ''MatchPair.Sort,''Context.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getContext.Sort,''Result4Tuple.Sort,''Context.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getEqs.Sort,''Module.Sort,''EquationSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getFrom.Sort,''View.Sort, ''ModuleExpression.Sort,'none.AttrSet],'op_:_->_`[_`].[''getImports.Sort, ''Module.Sort,''ImportList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getKind.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaGetKind.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''getKinds.Sort,''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaGetKinds.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''getMbs.Sort,''Module.Sort,''MembAxSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Constant.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Module.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Variable.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''View.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getOpMappings.Sort,''View.Sort,''OpMappingSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getOps.Sort,''Module.Sort, ''OpDeclSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''getRls.Sort, ''Module.Sort,''RuleSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getSortMappings.Sort,''View.Sort,''SortMappingSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getSorts.Sort,''Module.Sort,''SortSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getSubsorts.Sort,''Module.Sort, ''SubsortDeclSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getSubstitution.Sort,''MatchPair.Sort,''Substitution.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getSubstitution.Sort,''Result4Tuple.Sort, ''Substitution.Sort,'none.AttrSet],'op_:_->_`[_`].[''getSubstitution.Sort, ''ResultTriple.Sort,''Substitution.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getTerm.Sort,''Result4Tuple.Sort,''Term.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getTerm.Sort,''ResultPair.Sort,''Term.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getTerm.Sort,''ResultTriple.Sort, ''Term.Sort,'none.AttrSet],'op_:_->_`[_`].[''getTo.Sort,''View.Sort, ''ModuleExpression.Sort,'none.AttrSet],'op_:_->_`[_`].[''getType.Sort, ''Constant.Sort,''Type.Sort,'none.AttrSet],'op_:_->_`[_`].[''getType.Sort, ''Result4Tuple.Sort,''Type.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getType.Sort,''ResultPair.Sort,''Type.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getType.Sort,''ResultTriple.Sort,''Type.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getType.Sort,''Variable.Sort,''Type.Sort, 'none.AttrSet],'op_:_->_`[_`].[''glbSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaGlbSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''head.Sort,''NeNatList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''head.Sort,''NeQidList.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''id.Sort,''Term.Sort,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''id-hook.Sort,'__[''Qid.Sort,''QidList.Sort],''Hook.Sort, '__['ctor.Attr,'format['__[''nssss.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''idem.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''if_then_else_fi.Sort,'__[''Bool.Sort,''Universal.Sort,''Universal.Sort], ''Universal.Sort,'__['poly['__['s_^2['0.Zero],'s_^3['0.Zero],'0.Zero]], 'special['__['id-hook[''BranchSymbol.Sort,'nil.TypeList],'term-hook[ ''1.Sort,''true.Bool.Constant],'term-hook[''2.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''including_..Qid, ''ModuleExpression.Sort,''Import.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''insert.Sort,'__[''Qid.Sort,''QidSet.Sort],''QidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''intersection.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''iter.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''label.Sort,''Qid.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''label_to_.Sort,'__[''Qid.Sort, ''Qid.Sort],''Renaming.Sort,'ctor.Attr],'op_:_->_`[_`].[''last.Sort, ''NeNatList.Sort,''Nat.Sort,'none.AttrSet],'op_:_->_`[_`].[''last.Sort, ''NeQidList.Sort,''Qid.Sort,'none.AttrSet],'op_:_->_`[_`].[''lcm.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''lcm.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''lcm.Sort,'__[ ''NzNat.Sort,''NzNat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr, 'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''lcm.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''leastSort.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaLeastSort.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''left-id.Sort, ''Term.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''length.Sort, ''String.Sort,''Nat.Sort,'special['__['id-hook[''StringOpSymbol.Sort, ''length.Sort],'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]],'op_:_->_`[_`].[''lesserSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaLesserSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''max.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'special['__['id-hook[''ACU_NumberOpSymbol.Sort, ''max.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]]],'op_:_->_`[_`].[''max.Sort,'__[''NzNat.Sort,''Nat.Sort], ''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''max.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''maximalAritySet.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaMaximalAritySet.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort, '__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''maximalSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaMaximalSorts.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''mb_:_`[_`]..Qid, '__[''Term.Sort,''Sort.Sort,''AttrSet.Sort],''MembAx.Sort,'__['ctor.Attr, 'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''memo.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''metaApply.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Substitution?`].Kind,''`[FindResult`,NatList`,Bound`].Kind], ''`[ResultTriple?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaApply.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaDisjointUnify.Sort,'__[''`[Module`].Kind, ''`[UnificationProblem`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationTriple?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaDisjointUnify.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaFrewrite.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaFrewrite.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaGetIrredundantVariant.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Variant?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaGetIrredundantVariant.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaGetVariant.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Variant?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaGetVariant.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaMatch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[FindResult`,NatList`,Bound`].Kind], ''`[Substitution?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaMatch.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaNarrow.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[FindResult`,NatList`,Bound`].Kind,''`[Bool`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaNarrow2.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaNarrow.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultTriple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaNarrow.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaNormalize.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaNormalize.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaParse.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind], ''`[ResultPair?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaParse.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaPrettyPrint.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'none.AttrSet],'op_:_->_`[_`].[''metaPrettyPrint.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[PrintOptionSet`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaPrettyPrint.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaReduce.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[ResultPair?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaReduce.Sort],'op-hook[ ''qidSymbol.Sort,''.Sort,'nil.TypeList,''Qid.Sort],'op-hook[ ''metaTermSymbol.Sort,''_`[_`].Qid,'__[''Qid.Sort,''NeGroundTermList.Sort], ''GroundTerm.Sort],'op-hook[''metaArgSymbol.Sort,''_`,_.Qid,'__[ ''NeGroundTermList.Sort,''GroundTermList.Sort],''NeGroundTermList.Sort], 'op-hook[''emptyTermListSymbol.Sort,''empty.Sort,'nil.TypeList, ''GroundTermList.Sort],'op-hook[''assignmentSymbol.Sort,''_<-_.Sort,'__[ ''Variable.Sort,''Term.Sort],''Assignment.Sort],'op-hook[ ''emptySubstitutionSymbol.Sort,''none.Sort,'nil.TypeList, ''Substitution.Sort],'op-hook[''substitutionSymbol.Sort,''_;_.Sort,'__[ ''Substitution.Sort,''Substitution.Sort],''Substitution.Sort],'op-hook[ ''holeSymbol.Sort,''`[`].Kind,'nil.TypeList,''Context.Sort],'op-hook[ ''headerSymbol.Sort,''_`{_`}.Sort,'__[''Qid.Sort,''ParameterDeclList.Sort], ''Header.Sort],'op-hook[''parameterDeclSymbol.Sort,''_::_.Variable,'__[ ''Sort.Sort,''ModuleExpression.Sort],''ParameterDecl.Sort],'op-hook[ ''parameterDeclListSymbol.Sort,''_`,_.Qid,'__[''ParameterDeclList.Sort, ''ParameterDeclList.Sort],''ParameterDeclList.Sort],'op-hook[ ''protectingSymbol.Sort,''protecting_..Qid,''ModuleExpression.Sort, ''Import.Sort],'op-hook[''extendingSymbol.Sort,''extending_..Qid, ''ModuleExpression.Sort,''Import.Sort],'op-hook[''includingSymbol.Sort, ''including_..Qid,''ModuleExpression.Sort,''Import.Sort],'op-hook[ ''nilImportListSymbol.Sort,''nil.Sort,'nil.TypeList,''ImportList.Sort], 'op-hook[''importListSymbol.Sort,''__.Sort,'__[''ImportList.Sort, ''ImportList.Sort],''ImportList.Sort],'op-hook[''emptySortSetSymbol.Sort, ''none.Sort,'nil.TypeList,''QidSet.Sort],'op-hook[''sortSetSymbol.Sort, ''_;_.Sort,'__[''QidSet.Sort,''QidSet.Sort],''QidSet.Sort],'op-hook[ ''subsortSymbol.Sort,''subsort_<_..Qid,'__[''Sort.Sort,''Sort.Sort], ''SubsortDecl.Sort],'op-hook[''emptySubsortDeclSetSymbol.Sort,''none.Sort, 'nil.TypeList,''SubsortDeclSet.Sort],'op-hook[''subsortDeclSetSymbol.Sort, ''__.Sort,'__[''SubsortDeclSet.Sort,''SubsortDeclSet.Sort], ''SubsortDeclSet.Sort],'op-hook[''nilQidListSymbol.Sort,''nil.Sort, 'nil.TypeList,''QidList.Sort],'op-hook[''qidListSymbol.Sort,''__.Sort,'__[ ''QidList.Sort,''QidList.Sort],''QidList.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'op-hook[''natListSymbol.Sort,''__.Sort, '__[''NatList.Sort,''NatList.Sort],''NatList.Sort],'op-hook[ ''unboundedSymbol.Sort,''unbounded.Sort,'nil.TypeList,''Bound.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort], 'op-hook[''sortRenamingSymbol.Sort,''sort_to_.Sort,'__[''Qid.Sort, ''Qid.Sort],''Renaming.Sort],'op-hook[''opRenamingSymbol.Sort, ''op_to_`[_`].Qid,'__[''Qid.Sort,''Qid.Sort,''AttrSet.Sort], ''Renaming.Sort],'op-hook[''opRenamingSymbol2.Sort,''op_:_->_to_`[_`].Qid, '__[''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort,''AttrSet.Sort], ''Renaming.Sort],'op-hook[''labelRenamingSymbol.Sort,''label_to_.Sort,'__[ ''Qid.Sort,''Qid.Sort],''Renaming.Sort],'op-hook[''renamingSetSymbol.Sort, ''_`,_.Qid,'__[''RenamingSet.Sort,''RenamingSet.Sort],''RenamingSet.Sort], 'op-hook[''sumSymbol.Sort,''_+_.Sort,'__[''ModuleExpression.Sort, ''ModuleExpression.Sort],''ModuleExpression.Sort],'op-hook[ ''renamingSymbol.Sort,''_*`(_`).Sort,'__[''ModuleExpression.Sort, ''RenamingSet.Sort],''ModuleExpression.Sort],'op-hook[ ''instantiationSymbol.Sort,''_`{_`}.Sort,'__[''ModuleExpression.Sort, ''ParameterList.Sort],''ModuleExpression.Sort],'op-hook[ ''termHookSymbol.Sort,''term-hook.Sort,'__[''Qid.Sort,''Term.Sort], ''Hook.Sort],'op-hook[''hookListSymbol.Sort,''__.Sort,'__[''HookList.Sort, ''HookList.Sort],''HookList.Sort],'op-hook[''idHookSymbol.Sort, ''id-hook.Sort,'__[''Qid.Sort,''QidList.Sort],''Hook.Sort],'op-hook[ ''opHookSymbol.Sort,''op-hook.Sort,'__[''Qid.Sort,''Qid.Sort, ''QidList.Sort,''Qid.Sort],''Hook.Sort],'op-hook[''assocSymbol.Sort, ''assoc.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''commSymbol.Sort, ''comm.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''idemSymbol.Sort, ''idem.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''iterSymbol.Sort, ''iter.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''idSymbol.Sort,''id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''leftIdSymbol.Sort,''left-id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''rightIdSymbol.Sort,''right-id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''stratSymbol.Sort,''strat.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''memoSymbol.Sort,''memo.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''precSymbol.Sort,''prec.Sort, ''Nat.Sort,''Attr.Sort],'op-hook[''gatherSymbol.Sort,''gather.Sort, ''QidList.Sort,''Attr.Sort],'op-hook[''formatSymbol.Sort,''format.Sort, ''QidList.Sort,''Attr.Sort],'op-hook[''ctorSymbol.Sort,''ctor.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''frozenSymbol.Sort,''frozen.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''polySymbol.Sort,''poly.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''configSymbol.Sort,''config.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''objectSymbol.Sort,''object.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''msgSymbol.Sort,''msg.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''specialSymbol.Sort,''special.Sort, ''NeHookList.Sort,''Attr.Sort],'op-hook[''labelSymbol.Sort,''label.Sort, ''Qid.Sort,''Attr.Sort],'op-hook[''metadataSymbol.Sort,''metadata.Sort, ''String.Sort,''Attr.Sort],'op-hook[''owiseSymbol.Sort,''owise.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''variantAttrSymbol.Sort, ''variant.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''nonexecSymbol.Sort, ''nonexec.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''printSymbol.Sort, ''print.Sort,''QidList.Sort,''Attr.Sort],'op-hook[ ''emptyAttrSetSymbol.Sort,''none.Sort,'nil.TypeList,''AttrSet.Sort], 'op-hook[''attrSetSymbol.Sort,''__.Sort,'__[''AttrSet.Sort,''AttrSet.Sort], ''AttrSet.Sort],'op-hook[''opDeclSymbol.Sort,''op_:_->_`[_`]..Qid,'__[ ''Qid.Sort,''TypeList.Sort,''Type.Sort,''AttrSet.Sort],''OpDecl.Sort], 'op-hook[''opDeclSetSymbol.Sort,''__.Sort,'__[''OpDeclSet.Sort, ''OpDeclSet.Sort],''OpDeclSet.Sort],'op-hook[''emptyOpDeclSetSymbol.Sort, ''none.Sort,'nil.TypeList,''OpDeclSet.Sort],'op-hook[ ''noConditionSymbol.Sort,''nil.Sort,'nil.TypeList,''EqCondition.Sort], 'op-hook[''equalityConditionSymbol.Sort,''_=_.Sort,'__[''Term.Sort, ''Term.Sort],''EqCondition.Sort],'op-hook[''sortTestConditionSymbol.Sort, ''_:_.Variable,'__[''Term.Sort,''Sort.Sort],''EqCondition.Sort],'op-hook[ ''matchConditionSymbol.Sort,''_:=_.Variable,'__[''Term.Sort,''Term.Sort], ''EqCondition.Sort],'op-hook[''rewriteConditionSymbol.Sort,''_=>_.Sort,'__[ ''Term.Sort,''Term.Sort],''Condition.Sort],'op-hook[ ''conjunctionSymbol.Sort,''_/\_.Sort,'__[''EqCondition.Sort, ''EqCondition.Sort],''EqCondition.Sort],'op-hook[''mbSymbol.Sort, ''mb_:_`[_`]..Qid,'__[''Term.Sort,''Sort.Sort,''AttrSet.Sort], ''MembAx.Sort],'op-hook[''cmbSymbol.Sort,''cmb_:_if_`[_`]..Qid,'__[ ''Term.Sort,''Sort.Sort,''EqCondition.Sort,''AttrSet.Sort],''MembAx.Sort], 'op-hook[''emptyMembAxSetSymbol.Sort,''none.Sort,'nil.TypeList, ''MembAxSet.Sort],'op-hook[''membAxSetSymbol.Sort,''__.Sort,'__[ ''MembAxSet.Sort,''MembAxSet.Sort],''MembAxSet.Sort],'op-hook[ ''eqSymbol.Sort,''eq_=_`[_`]..Qid,'__[''Term.Sort,''Term.Sort, ''AttrSet.Sort],''Equation.Sort],'op-hook[''ceqSymbol.Sort, ''ceq_=_if_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''EqCondition.Sort, ''AttrSet.Sort],''Equation.Sort],'op-hook[''emptyEquationSetSymbol.Sort, ''none.Sort,'nil.TypeList,''EquationSet.Sort],'op-hook[ ''equationSetSymbol.Sort,''__.Sort,'__[''EquationSet.Sort, ''EquationSet.Sort],''EquationSet.Sort],'op-hook[''rlSymbol.Sort, ''rl_=>_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''AttrSet.Sort], ''Rule.Sort],'op-hook[''crlSymbol.Sort,''crl_=>_if_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''Condition.Sort,''AttrSet.Sort],''Rule.Sort], 'op-hook[''emptyRuleSetSymbol.Sort,''none.Sort,'nil.TypeList, ''RuleSet.Sort],'op-hook[''ruleSetSymbol.Sort,''__.Sort,'__[''RuleSet.Sort, ''RuleSet.Sort],''RuleSet.Sort],'op-hook[''fmodSymbol.Sort, ''fmod_is_sorts_.____endfm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FModule.Sort],'op-hook[''fthSymbol.Sort, ''fth_is_sorts_.____endfth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FTheory.Sort],'op-hook[''modSymbol.Sort, ''mod_is_sorts_._____endm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''SModule.Sort],'op-hook[ ''thSymbol.Sort,''th_is_sorts_._____endth.Constant,'__[''Qid.Sort, ''ImportList.Sort,''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort, ''MembAxSet.Sort,''EquationSet.Sort,''RuleSet.Sort],''STheory.Sort], 'op-hook[''sortMappingSymbol.Sort,''sort_to_..Qid,'__[''Sort.Sort, ''Sort.Sort],''SortMapping.Sort],'op-hook[''emptySortMappingSetSymbol.Sort, ''none.Sort,'nil.TypeList,''SortMappingSet.Sort],'op-hook[ ''sortMappingSetSymbol.Sort,''__.Sort,'__[''SortMappingSet.Sort, ''SortMappingSet.Sort],''SortMappingSet.Sort],'op-hook[ ''opMappingSymbol.Sort,''op_to_..Qid,'__[''Qid.Sort,''Qid.Sort], ''OpMapping.Sort],'op-hook[''opSpecificMappingSymbol.Sort, ''op_:_->_to_..Qid,'__[''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort], ''OpMapping.Sort],'op-hook[''opTermMappingSymbol.Sort,''op_to`term_..Qid, '__[''Term.Sort,''Term.Sort],''OpMapping.Sort],'op-hook[ ''emptyOpMappingSetSymbol.Sort,''none.Sort,'nil.TypeList, ''OpMappingSet.Sort],'op-hook[''opMappingSetSymbol.Sort,''__.Sort,'__[ ''OpMappingSet.Sort,''OpMappingSet.Sort],''OpMappingSet.Sort],'op-hook[ ''viewSymbol.Sort,''view_from_to_is__endv.Sort,'__[''Header.Sort, ''ModuleExpression.Sort,''ModuleExpression.Sort,''SortMappingSet.Sort, ''OpMappingSet.Sort],''View.Sort],'op-hook[''anyTypeSymbol.Sort, ''anyType.Sort,'nil.TypeList,''Type?.Sort],'op-hook[ ''unificandPairSymbol.Sort,''_=?_.Sort,'__[''Term.Sort,''Term.Sort], ''UnificandPair.Sort],'op-hook[''unificationConjunctionSymbol.Sort, ''_/\_.Sort,'__[''UnificationProblem.Sort,''UnificationProblem.Sort], ''UnificationProblem.Sort],'op-hook[''resultPairSymbol.Sort,''`{_`,_`}.Qid, '__[''Term.Sort,''Type.Sort],''ResultPair.Sort],'op-hook[ ''resultTripleSymbol.Sort,''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Substitution.Sort],''ResultTriple.Sort],'op-hook[ ''result4TupleSymbol.Sort,''`{_`,_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Substitution.Sort,''Context.Sort],''Result4Tuple.Sort],'op-hook[ ''matchPairSymbol.Sort,''`{_`,_`}.Qid,'__[''Substitution.Sort, ''Context.Sort],''MatchPair.Sort],'op-hook[''unificationPairSymbol.Sort, ''`{_`,_`}.Qid,'__[''Substitution.Sort,''Nat.Sort],''UnificationPair.Sort], 'op-hook[''unificationTripleSymbol.Sort,''`{_`,_`,_`}.Qid,'__[ ''Substitution.Sort,''Substitution.Sort,''Nat.Sort], ''UnificationTriple.Sort],'op-hook[''variantSymbol.Sort,''`{_`,_`,_`}.Qid, '__[''Term.Sort,''Substitution.Sort,''Nat.Sort],''Variant.Sort],'op-hook[ ''traceStepSymbol.Sort,''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Rule.Sort],''TraceStep.Sort],'op-hook[''nilTraceSymbol.Sort,''nil.Sort, 'nil.TypeList,''Trace.Sort],'op-hook[''traceSymbol.Sort,''__.Sort,'__[ ''Trace.Sort,''Trace.Sort],''Trace.Sort],'op-hook[''noParseSymbol.Sort, ''noParse.Sort,''Nat.Sort,''ResultPair?.Sort],'op-hook[ ''ambiguitySymbol.Sort,''ambiguity.Sort,'__[''ResultPair.Sort, ''ResultPair.Sort],''ResultPair?.Sort],'op-hook[''failure2Symbol.Sort, ''failure.Sort,'nil.TypeList,''ResultPair?.Sort],'op-hook[ ''failure3Symbol.Sort,''failure.Sort,'nil.TypeList,''ResultTriple?.Sort], 'op-hook[''failure4Symbol.Sort,''failure.Sort,'nil.TypeList, ''Result4Tuple?.Sort],'op-hook[''noUnifierPairSymbol.Sort,''noUnifier.Sort, 'nil.TypeList,''UnificationPair?.Sort],'op-hook[ ''noUnifierTripleSymbol.Sort,''noUnifier.Sort,'nil.TypeList, ''UnificationTriple?.Sort],'op-hook[''noVariantSymbol.Sort, ''noVariant.Sort,'nil.TypeList,''Variant?.Sort],'op-hook[ ''noMatchSubstSymbol.Sort,''noMatch.Sort,'nil.TypeList, ''Substitution?.Sort],'op-hook[''noMatchPairSymbol.Sort,''noMatch.Sort, 'nil.TypeList,''MatchPair?.Sort],'op-hook[''failureTraceSymbol.Sort, ''failure.Sort,'nil.TypeList,''Trace?.Sort],'op-hook[''mixfixSymbol.Sort, ''mixfix.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[ ''withParensSymbol.Sort,''with-parens.Sort,'nil.TypeList, ''PrintOption.Sort],'op-hook[''flatSymbol.Sort,''flat.Sort,'nil.TypeList, ''PrintOption.Sort],'op-hook[''formatPrintOptionSymbol.Sort,''format.Sort, 'nil.TypeList,''PrintOption.Sort],'op-hook[''numberSymbol.Sort, ''number.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[''ratSymbol.Sort, ''rat.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[ ''emptyPrintOptionSetSymbol.Sort,''none.Sort,'nil.TypeList, ''PrintOptionSet.Sort],'op-hook[''printOptionSetSymbol.Sort,''__.Sort,'__[ ''PrintOptionSet.Sort,''PrintOptionSet.Sort],''PrintOptionSet.Sort], 'term-hook[''trueTerm.Sort,''true.Bool.Constant],'term-hook[ ''falseTerm.Sort,''false.Bool.Constant]]]],'op_:_->_`[_`].[ ''metaRewrite.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaRewrite.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaSearch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultTriple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaSearch.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaSearchPath.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Trace?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaSearchPath.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaUnify.Sort,'__[ ''`[Module`].Kind,''`[UnificationProblem`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationPair?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUnify.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaVariantDisjointUnify.Sort,'__[ ''`[Module`].Kind,''`[UnificationProblem`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationTriple?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaVariantDisjointUnify.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''metaVariantUnify.Sort,'__[''`[Module`].Kind, ''`[UnificationProblem`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationPair?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaVariantUnify.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaXapply.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Substitution?`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Result4Tuple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaXapply.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaXmatch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[MatchPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaXmatch.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metadata.Sort,''String.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''min.Sort,'__[''Nat.Sort, ''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''min.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''min.Sort,'__[''NzNat.Sort, ''NzNat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''min.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''minimalSorts.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaMinimalSorts.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''mixfix.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''modExp.Sort,'__[ ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind], ''`[FindResult`,NatList`,Bound`].Kind,'special['__['id-hook[ ''NumberOpSymbol.Sort,''modExp.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[ ''mod_is_sorts_._____endm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''SModule.Sort,'__['ctor.Attr,'format[ '__[''d.Sort,''d.Sort,''s.Sort,''n++i.Sort,''ni.Sort,''d.Sort,''d.Sort, ''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort,''d.Sort]], 'gather['__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort, ''&.Sort]]]],'op_:_->_`[_`].[''msg.Sort,'nil.TypeList,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList,''EqCondition.Sort, 'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList,''HookList.Sort, 'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList,''ImportList.Sort, 'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList,''NatList.Sort, 'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''ParameterDeclList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''QidList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''Trace.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''TypeList.Sort,'ctor.Attr],'op_:_->_`[_`].[''noMatch.Sort, 'nil.TypeList,''MatchPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[''noMatch.Sort, 'nil.TypeList,''Substitution?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''noParse.Sort,''Nat.Sort,''ResultPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''noUnifier.Sort,'nil.TypeList,''UnificationPair?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''noUnifier.Sort,'nil.TypeList,''UnificationTriple?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''noVariant.Sort,'nil.TypeList,''Variant?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''AttrSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''EmptyTypeSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''EquationSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''MembAxSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''OpDeclSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''OpMappingSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList, ''PrintOptionSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''QidSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''RuleSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''SortMappingSet.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''none.Sort,'nil.TypeList,''SubsortDeclSet.Sort,'ctor.Attr], 'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''Substitution.Sort,'ctor.Attr], 'op_:_->_`[_`].[''nonexec.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''notFound.Sort,'nil.TypeList,''FindResult.Sort, 'ctor.Attr],'op_:_->_`[_`].[''not_.Sort,''Bool.Sort,''Bool.Sort,'prec[ 's_^53['0.Zero]]],'op_:_->_`[_`].[''number.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''object.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''occurs.Sort,'__[''Nat.Sort, ''NatList.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[''occurs.Sort, '__[''Qid.Sort,''QidList.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''op-hook.Sort,'__[''Qid.Sort,''Qid.Sort,''QidList.Sort,''Qid.Sort], ''Hook.Sort,'__['ctor.Attr,'format['__[''nssss.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_:_->_`[_`]..Qid,'__[''Qid.Sort,''TypeList.Sort, ''Type.Sort,''AttrSet.Sort],''OpDecl.Sort,'__['ctor.Attr,'format['__[ ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''op_:_->_to_..Qid,'__[ ''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort],''OpMapping.Sort, 'ctor.Attr],'op_:_->_`[_`].[''op_:_->_to_`[_`].Qid,'__[''Qid.Sort, ''TypeList.Sort,''Type.Sort,''Qid.Sort,''AttrSet.Sort],''Renaming.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_to_..Qid,'__[''Qid.Sort,''Qid.Sort],''OpMapping.Sort, 'ctor.Attr],'op_:_->_`[_`].[''op_to_`[_`].Qid,'__[''Qid.Sort,''Qid.Sort, ''AttrSet.Sort],''Renaming.Sort,'__['ctor.Attr,'format['__[''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_to`term_..Qid,'__[''Term.Sort,''Term.Sort], ''OpMapping.Sort,'ctor.Attr],'op_:_->_`[_`].[''owise.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''poly.Sort,''NeNatList.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''prec.Sort,''Nat.Sort,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''print.Sort,''QidList.Sort,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''protecting_..Qid,''ModuleExpression.Sort, ''Import.Sort,'ctor.Attr],'op_:_->_`[_`].[''qid.Sort,''`[String`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''QuotedIdentifierOpSymbol.Sort, ''qid.Sort],'op-hook[''quotedIdentifierSymbol.Sort,''.Sort, 'nil.TypeList,''Qid.Sort],'op-hook[''stringSymbol.Sort,''.Sort, 'nil.TypeList,''Char.Sort]]]],'op_:_->_`[_`].[''rat.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''reverse.Sort, ''NatList.Sort,''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''reverse.Sort,''NeNatList.Sort,''NeNatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''reverse.Sort,''NeQidList.Sort,''NeQidList.Sort, 'none.AttrSet],'op_:_->_`[_`].[''reverse.Sort,''QidList.Sort, ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''rfind.Sort,'__[ ''String.Sort,''String.Sort,''Nat.Sort],''FindResult.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''rfind.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''notFoundTerm.Sort, ''notFound.FindResult.Constant]]]],'op_:_->_`[_`].[''right-id.Sort, ''Term.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''rl_=>_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''AttrSet.Sort],''Rule.Sort,'__['ctor.Attr,'format[ '__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''s_.Sort,''Nat.Sort,''NzNat.Sort, '__['ctor.Attr,'iter.Attr,'special['__['id-hook[''SuccSymbol.Sort, 'nil.TypeList],'term-hook[''zeroTerm.Sort,''0.Zero.Constant]]]]], 'op_:_->_`[_`].[''sameKind.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[Bool`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaSameKind.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''sd.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'comm.Attr,'special['__['id-hook[''CUI_NumberOpSymbol.Sort,''sd.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''size.Sort,''NatList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''NeNatList.Sort,''NzNat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''NeQidList.Sort,''NzNat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''QidList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''sortLeq.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaSortLeq.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''sort_to_.Sort,'__[''Qid.Sort,''Qid.Sort],''Renaming.Sort,'ctor.Attr], 'op_:_->_`[_`].[''sort_to_..Qid,'__[''Sort.Sort,''Sort.Sort], ''SortMapping.Sort,'ctor.Attr],'op_:_->_`[_`].[''special.Sort, ''NeHookList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''strat.Sort, ''NeNatList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''string.Sort, ''Qid.Sort,''String.Sort,'special['__['id-hook[ ''QuotedIdentifierOpSymbol.Sort,''string.Sort],'op-hook[ ''quotedIdentifierSymbol.Sort,''.Sort,'nil.TypeList,''Qid.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort]]]],'op_:_->_`[_`].[''subsort_<_..Qid,'__[''Sort.Sort, ''Sort.Sort],''SubsortDecl.Sort,'ctor.Attr],'op_:_->_`[_`].[''substr.Sort, '__[''String.Sort,''Nat.Sort,''Nat.Sort],''String.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''substr.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[''tail.Sort, ''NeNatList.Sort,''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''tail.Sort, ''NeQidList.Sort,''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''term-hook.Sort,'__[''Qid.Sort,''Term.Sort],''Hook.Sort,'__['ctor.Attr, 'format['__[''nssss.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''th_is_sorts_._____endth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''STheory.Sort,'__['ctor.Attr,'format[ '__[''d.Sort,''d.Sort,''d.Sort,''n++i.Sort,''ni.Sort,''d.Sort,''d.Sort, ''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort,''d.Sort]], 'gather['__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort, ''&.Sort]]]],'op_:_->_`[_`].[''true.Sort,'nil.TypeList,''Bool.Sort,'__[ 'ctor.Attr,'special['id-hook[''SystemTrue.Sort,'nil.TypeList]]]], 'op_:_->_`[_`].[''unbounded.Sort,'nil.TypeList,''Bound.Sort,'ctor.Attr], 'op_:_->_`[_`].[''union.Sort,'__[''NeQidSet.Sort,''QidSet.Sort], ''NeQidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''union.Sort,'__[ ''QidSet.Sort,''NeQidSet.Sort],''NeQidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''union.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''upEqs.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[EquationSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpEqs.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upImports.Sort,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[ImportList`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpImports.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upMbs.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[MembAxSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpMbs.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upModule.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind], ''`[Module`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaUpModule.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''upOpDecls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind], ''`[OpDeclSet`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaUpOpDecls.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''upRls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[RuleSet`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpRls.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upSorts.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upSubsortDecls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Bool`].Kind],''`[SubsortDeclSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpSubsortDecls.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upTerm.Sort,''Universal.Sort, ''Term.Sort,'__['poly['s_['0.Zero]],'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpTerm.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]]], 'op_:_->_`[_`].[''upView.Sort,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[View`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpView.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''variant.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''view_from_to_is__endv.Sort,'__[ ''Header.Sort,''ModuleExpression.Sort,''ModuleExpression.Sort, ''SortMappingSet.Sort,''OpMappingSet.Sort],''View.Sort,'__['ctor.Attr, 'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort, ''n++i.Sort,''ni.Sort,''n--i.Sort,''d.Sort]],'gather['__[''&.Sort,''&.Sort, ''&.Sort,''&.Sort,''&.Sort]]]],'op_:_->_`[_`].[''wellFormed.Sort, ''Module.Sort,''Bool.Sort,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedModule.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort, '__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''wellFormed.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind], ''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedTerm.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''wellFormed.Sort,'__[''`[Module`].Kind,''`[Substitution?`].Kind], ''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedSubstitution.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''with-parens.Sort,'nil.TypeList,''PrintOption.Sort, 'ctor.Attr],'op_:_->_`[_`].[''|_|.Sort,''NeQidSet.Sort,''NzNat.Sort, 'none.AttrSet],'op_:_->_`[_`].[''|_|.Sort,''QidSet.Sort,''Nat.Sort, 'none.AttrSet]],'none.MembAxSet,'__['eq_=_`[_`].['_`[_`][''$card.Sort, '_`,_[''none.EmptyTypeSet.Constant,''C:Nat.Variable]],''C:Nat.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort, '_`,_[''E:Qid.Variable,''S:QidSet.Variable]],''C:Nat.Variable]],'_`[_`][ ''$card.Sort,'_`,_[''S:QidSet.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'owise.Attr], 'eq_=_`[_`].['_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[ ''N:NeQidSet.Variable,''N:NeQidSet.Variable,''S:QidSet.Variable]], ''C:Nat.Variable]],'_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[ ''N:NeQidSet.Variable,''S:QidSet.Variable]],''C:Nat.Variable]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$diff.Sort,'_`,_[ ''none.EmptyTypeSet.Constant,''S':QidSet.Variable,''A:QidSet.Variable]], ''A:QidSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''$diff.Sort,'_`,_[ '_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]], ''S':QidSet.Variable,''A:QidSet.Variable]],'_`[_`][''$diff.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable,'_`[_`][''if_then_else_fi.Sort, '_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable,''S':QidSet.Variable]], ''A:QidSet.Variable,'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''A:QidSet.Variable]]]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''$intersect.Sort,'_`,_[''none.EmptyTypeSet.Constant,''S':QidSet.Variable, ''A:QidSet.Variable]],''A:QidSet.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$intersect.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],''S':QidSet.Variable,''A:QidSet.Variable]],'_`[_`][ ''$intersect.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable,'_`[_`][ ''if_then_else_fi.Sort,'_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable, ''S':QidSet.Variable]],'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''A:QidSet.Variable]],''A:QidSet.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_[''nil.NatList.Constant, ''A:NatList.Variable]],''A:NatList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_[''nil.TypeList.Constant, ''A:QidList.Variable]],''A:QidList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]],''A:NatList.Variable]],'_`[_`][''$reverse.Sort, '_`,_[''L:NatList.Variable,'_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''A:NatList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''$reverse.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]],''A:QidList.Variable]],'_`[_`][''$reverse.Sort, '_`,_[''L:QidList.Variable,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''A:QidList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''$size.Sort, '_`,_[''nil.NatList.Constant,''C:Nat.Variable]],''C:Nat.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_[ ''nil.TypeList.Constant,''C:Nat.Variable]],''C:Nat.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[ ''E:Nat.Variable,''L:NatList.Variable]],''C:Nat.Variable]],'_`[_`][ ''$size.Sort,'_`,_[''L:NatList.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[ ''E:Qid.Variable,''L:QidList.Variable]],''C:Nat.Variable]],'_`[_`][ ''$size.Sort,'_`,_[''L:QidList.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_;_.Sort,'_`,_[''A:Assignment.Variable, ''A:Assignment.Variable]],''A:Assignment.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_;_.Sort,'_`,_[''N:NeQidSet.Variable, ''N:NeQidSet.Variable]],''N:NeQidSet.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_;_.Sort,'_`,_[''T:TypeList.Variable,''T:TypeList.Variable]], ''T:TypeList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_\_.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable]],'_`[_`][''$diff.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable,''none.EmptyTypeSet.Constant]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_\_.Sort,'_`,_[''S:QidSet.Variable, ''none.EmptyTypeSet.Constant]],''S:QidSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''A:Attr.Variable,''A:Attr.Variable]], ''A:Attr.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[ ''E:Equation.Variable,''E:Equation.Variable]],''E:Equation.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''M:MembAx.Variable, ''M:MembAx.Variable]],''M:MembAx.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''__.Sort,'_`,_[''O:OpDecl.Variable,''O:OpDecl.Variable]], ''O:OpDecl.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[ ''O:OpMapping.Variable,''O:OpMapping.Variable]],''O:OpMapping.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''R:Rule.Variable, ''R:Rule.Variable]],''R:Rule.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''__.Sort,'_`,_[''S:SortMapping.Variable,''S:SortMapping.Variable]], ''S:SortMapping.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort, '_`,_[''S:SubsortDecl.Variable,''S:SubsortDecl.Variable]], ''S:SubsortDecl.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''_and-then_.Sort,'_`,_[''false.Bool.Constant,''B:`[Bool`].Variable]], ''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''_and-then_.Sort,'_`,_[''true.Bool.Constant,''B:`[Bool`].Variable]], ''B:`[Bool`].Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort, '_`,_[''A:Bool.Variable,''A:Bool.Variable]],''A:Bool.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, '_`[_`][''_xor_.Sort,'_`,_[''B:Bool.Variable,''C:Bool.Variable]]]],'_`[_`][ ''_xor_.Sort,'_`,_['_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''C:Bool.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort, '_`,_[''false.Bool.Constant,''A:Bool.Variable]],''false.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort,'_`,_[ ''true.Bool.Constant,''A:Bool.Variable]],''A:Bool.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_implies_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''not_.Sort,'_`[_`][''_xor_.Sort,'_`,_[ ''A:Bool.Variable,'_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''_in_.Sort, '_`,_[''E:Qid.Variable,''S:QidSet.Variable]],''false.Bool.Constant, 'owise.Attr],'eq_=_`[_`].['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable, '_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]]]], ''true.Bool.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or-else_.Sort, '_`,_[''false.Bool.Constant,''B:`[Bool`].Variable]],''B:`[Bool`].Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or-else_.Sort,'_`,_[ ''true.Bool.Constant,''B:`[Bool`].Variable]],''true.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''_xor_.Sort,'_`,_['_`[_`][''_and_.Sort,'_`,_[ ''A:Bool.Variable,''B:Bool.Variable]],'_`[_`][''_xor_.Sort,'_`,_[ ''A:Bool.Variable,''B:Bool.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_psubset_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], '_`[_`][''_and-then_.Sort,'_`,_['_`[_`][''_=/=_.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable]],'_`[_`][''_subset_.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_subset_.Sort,'_`,_[''none.EmptyTypeSet.Constant, ''S':QidSet.Variable]],''true.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_subset_.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],''S':QidSet.Variable]],'_`[_`][''_and-then_.Sort, '_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable,''S':QidSet.Variable]], '_`[_`][''_subset_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_xor_.Sort,'_`,_[''A:Bool.Variable, ''A:Bool.Variable]],''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_xor_.Sort,'_`,_[''false.Bool.Constant,''A:Bool.Variable]], ''A:Bool.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''`[_`].Kind, ''Q:Qid.Variable],'_`[_`][''th_is_sorts_._____endth.Constant,'_`,_[ ''Q:Qid.Variable,'_`[_`][''including_..Qid,''Q:Qid.Variable], ''none.EmptyTypeSet.Constant,''none.SubsortDeclSet.Constant, ''none.OpDeclSet.Constant,''none.MembAxSet.Constant, ''none.EquationSet.Constant,''none.RuleSet.Constant]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''append.Sort,'_`,_[''A:NatList.Variable, ''L:NatList.Variable]],'_`[_`][''__.Sort,'_`,_[''A:NatList.Variable, ''L:NatList.Variable]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''append.Sort, '_`,_[''A:QidList.Variable,''L:QidList.Variable]],'_`[_`][''__.Sort,'_`,_[ ''A:QidList.Variable,''L:QidList.Variable]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''delete.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]], ''S:QidSet.Variable,'owise.Attr],'eq_=_`[_`].['_`[_`][''delete.Sort,'_`,_[ ''E:Qid.Variable,'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]]]],'_`[_`][''delete.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''front.Sort, '_`[_`][''__.Sort,'_`,_[''L:NatList.Variable,''E:Nat.Variable]]], ''L:NatList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''front.Sort, '_`[_`][''__.Sort,'_`,_[''L:QidList.Variable,''E:Qid.Variable]]], ''L:QidList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getContext.Sort, '_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[''T:Term.Variable,''T:Type.Variable, ''S:Substitution.Variable,''C:Context.Variable]]],''C:Context.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getContext.Sort,'_`[_`][ ''`{_`,_`}.Qid,'_`,_[''S:Substitution.Variable,''C:Context.Variable]]], ''C:Context.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getEqs.Sort, '_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''EQS:EquationSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getEqs.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''EQS:EquationSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getEqs.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''EQS:EquationSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getEqs.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''EQS:EquationSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getFrom.Sort,'_`[_`][''view_from_to_is__endv.Sort, '_`,_[''Q:Qid.Variable,''ME:ModuleExpression.Variable, ''ME':ModuleExpression.Variable,''SMS:SortMappingSet.Variable, ''OMS:OpMappingSet.Variable]]],''ME:ModuleExpression.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getImports.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''IL:ImportList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getImports.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''IL:ImportList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getImports.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''IL:ImportList.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getImports.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''IL:ImportList.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getMbs.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''MAS:MembAxSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getMbs.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''MAS:MembAxSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getMbs.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''MAS:MembAxSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getMbs.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''MAS:MembAxSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getName.Sort,''C:Constant.Variable],'_`[_`][ ''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''C:Constant.Variable],''0.Zero.Constant,'_`[_`][''rfind.Sort,'_`,_[ '_`[_`][''string.Sort,''C:Constant.Variable],''".".Char.Constant,'_`[_`][ ''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,''V:Variable.Variable], '_`[_`][''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],''0.Zero.Constant,'_`[_`][''rfind.Sort,'_`,_[ '_`[_`][''string.Sort,''V:Variable.Variable],''":".Char.Constant,'_`[_`][ ''length.Sort,'_`[_`][''string.Sort,''V:Variable.Variable]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_['_`[_`][''_`{_`}.Sort,'_`,_[ ''Q:Qid.Variable,''PDL:ParameterDeclList.Variable]], ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''mod_is_sorts_._____endm.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''Q:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getName.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ '_`[_`][''_`{_`}.Sort,'_`,_[''Q:Qid.Variable, ''PDL:ParameterDeclList.Variable]],''IL:ImportList.Variable, ''SS:SortSet.Variable,''SSDS:SubsortDeclSet.Variable, ''OPDS:OpDeclSet.Variable,''MAS:MembAxSet.Variable, ''EQS:EquationSet.Variable,''RLS:RuleSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''Q:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getName.Sort,'_`[_`][''view_from_to_is__endv.Sort,'_`,_[ ''Q:Qid.Variable,''ME:ModuleExpression.Variable, ''ME':ModuleExpression.Variable,''SMS:SortMappingSet.Variable, ''OMS:OpMappingSet.Variable]]],''Q:Qid.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getOpMappings.Sort,'_`[_`][ ''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''OMS:OpMappingSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''OPDS:OpDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''OPDS:OpDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''OPDS:OpDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getOps.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''OPDS:OpDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getRls.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''none.RuleSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getRls.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''none.RuleSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getRls.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''RLS:RuleSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getRls.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''RLS:RuleSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSortMappings.Sort,'_`[_`][ ''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''SMS:SortMappingSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSorts.Sort,'_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SS:SortSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getSorts.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SS:SortSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getSorts.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SS:SortSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSorts.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SS:SortSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubsorts.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SSDS:SubsortDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubsorts.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SSDS:SubsortDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubsorts.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SSDS:SubsortDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubsorts.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SSDS:SubsortDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubstitution.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable, ''C:Context.Variable]]],''S:Substitution.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubstitution.Sort,'_`[_`][''`{_`,_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable]]], ''S:Substitution.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubstitution.Sort,'_`[_`][''`{_`,_`}.Qid,'_`,_[ ''S:Substitution.Variable,''C:Context.Variable]]], ''S:Substitution.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getTerm.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable,''S:Substitution.Variable,''C:Context.Variable]]], ''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getTerm.Sort, '_`[_`][''`{_`,_`,_`}.Qid,'_`,_[''T:Term.Variable,''T:Type.Variable, ''S:Substitution.Variable]]],''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getTerm.Sort,'_`[_`][''`{_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable]]],''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getTo.Sort,'_`[_`][''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''ME':ModuleExpression.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getType.Sort,''C:Constant.Variable],'_`[_`][''qid.Sort,'_`[_`][ ''substr.Sort,'_`,_['_`[_`][''string.Sort,''C:Constant.Variable],'_`[_`][ ''_+_.Sort,'_`,_['_`[_`][''s_.Sort,''0.Zero.Constant],'_`[_`][''rfind.Sort, '_`,_['_`[_`][''string.Sort,''C:Constant.Variable],''".".Char.Constant, '_`[_`][''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]]], '_`[_`][''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getType.Sort,''V:Variable.Variable], '_`[_`][''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],'_`[_`][''_+_.Sort,'_`,_['_`[_`][''s_.Sort, ''0.Zero.Constant],'_`[_`][''rfind.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],''":".Char.Constant,'_`[_`][''length.Sort,'_`[_`][ ''string.Sort,''V:Variable.Variable]]]]]],'_`[_`][''length.Sort,'_`[_`][ ''string.Sort,''V:Variable.Variable]]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getType.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[ ''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable, ''C:Context.Variable]]],''T:Type.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getType.Sort,'_`[_`][''`{_`,_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable,''S:Substitution.Variable]]],''T:Type.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getType.Sort,'_`[_`][''`{_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable]]],''T:Type.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''head.Sort,'_`[_`][''__.Sort,'_`,_[ ''E:Nat.Variable,''L:NatList.Variable]]],''E:Nat.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''head.Sort,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]]],''E:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''insert.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]],'_`[_`][ ''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''intersection.Sort,'_`,_[''S:QidSet.Variable, ''N:NeQidSet.Variable]],'_`[_`][''$intersect.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable,''none.EmptyTypeSet.Constant]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''intersection.Sort,'_`,_[ ''S:QidSet.Variable,''none.EmptyTypeSet.Constant]], ''none.EmptyTypeSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''last.Sort,'_`[_`][''__.Sort,'_`,_[''L:NatList.Variable, ''E:Nat.Variable]]],''E:Nat.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''last.Sort,'_`[_`][''__.Sort,'_`,_[''L:QidList.Variable, ''E:Qid.Variable]]],''E:Qid.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''metaPrettyPrint.Sort,'_`,_[''M:Module.Variable,''T:Term.Variable]], '_`[_`][''metaPrettyPrint.Sort,'_`,_[''M:Module.Variable,''T:Term.Variable, '_`[_`][''__.Sort,'_`,_[''mixfix.PrintOption.Constant,'_`[_`][''__.Sort, '_`,_[''flat.PrintOption.Constant,'_`[_`][''__.Sort,'_`,_[ ''format.PrintOption.Constant,'_`[_`][''__.Sort,'_`,_[ ''number.PrintOption.Constant,''rat.PrintOption.Constant]]]]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''not_.Sort,''A:Bool.Variable],'_`[_`][ ''_xor_.Sort,'_`,_[''true.Bool.Constant,''A:Bool.Variable]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable, ''nil.NatList.Constant]],''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable,'_`[_`][''__.Sort,'_`,_[ ''E':Nat.Variable,''L:NatList.Variable]]]],'_`[_`][''if_then_else_fi.Sort, '_`,_['_`[_`][''_==_.Sort,'_`,_[''E:Nat.Variable,''E':Nat.Variable]], ''true.Bool.Constant,'_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''occurs.Sort, '_`,_[''E:Qid.Variable,''nil.TypeList.Constant]],''false.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''occurs.Sort,'_`,_[''E:Qid.Variable, '_`[_`][''__.Sort,'_`,_[''E':Qid.Variable,''L:QidList.Variable]]]],'_`[_`][ ''if_then_else_fi.Sort,'_`,_['_`[_`][''_==_.Sort,'_`,_[''E:Qid.Variable, ''E':Qid.Variable]],''true.Bool.Constant,'_`[_`][''occurs.Sort,'_`,_[ ''E:Qid.Variable,''L:QidList.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''reverse.Sort,''L:NatList.Variable],'_`[_`][''$reverse.Sort,'_`,_[ ''L:NatList.Variable,''nil.NatList.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''reverse.Sort,''L:QidList.Variable],'_`[_`][''$reverse.Sort,'_`,_[ ''L:QidList.Variable,''nil.TypeList.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''size.Sort,''L:NatList.Variable],'_`[_`][''$size.Sort,'_`,_[ ''L:NatList.Variable,''0.Zero.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''size.Sort,''L:QidList.Variable],'_`[_`][''$size.Sort,'_`,_[ ''L:QidList.Variable,''0.Zero.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''tail.Sort,'_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]]],''L:NatList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''tail.Sort,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]]],''L:QidList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''union.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], '_`[_`][''_;_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''|_|.Sort,''S:QidSet.Variable], '_`[_`][''$card.Sort,'_`,_[''S:QidSet.Variable,''0.Zero.Constant]], 'none.AttrSet]]],'FModule} ========================================== reduce in META-LEVEL : upTerm(upModule('META-LEVEL, true)) . rewrites: 3 result GroundTerm: 'fmod_is_sorts_.____endfm[''META-LEVEL.Sort,'nil.ImportList, '_;_[''Assignment.Sort,''Attr.Sort,''AttrSet.Sort,''Bool.Sort,''Bound.Sort, ''Char.Sort,''Condition.Sort,''Constant.Sort,''Context.Sort, ''EmptyCommaList.Sort,''EmptyTypeSet.Sort,''EqCondition.Sort, ''Equation.Sort,''EquationSet.Sort,''FModule.Sort,''FTheory.Sort, ''FindResult.Sort,''GTermList.Sort,''GroundTerm.Sort,''GroundTermList.Sort, ''Header.Sort,''Hook.Sort,''HookList.Sort,''Import.Sort,''ImportList.Sort, ''Kind.Sort,''KindSet.Sort,''MatchPair.Sort,''MatchPair?.Sort, ''MembAx.Sort,''MembAxSet.Sort,''Module.Sort,''ModuleExpression.Sort, ''Nat.Sort,''NatList.Sort,''NeCTermList.Sort,''NeGroundTermList.Sort, ''NeHookList.Sort,''NeKindSet.Sort,''NeNatList.Sort, ''NeParameterDeclList.Sort,''NeParameterList.Sort,''NeQidList.Sort, ''NeQidSet.Sort,''NeSortSet.Sort,''NeTermList.Sort,''NeTypeList.Sort, ''NeTypeSet.Sort,''NzNat.Sort,''OpDecl.Sort,''OpDeclSet.Sort, ''OpMapping.Sort,''OpMappingSet.Sort,''ParameterDecl.Sort, ''ParameterDeclList.Sort,''ParameterList.Sort,''PrintOption.Sort, ''PrintOptionSet.Sort,''Qid.Sort,''QidList.Sort,''QidSet.Sort, ''Renaming.Sort,''RenamingSet.Sort,''Result4Tuple.Sort, ''Result4Tuple?.Sort,''ResultPair.Sort,''ResultPair?.Sort, ''ResultTriple.Sort,''ResultTriple?.Sort,''Rule.Sort,''RuleSet.Sort, ''SModule.Sort,''STheory.Sort,''Sort.Sort,''SortMapping.Sort, ''SortMappingSet.Sort,''SortSet.Sort,''String.Sort,''SubsortDecl.Sort, ''SubsortDeclSet.Sort,''Substitution.Sort,''Substitution?.Sort,''Term.Sort, ''TermList.Sort,''TermQid.Sort,''Trace.Sort,''Trace?.Sort,''TraceStep.Sort, ''Type.Sort,''Type?.Sort,''TypeList.Sort,''TypeListSet.Sort,''TypeSet.Sort, ''UnificandPair.Sort,''UnificationPair.Sort,''UnificationPair?.Sort, ''UnificationProblem.Sort,''UnificationTriple.Sort, ''UnificationTriple?.Sort,''Variable.Sort,''Variant.Sort,''Variant?.Sort, ''View.Sort,''Zero.Sort],'__['subsort_<_.[''Assignment.Sort, ''Substitution.Sort],'subsort_<_.[''Attr.Sort,''AttrSet.Sort],'subsort_<_.[ ''Char.Sort,''String.Sort],'subsort_<_.[''Constant.Sort,''GroundTerm.Sort], 'subsort_<_.[''Constant.Sort,''TermQid.Sort],'subsort_<_.[''Context.Sort, ''NeCTermList.Sort],'subsort_<_.[''EmptyCommaList.Sort, ''GroundTermList.Sort],'subsort_<_.[''EmptyCommaList.Sort, ''ParameterList.Sort],'subsort_<_.[''EmptyTypeSet.Sort,''KindSet.Sort], 'subsort_<_.[''EmptyTypeSet.Sort,''SortSet.Sort],'subsort_<_.[ ''EqCondition.Sort,''Condition.Sort],'subsort_<_.[''Equation.Sort, ''EquationSet.Sort],'subsort_<_.[''FModule.Sort,''SModule.Sort], 'subsort_<_.[''FTheory.Sort,''STheory.Sort],'subsort_<_.[''GroundTerm.Sort, ''NeGroundTermList.Sort],'subsort_<_.[''GroundTerm.Sort,''Term.Sort], 'subsort_<_.[''GroundTermList.Sort,''TermList.Sort],'subsort_<_.[ ''Hook.Sort,''NeHookList.Sort],'subsort_<_.[''Import.Sort, ''ImportList.Sort],'subsort_<_.[''Kind.Sort,''NeKindSet.Sort],'subsort_<_.[ ''Kind.Sort,''Type.Sort],'subsort_<_.[''KindSet.Sort,''TypeSet.Sort], 'subsort_<_.[''MatchPair.Sort,''MatchPair?.Sort],'subsort_<_.[ ''MembAx.Sort,''MembAxSet.Sort],'subsort_<_.[''Nat.Sort,''Bound.Sort], 'subsort_<_.[''Nat.Sort,''FindResult.Sort],'subsort_<_.[''Nat.Sort, ''NeNatList.Sort],'subsort_<_.[''NeCTermList.Sort,''GTermList.Sort], 'subsort_<_.[''NeGroundTermList.Sort,''GroundTermList.Sort],'subsort_<_.[ ''NeGroundTermList.Sort,''NeTermList.Sort],'subsort_<_.[''NeHookList.Sort, ''HookList.Sort],'subsort_<_.[''NeKindSet.Sort,''KindSet.Sort], 'subsort_<_.[''NeKindSet.Sort,''NeTypeSet.Sort],'subsort_<_.[ ''NeNatList.Sort,''NatList.Sort],'subsort_<_.[''NeParameterDeclList.Sort, ''ParameterDeclList.Sort],'subsort_<_.[''NeParameterList.Sort, ''ParameterList.Sort],'subsort_<_.[''NeQidList.Sort,''QidList.Sort], 'subsort_<_.[''NeQidSet.Sort,''QidSet.Sort],'subsort_<_.[''NeSortSet.Sort, ''NeTypeSet.Sort],'subsort_<_.[''NeSortSet.Sort,''SortSet.Sort], 'subsort_<_.[''NeTermList.Sort,''TermList.Sort],'subsort_<_.[ ''NeTypeList.Sort,''NeQidList.Sort],'subsort_<_.[''NeTypeList.Sort, ''TypeList.Sort],'subsort_<_.[''NeTypeSet.Sort,''NeQidSet.Sort], 'subsort_<_.[''NeTypeSet.Sort,''TypeSet.Sort],'subsort_<_.[''NzNat.Sort, ''Nat.Sort],'subsort_<_.[''OpDecl.Sort,''OpDeclSet.Sort],'subsort_<_.[ ''OpMapping.Sort,''OpMappingSet.Sort],'subsort_<_.[''ParameterDecl.Sort, ''NeParameterDeclList.Sort],'subsort_<_.[''PrintOption.Sort, ''PrintOptionSet.Sort],'subsort_<_.[''Qid.Sort,''Header.Sort],'subsort_<_.[ ''Qid.Sort,''ModuleExpression.Sort],'subsort_<_.[''Qid.Sort, ''NeQidList.Sort],'subsort_<_.[''Qid.Sort,''NeQidSet.Sort],'subsort_<_.[ ''Renaming.Sort,''RenamingSet.Sort],'subsort_<_.[''Result4Tuple.Sort, ''Result4Tuple?.Sort],'subsort_<_.[''ResultPair.Sort,''ResultPair?.Sort], 'subsort_<_.[''ResultTriple.Sort,''ResultTriple?.Sort],'subsort_<_.[ ''Rule.Sort,''RuleSet.Sort],'subsort_<_.[''SModule.Sort,''Module.Sort], 'subsort_<_.[''STheory.Sort,''Module.Sort],'subsort_<_.[''Sort.Sort, ''NeParameterList.Sort],'subsort_<_.[''Sort.Sort,''NeSortSet.Sort], 'subsort_<_.[''Sort.Sort,''Type.Sort],'subsort_<_.[''SortMapping.Sort, ''SortMappingSet.Sort],'subsort_<_.[''SortSet.Sort,''TypeSet.Sort], 'subsort_<_.[''SubsortDecl.Sort,''SubsortDeclSet.Sort],'subsort_<_.[ ''Substitution.Sort,''Substitution?.Sort],'subsort_<_.[''Term.Sort, ''NeTermList.Sort],'subsort_<_.[''TermList.Sort,''GTermList.Sort], 'subsort_<_.[''TermQid.Sort,''Qid.Sort],'subsort_<_.[''TermQid.Sort, ''Term.Sort],'subsort_<_.[''Trace.Sort,''Trace?.Sort],'subsort_<_.[ ''TraceStep.Sort,''Trace.Sort],'subsort_<_.[''Type.Sort,''NeTypeList.Sort], 'subsort_<_.[''Type.Sort,''NeTypeSet.Sort],'subsort_<_.[''Type.Sort, ''Qid.Sort],'subsort_<_.[''Type.Sort,''Type?.Sort],'subsort_<_.[ ''TypeList.Sort,''QidList.Sort],'subsort_<_.[''TypeList.Sort, ''TypeListSet.Sort],'subsort_<_.[''TypeSet.Sort,''QidSet.Sort], 'subsort_<_.[''TypeSet.Sort,''TypeListSet.Sort],'subsort_<_.[ ''UnificandPair.Sort,''UnificationProblem.Sort],'subsort_<_.[ ''UnificationPair.Sort,''UnificationPair?.Sort],'subsort_<_.[ ''UnificationTriple.Sort,''UnificationTriple?.Sort],'subsort_<_.[ ''Variable.Sort,''TermQid.Sort],'subsort_<_.[''Variant.Sort, ''Variant?.Sort],'subsort_<_.[''Zero.Sort,''Nat.Sort]],'__['op_:_->_`[_`].[ ''$card.Sort,'__[''QidSet.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''$diff.Sort,'__[''QidSet.Sort,''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''$intersect.Sort,'__[''QidSet.Sort,''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''$reverse.Sort,'__[ ''NatList.Sort,''NatList.Sort],''NatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''$reverse.Sort,'__[''QidList.Sort,''QidList.Sort], ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''$size.Sort,'__[ ''NatList.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''$size.Sort,'__[''QidList.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''0.Sort,'nil.TypeList,''Zero.Sort,'ctor.Attr], 'op_:_->_`[_`].[''.Sort,'nil.TypeList,''Constant.Sort,'special[ 'id-hook[''QuotedIdentifierSymbol.Sort,''constantQid.Sort]]], 'op_:_->_`[_`].[''.Sort,'nil.TypeList,''Kind.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''kindQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Qid.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,'nil.TypeList]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Sort.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''sortQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Variable.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''variableQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Char.Sort,'special['id-hook[ ''StringSymbol.Sort,'nil.TypeList]]],'op_:_->_`[_`].[''.Sort, 'nil.TypeList,''String.Sort,'special['id-hook[''StringSymbol.Sort, 'nil.TypeList]]],'op_:_->_`[_`].[''_&_.Sort,'__[''Nat.Sort,''Nat.Sort], ''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^53['0.Zero]],'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''&.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_*_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^31[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''*.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_*_.Sort,'__[''NzNat.Sort,''NzNat.Sort],''NzNat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^31['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''*.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_*`(_`).Sort,'__[ ''ModuleExpression.Sort,''RenamingSet.Sort],''ModuleExpression.Sort,'__[ 'ctor.Attr,'prec['s_^39['0.Zero]],'format['__[''d.Sort,''d.Sort,''s.Sort, ''n++i.Sort,''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''_+_.Sort,'__[ ''ModuleExpression.Sort,''ModuleExpression.Sort],''ModuleExpression.Sort, '__['assoc.Attr,'comm.Attr,'ctor.Attr]],'op_:_->_`[_`].[''_+_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^33[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''+.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_+_.Sort,'__[''NzNat.Sort,''Nat.Sort],''NzNat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^33['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''+.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_+_.Sort,'__[''String.Sort, ''String.Sort],''String.Sort,'__['prec['s_^33['0.Zero]],'gather['__[ ''E.Sort,''e.Sort]],'special['__['id-hook[''StringOpSymbol.Sort,''+.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort]]]]],'op_:_->_`[_`].[''_/\_.Sort,'__[''Condition.Sort, ''Condition.Sort],''Condition.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.EqCondition.Constant],'prec['s_^73['0.Zero]]]],'op_:_->_`[_`].[ ''_/\_.Sort,'__[''EqCondition.Sort,''EqCondition.Sort],''EqCondition.Sort, '__['assoc.Attr,'ctor.Attr,'id[''nil.EqCondition.Constant],'prec['s_^73[ '0.Zero]]]],'op_:_->_`[_`].[''_/\_.Sort,'__[''UnificationProblem.Sort, ''UnificationProblem.Sort],''UnificationProblem.Sort,'__['assoc.Attr, 'comm.Attr,'ctor.Attr,'prec['s_^73['0.Zero]]]],'op_:_->_`[_`].[ ''_::_.Variable,'__[''Sort.Sort,''ModuleExpression.Sort], ''ParameterDecl.Sort,'none.AttrSet],'op_:_->_`[_`].[''_:=_.Variable,'__[ ''Term.Sort,''Term.Sort],''EqCondition.Sort,'__['ctor.Attr,'prec['s_^71[ '0.Zero]]]],'op_:_->_`[_`].[''_:_.Variable,'__[''Term.Sort,''Sort.Sort], ''EqCondition.Sort,'__['ctor.Attr,'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''EmptyTypeSet.Sort,''EmptyTypeSet.Sort], ''EmptyTypeSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''KindSet.Sort,''KindSet.Sort],''KindSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''NeKindSet.Sort, ''KindSet.Sort],''NeKindSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''NeQidSet.Sort,''QidSet.Sort],''NeQidSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''NeSortSet.Sort, ''SortSet.Sort],''NeSortSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''NeTypeSet.Sort,''TypeSet.Sort],''NeTypeSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''SortSet.Sort,''SortSet.Sort],''SortSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''Substitution.Sort, ''Substitution.Sort],''Substitution.Sort,'__['assoc.Attr,'comm.Attr, 'ctor.Attr,'id[''none.Substitution.Constant],'prec['s_^65['0.Zero]]]], 'op_:_->_`[_`].[''_;_.Sort,'__[''TypeListSet.Sort,''TypeListSet.Sort], ''TypeListSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''TypeSet.Sort,''TypeSet.Sort],''TypeSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_<-_.Sort,'__[''Variable.Sort, ''Term.Sort],''Assignment.Sort,'__['ctor.Attr,'prec['s_^63['0.Zero]], 'format['__[''nt.Sort,''d.Sort,''d.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''_<<_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['prec['s_^35[ '0.Zero]],'gather['__[''E.Sort,''e.Sort]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<<.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_<=_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<=.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_<=_.Sort,'__[''String.Sort,''String.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''StringOpSymbol.Sort,''<=.Sort],'op-hook[ ''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_<_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_<_.Sort,'__[''String.Sort,''String.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''StringOpSymbol.Sort,''<.Sort],'op-hook[ ''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_=/=_.Sort,'__[ ''Universal.Sort,''Universal.Sort],''Bool.Sort,'__['prec['s_^51['0.Zero]], 'poly['__['s_['0.Zero],'s_^2['0.Zero]]],'special['__['id-hook[ ''EqualitySymbol.Sort,'nil.TypeList],'term-hook[''equalTerm.Sort, ''false.Bool.Constant],'term-hook[''notEqualTerm.Sort, ''true.Bool.Constant]]]]],'op_:_->_`[_`].[''_==_.Sort,'__[''Universal.Sort, ''Universal.Sort],''Bool.Sort,'__['prec['s_^51['0.Zero]],'poly['__['s_[ '0.Zero],'s_^2['0.Zero]]],'special['__['id-hook[''EqualitySymbol.Sort, 'nil.TypeList],'term-hook[''equalTerm.Sort,''true.Bool.Constant], 'term-hook[''notEqualTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_=>_.Sort,'__[''Term.Sort,''Term.Sort],''Condition.Sort,'__['ctor.Attr, 'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[''_=?_.Sort,'__[''Term.Sort, ''Term.Sort],''UnificandPair.Sort,'__['ctor.Attr,'prec['s_^71['0.Zero]]]], 'op_:_->_`[_`].[''_=_.Sort,'__[''Term.Sort,''Term.Sort],''EqCondition.Sort, '__['ctor.Attr,'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[''_>=_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''NumberOpSymbol.Sort,''>=.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>=_.Sort,'__[''String.Sort, ''String.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''StringOpSymbol.Sort,''>=.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>>_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Nat.Sort,'__['prec['s_^35['0.Zero]],'gather['__[''E.Sort, ''e.Sort]],'special['__['id-hook[''NumberOpSymbol.Sort,''>>.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''_>_.Sort,'__[''Nat.Sort,''Nat.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''NumberOpSymbol.Sort,''>.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>_.Sort,'__[''String.Sort, ''String.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''StringOpSymbol.Sort,''>.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_\_.Sort,'__[''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'gather['__[''E.Sort,''e.Sort]]], 'op_:_->_`[_`].[''_^_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['prec[ 's_^29['0.Zero]],'gather['__[''E.Sort,''e.Sort]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''^.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_^_.Sort,'__[''NzNat.Sort, ''Nat.Sort],''NzNat.Sort,'__['prec['s_^29['0.Zero]],'gather['__[''E.Sort, ''e.Sort]],'special['__['id-hook[''NumberOpSymbol.Sort,''^.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''__.Sort,'__[''AttrSet.Sort,''AttrSet.Sort],''AttrSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.AttrSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''EquationSet.Sort,''EquationSet.Sort], ''EquationSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EquationSet.Constant],'format['__[''d.Sort,''ni.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''HookList.Sort,''HookList.Sort], ''HookList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.HookList.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''HookList.Sort,''NeHookList.Sort], ''NeHookList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.HookList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[''ImportList.Sort, ''ImportList.Sort],''ImportList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.ImportList.Constant],'format['__[''d.Sort,''ni.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''MembAxSet.Sort,''MembAxSet.Sort], ''MembAxSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.MembAxSet.Constant],'format['__[''d.Sort,''ni.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''NatList.Sort,''NatList.Sort], ''NatList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.NatList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''NatList.Sort, ''NeNatList.Sort],''NeNatList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.NatList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort, '__[''NeHookList.Sort,''HookList.Sort],''NeHookList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.HookList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''NeNatList.Sort,''NatList.Sort],''NeNatList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.NatList.Constant],'prec['s_^25['0.Zero]]]], 'op_:_->_`[_`].[''__.Sort,'__[''NeQidList.Sort,''QidList.Sort], ''NeQidList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''NeTypeList.Sort, ''TypeList.Sort],''NeTypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[ ''__.Sort,'__[''OpDeclSet.Sort,''OpDeclSet.Sort],''OpDeclSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.OpDeclSet.Constant],'format[ '__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''OpMappingSet.Sort,''OpMappingSet.Sort],''OpMappingSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.OpMappingSet.Constant], 'format['__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''PrintOptionSet.Sort,''PrintOptionSet.Sort],''PrintOptionSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.PrintOptionSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''QidList.Sort,''NeQidList.Sort], ''NeQidList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''QidList.Sort, ''QidList.Sort],''QidList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[ ''__.Sort,'__[''RuleSet.Sort,''RuleSet.Sort],''RuleSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.RuleSet.Constant],'format['__[ ''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''SortMappingSet.Sort,''SortMappingSet.Sort],''SortMappingSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.SortMappingSet.Constant], 'format['__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''SubsortDeclSet.Sort,''SubsortDeclSet.Sort],''SubsortDeclSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.SubsortDeclSet.Constant], 'format['__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''Trace.Sort,''Trace.Sort],''Trace.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.Trace.Constant],'format['__[''d.Sort,''n.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''TypeList.Sort,''NeTypeList.Sort], ''NeTypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''TypeList.Sort, ''TypeList.Sort],''TypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[ ''_`,_.Qid,'__[''EmptyCommaList.Sort,''EmptyCommaList.Sort], ''EmptyCommaList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GTermList.Sort, ''GTermList.Sort],''GTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GroundTermList.Sort, ''GroundTermList.Sort],''GroundTermList.Sort,'__['assoc.Attr,'ctor.Attr, 'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GroundTermList.Sort, ''NeGroundTermList.Sort],''NeGroundTermList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]], 'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''NeCTermList.Sort,''TermList.Sort],''NeCTermList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]], 'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''NeGroundTermList.Sort,''GroundTermList.Sort],''NeGroundTermList.Sort,'__[ 'assoc.Attr,'ctor.Attr,'id[''empty.EmptyCommaList.Constant],'prec['s_^121[ '0.Zero]],'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''NeParameterDeclList.Sort,''ParameterDeclList.Sort], ''NeParameterDeclList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''NeParameterList.Sort, ''ParameterList.Sort],''NeParameterList.Sort,'__['assoc.Attr,'ctor.Attr, 'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''NeTermList.Sort, ''TermList.Sort],''NeTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''ParameterDeclList.Sort,''NeParameterDeclList.Sort], ''NeParameterDeclList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterDeclList.Sort, ''ParameterDeclList.Sort],''ParameterDeclList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterList.Sort, ''NeParameterList.Sort],''NeParameterList.Sort,'__['assoc.Attr,'ctor.Attr, 'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterList.Sort, ''ParameterList.Sort],''ParameterList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''RenamingSet.Sort, ''RenamingSet.Sort],''RenamingSet.Sort,'__['assoc.Attr,'comm.Attr, 'ctor.Attr,'prec['s_^43['0.Zero]],'format['__[''d.Sort,''d.Sort,''ni.Sort, ''d.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''NeCTermList.Sort],''NeCTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''NeTermList.Sort],''NeTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''TermList.Sort],''TermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`[_`].Qid,'__[''Qid.Sort, ''NeCTermList.Sort],''Context.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''_`[_`].Qid,'__[''Qid.Sort,''NeGroundTermList.Sort],''GroundTerm.Sort, 'ctor.Attr],'op_:_->_`[_`].[''_`[_`].Qid,'__[''Qid.Sort,''NeTermList.Sort], ''Term.Sort,'ctor.Attr],'op_:_->_`[_`].[''_`{_`}.Sort,'__[ ''ModuleExpression.Sort,''ParameterList.Sort],''ModuleExpression.Sort,'__[ 'ctor.Attr,'prec['s_^37['0.Zero]]]],'op_:_->_`[_`].[''_`{_`}.Sort,'__[ ''Qid.Sort,''ParameterDeclList.Sort],''Header.Sort,'ctor.Attr], 'op_:_->_`[_`].[''_and-then_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort, '__['strat['__['s_['0.Zero],'0.Zero]],'prec['s_^55['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_and_.Sort,'__[''Bool.Sort, ''Bool.Sort],''Bool.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^55[ '0.Zero]]]],'op_:_->_`[_`].[''_divides_.Sort,'__[''NzNat.Sort,''Nat.Sort], ''Bool.Sort,'__['prec['s_^51['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''divides.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_implies_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['prec['s_^61[ '0.Zero]],'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_in_.Sort, '__[''Qid.Sort,''QidSet.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''_or-else_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['strat['__[ 's_['0.Zero],'0.Zero]],'prec['s_^59['0.Zero]],'gather['__[''e.Sort, ''E.Sort]]]],'op_:_->_`[_`].[''_or_.Sort,'__[''Bool.Sort,''Bool.Sort], ''Bool.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^59['0.Zero]]]], 'op_:_->_`[_`].[''_psubset_.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[''_quo_.Sort,'__[''Nat.Sort, ''NzNat.Sort],''Nat.Sort,'__['prec['s_^31['0.Zero]],'gather['__[''E.Sort, ''e.Sort]],'special['__['id-hook[''NumberOpSymbol.Sort,''quo.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_rem_.Sort,'__[''Nat.Sort,''NzNat.Sort],''Nat.Sort,'__[ 'prec['s_^31['0.Zero]],'gather['__[''E.Sort,''e.Sort]],'special['__[ 'id-hook[''NumberOpSymbol.Sort,''rem.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_subset_.Sort,'__[ ''QidSet.Sort,''QidSet.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''_xor_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['assoc.Attr, 'comm.Attr,'prec['s_^57['0.Zero]]]],'op_:_->_`[_`].[''_xor_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^55[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''xor.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_|_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^57['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''|.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_|_.Sort,'__[''NzNat.Sort, ''Nat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^57['0.Zero]], 'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''|.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''`[_`].Kind,''Qid.Sort,''Module.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''`[`].Kind,'nil.TypeList,''Context.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort,''Substitution.Sort, ''Context.Sort],''Result4Tuple.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`,_`}.Qid,'__[''Substitution.Sort,''Substitution.Sort,''Nat.Sort], ''UnificationTriple.Sort,'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[ ''Term.Sort,''Substitution.Sort,''Nat.Sort],''Variant.Sort,'ctor.Attr], 'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort,''Rule.Sort], ''TraceStep.Sort,'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[ ''Term.Sort,''Type.Sort,''Substitution.Sort],''ResultTriple.Sort, 'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`}.Qid,'__[''Substitution.Sort, ''Context.Sort],''MatchPair.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`}.Qid,'__[''Substitution.Sort,''Nat.Sort],''UnificationPair.Sort, 'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`}.Qid,'__[''Term.Sort,''Type.Sort], ''ResultPair.Sort,'ctor.Attr],'op_:_->_`[_`].[''ambiguity.Sort,'__[ ''ResultPair.Sort,''ResultPair.Sort],''ResultPair?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''anyType.Sort,'nil.TypeList,''Type?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''append.Sort,'__[''NatList.Sort,''NatList.Sort], ''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''NatList.Sort,''NeNatList.Sort],''NeNatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''append.Sort,'__[''NeNatList.Sort,''NatList.Sort], ''NeNatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''NeQidList.Sort,''QidList.Sort],''NeQidList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''append.Sort,'__[''QidList.Sort,''NeQidList.Sort], ''NeQidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''QidList.Sort,''QidList.Sort],''QidList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''ascii.Sort,''Char.Sort,''Nat.Sort,'special['__['id-hook[ ''StringOpSymbol.Sort,''ascii.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[''assoc.Sort, 'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''ceq_=_if_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''EqCondition.Sort, ''AttrSet.Sort],''Equation.Sort,'__['ctor.Attr,'format['__[''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''char.Sort, ''`[FindResult`,NatList`,Bound`].Kind,''`[String`].Kind,'special['__[ 'id-hook[''StringOpSymbol.Sort,''char.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[ ''cmb_:_if_`[_`]..Qid,'__[''Term.Sort,''Sort.Sort,''EqCondition.Sort, ''AttrSet.Sort],''MembAx.Sort,'__['ctor.Attr,'format['__[''d.Sort,''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort, ''d.Sort]]]],'op_:_->_`[_`].[''comm.Sort,'nil.TypeList,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''completeName.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaCompleteName.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''config.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''crl_=>_if_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''Condition.Sort,''AttrSet.Sort],''Rule.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''ctor.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''delete.Sort,'__[''Qid.Sort,''QidSet.Sort],''QidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''downTerm.Sort,'__[''Term.Sort,''Universal.Sort], ''Universal.Sort,'__['poly['__['s_^2['0.Zero],'0.Zero]],'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaDownTerm.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]]],'op_:_->_`[_`].[''empty.Sort,'nil.TypeList, ''EmptyCommaList.Sort,'ctor.Attr],'op_:_->_`[_`].[''empty.Sort, 'nil.TypeList,''GroundTermList.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''eq_=_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''AttrSet.Sort], ''Equation.Sort,'__['ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''extending_..Qid,''ModuleExpression.Sort,''Import.Sort,'ctor.Attr], 'op_:_->_`[_`].[''failure.Sort,'nil.TypeList,''Result4Tuple?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''failure.Sort,'nil.TypeList, ''ResultPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[''failure.Sort, 'nil.TypeList,''ResultTriple?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''failure.Sort,'nil.TypeList,''Trace?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''false.Sort,'nil.TypeList,''Bool.Sort,'__['ctor.Attr,'special['id-hook[ ''SystemFalse.Sort,'nil.TypeList]]]],'op_:_->_`[_`].[''find.Sort,'__[ ''String.Sort,''String.Sort,''Nat.Sort],''FindResult.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''find.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''notFoundTerm.Sort, ''notFound.FindResult.Constant]]]],'op_:_->_`[_`].[''flat.Sort, 'nil.TypeList,''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''fmod_is_sorts_.____endfm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FModule.Sort,'__['ctor.Attr,'gather['__[''&.Sort, ''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort]],'format['__[ ''d.Sort,''d.Sort,''s.Sort,''n++i.Sort,''ni.Sort,''d.Sort,''d.Sort, ''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''format.Sort,''QidList.Sort,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''format.Sort,'nil.TypeList,''PrintOption.Sort,'ctor.Attr], 'op_:_->_`[_`].[''front.Sort,''NeNatList.Sort,''NatList.Sort, 'none.AttrSet],'op_:_->_`[_`].[''front.Sort,''NeQidList.Sort, ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''frozen.Sort, ''NeNatList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''fth_is_sorts_.____endfth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FTheory.Sort,'__['ctor.Attr,'gather['__[''&.Sort, ''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort]],'format['__[ ''d.Sort,''d.Sort,''d.Sort,''n++i.Sort,''ni.Sort,''d.Sort,''d.Sort, ''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''gather.Sort,''QidList.Sort,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''gcd.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'special['__['id-hook[''ACU_NumberOpSymbol.Sort, ''gcd.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]]],'op_:_->_`[_`].[''gcd.Sort,'__[''NzNat.Sort,''Nat.Sort], ''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''gcd.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''getContext.Sort, ''MatchPair.Sort,''Context.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getContext.Sort,''Result4Tuple.Sort,''Context.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getEqs.Sort,''Module.Sort,''EquationSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getFrom.Sort,''View.Sort, ''ModuleExpression.Sort,'none.AttrSet],'op_:_->_`[_`].[''getImports.Sort, ''Module.Sort,''ImportList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getKind.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaGetKind.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''getKinds.Sort,''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaGetKinds.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''getMbs.Sort,''Module.Sort,''MembAxSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Constant.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Module.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Variable.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''View.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getOpMappings.Sort,''View.Sort,''OpMappingSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getOps.Sort,''Module.Sort, ''OpDeclSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''getRls.Sort, ''Module.Sort,''RuleSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getSortMappings.Sort,''View.Sort,''SortMappingSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getSorts.Sort,''Module.Sort,''SortSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getSubsorts.Sort,''Module.Sort, ''SubsortDeclSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getSubstitution.Sort,''MatchPair.Sort,''Substitution.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getSubstitution.Sort,''Result4Tuple.Sort, ''Substitution.Sort,'none.AttrSet],'op_:_->_`[_`].[''getSubstitution.Sort, ''ResultTriple.Sort,''Substitution.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getTerm.Sort,''Result4Tuple.Sort,''Term.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getTerm.Sort,''ResultPair.Sort,''Term.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getTerm.Sort,''ResultTriple.Sort, ''Term.Sort,'none.AttrSet],'op_:_->_`[_`].[''getTo.Sort,''View.Sort, ''ModuleExpression.Sort,'none.AttrSet],'op_:_->_`[_`].[''getType.Sort, ''Constant.Sort,''Type.Sort,'none.AttrSet],'op_:_->_`[_`].[''getType.Sort, ''Result4Tuple.Sort,''Type.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getType.Sort,''ResultPair.Sort,''Type.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getType.Sort,''ResultTriple.Sort,''Type.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getType.Sort,''Variable.Sort,''Type.Sort, 'none.AttrSet],'op_:_->_`[_`].[''glbSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaGlbSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''head.Sort,''NeNatList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''head.Sort,''NeQidList.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''id.Sort,''Term.Sort,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''id-hook.Sort,'__[''Qid.Sort,''QidList.Sort],''Hook.Sort, '__['ctor.Attr,'format['__[''nssss.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''idem.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''if_then_else_fi.Sort,'__[''Bool.Sort,''Universal.Sort,''Universal.Sort], ''Universal.Sort,'__['poly['__['s_^2['0.Zero],'s_^3['0.Zero],'0.Zero]], 'special['__['id-hook[''BranchSymbol.Sort,'nil.TypeList],'term-hook[ ''1.Sort,''true.Bool.Constant],'term-hook[''2.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''including_..Qid, ''ModuleExpression.Sort,''Import.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''insert.Sort,'__[''Qid.Sort,''QidSet.Sort],''QidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''intersection.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''iter.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''label.Sort,''Qid.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''label_to_.Sort,'__[''Qid.Sort, ''Qid.Sort],''Renaming.Sort,'ctor.Attr],'op_:_->_`[_`].[''last.Sort, ''NeNatList.Sort,''Nat.Sort,'none.AttrSet],'op_:_->_`[_`].[''last.Sort, ''NeQidList.Sort,''Qid.Sort,'none.AttrSet],'op_:_->_`[_`].[''lcm.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''lcm.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''lcm.Sort,'__[ ''NzNat.Sort,''NzNat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr, 'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''lcm.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''leastSort.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaLeastSort.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''left-id.Sort, ''Term.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''length.Sort, ''String.Sort,''Nat.Sort,'special['__['id-hook[''StringOpSymbol.Sort, ''length.Sort],'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]],'op_:_->_`[_`].[''lesserSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaLesserSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''max.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'special['__['id-hook[''ACU_NumberOpSymbol.Sort, ''max.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]]],'op_:_->_`[_`].[''max.Sort,'__[''NzNat.Sort,''Nat.Sort], ''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''max.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''maximalAritySet.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaMaximalAritySet.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort, '__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''maximalSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaMaximalSorts.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''mb_:_`[_`]..Qid, '__[''Term.Sort,''Sort.Sort,''AttrSet.Sort],''MembAx.Sort,'__['ctor.Attr, 'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''memo.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''metaApply.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Substitution?`].Kind,''`[FindResult`,NatList`,Bound`].Kind], ''`[ResultTriple?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaApply.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaDisjointUnify.Sort,'__[''`[Module`].Kind, ''`[UnificationProblem`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationTriple?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaDisjointUnify.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaFrewrite.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaFrewrite.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaGetIrredundantVariant.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Variant?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaGetIrredundantVariant.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaGetVariant.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Variant?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaGetVariant.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaMatch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[FindResult`,NatList`,Bound`].Kind], ''`[Substitution?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaMatch.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaNarrow.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[FindResult`,NatList`,Bound`].Kind,''`[Bool`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaNarrow2.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaNarrow.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultTriple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaNarrow.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaNormalize.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaNormalize.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaParse.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind], ''`[ResultPair?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaParse.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaPrettyPrint.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'none.AttrSet],'op_:_->_`[_`].[''metaPrettyPrint.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[PrintOptionSet`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaPrettyPrint.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaReduce.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[ResultPair?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaReduce.Sort],'op-hook[ ''qidSymbol.Sort,''.Sort,'nil.TypeList,''Qid.Sort],'op-hook[ ''metaTermSymbol.Sort,''_`[_`].Qid,'__[''Qid.Sort,''NeGroundTermList.Sort], ''GroundTerm.Sort],'op-hook[''metaArgSymbol.Sort,''_`,_.Qid,'__[ ''NeGroundTermList.Sort,''GroundTermList.Sort],''NeGroundTermList.Sort], 'op-hook[''emptyTermListSymbol.Sort,''empty.Sort,'nil.TypeList, ''GroundTermList.Sort],'op-hook[''assignmentSymbol.Sort,''_<-_.Sort,'__[ ''Variable.Sort,''Term.Sort],''Assignment.Sort],'op-hook[ ''emptySubstitutionSymbol.Sort,''none.Sort,'nil.TypeList, ''Substitution.Sort],'op-hook[''substitutionSymbol.Sort,''_;_.Sort,'__[ ''Substitution.Sort,''Substitution.Sort],''Substitution.Sort],'op-hook[ ''holeSymbol.Sort,''`[`].Kind,'nil.TypeList,''Context.Sort],'op-hook[ ''headerSymbol.Sort,''_`{_`}.Sort,'__[''Qid.Sort,''ParameterDeclList.Sort], ''Header.Sort],'op-hook[''parameterDeclSymbol.Sort,''_::_.Variable,'__[ ''Sort.Sort,''ModuleExpression.Sort],''ParameterDecl.Sort],'op-hook[ ''parameterDeclListSymbol.Sort,''_`,_.Qid,'__[''ParameterDeclList.Sort, ''ParameterDeclList.Sort],''ParameterDeclList.Sort],'op-hook[ ''protectingSymbol.Sort,''protecting_..Qid,''ModuleExpression.Sort, ''Import.Sort],'op-hook[''extendingSymbol.Sort,''extending_..Qid, ''ModuleExpression.Sort,''Import.Sort],'op-hook[''includingSymbol.Sort, ''including_..Qid,''ModuleExpression.Sort,''Import.Sort],'op-hook[ ''nilImportListSymbol.Sort,''nil.Sort,'nil.TypeList,''ImportList.Sort], 'op-hook[''importListSymbol.Sort,''__.Sort,'__[''ImportList.Sort, ''ImportList.Sort],''ImportList.Sort],'op-hook[''emptySortSetSymbol.Sort, ''none.Sort,'nil.TypeList,''QidSet.Sort],'op-hook[''sortSetSymbol.Sort, ''_;_.Sort,'__[''QidSet.Sort,''QidSet.Sort],''QidSet.Sort],'op-hook[ ''subsortSymbol.Sort,''subsort_<_..Qid,'__[''Sort.Sort,''Sort.Sort], ''SubsortDecl.Sort],'op-hook[''emptySubsortDeclSetSymbol.Sort,''none.Sort, 'nil.TypeList,''SubsortDeclSet.Sort],'op-hook[''subsortDeclSetSymbol.Sort, ''__.Sort,'__[''SubsortDeclSet.Sort,''SubsortDeclSet.Sort], ''SubsortDeclSet.Sort],'op-hook[''nilQidListSymbol.Sort,''nil.Sort, 'nil.TypeList,''QidList.Sort],'op-hook[''qidListSymbol.Sort,''__.Sort,'__[ ''QidList.Sort,''QidList.Sort],''QidList.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'op-hook[''natListSymbol.Sort,''__.Sort, '__[''NatList.Sort,''NatList.Sort],''NatList.Sort],'op-hook[ ''unboundedSymbol.Sort,''unbounded.Sort,'nil.TypeList,''Bound.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort], 'op-hook[''sortRenamingSymbol.Sort,''sort_to_.Sort,'__[''Qid.Sort, ''Qid.Sort],''Renaming.Sort],'op-hook[''opRenamingSymbol.Sort, ''op_to_`[_`].Qid,'__[''Qid.Sort,''Qid.Sort,''AttrSet.Sort], ''Renaming.Sort],'op-hook[''opRenamingSymbol2.Sort,''op_:_->_to_`[_`].Qid, '__[''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort,''AttrSet.Sort], ''Renaming.Sort],'op-hook[''labelRenamingSymbol.Sort,''label_to_.Sort,'__[ ''Qid.Sort,''Qid.Sort],''Renaming.Sort],'op-hook[''renamingSetSymbol.Sort, ''_`,_.Qid,'__[''RenamingSet.Sort,''RenamingSet.Sort],''RenamingSet.Sort], 'op-hook[''sumSymbol.Sort,''_+_.Sort,'__[''ModuleExpression.Sort, ''ModuleExpression.Sort],''ModuleExpression.Sort],'op-hook[ ''renamingSymbol.Sort,''_*`(_`).Sort,'__[''ModuleExpression.Sort, ''RenamingSet.Sort],''ModuleExpression.Sort],'op-hook[ ''instantiationSymbol.Sort,''_`{_`}.Sort,'__[''ModuleExpression.Sort, ''ParameterList.Sort],''ModuleExpression.Sort],'op-hook[ ''termHookSymbol.Sort,''term-hook.Sort,'__[''Qid.Sort,''Term.Sort], ''Hook.Sort],'op-hook[''hookListSymbol.Sort,''__.Sort,'__[''HookList.Sort, ''HookList.Sort],''HookList.Sort],'op-hook[''idHookSymbol.Sort, ''id-hook.Sort,'__[''Qid.Sort,''QidList.Sort],''Hook.Sort],'op-hook[ ''opHookSymbol.Sort,''op-hook.Sort,'__[''Qid.Sort,''Qid.Sort, ''QidList.Sort,''Qid.Sort],''Hook.Sort],'op-hook[''assocSymbol.Sort, ''assoc.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''commSymbol.Sort, ''comm.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''idemSymbol.Sort, ''idem.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''iterSymbol.Sort, ''iter.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''idSymbol.Sort,''id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''leftIdSymbol.Sort,''left-id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''rightIdSymbol.Sort,''right-id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''stratSymbol.Sort,''strat.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''memoSymbol.Sort,''memo.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''precSymbol.Sort,''prec.Sort, ''Nat.Sort,''Attr.Sort],'op-hook[''gatherSymbol.Sort,''gather.Sort, ''QidList.Sort,''Attr.Sort],'op-hook[''formatSymbol.Sort,''format.Sort, ''QidList.Sort,''Attr.Sort],'op-hook[''ctorSymbol.Sort,''ctor.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''frozenSymbol.Sort,''frozen.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''polySymbol.Sort,''poly.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''configSymbol.Sort,''config.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''objectSymbol.Sort,''object.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''msgSymbol.Sort,''msg.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''specialSymbol.Sort,''special.Sort, ''NeHookList.Sort,''Attr.Sort],'op-hook[''labelSymbol.Sort,''label.Sort, ''Qid.Sort,''Attr.Sort],'op-hook[''metadataSymbol.Sort,''metadata.Sort, ''String.Sort,''Attr.Sort],'op-hook[''owiseSymbol.Sort,''owise.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''variantAttrSymbol.Sort, ''variant.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''nonexecSymbol.Sort, ''nonexec.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''printSymbol.Sort, ''print.Sort,''QidList.Sort,''Attr.Sort],'op-hook[ ''emptyAttrSetSymbol.Sort,''none.Sort,'nil.TypeList,''AttrSet.Sort], 'op-hook[''attrSetSymbol.Sort,''__.Sort,'__[''AttrSet.Sort,''AttrSet.Sort], ''AttrSet.Sort],'op-hook[''opDeclSymbol.Sort,''op_:_->_`[_`]..Qid,'__[ ''Qid.Sort,''TypeList.Sort,''Type.Sort,''AttrSet.Sort],''OpDecl.Sort], 'op-hook[''opDeclSetSymbol.Sort,''__.Sort,'__[''OpDeclSet.Sort, ''OpDeclSet.Sort],''OpDeclSet.Sort],'op-hook[''emptyOpDeclSetSymbol.Sort, ''none.Sort,'nil.TypeList,''OpDeclSet.Sort],'op-hook[ ''noConditionSymbol.Sort,''nil.Sort,'nil.TypeList,''EqCondition.Sort], 'op-hook[''equalityConditionSymbol.Sort,''_=_.Sort,'__[''Term.Sort, ''Term.Sort],''EqCondition.Sort],'op-hook[''sortTestConditionSymbol.Sort, ''_:_.Variable,'__[''Term.Sort,''Sort.Sort],''EqCondition.Sort],'op-hook[ ''matchConditionSymbol.Sort,''_:=_.Variable,'__[''Term.Sort,''Term.Sort], ''EqCondition.Sort],'op-hook[''rewriteConditionSymbol.Sort,''_=>_.Sort,'__[ ''Term.Sort,''Term.Sort],''Condition.Sort],'op-hook[ ''conjunctionSymbol.Sort,''_/\_.Sort,'__[''EqCondition.Sort, ''EqCondition.Sort],''EqCondition.Sort],'op-hook[''mbSymbol.Sort, ''mb_:_`[_`]..Qid,'__[''Term.Sort,''Sort.Sort,''AttrSet.Sort], ''MembAx.Sort],'op-hook[''cmbSymbol.Sort,''cmb_:_if_`[_`]..Qid,'__[ ''Term.Sort,''Sort.Sort,''EqCondition.Sort,''AttrSet.Sort],''MembAx.Sort], 'op-hook[''emptyMembAxSetSymbol.Sort,''none.Sort,'nil.TypeList, ''MembAxSet.Sort],'op-hook[''membAxSetSymbol.Sort,''__.Sort,'__[ ''MembAxSet.Sort,''MembAxSet.Sort],''MembAxSet.Sort],'op-hook[ ''eqSymbol.Sort,''eq_=_`[_`]..Qid,'__[''Term.Sort,''Term.Sort, ''AttrSet.Sort],''Equation.Sort],'op-hook[''ceqSymbol.Sort, ''ceq_=_if_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''EqCondition.Sort, ''AttrSet.Sort],''Equation.Sort],'op-hook[''emptyEquationSetSymbol.Sort, ''none.Sort,'nil.TypeList,''EquationSet.Sort],'op-hook[ ''equationSetSymbol.Sort,''__.Sort,'__[''EquationSet.Sort, ''EquationSet.Sort],''EquationSet.Sort],'op-hook[''rlSymbol.Sort, ''rl_=>_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''AttrSet.Sort], ''Rule.Sort],'op-hook[''crlSymbol.Sort,''crl_=>_if_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''Condition.Sort,''AttrSet.Sort],''Rule.Sort], 'op-hook[''emptyRuleSetSymbol.Sort,''none.Sort,'nil.TypeList, ''RuleSet.Sort],'op-hook[''ruleSetSymbol.Sort,''__.Sort,'__[''RuleSet.Sort, ''RuleSet.Sort],''RuleSet.Sort],'op-hook[''fmodSymbol.Sort, ''fmod_is_sorts_.____endfm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FModule.Sort],'op-hook[''fthSymbol.Sort, ''fth_is_sorts_.____endfth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FTheory.Sort],'op-hook[''modSymbol.Sort, ''mod_is_sorts_._____endm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''SModule.Sort],'op-hook[ ''thSymbol.Sort,''th_is_sorts_._____endth.Constant,'__[''Qid.Sort, ''ImportList.Sort,''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort, ''MembAxSet.Sort,''EquationSet.Sort,''RuleSet.Sort],''STheory.Sort], 'op-hook[''sortMappingSymbol.Sort,''sort_to_..Qid,'__[''Sort.Sort, ''Sort.Sort],''SortMapping.Sort],'op-hook[''emptySortMappingSetSymbol.Sort, ''none.Sort,'nil.TypeList,''SortMappingSet.Sort],'op-hook[ ''sortMappingSetSymbol.Sort,''__.Sort,'__[''SortMappingSet.Sort, ''SortMappingSet.Sort],''SortMappingSet.Sort],'op-hook[ ''opMappingSymbol.Sort,''op_to_..Qid,'__[''Qid.Sort,''Qid.Sort], ''OpMapping.Sort],'op-hook[''opSpecificMappingSymbol.Sort, ''op_:_->_to_..Qid,'__[''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort], ''OpMapping.Sort],'op-hook[''opTermMappingSymbol.Sort,''op_to`term_..Qid, '__[''Term.Sort,''Term.Sort],''OpMapping.Sort],'op-hook[ ''emptyOpMappingSetSymbol.Sort,''none.Sort,'nil.TypeList, ''OpMappingSet.Sort],'op-hook[''opMappingSetSymbol.Sort,''__.Sort,'__[ ''OpMappingSet.Sort,''OpMappingSet.Sort],''OpMappingSet.Sort],'op-hook[ ''viewSymbol.Sort,''view_from_to_is__endv.Sort,'__[''Header.Sort, ''ModuleExpression.Sort,''ModuleExpression.Sort,''SortMappingSet.Sort, ''OpMappingSet.Sort],''View.Sort],'op-hook[''anyTypeSymbol.Sort, ''anyType.Sort,'nil.TypeList,''Type?.Sort],'op-hook[ ''unificandPairSymbol.Sort,''_=?_.Sort,'__[''Term.Sort,''Term.Sort], ''UnificandPair.Sort],'op-hook[''unificationConjunctionSymbol.Sort, ''_/\_.Sort,'__[''UnificationProblem.Sort,''UnificationProblem.Sort], ''UnificationProblem.Sort],'op-hook[''resultPairSymbol.Sort,''`{_`,_`}.Qid, '__[''Term.Sort,''Type.Sort],''ResultPair.Sort],'op-hook[ ''resultTripleSymbol.Sort,''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Substitution.Sort],''ResultTriple.Sort],'op-hook[ ''result4TupleSymbol.Sort,''`{_`,_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Substitution.Sort,''Context.Sort],''Result4Tuple.Sort],'op-hook[ ''matchPairSymbol.Sort,''`{_`,_`}.Qid,'__[''Substitution.Sort, ''Context.Sort],''MatchPair.Sort],'op-hook[''unificationPairSymbol.Sort, ''`{_`,_`}.Qid,'__[''Substitution.Sort,''Nat.Sort],''UnificationPair.Sort], 'op-hook[''unificationTripleSymbol.Sort,''`{_`,_`,_`}.Qid,'__[ ''Substitution.Sort,''Substitution.Sort,''Nat.Sort], ''UnificationTriple.Sort],'op-hook[''variantSymbol.Sort,''`{_`,_`,_`}.Qid, '__[''Term.Sort,''Substitution.Sort,''Nat.Sort],''Variant.Sort],'op-hook[ ''traceStepSymbol.Sort,''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Rule.Sort],''TraceStep.Sort],'op-hook[''nilTraceSymbol.Sort,''nil.Sort, 'nil.TypeList,''Trace.Sort],'op-hook[''traceSymbol.Sort,''__.Sort,'__[ ''Trace.Sort,''Trace.Sort],''Trace.Sort],'op-hook[''noParseSymbol.Sort, ''noParse.Sort,''Nat.Sort,''ResultPair?.Sort],'op-hook[ ''ambiguitySymbol.Sort,''ambiguity.Sort,'__[''ResultPair.Sort, ''ResultPair.Sort],''ResultPair?.Sort],'op-hook[''failure2Symbol.Sort, ''failure.Sort,'nil.TypeList,''ResultPair?.Sort],'op-hook[ ''failure3Symbol.Sort,''failure.Sort,'nil.TypeList,''ResultTriple?.Sort], 'op-hook[''failure4Symbol.Sort,''failure.Sort,'nil.TypeList, ''Result4Tuple?.Sort],'op-hook[''noUnifierPairSymbol.Sort,''noUnifier.Sort, 'nil.TypeList,''UnificationPair?.Sort],'op-hook[ ''noUnifierTripleSymbol.Sort,''noUnifier.Sort,'nil.TypeList, ''UnificationTriple?.Sort],'op-hook[''noVariantSymbol.Sort, ''noVariant.Sort,'nil.TypeList,''Variant?.Sort],'op-hook[ ''noMatchSubstSymbol.Sort,''noMatch.Sort,'nil.TypeList, ''Substitution?.Sort],'op-hook[''noMatchPairSymbol.Sort,''noMatch.Sort, 'nil.TypeList,''MatchPair?.Sort],'op-hook[''failureTraceSymbol.Sort, ''failure.Sort,'nil.TypeList,''Trace?.Sort],'op-hook[''mixfixSymbol.Sort, ''mixfix.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[ ''withParensSymbol.Sort,''with-parens.Sort,'nil.TypeList, ''PrintOption.Sort],'op-hook[''flatSymbol.Sort,''flat.Sort,'nil.TypeList, ''PrintOption.Sort],'op-hook[''formatPrintOptionSymbol.Sort,''format.Sort, 'nil.TypeList,''PrintOption.Sort],'op-hook[''numberSymbol.Sort, ''number.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[''ratSymbol.Sort, ''rat.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[ ''emptyPrintOptionSetSymbol.Sort,''none.Sort,'nil.TypeList, ''PrintOptionSet.Sort],'op-hook[''printOptionSetSymbol.Sort,''__.Sort,'__[ ''PrintOptionSet.Sort,''PrintOptionSet.Sort],''PrintOptionSet.Sort], 'term-hook[''trueTerm.Sort,''true.Bool.Constant],'term-hook[ ''falseTerm.Sort,''false.Bool.Constant]]]],'op_:_->_`[_`].[ ''metaRewrite.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaRewrite.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaSearch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultTriple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaSearch.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaSearchPath.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Trace?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaSearchPath.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaUnify.Sort,'__[ ''`[Module`].Kind,''`[UnificationProblem`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationPair?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUnify.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaVariantDisjointUnify.Sort,'__[ ''`[Module`].Kind,''`[UnificationProblem`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationTriple?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaVariantDisjointUnify.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''metaVariantUnify.Sort,'__[''`[Module`].Kind, ''`[UnificationProblem`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationPair?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaVariantUnify.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaXapply.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Substitution?`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Result4Tuple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaXapply.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaXmatch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[MatchPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaXmatch.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metadata.Sort,''String.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''min.Sort,'__[''Nat.Sort, ''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''min.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''min.Sort,'__[''NzNat.Sort, ''NzNat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''min.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''minimalSorts.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaMinimalSorts.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''mixfix.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''modExp.Sort,'__[ ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind], ''`[FindResult`,NatList`,Bound`].Kind,'special['__['id-hook[ ''NumberOpSymbol.Sort,''modExp.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[ ''mod_is_sorts_._____endm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''SModule.Sort,'__['ctor.Attr,'gather[ '__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort, ''&.Sort]],'format['__[''d.Sort,''d.Sort,''s.Sort,''n++i.Sort,''ni.Sort, ''d.Sort,''d.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort, ''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''msg.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''EqCondition.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''HookList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''ImportList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''NatList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''ParameterDeclList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''QidList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''Trace.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''TypeList.Sort,'ctor.Attr],'op_:_->_`[_`].[''noMatch.Sort, 'nil.TypeList,''MatchPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[''noMatch.Sort, 'nil.TypeList,''Substitution?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''noParse.Sort,''Nat.Sort,''ResultPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''noUnifier.Sort,'nil.TypeList,''UnificationPair?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''noUnifier.Sort,'nil.TypeList,''UnificationTriple?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''noVariant.Sort,'nil.TypeList,''Variant?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''AttrSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''EmptyTypeSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''EquationSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''MembAxSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''OpDeclSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''OpMappingSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList, ''PrintOptionSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''QidSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''RuleSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''SortMappingSet.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''none.Sort,'nil.TypeList,''SubsortDeclSet.Sort,'ctor.Attr], 'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''Substitution.Sort,'ctor.Attr], 'op_:_->_`[_`].[''nonexec.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''notFound.Sort,'nil.TypeList,''FindResult.Sort, 'ctor.Attr],'op_:_->_`[_`].[''not_.Sort,''Bool.Sort,''Bool.Sort,'prec[ 's_^53['0.Zero]]],'op_:_->_`[_`].[''number.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''object.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''occurs.Sort,'__[''Nat.Sort, ''NatList.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[''occurs.Sort, '__[''Qid.Sort,''QidList.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''op-hook.Sort,'__[''Qid.Sort,''Qid.Sort,''QidList.Sort,''Qid.Sort], ''Hook.Sort,'__['ctor.Attr,'format['__[''nssss.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_:_->_`[_`]..Qid,'__[''Qid.Sort,''TypeList.Sort, ''Type.Sort,''AttrSet.Sort],''OpDecl.Sort,'__['ctor.Attr,'format['__[ ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''op_:_->_to_..Qid,'__[ ''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort],''OpMapping.Sort, 'ctor.Attr],'op_:_->_`[_`].[''op_:_->_to_`[_`].Qid,'__[''Qid.Sort, ''TypeList.Sort,''Type.Sort,''Qid.Sort,''AttrSet.Sort],''Renaming.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_to_..Qid,'__[''Qid.Sort,''Qid.Sort],''OpMapping.Sort, 'ctor.Attr],'op_:_->_`[_`].[''op_to_`[_`].Qid,'__[''Qid.Sort,''Qid.Sort, ''AttrSet.Sort],''Renaming.Sort,'__['ctor.Attr,'format['__[''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_to`term_..Qid,'__[''Term.Sort,''Term.Sort], ''OpMapping.Sort,'ctor.Attr],'op_:_->_`[_`].[''owise.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''poly.Sort,''NeNatList.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''prec.Sort,''Nat.Sort,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''print.Sort,''QidList.Sort,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''protecting_..Qid,''ModuleExpression.Sort, ''Import.Sort,'ctor.Attr],'op_:_->_`[_`].[''qid.Sort,''`[String`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''QuotedIdentifierOpSymbol.Sort, ''qid.Sort],'op-hook[''quotedIdentifierSymbol.Sort,''.Sort, 'nil.TypeList,''Qid.Sort],'op-hook[''stringSymbol.Sort,''.Sort, 'nil.TypeList,''Char.Sort]]]],'op_:_->_`[_`].[''rat.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''reverse.Sort, ''NatList.Sort,''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''reverse.Sort,''NeNatList.Sort,''NeNatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''reverse.Sort,''NeQidList.Sort,''NeQidList.Sort, 'none.AttrSet],'op_:_->_`[_`].[''reverse.Sort,''QidList.Sort, ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''rfind.Sort,'__[ ''String.Sort,''String.Sort,''Nat.Sort],''FindResult.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''rfind.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''notFoundTerm.Sort, ''notFound.FindResult.Constant]]]],'op_:_->_`[_`].[''right-id.Sort, ''Term.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''rl_=>_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''AttrSet.Sort],''Rule.Sort,'__['ctor.Attr,'format[ '__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''s_.Sort,''Nat.Sort,''NzNat.Sort, '__['iter.Attr,'ctor.Attr,'special['__['id-hook[''SuccSymbol.Sort, 'nil.TypeList],'term-hook[''zeroTerm.Sort,''0.Zero.Constant]]]]], 'op_:_->_`[_`].[''sameKind.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[Bool`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaSameKind.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''sd.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'comm.Attr,'special['__['id-hook[''CUI_NumberOpSymbol.Sort,''sd.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''size.Sort,''NatList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''NeNatList.Sort,''NzNat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''NeQidList.Sort,''NzNat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''QidList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''sortLeq.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaSortLeq.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''sort_to_.Sort,'__[''Qid.Sort,''Qid.Sort],''Renaming.Sort,'ctor.Attr], 'op_:_->_`[_`].[''sort_to_..Qid,'__[''Sort.Sort,''Sort.Sort], ''SortMapping.Sort,'ctor.Attr],'op_:_->_`[_`].[''special.Sort, ''NeHookList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''strat.Sort, ''NeNatList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''string.Sort, ''Qid.Sort,''String.Sort,'special['__['id-hook[ ''QuotedIdentifierOpSymbol.Sort,''string.Sort],'op-hook[ ''quotedIdentifierSymbol.Sort,''.Sort,'nil.TypeList,''Qid.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort]]]],'op_:_->_`[_`].[''subsort_<_..Qid,'__[''Sort.Sort, ''Sort.Sort],''SubsortDecl.Sort,'ctor.Attr],'op_:_->_`[_`].[''substr.Sort, '__[''String.Sort,''Nat.Sort,''Nat.Sort],''String.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''substr.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[''tail.Sort, ''NeNatList.Sort,''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''tail.Sort, ''NeQidList.Sort,''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''term-hook.Sort,'__[''Qid.Sort,''Term.Sort],''Hook.Sort,'__['ctor.Attr, 'format['__[''nssss.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''th_is_sorts_._____endth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''STheory.Sort,'__['ctor.Attr,'gather[ '__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort, ''&.Sort]],'format['__[''d.Sort,''d.Sort,''d.Sort,''n++i.Sort,''ni.Sort, ''d.Sort,''d.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort, ''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''true.Sort,'nil.TypeList, ''Bool.Sort,'__['ctor.Attr,'special['id-hook[''SystemTrue.Sort, 'nil.TypeList]]]],'op_:_->_`[_`].[''unbounded.Sort,'nil.TypeList, ''Bound.Sort,'ctor.Attr],'op_:_->_`[_`].[''union.Sort,'__[''NeQidSet.Sort, ''QidSet.Sort],''NeQidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''union.Sort, '__[''QidSet.Sort,''NeQidSet.Sort],''NeQidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''union.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''upEqs.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[EquationSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpEqs.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upImports.Sort,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[ImportList`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpImports.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upMbs.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[MembAxSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpMbs.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upModule.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind], ''`[Module`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaUpModule.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''upOpDecls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind], ''`[OpDeclSet`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaUpOpDecls.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''upRls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[RuleSet`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpRls.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upSorts.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upSubsortDecls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Bool`].Kind],''`[SubsortDeclSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpSubsortDecls.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upTerm.Sort,''Universal.Sort, ''Term.Sort,'__['poly['s_['0.Zero]],'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpTerm.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]]], 'op_:_->_`[_`].[''upView.Sort,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[View`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpView.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''variant.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''view_from_to_is__endv.Sort,'__[ ''Header.Sort,''ModuleExpression.Sort,''ModuleExpression.Sort, ''SortMappingSet.Sort,''OpMappingSet.Sort],''View.Sort,'__['ctor.Attr, 'gather['__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort]],'format['__[ ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''n++i.Sort, ''ni.Sort,''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''wellFormed.Sort, ''Module.Sort,''Bool.Sort,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedModule.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort, '__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''wellFormed.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind], ''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedTerm.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''wellFormed.Sort,'__[''`[Module`].Kind,''`[Substitution?`].Kind], ''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedSubstitution.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''with-parens.Sort,'nil.TypeList,''PrintOption.Sort, 'ctor.Attr],'op_:_->_`[_`].[''|_|.Sort,''NeQidSet.Sort,''NzNat.Sort, 'none.AttrSet],'op_:_->_`[_`].[''|_|.Sort,''QidSet.Sort,''Nat.Sort, 'none.AttrSet]],'none.MembAxSet,'__['eq_=_`[_`].['_`[_`][''$card.Sort, '_`,_[''none.EmptyTypeSet.Constant,''C:Nat.Variable]],''C:Nat.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort, '_`,_[''E:Qid.Variable,''S:QidSet.Variable]],''C:Nat.Variable]],'_`[_`][ ''$card.Sort,'_`,_[''S:QidSet.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'owise.Attr], 'eq_=_`[_`].['_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[ ''N:NeQidSet.Variable,''N:NeQidSet.Variable,''S:QidSet.Variable]], ''C:Nat.Variable]],'_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[ ''N:NeQidSet.Variable,''S:QidSet.Variable]],''C:Nat.Variable]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$diff.Sort,'_`,_[ ''none.EmptyTypeSet.Constant,''S':QidSet.Variable,''A:QidSet.Variable]], ''A:QidSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''$diff.Sort,'_`,_[ '_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]], ''S':QidSet.Variable,''A:QidSet.Variable]],'_`[_`][''$diff.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable,'_`[_`][''if_then_else_fi.Sort, '_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable,''S':QidSet.Variable]], ''A:QidSet.Variable,'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''A:QidSet.Variable]]]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''$intersect.Sort,'_`,_[''none.EmptyTypeSet.Constant,''S':QidSet.Variable, ''A:QidSet.Variable]],''A:QidSet.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$intersect.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],''S':QidSet.Variable,''A:QidSet.Variable]],'_`[_`][ ''$intersect.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable,'_`[_`][ ''if_then_else_fi.Sort,'_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable, ''S':QidSet.Variable]],'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''A:QidSet.Variable]],''A:QidSet.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_[''nil.NatList.Constant, ''A:NatList.Variable]],''A:NatList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_[''nil.TypeList.Constant, ''A:QidList.Variable]],''A:QidList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]],''A:NatList.Variable]],'_`[_`][''$reverse.Sort, '_`,_[''L:NatList.Variable,'_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''A:NatList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''$reverse.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]],''A:QidList.Variable]],'_`[_`][''$reverse.Sort, '_`,_[''L:QidList.Variable,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''A:QidList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''$size.Sort, '_`,_[''nil.NatList.Constant,''C:Nat.Variable]],''C:Nat.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_[ ''nil.TypeList.Constant,''C:Nat.Variable]],''C:Nat.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[ ''E:Nat.Variable,''L:NatList.Variable]],''C:Nat.Variable]],'_`[_`][ ''$size.Sort,'_`,_[''L:NatList.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[ ''E:Qid.Variable,''L:QidList.Variable]],''C:Nat.Variable]],'_`[_`][ ''$size.Sort,'_`,_[''L:QidList.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_;_.Sort,'_`,_[''A:Assignment.Variable, ''A:Assignment.Variable]],''A:Assignment.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_;_.Sort,'_`,_[''N:NeQidSet.Variable, ''N:NeQidSet.Variable]],''N:NeQidSet.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_;_.Sort,'_`,_[''T:TypeList.Variable,''T:TypeList.Variable]], ''T:TypeList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_\_.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable]],'_`[_`][''$diff.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable,''none.EmptyTypeSet.Constant]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_\_.Sort,'_`,_[''S:QidSet.Variable, ''none.EmptyTypeSet.Constant]],''S:QidSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''A:Attr.Variable,''A:Attr.Variable]], ''A:Attr.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[ ''E:Equation.Variable,''E:Equation.Variable]],''E:Equation.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''M:MembAx.Variable, ''M:MembAx.Variable]],''M:MembAx.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''__.Sort,'_`,_[''O:OpDecl.Variable,''O:OpDecl.Variable]], ''O:OpDecl.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[ ''O:OpMapping.Variable,''O:OpMapping.Variable]],''O:OpMapping.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''R:Rule.Variable, ''R:Rule.Variable]],''R:Rule.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''__.Sort,'_`,_[''S:SortMapping.Variable,''S:SortMapping.Variable]], ''S:SortMapping.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort, '_`,_[''S:SubsortDecl.Variable,''S:SubsortDecl.Variable]], ''S:SubsortDecl.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''_and-then_.Sort,'_`,_[''false.Bool.Constant,''B:`[Bool`].Variable]], ''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''_and-then_.Sort,'_`,_[''true.Bool.Constant,''B:`[Bool`].Variable]], ''B:`[Bool`].Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort, '_`,_[''A:Bool.Variable,''A:Bool.Variable]],''A:Bool.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, '_`[_`][''_xor_.Sort,'_`,_[''B:Bool.Variable,''C:Bool.Variable]]]],'_`[_`][ ''_xor_.Sort,'_`,_['_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''C:Bool.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort, '_`,_[''false.Bool.Constant,''A:Bool.Variable]],''false.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort,'_`,_[ ''true.Bool.Constant,''A:Bool.Variable]],''A:Bool.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_implies_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''not_.Sort,'_`[_`][''_xor_.Sort,'_`,_[ ''A:Bool.Variable,'_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''_in_.Sort, '_`,_[''E:Qid.Variable,''S:QidSet.Variable]],''false.Bool.Constant, 'owise.Attr],'eq_=_`[_`].['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable, '_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]]]], ''true.Bool.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or-else_.Sort, '_`,_[''false.Bool.Constant,''B:`[Bool`].Variable]],''B:`[Bool`].Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or-else_.Sort,'_`,_[ ''true.Bool.Constant,''B:`[Bool`].Variable]],''true.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''_xor_.Sort,'_`,_['_`[_`][''_and_.Sort,'_`,_[ ''A:Bool.Variable,''B:Bool.Variable]],'_`[_`][''_xor_.Sort,'_`,_[ ''A:Bool.Variable,''B:Bool.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_psubset_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], '_`[_`][''_and-then_.Sort,'_`,_['_`[_`][''_=/=_.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable]],'_`[_`][''_subset_.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_subset_.Sort,'_`,_[''none.EmptyTypeSet.Constant, ''S':QidSet.Variable]],''true.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_subset_.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],''S':QidSet.Variable]],'_`[_`][''_and-then_.Sort, '_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable,''S':QidSet.Variable]], '_`[_`][''_subset_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_xor_.Sort,'_`,_[''A:Bool.Variable, ''A:Bool.Variable]],''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_xor_.Sort,'_`,_[''false.Bool.Constant,''A:Bool.Variable]], ''A:Bool.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''`[_`].Kind, ''Q:Qid.Variable],'_`[_`][''th_is_sorts_._____endth.Constant,'_`,_[ ''Q:Qid.Variable,'_`[_`][''including_..Qid,''Q:Qid.Variable], ''none.EmptyTypeSet.Constant,''none.SubsortDeclSet.Constant, ''none.OpDeclSet.Constant,''none.MembAxSet.Constant, ''none.EquationSet.Constant,''none.RuleSet.Constant]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''append.Sort,'_`,_[''A:NatList.Variable, ''L:NatList.Variable]],'_`[_`][''__.Sort,'_`,_[''A:NatList.Variable, ''L:NatList.Variable]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''append.Sort, '_`,_[''A:QidList.Variable,''L:QidList.Variable]],'_`[_`][''__.Sort,'_`,_[ ''A:QidList.Variable,''L:QidList.Variable]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''delete.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]], ''S:QidSet.Variable,'owise.Attr],'eq_=_`[_`].['_`[_`][''delete.Sort,'_`,_[ ''E:Qid.Variable,'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]]]],'_`[_`][''delete.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''front.Sort, '_`[_`][''__.Sort,'_`,_[''L:NatList.Variable,''E:Nat.Variable]]], ''L:NatList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''front.Sort, '_`[_`][''__.Sort,'_`,_[''L:QidList.Variable,''E:Qid.Variable]]], ''L:QidList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getContext.Sort, '_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[''T:Term.Variable,''T:Type.Variable, ''S:Substitution.Variable,''C:Context.Variable]]],''C:Context.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getContext.Sort,'_`[_`][ ''`{_`,_`}.Qid,'_`,_[''S:Substitution.Variable,''C:Context.Variable]]], ''C:Context.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getEqs.Sort, '_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''EQS:EquationSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getEqs.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''EQS:EquationSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getEqs.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''EQS:EquationSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getEqs.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''EQS:EquationSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getFrom.Sort,'_`[_`][''view_from_to_is__endv.Sort, '_`,_[''Q:Qid.Variable,''ME:ModuleExpression.Variable, ''ME':ModuleExpression.Variable,''SMS:SortMappingSet.Variable, ''OMS:OpMappingSet.Variable]]],''ME:ModuleExpression.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getImports.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''IL:ImportList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getImports.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''IL:ImportList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getImports.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''IL:ImportList.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getImports.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''IL:ImportList.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getMbs.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''MAS:MembAxSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getMbs.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''MAS:MembAxSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getMbs.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''MAS:MembAxSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getMbs.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''MAS:MembAxSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getName.Sort,''C:Constant.Variable],'_`[_`][ ''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''C:Constant.Variable],''0.Zero.Constant,'_`[_`][''rfind.Sort,'_`,_[ '_`[_`][''string.Sort,''C:Constant.Variable],''".".Char.Constant,'_`[_`][ ''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,''V:Variable.Variable], '_`[_`][''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],''0.Zero.Constant,'_`[_`][''rfind.Sort,'_`,_[ '_`[_`][''string.Sort,''V:Variable.Variable],''":".Char.Constant,'_`[_`][ ''length.Sort,'_`[_`][''string.Sort,''V:Variable.Variable]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_['_`[_`][''_`{_`}.Sort,'_`,_[ ''Q:Qid.Variable,''PDL:ParameterDeclList.Variable]], ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''mod_is_sorts_._____endm.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''Q:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getName.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ '_`[_`][''_`{_`}.Sort,'_`,_[''Q:Qid.Variable, ''PDL:ParameterDeclList.Variable]],''IL:ImportList.Variable, ''SS:SortSet.Variable,''SSDS:SubsortDeclSet.Variable, ''OPDS:OpDeclSet.Variable,''MAS:MembAxSet.Variable, ''EQS:EquationSet.Variable,''RLS:RuleSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''Q:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getName.Sort,'_`[_`][''view_from_to_is__endv.Sort,'_`,_[ ''Q:Qid.Variable,''ME:ModuleExpression.Variable, ''ME':ModuleExpression.Variable,''SMS:SortMappingSet.Variable, ''OMS:OpMappingSet.Variable]]],''Q:Qid.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getOpMappings.Sort,'_`[_`][ ''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''OMS:OpMappingSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''OPDS:OpDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''OPDS:OpDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''OPDS:OpDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getOps.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''OPDS:OpDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getRls.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''none.RuleSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getRls.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''none.RuleSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getRls.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''RLS:RuleSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getRls.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''RLS:RuleSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSortMappings.Sort,'_`[_`][ ''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''SMS:SortMappingSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSorts.Sort,'_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SS:SortSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getSorts.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SS:SortSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getSorts.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SS:SortSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSorts.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SS:SortSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubsorts.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SSDS:SubsortDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubsorts.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SSDS:SubsortDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubsorts.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SSDS:SubsortDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubsorts.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SSDS:SubsortDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubstitution.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable, ''C:Context.Variable]]],''S:Substitution.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubstitution.Sort,'_`[_`][''`{_`,_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable]]], ''S:Substitution.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubstitution.Sort,'_`[_`][''`{_`,_`}.Qid,'_`,_[ ''S:Substitution.Variable,''C:Context.Variable]]], ''S:Substitution.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getTerm.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable,''S:Substitution.Variable,''C:Context.Variable]]], ''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getTerm.Sort, '_`[_`][''`{_`,_`,_`}.Qid,'_`,_[''T:Term.Variable,''T:Type.Variable, ''S:Substitution.Variable]]],''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getTerm.Sort,'_`[_`][''`{_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable]]],''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getTo.Sort,'_`[_`][''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''ME':ModuleExpression.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getType.Sort,''C:Constant.Variable],'_`[_`][''qid.Sort,'_`[_`][ ''substr.Sort,'_`,_['_`[_`][''string.Sort,''C:Constant.Variable],'_`[_`][ ''_+_.Sort,'_`,_['_`[_`][''s_.Sort,''0.Zero.Constant],'_`[_`][''rfind.Sort, '_`,_['_`[_`][''string.Sort,''C:Constant.Variable],''".".Char.Constant, '_`[_`][''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]]], '_`[_`][''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getType.Sort,''V:Variable.Variable], '_`[_`][''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],'_`[_`][''_+_.Sort,'_`,_['_`[_`][''s_.Sort, ''0.Zero.Constant],'_`[_`][''rfind.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],''":".Char.Constant,'_`[_`][''length.Sort,'_`[_`][ ''string.Sort,''V:Variable.Variable]]]]]],'_`[_`][''length.Sort,'_`[_`][ ''string.Sort,''V:Variable.Variable]]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getType.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[ ''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable, ''C:Context.Variable]]],''T:Type.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getType.Sort,'_`[_`][''`{_`,_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable,''S:Substitution.Variable]]],''T:Type.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getType.Sort,'_`[_`][''`{_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable]]],''T:Type.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''head.Sort,'_`[_`][''__.Sort,'_`,_[ ''E:Nat.Variable,''L:NatList.Variable]]],''E:Nat.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''head.Sort,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]]],''E:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''insert.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]],'_`[_`][ ''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''intersection.Sort,'_`,_[''S:QidSet.Variable, ''N:NeQidSet.Variable]],'_`[_`][''$intersect.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable,''none.EmptyTypeSet.Constant]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''intersection.Sort,'_`,_[ ''S:QidSet.Variable,''none.EmptyTypeSet.Constant]], ''none.EmptyTypeSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''last.Sort,'_`[_`][''__.Sort,'_`,_[''L:NatList.Variable, ''E:Nat.Variable]]],''E:Nat.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''last.Sort,'_`[_`][''__.Sort,'_`,_[''L:QidList.Variable, ''E:Qid.Variable]]],''E:Qid.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''metaPrettyPrint.Sort,'_`,_[''M:Module.Variable,''T:Term.Variable]], '_`[_`][''metaPrettyPrint.Sort,'_`,_[''M:Module.Variable,''T:Term.Variable, '_`[_`][''__.Sort,'_`,_[''mixfix.PrintOption.Constant,'_`[_`][''__.Sort, '_`,_[''flat.PrintOption.Constant,'_`[_`][''__.Sort,'_`,_[ ''format.PrintOption.Constant,'_`[_`][''__.Sort,'_`,_[ ''number.PrintOption.Constant,''rat.PrintOption.Constant]]]]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''not_.Sort,''A:Bool.Variable],'_`[_`][ ''_xor_.Sort,'_`,_[''true.Bool.Constant,''A:Bool.Variable]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable, ''nil.NatList.Constant]],''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable,'_`[_`][''__.Sort,'_`,_[ ''E':Nat.Variable,''L:NatList.Variable]]]],'_`[_`][''if_then_else_fi.Sort, '_`,_['_`[_`][''_==_.Sort,'_`,_[''E:Nat.Variable,''E':Nat.Variable]], ''true.Bool.Constant,'_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''occurs.Sort, '_`,_[''E:Qid.Variable,''nil.TypeList.Constant]],''false.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''occurs.Sort,'_`,_[''E:Qid.Variable, '_`[_`][''__.Sort,'_`,_[''E':Qid.Variable,''L:QidList.Variable]]]],'_`[_`][ ''if_then_else_fi.Sort,'_`,_['_`[_`][''_==_.Sort,'_`,_[''E:Qid.Variable, ''E':Qid.Variable]],''true.Bool.Constant,'_`[_`][''occurs.Sort,'_`,_[ ''E:Qid.Variable,''L:QidList.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''reverse.Sort,''L:NatList.Variable],'_`[_`][''$reverse.Sort,'_`,_[ ''L:NatList.Variable,''nil.NatList.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''reverse.Sort,''L:QidList.Variable],'_`[_`][''$reverse.Sort,'_`,_[ ''L:QidList.Variable,''nil.TypeList.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''size.Sort,''L:NatList.Variable],'_`[_`][''$size.Sort,'_`,_[ ''L:NatList.Variable,''0.Zero.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''size.Sort,''L:QidList.Variable],'_`[_`][''$size.Sort,'_`,_[ ''L:QidList.Variable,''0.Zero.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''tail.Sort,'_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]]],''L:NatList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''tail.Sort,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]]],''L:QidList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''union.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], '_`[_`][''_;_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''|_|.Sort,''S:QidSet.Variable], '_`[_`][''$card.Sort,'_`,_[''S:QidSet.Variable,''0.Zero.Constant]], 'none.AttrSet]]] ========================================== reduce in META-LEVEL : {upTerm(upModule('META-LEVEL, true)),'FModule} . rewrites: 3 result ResultPair: {'fmod_is_sorts_.____endfm[''META-LEVEL.Sort, 'nil.ImportList,'_;_[''Assignment.Sort,''Attr.Sort,''AttrSet.Sort, ''Bool.Sort,''Bound.Sort,''Char.Sort,''Condition.Sort,''Constant.Sort, ''Context.Sort,''EmptyCommaList.Sort,''EmptyTypeSet.Sort, ''EqCondition.Sort,''Equation.Sort,''EquationSet.Sort,''FModule.Sort, ''FTheory.Sort,''FindResult.Sort,''GTermList.Sort,''GroundTerm.Sort, ''GroundTermList.Sort,''Header.Sort,''Hook.Sort,''HookList.Sort, ''Import.Sort,''ImportList.Sort,''Kind.Sort,''KindSet.Sort, ''MatchPair.Sort,''MatchPair?.Sort,''MembAx.Sort,''MembAxSet.Sort, ''Module.Sort,''ModuleExpression.Sort,''Nat.Sort,''NatList.Sort, ''NeCTermList.Sort,''NeGroundTermList.Sort,''NeHookList.Sort, ''NeKindSet.Sort,''NeNatList.Sort,''NeParameterDeclList.Sort, ''NeParameterList.Sort,''NeQidList.Sort,''NeQidSet.Sort,''NeSortSet.Sort, ''NeTermList.Sort,''NeTypeList.Sort,''NeTypeSet.Sort,''NzNat.Sort, ''OpDecl.Sort,''OpDeclSet.Sort,''OpMapping.Sort,''OpMappingSet.Sort, ''ParameterDecl.Sort,''ParameterDeclList.Sort,''ParameterList.Sort, ''PrintOption.Sort,''PrintOptionSet.Sort,''Qid.Sort,''QidList.Sort, ''QidSet.Sort,''Renaming.Sort,''RenamingSet.Sort,''Result4Tuple.Sort, ''Result4Tuple?.Sort,''ResultPair.Sort,''ResultPair?.Sort, ''ResultTriple.Sort,''ResultTriple?.Sort,''Rule.Sort,''RuleSet.Sort, ''SModule.Sort,''STheory.Sort,''Sort.Sort,''SortMapping.Sort, ''SortMappingSet.Sort,''SortSet.Sort,''String.Sort,''SubsortDecl.Sort, ''SubsortDeclSet.Sort,''Substitution.Sort,''Substitution?.Sort,''Term.Sort, ''TermList.Sort,''TermQid.Sort,''Trace.Sort,''Trace?.Sort,''TraceStep.Sort, ''Type.Sort,''Type?.Sort,''TypeList.Sort,''TypeListSet.Sort,''TypeSet.Sort, ''UnificandPair.Sort,''UnificationPair.Sort,''UnificationPair?.Sort, ''UnificationProblem.Sort,''UnificationTriple.Sort, ''UnificationTriple?.Sort,''Variable.Sort,''Variant.Sort,''Variant?.Sort, ''View.Sort,''Zero.Sort],'__['subsort_<_.[''Assignment.Sort, ''Substitution.Sort],'subsort_<_.[''Attr.Sort,''AttrSet.Sort],'subsort_<_.[ ''Char.Sort,''String.Sort],'subsort_<_.[''Constant.Sort,''GroundTerm.Sort], 'subsort_<_.[''Constant.Sort,''TermQid.Sort],'subsort_<_.[''Context.Sort, ''NeCTermList.Sort],'subsort_<_.[''EmptyCommaList.Sort, ''GroundTermList.Sort],'subsort_<_.[''EmptyCommaList.Sort, ''ParameterList.Sort],'subsort_<_.[''EmptyTypeSet.Sort,''KindSet.Sort], 'subsort_<_.[''EmptyTypeSet.Sort,''SortSet.Sort],'subsort_<_.[ ''EqCondition.Sort,''Condition.Sort],'subsort_<_.[''Equation.Sort, ''EquationSet.Sort],'subsort_<_.[''FModule.Sort,''SModule.Sort], 'subsort_<_.[''FTheory.Sort,''STheory.Sort],'subsort_<_.[''GroundTerm.Sort, ''NeGroundTermList.Sort],'subsort_<_.[''GroundTerm.Sort,''Term.Sort], 'subsort_<_.[''GroundTermList.Sort,''TermList.Sort],'subsort_<_.[ ''Hook.Sort,''NeHookList.Sort],'subsort_<_.[''Import.Sort, ''ImportList.Sort],'subsort_<_.[''Kind.Sort,''NeKindSet.Sort],'subsort_<_.[ ''Kind.Sort,''Type.Sort],'subsort_<_.[''KindSet.Sort,''TypeSet.Sort], 'subsort_<_.[''MatchPair.Sort,''MatchPair?.Sort],'subsort_<_.[ ''MembAx.Sort,''MembAxSet.Sort],'subsort_<_.[''Nat.Sort,''Bound.Sort], 'subsort_<_.[''Nat.Sort,''FindResult.Sort],'subsort_<_.[''Nat.Sort, ''NeNatList.Sort],'subsort_<_.[''NeCTermList.Sort,''GTermList.Sort], 'subsort_<_.[''NeGroundTermList.Sort,''GroundTermList.Sort],'subsort_<_.[ ''NeGroundTermList.Sort,''NeTermList.Sort],'subsort_<_.[''NeHookList.Sort, ''HookList.Sort],'subsort_<_.[''NeKindSet.Sort,''KindSet.Sort], 'subsort_<_.[''NeKindSet.Sort,''NeTypeSet.Sort],'subsort_<_.[ ''NeNatList.Sort,''NatList.Sort],'subsort_<_.[''NeParameterDeclList.Sort, ''ParameterDeclList.Sort],'subsort_<_.[''NeParameterList.Sort, ''ParameterList.Sort],'subsort_<_.[''NeQidList.Sort,''QidList.Sort], 'subsort_<_.[''NeQidSet.Sort,''QidSet.Sort],'subsort_<_.[''NeSortSet.Sort, ''NeTypeSet.Sort],'subsort_<_.[''NeSortSet.Sort,''SortSet.Sort], 'subsort_<_.[''NeTermList.Sort,''TermList.Sort],'subsort_<_.[ ''NeTypeList.Sort,''NeQidList.Sort],'subsort_<_.[''NeTypeList.Sort, ''TypeList.Sort],'subsort_<_.[''NeTypeSet.Sort,''NeQidSet.Sort], 'subsort_<_.[''NeTypeSet.Sort,''TypeSet.Sort],'subsort_<_.[''NzNat.Sort, ''Nat.Sort],'subsort_<_.[''OpDecl.Sort,''OpDeclSet.Sort],'subsort_<_.[ ''OpMapping.Sort,''OpMappingSet.Sort],'subsort_<_.[''ParameterDecl.Sort, ''NeParameterDeclList.Sort],'subsort_<_.[''PrintOption.Sort, ''PrintOptionSet.Sort],'subsort_<_.[''Qid.Sort,''Header.Sort],'subsort_<_.[ ''Qid.Sort,''ModuleExpression.Sort],'subsort_<_.[''Qid.Sort, ''NeQidList.Sort],'subsort_<_.[''Qid.Sort,''NeQidSet.Sort],'subsort_<_.[ ''Renaming.Sort,''RenamingSet.Sort],'subsort_<_.[''Result4Tuple.Sort, ''Result4Tuple?.Sort],'subsort_<_.[''ResultPair.Sort,''ResultPair?.Sort], 'subsort_<_.[''ResultTriple.Sort,''ResultTriple?.Sort],'subsort_<_.[ ''Rule.Sort,''RuleSet.Sort],'subsort_<_.[''SModule.Sort,''Module.Sort], 'subsort_<_.[''STheory.Sort,''Module.Sort],'subsort_<_.[''Sort.Sort, ''NeParameterList.Sort],'subsort_<_.[''Sort.Sort,''NeSortSet.Sort], 'subsort_<_.[''Sort.Sort,''Type.Sort],'subsort_<_.[''SortMapping.Sort, ''SortMappingSet.Sort],'subsort_<_.[''SortSet.Sort,''TypeSet.Sort], 'subsort_<_.[''SubsortDecl.Sort,''SubsortDeclSet.Sort],'subsort_<_.[ ''Substitution.Sort,''Substitution?.Sort],'subsort_<_.[''Term.Sort, ''NeTermList.Sort],'subsort_<_.[''TermList.Sort,''GTermList.Sort], 'subsort_<_.[''TermQid.Sort,''Qid.Sort],'subsort_<_.[''TermQid.Sort, ''Term.Sort],'subsort_<_.[''Trace.Sort,''Trace?.Sort],'subsort_<_.[ ''TraceStep.Sort,''Trace.Sort],'subsort_<_.[''Type.Sort,''NeTypeList.Sort], 'subsort_<_.[''Type.Sort,''NeTypeSet.Sort],'subsort_<_.[''Type.Sort, ''Qid.Sort],'subsort_<_.[''Type.Sort,''Type?.Sort],'subsort_<_.[ ''TypeList.Sort,''QidList.Sort],'subsort_<_.[''TypeList.Sort, ''TypeListSet.Sort],'subsort_<_.[''TypeSet.Sort,''QidSet.Sort], 'subsort_<_.[''TypeSet.Sort,''TypeListSet.Sort],'subsort_<_.[ ''UnificandPair.Sort,''UnificationProblem.Sort],'subsort_<_.[ ''UnificationPair.Sort,''UnificationPair?.Sort],'subsort_<_.[ ''UnificationTriple.Sort,''UnificationTriple?.Sort],'subsort_<_.[ ''Variable.Sort,''TermQid.Sort],'subsort_<_.[''Variant.Sort, ''Variant?.Sort],'subsort_<_.[''Zero.Sort,''Nat.Sort]],'__['op_:_->_`[_`].[ ''$card.Sort,'__[''QidSet.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''$diff.Sort,'__[''QidSet.Sort,''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''$intersect.Sort,'__[''QidSet.Sort,''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''$reverse.Sort,'__[ ''NatList.Sort,''NatList.Sort],''NatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''$reverse.Sort,'__[''QidList.Sort,''QidList.Sort], ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''$size.Sort,'__[ ''NatList.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''$size.Sort,'__[''QidList.Sort,''Nat.Sort],''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''0.Sort,'nil.TypeList,''Zero.Sort,'ctor.Attr], 'op_:_->_`[_`].[''.Sort,'nil.TypeList,''Constant.Sort,'special[ 'id-hook[''QuotedIdentifierSymbol.Sort,''constantQid.Sort]]], 'op_:_->_`[_`].[''.Sort,'nil.TypeList,''Kind.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''kindQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Qid.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,'nil.TypeList]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Sort.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''sortQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Variable.Sort,'special['id-hook[ ''QuotedIdentifierSymbol.Sort,''variableQid.Sort]]],'op_:_->_`[_`].[ ''.Sort,'nil.TypeList,''Char.Sort,'special['id-hook[ ''StringSymbol.Sort,'nil.TypeList]]],'op_:_->_`[_`].[''.Sort, 'nil.TypeList,''String.Sort,'special['id-hook[''StringSymbol.Sort, 'nil.TypeList]]],'op_:_->_`[_`].[''_&_.Sort,'__[''Nat.Sort,''Nat.Sort], ''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^53['0.Zero]],'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''&.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_*_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^31[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''*.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_*_.Sort,'__[''NzNat.Sort,''NzNat.Sort],''NzNat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^31['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''*.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_*`(_`).Sort,'__[ ''ModuleExpression.Sort,''RenamingSet.Sort],''ModuleExpression.Sort,'__[ 'ctor.Attr,'prec['s_^39['0.Zero]],'format['__[''d.Sort,''d.Sort,''s.Sort, ''n++i.Sort,''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''_+_.Sort,'__[ ''ModuleExpression.Sort,''ModuleExpression.Sort],''ModuleExpression.Sort, '__['assoc.Attr,'comm.Attr,'ctor.Attr]],'op_:_->_`[_`].[''_+_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^33[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''+.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_+_.Sort,'__[''NzNat.Sort,''Nat.Sort],''NzNat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^33['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''+.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_+_.Sort,'__[''String.Sort, ''String.Sort],''String.Sort,'__['prec['s_^33['0.Zero]],'gather['__[ ''E.Sort,''e.Sort]],'special['__['id-hook[''StringOpSymbol.Sort,''+.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort]]]]],'op_:_->_`[_`].[''_/\_.Sort,'__[''Condition.Sort, ''Condition.Sort],''Condition.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.EqCondition.Constant],'prec['s_^73['0.Zero]]]],'op_:_->_`[_`].[ ''_/\_.Sort,'__[''EqCondition.Sort,''EqCondition.Sort],''EqCondition.Sort, '__['assoc.Attr,'ctor.Attr,'id[''nil.EqCondition.Constant],'prec['s_^73[ '0.Zero]]]],'op_:_->_`[_`].[''_/\_.Sort,'__[''UnificationProblem.Sort, ''UnificationProblem.Sort],''UnificationProblem.Sort,'__['assoc.Attr, 'comm.Attr,'ctor.Attr,'prec['s_^73['0.Zero]]]],'op_:_->_`[_`].[ ''_::_.Variable,'__[''Sort.Sort,''ModuleExpression.Sort], ''ParameterDecl.Sort,'none.AttrSet],'op_:_->_`[_`].[''_:=_.Variable,'__[ ''Term.Sort,''Term.Sort],''EqCondition.Sort,'__['ctor.Attr,'prec['s_^71[ '0.Zero]]]],'op_:_->_`[_`].[''_:_.Variable,'__[''Term.Sort,''Sort.Sort], ''EqCondition.Sort,'__['ctor.Attr,'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''EmptyTypeSet.Sort,''EmptyTypeSet.Sort], ''EmptyTypeSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''KindSet.Sort,''KindSet.Sort],''KindSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''NeKindSet.Sort, ''KindSet.Sort],''NeKindSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''NeQidSet.Sort,''QidSet.Sort],''NeQidSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''NeSortSet.Sort, ''SortSet.Sort],''NeSortSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''NeTypeSet.Sort,''TypeSet.Sort],''NeTypeSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''SortSet.Sort,''SortSet.Sort],''SortSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_;_.Sort,'__[''Substitution.Sort, ''Substitution.Sort],''Substitution.Sort,'__['assoc.Attr,'comm.Attr, 'ctor.Attr,'id[''none.Substitution.Constant],'prec['s_^65['0.Zero]]]], 'op_:_->_`[_`].[''_;_.Sort,'__[''TypeListSet.Sort,''TypeListSet.Sort], ''TypeListSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EmptyTypeSet.Constant],'prec['s_^43['0.Zero]]]],'op_:_->_`[_`].[ ''_;_.Sort,'__[''TypeSet.Sort,''TypeSet.Sort],''TypeSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.EmptyTypeSet.Constant],'prec[ 's_^43['0.Zero]]]],'op_:_->_`[_`].[''_<-_.Sort,'__[''Variable.Sort, ''Term.Sort],''Assignment.Sort,'__['ctor.Attr,'prec['s_^63['0.Zero]], 'format['__[''nt.Sort,''d.Sort,''d.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''_<<_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['prec['s_^35[ '0.Zero]],'gather['__[''E.Sort,''e.Sort]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<<.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_<=_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<=.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_<=_.Sort,'__[''String.Sort,''String.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''StringOpSymbol.Sort,''<=.Sort],'op-hook[ ''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_<_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''<.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_<_.Sort,'__[''String.Sort,''String.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''StringOpSymbol.Sort,''<.Sort],'op-hook[ ''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_=/=_.Sort,'__[ ''Universal.Sort,''Universal.Sort],''Bool.Sort,'__['prec['s_^51['0.Zero]], 'poly['__['s_['0.Zero],'s_^2['0.Zero]]],'special['__['id-hook[ ''EqualitySymbol.Sort,'nil.TypeList],'term-hook[''equalTerm.Sort, ''false.Bool.Constant],'term-hook[''notEqualTerm.Sort, ''true.Bool.Constant]]]]],'op_:_->_`[_`].[''_==_.Sort,'__[''Universal.Sort, ''Universal.Sort],''Bool.Sort,'__['prec['s_^51['0.Zero]],'poly['__['s_[ '0.Zero],'s_^2['0.Zero]]],'special['__['id-hook[''EqualitySymbol.Sort, 'nil.TypeList],'term-hook[''equalTerm.Sort,''true.Bool.Constant], 'term-hook[''notEqualTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_=>_.Sort,'__[''Term.Sort,''Term.Sort],''Condition.Sort,'__['ctor.Attr, 'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[''_=?_.Sort,'__[''Term.Sort, ''Term.Sort],''UnificandPair.Sort,'__['ctor.Attr,'prec['s_^71['0.Zero]]]], 'op_:_->_`[_`].[''_=_.Sort,'__[''Term.Sort,''Term.Sort],''EqCondition.Sort, '__['ctor.Attr,'prec['s_^71['0.Zero]]]],'op_:_->_`[_`].[''_>=_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''NumberOpSymbol.Sort,''>=.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>=_.Sort,'__[''String.Sort, ''String.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''StringOpSymbol.Sort,''>=.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>>_.Sort,'__[''Nat.Sort, ''Nat.Sort],''Nat.Sort,'__['prec['s_^35['0.Zero]],'gather['__[''E.Sort, ''e.Sort]],'special['__['id-hook[''NumberOpSymbol.Sort,''>>.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''_>_.Sort,'__[''Nat.Sort,''Nat.Sort],''Bool.Sort,'__['prec['s_^37[ '0.Zero]],'special['__['id-hook[''NumberOpSymbol.Sort,''>.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[ ''trueTerm.Sort,''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_>_.Sort,'__[''String.Sort, ''String.Sort],''Bool.Sort,'__['prec['s_^37['0.Zero]],'special['__[ 'id-hook[''StringOpSymbol.Sort,''>.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'term-hook[''trueTerm.Sort, ''true.Bool.Constant],'term-hook[''falseTerm.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''_\_.Sort,'__[''QidSet.Sort, ''QidSet.Sort],''QidSet.Sort,'gather['__[''E.Sort,''e.Sort]]], 'op_:_->_`[_`].[''_^_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['prec[ 's_^29['0.Zero]],'gather['__[''E.Sort,''e.Sort]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''^.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_^_.Sort,'__[''NzNat.Sort, ''Nat.Sort],''NzNat.Sort,'__['prec['s_^29['0.Zero]],'gather['__[''E.Sort, ''e.Sort]],'special['__['id-hook[''NumberOpSymbol.Sort,''^.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''__.Sort,'__[''AttrSet.Sort,''AttrSet.Sort],''AttrSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.AttrSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''EquationSet.Sort,''EquationSet.Sort], ''EquationSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.EquationSet.Constant],'format['__[''d.Sort,''ni.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''HookList.Sort,''HookList.Sort], ''HookList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.HookList.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''HookList.Sort,''NeHookList.Sort], ''NeHookList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.HookList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[''ImportList.Sort, ''ImportList.Sort],''ImportList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.ImportList.Constant],'format['__[''d.Sort,''ni.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''MembAxSet.Sort,''MembAxSet.Sort], ''MembAxSet.Sort,'__['assoc.Attr,'comm.Attr,'ctor.Attr,'id[ ''none.MembAxSet.Constant],'format['__[''d.Sort,''ni.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''NatList.Sort,''NatList.Sort], ''NatList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.NatList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''NatList.Sort, ''NeNatList.Sort],''NeNatList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.NatList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort, '__[''NeHookList.Sort,''HookList.Sort],''NeHookList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.HookList.Constant]]],'op_:_->_`[_`].[''__.Sort,'__[ ''NeNatList.Sort,''NatList.Sort],''NeNatList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.NatList.Constant],'prec['s_^25['0.Zero]]]], 'op_:_->_`[_`].[''__.Sort,'__[''NeQidList.Sort,''QidList.Sort], ''NeQidList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''NeTypeList.Sort, ''TypeList.Sort],''NeTypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[ ''__.Sort,'__[''OpDeclSet.Sort,''OpDeclSet.Sort],''OpDeclSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.OpDeclSet.Constant],'format[ '__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''OpMappingSet.Sort,''OpMappingSet.Sort],''OpMappingSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.OpMappingSet.Constant], 'format['__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''PrintOptionSet.Sort,''PrintOptionSet.Sort],''PrintOptionSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.PrintOptionSet.Constant]]], 'op_:_->_`[_`].[''__.Sort,'__[''QidList.Sort,''NeQidList.Sort], ''NeQidList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''QidList.Sort, ''QidList.Sort],''QidList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[ ''__.Sort,'__[''RuleSet.Sort,''RuleSet.Sort],''RuleSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.RuleSet.Constant],'format['__[ ''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''SortMappingSet.Sort,''SortMappingSet.Sort],''SortMappingSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.SortMappingSet.Constant], 'format['__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''SubsortDeclSet.Sort,''SubsortDeclSet.Sort],''SubsortDeclSet.Sort,'__[ 'assoc.Attr,'comm.Attr,'ctor.Attr,'id[''none.SubsortDeclSet.Constant], 'format['__[''d.Sort,''ni.Sort,''d.Sort]]]],'op_:_->_`[_`].[''__.Sort,'__[ ''Trace.Sort,''Trace.Sort],''Trace.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.Trace.Constant],'format['__[''d.Sort,''n.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''__.Sort,'__[''TypeList.Sort,''NeTypeList.Sort], ''NeTypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[''nil.TypeList.Constant], 'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[''__.Sort,'__[''TypeList.Sort, ''TypeList.Sort],''TypeList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.TypeList.Constant],'prec['s_^25['0.Zero]]]],'op_:_->_`[_`].[ ''_`,_.Qid,'__[''EmptyCommaList.Sort,''EmptyCommaList.Sort], ''EmptyCommaList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GTermList.Sort, ''GTermList.Sort],''GTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GroundTermList.Sort, ''GroundTermList.Sort],''GroundTermList.Sort,'__['assoc.Attr,'ctor.Attr, 'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''GroundTermList.Sort, ''NeGroundTermList.Sort],''NeGroundTermList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]], 'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''NeCTermList.Sort,''TermList.Sort],''NeCTermList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]], 'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''NeGroundTermList.Sort,''GroundTermList.Sort],''NeGroundTermList.Sort,'__[ 'assoc.Attr,'ctor.Attr,'id[''empty.EmptyCommaList.Constant],'prec['s_^121[ '0.Zero]],'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''NeParameterDeclList.Sort,''ParameterDeclList.Sort], ''NeParameterDeclList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''NeParameterList.Sort, ''ParameterList.Sort],''NeParameterList.Sort,'__['assoc.Attr,'ctor.Attr, 'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''NeTermList.Sort, ''TermList.Sort],''NeTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[ ''ParameterDeclList.Sort,''NeParameterDeclList.Sort], ''NeParameterDeclList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterDeclList.Sort, ''ParameterDeclList.Sort],''ParameterDeclList.Sort,'__['assoc.Attr, 'ctor.Attr,'id[''nil.ParameterDeclList.Constant],'prec['s_^121['0.Zero]]]], 'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterList.Sort, ''NeParameterList.Sort],''NeParameterList.Sort,'__['assoc.Attr,'ctor.Attr, 'id[''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''ParameterList.Sort, ''ParameterList.Sort],''ParameterList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''RenamingSet.Sort, ''RenamingSet.Sort],''RenamingSet.Sort,'__['assoc.Attr,'comm.Attr, 'ctor.Attr,'prec['s_^43['0.Zero]],'format['__[''d.Sort,''d.Sort,''ni.Sort, ''d.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''NeCTermList.Sort],''NeCTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''NeTermList.Sort],''NeTermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`,_.Qid,'__[''TermList.Sort, ''TermList.Sort],''TermList.Sort,'__['assoc.Attr,'ctor.Attr,'id[ ''empty.EmptyCommaList.Constant],'prec['s_^121['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_`[_`].Qid,'__[''Qid.Sort, ''NeCTermList.Sort],''Context.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''_`[_`].Qid,'__[''Qid.Sort,''NeGroundTermList.Sort],''GroundTerm.Sort, 'ctor.Attr],'op_:_->_`[_`].[''_`[_`].Qid,'__[''Qid.Sort,''NeTermList.Sort], ''Term.Sort,'ctor.Attr],'op_:_->_`[_`].[''_`{_`}.Sort,'__[ ''ModuleExpression.Sort,''ParameterList.Sort],''ModuleExpression.Sort,'__[ 'ctor.Attr,'prec['s_^37['0.Zero]]]],'op_:_->_`[_`].[''_`{_`}.Sort,'__[ ''Qid.Sort,''ParameterDeclList.Sort],''Header.Sort,'ctor.Attr], 'op_:_->_`[_`].[''_and-then_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort, '__['strat['__['s_['0.Zero],'0.Zero]],'prec['s_^55['0.Zero]],'gather['__[ ''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_and_.Sort,'__[''Bool.Sort, ''Bool.Sort],''Bool.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^55[ '0.Zero]]]],'op_:_->_`[_`].[''_divides_.Sort,'__[''NzNat.Sort,''Nat.Sort], ''Bool.Sort,'__['prec['s_^51['0.Zero]],'special['__['id-hook[ ''NumberOpSymbol.Sort,''divides.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort],'term-hook[''trueTerm.Sort,''true.Bool.Constant], 'term-hook[''falseTerm.Sort,''false.Bool.Constant]]]]],'op_:_->_`[_`].[ ''_implies_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['prec['s_^61[ '0.Zero]],'gather['__[''e.Sort,''E.Sort]]]],'op_:_->_`[_`].[''_in_.Sort, '__[''Qid.Sort,''QidSet.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''_or-else_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['strat['__[ 's_['0.Zero],'0.Zero]],'prec['s_^59['0.Zero]],'gather['__[''e.Sort, ''E.Sort]]]],'op_:_->_`[_`].[''_or_.Sort,'__[''Bool.Sort,''Bool.Sort], ''Bool.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^59['0.Zero]]]], 'op_:_->_`[_`].[''_psubset_.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[''_quo_.Sort,'__[''Nat.Sort, ''NzNat.Sort],''Nat.Sort,'__['prec['s_^31['0.Zero]],'gather['__[''E.Sort, ''e.Sort]],'special['__['id-hook[''NumberOpSymbol.Sort,''quo.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_rem_.Sort,'__[''Nat.Sort,''NzNat.Sort],''Nat.Sort,'__[ 'prec['s_^31['0.Zero]],'gather['__[''E.Sort,''e.Sort]],'special['__[ 'id-hook[''NumberOpSymbol.Sort,''rem.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_subset_.Sort,'__[ ''QidSet.Sort,''QidSet.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''_xor_.Sort,'__[''Bool.Sort,''Bool.Sort],''Bool.Sort,'__['assoc.Attr, 'comm.Attr,'prec['s_^57['0.Zero]]]],'op_:_->_`[_`].[''_xor_.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^55[ '0.Zero]],'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''xor.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''_|_.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'prec['s_^57['0.Zero]],'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''|.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''_|_.Sort,'__[''NzNat.Sort, ''Nat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'prec['s_^57['0.Zero]], 'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''|.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''`[_`].Kind,''Qid.Sort,''Module.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''`[`].Kind,'nil.TypeList,''Context.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort,''Substitution.Sort, ''Context.Sort],''Result4Tuple.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`,_`}.Qid,'__[''Substitution.Sort,''Substitution.Sort,''Nat.Sort], ''UnificationTriple.Sort,'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[ ''Term.Sort,''Substitution.Sort,''Nat.Sort],''Variant.Sort,'ctor.Attr], 'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort,''Rule.Sort], ''TraceStep.Sort,'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`,_`}.Qid,'__[ ''Term.Sort,''Type.Sort,''Substitution.Sort],''ResultTriple.Sort, 'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`}.Qid,'__[''Substitution.Sort, ''Context.Sort],''MatchPair.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''`{_`,_`}.Qid,'__[''Substitution.Sort,''Nat.Sort],''UnificationPair.Sort, 'ctor.Attr],'op_:_->_`[_`].[''`{_`,_`}.Qid,'__[''Term.Sort,''Type.Sort], ''ResultPair.Sort,'ctor.Attr],'op_:_->_`[_`].[''ambiguity.Sort,'__[ ''ResultPair.Sort,''ResultPair.Sort],''ResultPair?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''anyType.Sort,'nil.TypeList,''Type?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''append.Sort,'__[''NatList.Sort,''NatList.Sort], ''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''NatList.Sort,''NeNatList.Sort],''NeNatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''append.Sort,'__[''NeNatList.Sort,''NatList.Sort], ''NeNatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''NeQidList.Sort,''QidList.Sort],''NeQidList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''append.Sort,'__[''QidList.Sort,''NeQidList.Sort], ''NeQidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''append.Sort,'__[ ''QidList.Sort,''QidList.Sort],''QidList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''ascii.Sort,''Char.Sort,''Nat.Sort,'special['__['id-hook[ ''StringOpSymbol.Sort,''ascii.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[''assoc.Sort, 'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''ceq_=_if_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''EqCondition.Sort, ''AttrSet.Sort],''Equation.Sort,'__['ctor.Attr,'format['__[''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''char.Sort, ''`[FindResult`,NatList`,Bound`].Kind,''`[String`].Kind,'special['__[ 'id-hook[''StringOpSymbol.Sort,''char.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[ ''cmb_:_if_`[_`]..Qid,'__[''Term.Sort,''Sort.Sort,''EqCondition.Sort, ''AttrSet.Sort],''MembAx.Sort,'__['ctor.Attr,'format['__[''d.Sort,''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort, ''d.Sort]]]],'op_:_->_`[_`].[''comm.Sort,'nil.TypeList,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''completeName.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaCompleteName.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''config.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''crl_=>_if_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''Condition.Sort,''AttrSet.Sort],''Rule.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''ctor.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''delete.Sort,'__[''Qid.Sort,''QidSet.Sort],''QidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''downTerm.Sort,'__[''Term.Sort,''Universal.Sort], ''Universal.Sort,'__['poly['__['s_^2['0.Zero],'0.Zero]],'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaDownTerm.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]]],'op_:_->_`[_`].[''empty.Sort,'nil.TypeList, ''EmptyCommaList.Sort,'ctor.Attr],'op_:_->_`[_`].[''empty.Sort, 'nil.TypeList,''GroundTermList.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''eq_=_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''AttrSet.Sort], ''Equation.Sort,'__['ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''extending_..Qid,''ModuleExpression.Sort,''Import.Sort,'ctor.Attr], 'op_:_->_`[_`].[''failure.Sort,'nil.TypeList,''Result4Tuple?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''failure.Sort,'nil.TypeList, ''ResultPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[''failure.Sort, 'nil.TypeList,''ResultTriple?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''failure.Sort,'nil.TypeList,''Trace?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''false.Sort,'nil.TypeList,''Bool.Sort,'__['ctor.Attr,'special['id-hook[ ''SystemFalse.Sort,'nil.TypeList]]]],'op_:_->_`[_`].[''find.Sort,'__[ ''String.Sort,''String.Sort,''Nat.Sort],''FindResult.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''find.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''notFoundTerm.Sort, ''notFound.FindResult.Constant]]]],'op_:_->_`[_`].[''flat.Sort, 'nil.TypeList,''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''fmod_is_sorts_.____endfm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FModule.Sort,'__['ctor.Attr,'gather['__[''&.Sort, ''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort]],'format['__[ ''d.Sort,''d.Sort,''s.Sort,''n++i.Sort,''ni.Sort,''d.Sort,''d.Sort, ''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''format.Sort,''QidList.Sort,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''format.Sort,'nil.TypeList,''PrintOption.Sort,'ctor.Attr], 'op_:_->_`[_`].[''front.Sort,''NeNatList.Sort,''NatList.Sort, 'none.AttrSet],'op_:_->_`[_`].[''front.Sort,''NeQidList.Sort, ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''frozen.Sort, ''NeNatList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''fth_is_sorts_.____endfth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FTheory.Sort,'__['ctor.Attr,'gather['__[''&.Sort, ''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort]],'format['__[ ''d.Sort,''d.Sort,''d.Sort,''n++i.Sort,''ni.Sort,''d.Sort,''d.Sort, ''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''n--i.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''gather.Sort,''QidList.Sort,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''gcd.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'special['__['id-hook[''ACU_NumberOpSymbol.Sort, ''gcd.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]]],'op_:_->_`[_`].[''gcd.Sort,'__[''NzNat.Sort,''Nat.Sort], ''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''gcd.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''getContext.Sort, ''MatchPair.Sort,''Context.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getContext.Sort,''Result4Tuple.Sort,''Context.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getEqs.Sort,''Module.Sort,''EquationSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getFrom.Sort,''View.Sort, ''ModuleExpression.Sort,'none.AttrSet],'op_:_->_`[_`].[''getImports.Sort, ''Module.Sort,''ImportList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getKind.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaGetKind.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''getKinds.Sort,''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaGetKinds.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''getMbs.Sort,''Module.Sort,''MembAxSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Constant.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Module.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''Variable.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getName.Sort,''View.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getOpMappings.Sort,''View.Sort,''OpMappingSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getOps.Sort,''Module.Sort, ''OpDeclSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''getRls.Sort, ''Module.Sort,''RuleSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getSortMappings.Sort,''View.Sort,''SortMappingSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getSorts.Sort,''Module.Sort,''SortSet.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getSubsorts.Sort,''Module.Sort, ''SubsortDeclSet.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getSubstitution.Sort,''MatchPair.Sort,''Substitution.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getSubstitution.Sort,''Result4Tuple.Sort, ''Substitution.Sort,'none.AttrSet],'op_:_->_`[_`].[''getSubstitution.Sort, ''ResultTriple.Sort,''Substitution.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getTerm.Sort,''Result4Tuple.Sort,''Term.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getTerm.Sort,''ResultPair.Sort,''Term.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getTerm.Sort,''ResultTriple.Sort, ''Term.Sort,'none.AttrSet],'op_:_->_`[_`].[''getTo.Sort,''View.Sort, ''ModuleExpression.Sort,'none.AttrSet],'op_:_->_`[_`].[''getType.Sort, ''Constant.Sort,''Type.Sort,'none.AttrSet],'op_:_->_`[_`].[''getType.Sort, ''Result4Tuple.Sort,''Type.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''getType.Sort,''ResultPair.Sort,''Type.Sort,'none.AttrSet], 'op_:_->_`[_`].[''getType.Sort,''ResultTriple.Sort,''Type.Sort, 'none.AttrSet],'op_:_->_`[_`].[''getType.Sort,''Variable.Sort,''Type.Sort, 'none.AttrSet],'op_:_->_`[_`].[''glbSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaGlbSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''head.Sort,''NeNatList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''head.Sort,''NeQidList.Sort,''Qid.Sort,'none.AttrSet], 'op_:_->_`[_`].[''id.Sort,''Term.Sort,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''id-hook.Sort,'__[''Qid.Sort,''QidList.Sort],''Hook.Sort, '__['ctor.Attr,'format['__[''nssss.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''idem.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''if_then_else_fi.Sort,'__[''Bool.Sort,''Universal.Sort,''Universal.Sort], ''Universal.Sort,'__['poly['__['s_^2['0.Zero],'s_^3['0.Zero],'0.Zero]], 'special['__['id-hook[''BranchSymbol.Sort,'nil.TypeList],'term-hook[ ''1.Sort,''true.Bool.Constant],'term-hook[''2.Sort, ''false.Bool.Constant]]]]],'op_:_->_`[_`].[''including_..Qid, ''ModuleExpression.Sort,''Import.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''insert.Sort,'__[''Qid.Sort,''QidSet.Sort],''QidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''intersection.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''iter.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''label.Sort,''Qid.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''label_to_.Sort,'__[''Qid.Sort, ''Qid.Sort],''Renaming.Sort,'ctor.Attr],'op_:_->_`[_`].[''last.Sort, ''NeNatList.Sort,''Nat.Sort,'none.AttrSet],'op_:_->_`[_`].[''last.Sort, ''NeQidList.Sort,''Qid.Sort,'none.AttrSet],'op_:_->_`[_`].[''lcm.Sort,'__[ ''Nat.Sort,''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''lcm.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''lcm.Sort,'__[ ''NzNat.Sort,''NzNat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr, 'special['__['id-hook[''ACU_NumberOpSymbol.Sort,''lcm.Sort],'op-hook[ ''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[ ''leastSort.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaLeastSort.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''left-id.Sort, ''Term.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''length.Sort, ''String.Sort,''Nat.Sort,'special['__['id-hook[''StringOpSymbol.Sort, ''length.Sort],'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]],'op_:_->_`[_`].[''lesserSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaLesserSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''max.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'assoc.Attr,'comm.Attr,'special['__['id-hook[''ACU_NumberOpSymbol.Sort, ''max.Sort],'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort, ''NzNat.Sort]]]]],'op_:_->_`[_`].[''max.Sort,'__[''NzNat.Sort,''Nat.Sort], ''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''max.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''maximalAritySet.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaMaximalAritySet.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort, '__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''maximalSorts.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaMaximalSorts.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''mb_:_`[_`]..Qid, '__[''Term.Sort,''Sort.Sort,''AttrSet.Sort],''MembAx.Sort,'__['ctor.Attr, 'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''memo.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''metaApply.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Substitution?`].Kind,''`[FindResult`,NatList`,Bound`].Kind], ''`[ResultTriple?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaApply.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaDisjointUnify.Sort,'__[''`[Module`].Kind, ''`[UnificationProblem`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationTriple?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaDisjointUnify.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaFrewrite.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaFrewrite.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaGetIrredundantVariant.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Variant?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaGetIrredundantVariant.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaGetVariant.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Variant?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaGetVariant.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaMatch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[FindResult`,NatList`,Bound`].Kind], ''`[Substitution?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaMatch.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaNarrow.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[FindResult`,NatList`,Bound`].Kind,''`[Bool`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaNarrow2.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaNarrow.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultTriple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaNarrow.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaNormalize.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaNormalize.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaParse.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind], ''`[ResultPair?`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaParse.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''metaPrettyPrint.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'none.AttrSet],'op_:_->_`[_`].[''metaPrettyPrint.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[PrintOptionSet`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaPrettyPrint.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaReduce.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[ResultPair?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaReduce.Sort],'op-hook[ ''qidSymbol.Sort,''.Sort,'nil.TypeList,''Qid.Sort],'op-hook[ ''metaTermSymbol.Sort,''_`[_`].Qid,'__[''Qid.Sort,''NeGroundTermList.Sort], ''GroundTerm.Sort],'op-hook[''metaArgSymbol.Sort,''_`,_.Qid,'__[ ''NeGroundTermList.Sort,''GroundTermList.Sort],''NeGroundTermList.Sort], 'op-hook[''emptyTermListSymbol.Sort,''empty.Sort,'nil.TypeList, ''GroundTermList.Sort],'op-hook[''assignmentSymbol.Sort,''_<-_.Sort,'__[ ''Variable.Sort,''Term.Sort],''Assignment.Sort],'op-hook[ ''emptySubstitutionSymbol.Sort,''none.Sort,'nil.TypeList, ''Substitution.Sort],'op-hook[''substitutionSymbol.Sort,''_;_.Sort,'__[ ''Substitution.Sort,''Substitution.Sort],''Substitution.Sort],'op-hook[ ''holeSymbol.Sort,''`[`].Kind,'nil.TypeList,''Context.Sort],'op-hook[ ''headerSymbol.Sort,''_`{_`}.Sort,'__[''Qid.Sort,''ParameterDeclList.Sort], ''Header.Sort],'op-hook[''parameterDeclSymbol.Sort,''_::_.Variable,'__[ ''Sort.Sort,''ModuleExpression.Sort],''ParameterDecl.Sort],'op-hook[ ''parameterDeclListSymbol.Sort,''_`,_.Qid,'__[''ParameterDeclList.Sort, ''ParameterDeclList.Sort],''ParameterDeclList.Sort],'op-hook[ ''protectingSymbol.Sort,''protecting_..Qid,''ModuleExpression.Sort, ''Import.Sort],'op-hook[''extendingSymbol.Sort,''extending_..Qid, ''ModuleExpression.Sort,''Import.Sort],'op-hook[''includingSymbol.Sort, ''including_..Qid,''ModuleExpression.Sort,''Import.Sort],'op-hook[ ''nilImportListSymbol.Sort,''nil.Sort,'nil.TypeList,''ImportList.Sort], 'op-hook[''importListSymbol.Sort,''__.Sort,'__[''ImportList.Sort, ''ImportList.Sort],''ImportList.Sort],'op-hook[''emptySortSetSymbol.Sort, ''none.Sort,'nil.TypeList,''QidSet.Sort],'op-hook[''sortSetSymbol.Sort, ''_;_.Sort,'__[''QidSet.Sort,''QidSet.Sort],''QidSet.Sort],'op-hook[ ''subsortSymbol.Sort,''subsort_<_..Qid,'__[''Sort.Sort,''Sort.Sort], ''SubsortDecl.Sort],'op-hook[''emptySubsortDeclSetSymbol.Sort,''none.Sort, 'nil.TypeList,''SubsortDeclSet.Sort],'op-hook[''subsortDeclSetSymbol.Sort, ''__.Sort,'__[''SubsortDeclSet.Sort,''SubsortDeclSet.Sort], ''SubsortDeclSet.Sort],'op-hook[''nilQidListSymbol.Sort,''nil.Sort, 'nil.TypeList,''QidList.Sort],'op-hook[''qidListSymbol.Sort,''__.Sort,'__[ ''QidList.Sort,''QidList.Sort],''QidList.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'op-hook[''natListSymbol.Sort,''__.Sort, '__[''NatList.Sort,''NatList.Sort],''NatList.Sort],'op-hook[ ''unboundedSymbol.Sort,''unbounded.Sort,'nil.TypeList,''Bound.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList,''Char.Sort], 'op-hook[''sortRenamingSymbol.Sort,''sort_to_.Sort,'__[''Qid.Sort, ''Qid.Sort],''Renaming.Sort],'op-hook[''opRenamingSymbol.Sort, ''op_to_`[_`].Qid,'__[''Qid.Sort,''Qid.Sort,''AttrSet.Sort], ''Renaming.Sort],'op-hook[''opRenamingSymbol2.Sort,''op_:_->_to_`[_`].Qid, '__[''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort,''AttrSet.Sort], ''Renaming.Sort],'op-hook[''labelRenamingSymbol.Sort,''label_to_.Sort,'__[ ''Qid.Sort,''Qid.Sort],''Renaming.Sort],'op-hook[''renamingSetSymbol.Sort, ''_`,_.Qid,'__[''RenamingSet.Sort,''RenamingSet.Sort],''RenamingSet.Sort], 'op-hook[''sumSymbol.Sort,''_+_.Sort,'__[''ModuleExpression.Sort, ''ModuleExpression.Sort],''ModuleExpression.Sort],'op-hook[ ''renamingSymbol.Sort,''_*`(_`).Sort,'__[''ModuleExpression.Sort, ''RenamingSet.Sort],''ModuleExpression.Sort],'op-hook[ ''instantiationSymbol.Sort,''_`{_`}.Sort,'__[''ModuleExpression.Sort, ''ParameterList.Sort],''ModuleExpression.Sort],'op-hook[ ''termHookSymbol.Sort,''term-hook.Sort,'__[''Qid.Sort,''Term.Sort], ''Hook.Sort],'op-hook[''hookListSymbol.Sort,''__.Sort,'__[''HookList.Sort, ''HookList.Sort],''HookList.Sort],'op-hook[''idHookSymbol.Sort, ''id-hook.Sort,'__[''Qid.Sort,''QidList.Sort],''Hook.Sort],'op-hook[ ''opHookSymbol.Sort,''op-hook.Sort,'__[''Qid.Sort,''Qid.Sort, ''QidList.Sort,''Qid.Sort],''Hook.Sort],'op-hook[''assocSymbol.Sort, ''assoc.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''commSymbol.Sort, ''comm.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''idemSymbol.Sort, ''idem.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''iterSymbol.Sort, ''iter.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''idSymbol.Sort,''id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''leftIdSymbol.Sort,''left-id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''rightIdSymbol.Sort,''right-id.Sort, ''Term.Sort,''Attr.Sort],'op-hook[''stratSymbol.Sort,''strat.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''memoSymbol.Sort,''memo.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''precSymbol.Sort,''prec.Sort, ''Nat.Sort,''Attr.Sort],'op-hook[''gatherSymbol.Sort,''gather.Sort, ''QidList.Sort,''Attr.Sort],'op-hook[''formatSymbol.Sort,''format.Sort, ''QidList.Sort,''Attr.Sort],'op-hook[''ctorSymbol.Sort,''ctor.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''frozenSymbol.Sort,''frozen.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''polySymbol.Sort,''poly.Sort, ''NeNatList.Sort,''Attr.Sort],'op-hook[''configSymbol.Sort,''config.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''objectSymbol.Sort,''object.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''msgSymbol.Sort,''msg.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''specialSymbol.Sort,''special.Sort, ''NeHookList.Sort,''Attr.Sort],'op-hook[''labelSymbol.Sort,''label.Sort, ''Qid.Sort,''Attr.Sort],'op-hook[''metadataSymbol.Sort,''metadata.Sort, ''String.Sort,''Attr.Sort],'op-hook[''owiseSymbol.Sort,''owise.Sort, 'nil.TypeList,''Attr.Sort],'op-hook[''variantAttrSymbol.Sort, ''variant.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''nonexecSymbol.Sort, ''nonexec.Sort,'nil.TypeList,''Attr.Sort],'op-hook[''printSymbol.Sort, ''print.Sort,''QidList.Sort,''Attr.Sort],'op-hook[ ''emptyAttrSetSymbol.Sort,''none.Sort,'nil.TypeList,''AttrSet.Sort], 'op-hook[''attrSetSymbol.Sort,''__.Sort,'__[''AttrSet.Sort,''AttrSet.Sort], ''AttrSet.Sort],'op-hook[''opDeclSymbol.Sort,''op_:_->_`[_`]..Qid,'__[ ''Qid.Sort,''TypeList.Sort,''Type.Sort,''AttrSet.Sort],''OpDecl.Sort], 'op-hook[''opDeclSetSymbol.Sort,''__.Sort,'__[''OpDeclSet.Sort, ''OpDeclSet.Sort],''OpDeclSet.Sort],'op-hook[''emptyOpDeclSetSymbol.Sort, ''none.Sort,'nil.TypeList,''OpDeclSet.Sort],'op-hook[ ''noConditionSymbol.Sort,''nil.Sort,'nil.TypeList,''EqCondition.Sort], 'op-hook[''equalityConditionSymbol.Sort,''_=_.Sort,'__[''Term.Sort, ''Term.Sort],''EqCondition.Sort],'op-hook[''sortTestConditionSymbol.Sort, ''_:_.Variable,'__[''Term.Sort,''Sort.Sort],''EqCondition.Sort],'op-hook[ ''matchConditionSymbol.Sort,''_:=_.Variable,'__[''Term.Sort,''Term.Sort], ''EqCondition.Sort],'op-hook[''rewriteConditionSymbol.Sort,''_=>_.Sort,'__[ ''Term.Sort,''Term.Sort],''Condition.Sort],'op-hook[ ''conjunctionSymbol.Sort,''_/\_.Sort,'__[''EqCondition.Sort, ''EqCondition.Sort],''EqCondition.Sort],'op-hook[''mbSymbol.Sort, ''mb_:_`[_`]..Qid,'__[''Term.Sort,''Sort.Sort,''AttrSet.Sort], ''MembAx.Sort],'op-hook[''cmbSymbol.Sort,''cmb_:_if_`[_`]..Qid,'__[ ''Term.Sort,''Sort.Sort,''EqCondition.Sort,''AttrSet.Sort],''MembAx.Sort], 'op-hook[''emptyMembAxSetSymbol.Sort,''none.Sort,'nil.TypeList, ''MembAxSet.Sort],'op-hook[''membAxSetSymbol.Sort,''__.Sort,'__[ ''MembAxSet.Sort,''MembAxSet.Sort],''MembAxSet.Sort],'op-hook[ ''eqSymbol.Sort,''eq_=_`[_`]..Qid,'__[''Term.Sort,''Term.Sort, ''AttrSet.Sort],''Equation.Sort],'op-hook[''ceqSymbol.Sort, ''ceq_=_if_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''EqCondition.Sort, ''AttrSet.Sort],''Equation.Sort],'op-hook[''emptyEquationSetSymbol.Sort, ''none.Sort,'nil.TypeList,''EquationSet.Sort],'op-hook[ ''equationSetSymbol.Sort,''__.Sort,'__[''EquationSet.Sort, ''EquationSet.Sort],''EquationSet.Sort],'op-hook[''rlSymbol.Sort, ''rl_=>_`[_`]..Qid,'__[''Term.Sort,''Term.Sort,''AttrSet.Sort], ''Rule.Sort],'op-hook[''crlSymbol.Sort,''crl_=>_if_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''Condition.Sort,''AttrSet.Sort],''Rule.Sort], 'op-hook[''emptyRuleSetSymbol.Sort,''none.Sort,'nil.TypeList, ''RuleSet.Sort],'op-hook[''ruleSetSymbol.Sort,''__.Sort,'__[''RuleSet.Sort, ''RuleSet.Sort],''RuleSet.Sort],'op-hook[''fmodSymbol.Sort, ''fmod_is_sorts_.____endfm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FModule.Sort],'op-hook[''fthSymbol.Sort, ''fth_is_sorts_.____endfth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort],''FTheory.Sort],'op-hook[''modSymbol.Sort, ''mod_is_sorts_._____endm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''SModule.Sort],'op-hook[ ''thSymbol.Sort,''th_is_sorts_._____endth.Constant,'__[''Qid.Sort, ''ImportList.Sort,''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort, ''MembAxSet.Sort,''EquationSet.Sort,''RuleSet.Sort],''STheory.Sort], 'op-hook[''sortMappingSymbol.Sort,''sort_to_..Qid,'__[''Sort.Sort, ''Sort.Sort],''SortMapping.Sort],'op-hook[''emptySortMappingSetSymbol.Sort, ''none.Sort,'nil.TypeList,''SortMappingSet.Sort],'op-hook[ ''sortMappingSetSymbol.Sort,''__.Sort,'__[''SortMappingSet.Sort, ''SortMappingSet.Sort],''SortMappingSet.Sort],'op-hook[ ''opMappingSymbol.Sort,''op_to_..Qid,'__[''Qid.Sort,''Qid.Sort], ''OpMapping.Sort],'op-hook[''opSpecificMappingSymbol.Sort, ''op_:_->_to_..Qid,'__[''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort], ''OpMapping.Sort],'op-hook[''opTermMappingSymbol.Sort,''op_to`term_..Qid, '__[''Term.Sort,''Term.Sort],''OpMapping.Sort],'op-hook[ ''emptyOpMappingSetSymbol.Sort,''none.Sort,'nil.TypeList, ''OpMappingSet.Sort],'op-hook[''opMappingSetSymbol.Sort,''__.Sort,'__[ ''OpMappingSet.Sort,''OpMappingSet.Sort],''OpMappingSet.Sort],'op-hook[ ''viewSymbol.Sort,''view_from_to_is__endv.Sort,'__[''Header.Sort, ''ModuleExpression.Sort,''ModuleExpression.Sort,''SortMappingSet.Sort, ''OpMappingSet.Sort],''View.Sort],'op-hook[''anyTypeSymbol.Sort, ''anyType.Sort,'nil.TypeList,''Type?.Sort],'op-hook[ ''unificandPairSymbol.Sort,''_=?_.Sort,'__[''Term.Sort,''Term.Sort], ''UnificandPair.Sort],'op-hook[''unificationConjunctionSymbol.Sort, ''_/\_.Sort,'__[''UnificationProblem.Sort,''UnificationProblem.Sort], ''UnificationProblem.Sort],'op-hook[''resultPairSymbol.Sort,''`{_`,_`}.Qid, '__[''Term.Sort,''Type.Sort],''ResultPair.Sort],'op-hook[ ''resultTripleSymbol.Sort,''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Substitution.Sort],''ResultTriple.Sort],'op-hook[ ''result4TupleSymbol.Sort,''`{_`,_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Substitution.Sort,''Context.Sort],''Result4Tuple.Sort],'op-hook[ ''matchPairSymbol.Sort,''`{_`,_`}.Qid,'__[''Substitution.Sort, ''Context.Sort],''MatchPair.Sort],'op-hook[''unificationPairSymbol.Sort, ''`{_`,_`}.Qid,'__[''Substitution.Sort,''Nat.Sort],''UnificationPair.Sort], 'op-hook[''unificationTripleSymbol.Sort,''`{_`,_`,_`}.Qid,'__[ ''Substitution.Sort,''Substitution.Sort,''Nat.Sort], ''UnificationTriple.Sort],'op-hook[''variantSymbol.Sort,''`{_`,_`,_`}.Qid, '__[''Term.Sort,''Substitution.Sort,''Nat.Sort],''Variant.Sort],'op-hook[ ''traceStepSymbol.Sort,''`{_`,_`,_`}.Qid,'__[''Term.Sort,''Type.Sort, ''Rule.Sort],''TraceStep.Sort],'op-hook[''nilTraceSymbol.Sort,''nil.Sort, 'nil.TypeList,''Trace.Sort],'op-hook[''traceSymbol.Sort,''__.Sort,'__[ ''Trace.Sort,''Trace.Sort],''Trace.Sort],'op-hook[''noParseSymbol.Sort, ''noParse.Sort,''Nat.Sort,''ResultPair?.Sort],'op-hook[ ''ambiguitySymbol.Sort,''ambiguity.Sort,'__[''ResultPair.Sort, ''ResultPair.Sort],''ResultPair?.Sort],'op-hook[''failure2Symbol.Sort, ''failure.Sort,'nil.TypeList,''ResultPair?.Sort],'op-hook[ ''failure3Symbol.Sort,''failure.Sort,'nil.TypeList,''ResultTriple?.Sort], 'op-hook[''failure4Symbol.Sort,''failure.Sort,'nil.TypeList, ''Result4Tuple?.Sort],'op-hook[''noUnifierPairSymbol.Sort,''noUnifier.Sort, 'nil.TypeList,''UnificationPair?.Sort],'op-hook[ ''noUnifierTripleSymbol.Sort,''noUnifier.Sort,'nil.TypeList, ''UnificationTriple?.Sort],'op-hook[''noVariantSymbol.Sort, ''noVariant.Sort,'nil.TypeList,''Variant?.Sort],'op-hook[ ''noMatchSubstSymbol.Sort,''noMatch.Sort,'nil.TypeList, ''Substitution?.Sort],'op-hook[''noMatchPairSymbol.Sort,''noMatch.Sort, 'nil.TypeList,''MatchPair?.Sort],'op-hook[''failureTraceSymbol.Sort, ''failure.Sort,'nil.TypeList,''Trace?.Sort],'op-hook[''mixfixSymbol.Sort, ''mixfix.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[ ''withParensSymbol.Sort,''with-parens.Sort,'nil.TypeList, ''PrintOption.Sort],'op-hook[''flatSymbol.Sort,''flat.Sort,'nil.TypeList, ''PrintOption.Sort],'op-hook[''formatPrintOptionSymbol.Sort,''format.Sort, 'nil.TypeList,''PrintOption.Sort],'op-hook[''numberSymbol.Sort, ''number.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[''ratSymbol.Sort, ''rat.Sort,'nil.TypeList,''PrintOption.Sort],'op-hook[ ''emptyPrintOptionSetSymbol.Sort,''none.Sort,'nil.TypeList, ''PrintOptionSet.Sort],'op-hook[''printOptionSetSymbol.Sort,''__.Sort,'__[ ''PrintOptionSet.Sort,''PrintOptionSet.Sort],''PrintOptionSet.Sort], 'term-hook[''trueTerm.Sort,''true.Bool.Constant],'term-hook[ ''falseTerm.Sort,''false.Bool.Constant]]]],'op_:_->_`[_`].[ ''metaRewrite.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaRewrite.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaSearch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[ResultTriple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaSearch.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaSearchPath.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Trace?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaSearchPath.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaUnify.Sort,'__[ ''`[Module`].Kind,''`[UnificationProblem`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationPair?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUnify.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaVariantDisjointUnify.Sort,'__[ ''`[Module`].Kind,''`[UnificationProblem`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationTriple?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaVariantDisjointUnify.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''metaVariantUnify.Sort,'__[''`[Module`].Kind, ''`[UnificationProblem`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[UnificationPair?`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaVariantUnify.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaXapply.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Substitution?`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[Result4Tuple?`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaXapply.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metaXmatch.Sort,'__[ ''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Condition`].Kind,''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind],''`[MatchPair?`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaXmatch.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''metadata.Sort,''String.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''min.Sort,'__[''Nat.Sort, ''Nat.Sort],''Nat.Sort,'__['assoc.Attr,'comm.Attr,'special['__['id-hook[ ''ACU_NumberOpSymbol.Sort,''min.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''min.Sort,'__[''NzNat.Sort, ''NzNat.Sort],''NzNat.Sort,'__['assoc.Attr,'comm.Attr,'special['__[ 'id-hook[''ACU_NumberOpSymbol.Sort,''min.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]],'op_:_->_`[_`].[''minimalSorts.Sort, '__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__[ 'id-hook[''MetaLevelOpSymbol.Sort,''metaMinimalSorts.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''mixfix.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''modExp.Sort,'__[ ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind, ''`[FindResult`,NatList`,Bound`].Kind], ''`[FindResult`,NatList`,Bound`].Kind,'special['__['id-hook[ ''NumberOpSymbol.Sort,''modExp.Sort],'op-hook[''succSymbol.Sort,''s_.Sort, ''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[ ''mod_is_sorts_._____endm.Constant,'__[''Header.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''SModule.Sort,'__['ctor.Attr,'gather[ '__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort, ''&.Sort]],'format['__[''d.Sort,''d.Sort,''s.Sort,''n++i.Sort,''ni.Sort, ''d.Sort,''d.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort, ''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''msg.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''EqCondition.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''HookList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''ImportList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''NatList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort,'nil.TypeList, ''ParameterDeclList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''QidList.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''Trace.Sort,'ctor.Attr],'op_:_->_`[_`].[''nil.Sort, 'nil.TypeList,''TypeList.Sort,'ctor.Attr],'op_:_->_`[_`].[''noMatch.Sort, 'nil.TypeList,''MatchPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[''noMatch.Sort, 'nil.TypeList,''Substitution?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''noParse.Sort,''Nat.Sort,''ResultPair?.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''noUnifier.Sort,'nil.TypeList,''UnificationPair?.Sort,'ctor.Attr], 'op_:_->_`[_`].[''noUnifier.Sort,'nil.TypeList,''UnificationTriple?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''noVariant.Sort,'nil.TypeList,''Variant?.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''AttrSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''EmptyTypeSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''EquationSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''MembAxSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''OpDeclSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''OpMappingSet.Sort, 'ctor.Attr],'op_:_->_`[_`].[''none.Sort,'nil.TypeList, ''PrintOptionSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''QidSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''RuleSet.Sort,'ctor.Attr],'op_:_->_`[_`].[''none.Sort, 'nil.TypeList,''SortMappingSet.Sort,'ctor.Attr],'op_:_->_`[_`].[ ''none.Sort,'nil.TypeList,''SubsortDeclSet.Sort,'ctor.Attr], 'op_:_->_`[_`].[''none.Sort,'nil.TypeList,''Substitution.Sort,'ctor.Attr], 'op_:_->_`[_`].[''nonexec.Sort,'nil.TypeList,''Attr.Sort,'ctor.Attr], 'op_:_->_`[_`].[''notFound.Sort,'nil.TypeList,''FindResult.Sort, 'ctor.Attr],'op_:_->_`[_`].[''not_.Sort,''Bool.Sort,''Bool.Sort,'prec[ 's_^53['0.Zero]]],'op_:_->_`[_`].[''number.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''object.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''occurs.Sort,'__[''Nat.Sort, ''NatList.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[''occurs.Sort, '__[''Qid.Sort,''QidList.Sort],''Bool.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''op-hook.Sort,'__[''Qid.Sort,''Qid.Sort,''QidList.Sort,''Qid.Sort], ''Hook.Sort,'__['ctor.Attr,'format['__[''nssss.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_:_->_`[_`]..Qid,'__[''Qid.Sort,''TypeList.Sort, ''Type.Sort,''AttrSet.Sort],''OpDecl.Sort,'__['ctor.Attr,'format['__[ ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort, ''d.Sort,''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''op_:_->_to_..Qid,'__[ ''Qid.Sort,''TypeList.Sort,''Type.Sort,''Qid.Sort],''OpMapping.Sort, 'ctor.Attr],'op_:_->_`[_`].[''op_:_->_to_`[_`].Qid,'__[''Qid.Sort, ''TypeList.Sort,''Type.Sort,''Qid.Sort,''AttrSet.Sort],''Renaming.Sort,'__[ 'ctor.Attr,'format['__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_to_..Qid,'__[''Qid.Sort,''Qid.Sort],''OpMapping.Sort, 'ctor.Attr],'op_:_->_`[_`].[''op_to_`[_`].Qid,'__[''Qid.Sort,''Qid.Sort, ''AttrSet.Sort],''Renaming.Sort,'__['ctor.Attr,'format['__[''d.Sort, ''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort,''d.Sort]]]], 'op_:_->_`[_`].[''op_to`term_..Qid,'__[''Term.Sort,''Term.Sort], ''OpMapping.Sort,'ctor.Attr],'op_:_->_`[_`].[''owise.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''poly.Sort,''NeNatList.Sort, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''prec.Sort,''Nat.Sort,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''print.Sort,''QidList.Sort,''Attr.Sort, 'ctor.Attr],'op_:_->_`[_`].[''protecting_..Qid,''ModuleExpression.Sort, ''Import.Sort,'ctor.Attr],'op_:_->_`[_`].[''qid.Sort,''`[String`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[''QuotedIdentifierOpSymbol.Sort, ''qid.Sort],'op-hook[''quotedIdentifierSymbol.Sort,''.Sort, 'nil.TypeList,''Qid.Sort],'op-hook[''stringSymbol.Sort,''.Sort, 'nil.TypeList,''Char.Sort]]]],'op_:_->_`[_`].[''rat.Sort,'nil.TypeList, ''PrintOption.Sort,'ctor.Attr],'op_:_->_`[_`].[''reverse.Sort, ''NatList.Sort,''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''reverse.Sort,''NeNatList.Sort,''NeNatList.Sort,'none.AttrSet], 'op_:_->_`[_`].[''reverse.Sort,''NeQidList.Sort,''NeQidList.Sort, 'none.AttrSet],'op_:_->_`[_`].[''reverse.Sort,''QidList.Sort, ''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[''rfind.Sort,'__[ ''String.Sort,''String.Sort,''Nat.Sort],''FindResult.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''rfind.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort],'term-hook[''notFoundTerm.Sort, ''notFound.FindResult.Constant]]]],'op_:_->_`[_`].[''right-id.Sort, ''Term.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''rl_=>_`[_`]..Qid,'__[ ''Term.Sort,''Term.Sort,''AttrSet.Sort],''Rule.Sort,'__['ctor.Attr,'format[ '__[''d.Sort,''d.Sort,''d.Sort,''d.Sort,''s.Sort,''d.Sort,''d.Sort, ''s.Sort,''d.Sort]]]],'op_:_->_`[_`].[''s_.Sort,''Nat.Sort,''NzNat.Sort, '__['iter.Attr,'ctor.Attr,'special['__['id-hook[''SuccSymbol.Sort, 'nil.TypeList],'term-hook[''zeroTerm.Sort,''0.Zero.Constant]]]]], 'op_:_->_`[_`].[''sameKind.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[Bool`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaSameKind.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''sd.Sort,'__[''Nat.Sort,''Nat.Sort],''Nat.Sort,'__[ 'comm.Attr,'special['__['id-hook[''CUI_NumberOpSymbol.Sort,''sd.Sort], 'op-hook[''succSymbol.Sort,''s_.Sort,''Nat.Sort,''NzNat.Sort]]]]], 'op_:_->_`[_`].[''size.Sort,''NatList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''NeNatList.Sort,''NzNat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''NeQidList.Sort,''NzNat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''size.Sort,''QidList.Sort,''Nat.Sort,'none.AttrSet], 'op_:_->_`[_`].[''sortLeq.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind],''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaSortLeq.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''sort_to_.Sort,'__[''Qid.Sort,''Qid.Sort],''Renaming.Sort,'ctor.Attr], 'op_:_->_`[_`].[''sort_to_..Qid,'__[''Sort.Sort,''Sort.Sort], ''SortMapping.Sort,'ctor.Attr],'op_:_->_`[_`].[''special.Sort, ''NeHookList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''strat.Sort, ''NeNatList.Sort,''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''string.Sort, ''Qid.Sort,''String.Sort,'special['__['id-hook[ ''QuotedIdentifierOpSymbol.Sort,''string.Sort],'op-hook[ ''quotedIdentifierSymbol.Sort,''.Sort,'nil.TypeList,''Qid.Sort], 'op-hook[''stringSymbol.Sort,''.Sort,'nil.TypeList, ''Char.Sort]]]],'op_:_->_`[_`].[''subsort_<_..Qid,'__[''Sort.Sort, ''Sort.Sort],''SubsortDecl.Sort,'ctor.Attr],'op_:_->_`[_`].[''substr.Sort, '__[''String.Sort,''Nat.Sort,''Nat.Sort],''String.Sort,'special['__[ 'id-hook[''StringOpSymbol.Sort,''substr.Sort],'op-hook[''stringSymbol.Sort, ''.Sort,'nil.TypeList,''Char.Sort],'op-hook[''succSymbol.Sort, ''s_.Sort,''Nat.Sort,''NzNat.Sort]]]],'op_:_->_`[_`].[''tail.Sort, ''NeNatList.Sort,''NatList.Sort,'none.AttrSet],'op_:_->_`[_`].[''tail.Sort, ''NeQidList.Sort,''QidList.Sort,'none.AttrSet],'op_:_->_`[_`].[ ''term-hook.Sort,'__[''Qid.Sort,''Term.Sort],''Hook.Sort,'__['ctor.Attr, 'format['__[''nssss.Sort,''d.Sort]]]],'op_:_->_`[_`].[ ''th_is_sorts_._____endth.Constant,'__[''Qid.Sort,''ImportList.Sort, ''SortSet.Sort,''SubsortDeclSet.Sort,''OpDeclSet.Sort,''MembAxSet.Sort, ''EquationSet.Sort,''RuleSet.Sort],''STheory.Sort,'__['ctor.Attr,'gather[ '__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort, ''&.Sort]],'format['__[''d.Sort,''d.Sort,''d.Sort,''n++i.Sort,''ni.Sort, ''d.Sort,''d.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort,''ni.Sort, ''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''true.Sort,'nil.TypeList, ''Bool.Sort,'__['ctor.Attr,'special['id-hook[''SystemTrue.Sort, 'nil.TypeList]]]],'op_:_->_`[_`].[''unbounded.Sort,'nil.TypeList, ''Bound.Sort,'ctor.Attr],'op_:_->_`[_`].[''union.Sort,'__[''NeQidSet.Sort, ''QidSet.Sort],''NeQidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''union.Sort, '__[''QidSet.Sort,''NeQidSet.Sort],''NeQidSet.Sort,'none.AttrSet], 'op_:_->_`[_`].[''union.Sort,'__[''QidSet.Sort,''QidSet.Sort], ''QidSet.Sort,'none.AttrSet],'op_:_->_`[_`].[''upEqs.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[EquationSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpEqs.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upImports.Sort,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[ImportList`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpImports.Sort], 'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort, ''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upMbs.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[MembAxSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpMbs.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upModule.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind], ''`[Module`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaUpModule.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''upOpDecls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind], ''`[OpDeclSet`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaUpOpDecls.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''upRls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[RuleSet`].Kind, 'special['__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpRls.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upSorts.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[Bool`].Kind],''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpSorts.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''upSubsortDecls.Sort,'__[''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind, ''`[Bool`].Kind],''`[SubsortDeclSet`].Kind,'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpSubsortDecls.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''upTerm.Sort,''Universal.Sort, ''Term.Sort,'__['poly['s_['0.Zero]],'special['__['id-hook[ ''MetaLevelOpSymbol.Sort,''metaUpTerm.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]]], 'op_:_->_`[_`].[''upView.Sort,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind,''`[View`].Kind,'special[ '__['id-hook[''MetaLevelOpSymbol.Sort,''metaUpView.Sort],'op-hook[ ''shareWith.Sort,''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort], ''ResultPair?.Sort]]]],'op_:_->_`[_`].[''variant.Sort,'nil.TypeList, ''Attr.Sort,'ctor.Attr],'op_:_->_`[_`].[''view_from_to_is__endv.Sort,'__[ ''Header.Sort,''ModuleExpression.Sort,''ModuleExpression.Sort, ''SortMappingSet.Sort,''OpMappingSet.Sort],''View.Sort,'__['ctor.Attr, 'gather['__[''&.Sort,''&.Sort,''&.Sort,''&.Sort,''&.Sort]],'format['__[ ''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''d.Sort,''n++i.Sort, ''ni.Sort,''n--i.Sort,''d.Sort]]]],'op_:_->_`[_`].[''wellFormed.Sort, ''Module.Sort,''Bool.Sort,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedModule.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort, '__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''wellFormed.Sort,'__[''`[Module`].Kind,''`[QidSet`,QidList`,TypeListSet`,GTermList`,ParameterList`,Type?`,ModuleExpression`,Header`].Kind], ''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedTerm.Sort],'op-hook[''shareWith.Sort,''metaReduce.Sort,'__[ ''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]],'op_:_->_`[_`].[ ''wellFormed.Sort,'__[''`[Module`].Kind,''`[Substitution?`].Kind], ''`[Bool`].Kind,'special['__['id-hook[''MetaLevelOpSymbol.Sort, ''metaWellFormedSubstitution.Sort],'op-hook[''shareWith.Sort, ''metaReduce.Sort,'__[''Module.Sort,''QidSet.Sort],''ResultPair?.Sort]]]], 'op_:_->_`[_`].[''with-parens.Sort,'nil.TypeList,''PrintOption.Sort, 'ctor.Attr],'op_:_->_`[_`].[''|_|.Sort,''NeQidSet.Sort,''NzNat.Sort, 'none.AttrSet],'op_:_->_`[_`].[''|_|.Sort,''QidSet.Sort,''Nat.Sort, 'none.AttrSet]],'none.MembAxSet,'__['eq_=_`[_`].['_`[_`][''$card.Sort, '_`,_[''none.EmptyTypeSet.Constant,''C:Nat.Variable]],''C:Nat.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort, '_`,_[''E:Qid.Variable,''S:QidSet.Variable]],''C:Nat.Variable]],'_`[_`][ ''$card.Sort,'_`,_[''S:QidSet.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'owise.Attr], 'eq_=_`[_`].['_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[ ''N:NeQidSet.Variable,''N:NeQidSet.Variable,''S:QidSet.Variable]], ''C:Nat.Variable]],'_`[_`][''$card.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[ ''N:NeQidSet.Variable,''S:QidSet.Variable]],''C:Nat.Variable]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$diff.Sort,'_`,_[ ''none.EmptyTypeSet.Constant,''S':QidSet.Variable,''A:QidSet.Variable]], ''A:QidSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''$diff.Sort,'_`,_[ '_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]], ''S':QidSet.Variable,''A:QidSet.Variable]],'_`[_`][''$diff.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable,'_`[_`][''if_then_else_fi.Sort, '_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable,''S':QidSet.Variable]], ''A:QidSet.Variable,'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''A:QidSet.Variable]]]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''$intersect.Sort,'_`,_[''none.EmptyTypeSet.Constant,''S':QidSet.Variable, ''A:QidSet.Variable]],''A:QidSet.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$intersect.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],''S':QidSet.Variable,''A:QidSet.Variable]],'_`[_`][ ''$intersect.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable,'_`[_`][ ''if_then_else_fi.Sort,'_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable, ''S':QidSet.Variable]],'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''A:QidSet.Variable]],''A:QidSet.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_[''nil.NatList.Constant, ''A:NatList.Variable]],''A:NatList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_[''nil.TypeList.Constant, ''A:QidList.Variable]],''A:QidList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''$reverse.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]],''A:NatList.Variable]],'_`[_`][''$reverse.Sort, '_`,_[''L:NatList.Variable,'_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''A:NatList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''$reverse.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]],''A:QidList.Variable]],'_`[_`][''$reverse.Sort, '_`,_[''L:QidList.Variable,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''A:QidList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''$size.Sort, '_`,_[''nil.NatList.Constant,''C:Nat.Variable]],''C:Nat.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_[ ''nil.TypeList.Constant,''C:Nat.Variable]],''C:Nat.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[ ''E:Nat.Variable,''L:NatList.Variable]],''C:Nat.Variable]],'_`[_`][ ''$size.Sort,'_`,_[''L:NatList.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''$size.Sort,'_`,_['_`[_`][''__.Sort,'_`,_[ ''E:Qid.Variable,''L:QidList.Variable]],''C:Nat.Variable]],'_`[_`][ ''$size.Sort,'_`,_[''L:QidList.Variable,'_`[_`][''_+_.Sort,'_`,_[ ''C:Nat.Variable,'_`[_`][''s_.Sort,''0.Zero.Constant]]]]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_;_.Sort,'_`,_[''A:Assignment.Variable, ''A:Assignment.Variable]],''A:Assignment.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_;_.Sort,'_`,_[''N:NeQidSet.Variable, ''N:NeQidSet.Variable]],''N:NeQidSet.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_;_.Sort,'_`,_[''T:TypeList.Variable,''T:TypeList.Variable]], ''T:TypeList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_\_.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable]],'_`[_`][''$diff.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable,''none.EmptyTypeSet.Constant]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_\_.Sort,'_`,_[''S:QidSet.Variable, ''none.EmptyTypeSet.Constant]],''S:QidSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''A:Attr.Variable,''A:Attr.Variable]], ''A:Attr.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[ ''E:Equation.Variable,''E:Equation.Variable]],''E:Equation.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''M:MembAx.Variable, ''M:MembAx.Variable]],''M:MembAx.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''__.Sort,'_`,_[''O:OpDecl.Variable,''O:OpDecl.Variable]], ''O:OpDecl.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[ ''O:OpMapping.Variable,''O:OpMapping.Variable]],''O:OpMapping.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort,'_`,_[''R:Rule.Variable, ''R:Rule.Variable]],''R:Rule.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''__.Sort,'_`,_[''S:SortMapping.Variable,''S:SortMapping.Variable]], ''S:SortMapping.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''__.Sort, '_`,_[''S:SubsortDecl.Variable,''S:SubsortDecl.Variable]], ''S:SubsortDecl.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''_and-then_.Sort,'_`,_[''false.Bool.Constant,''B:`[Bool`].Variable]], ''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''_and-then_.Sort,'_`,_[''true.Bool.Constant,''B:`[Bool`].Variable]], ''B:`[Bool`].Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort, '_`,_[''A:Bool.Variable,''A:Bool.Variable]],''A:Bool.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, '_`[_`][''_xor_.Sort,'_`,_[''B:Bool.Variable,''C:Bool.Variable]]]],'_`[_`][ ''_xor_.Sort,'_`,_['_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''C:Bool.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort, '_`,_[''false.Bool.Constant,''A:Bool.Variable]],''false.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_and_.Sort,'_`,_[ ''true.Bool.Constant,''A:Bool.Variable]],''A:Bool.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''_implies_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''not_.Sort,'_`[_`][''_xor_.Sort,'_`,_[ ''A:Bool.Variable,'_`[_`][''_and_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''_in_.Sort, '_`,_[''E:Qid.Variable,''S:QidSet.Variable]],''false.Bool.Constant, 'owise.Attr],'eq_=_`[_`].['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable, '_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]]]], ''true.Bool.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or-else_.Sort, '_`,_[''false.Bool.Constant,''B:`[Bool`].Variable]],''B:`[Bool`].Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or-else_.Sort,'_`,_[ ''true.Bool.Constant,''B:`[Bool`].Variable]],''true.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_or_.Sort,'_`,_[''A:Bool.Variable, ''B:Bool.Variable]],'_`[_`][''_xor_.Sort,'_`,_['_`[_`][''_and_.Sort,'_`,_[ ''A:Bool.Variable,''B:Bool.Variable]],'_`[_`][''_xor_.Sort,'_`,_[ ''A:Bool.Variable,''B:Bool.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_psubset_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], '_`[_`][''_and-then_.Sort,'_`,_['_`[_`][''_=/=_.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable]],'_`[_`][''_subset_.Sort,'_`,_[ ''S:QidSet.Variable,''S':QidSet.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_subset_.Sort,'_`,_[''none.EmptyTypeSet.Constant, ''S':QidSet.Variable]],''true.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_subset_.Sort,'_`,_['_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],''S':QidSet.Variable]],'_`[_`][''_and-then_.Sort, '_`,_['_`[_`][''_in_.Sort,'_`,_[''E:Qid.Variable,''S':QidSet.Variable]], '_`[_`][''_subset_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''_xor_.Sort,'_`,_[''A:Bool.Variable, ''A:Bool.Variable]],''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''_xor_.Sort,'_`,_[''false.Bool.Constant,''A:Bool.Variable]], ''A:Bool.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''`[_`].Kind, ''Q:Qid.Variable],'_`[_`][''th_is_sorts_._____endth.Constant,'_`,_[ ''Q:Qid.Variable,'_`[_`][''including_..Qid,''Q:Qid.Variable], ''none.EmptyTypeSet.Constant,''none.SubsortDeclSet.Constant, ''none.OpDeclSet.Constant,''none.MembAxSet.Constant, ''none.EquationSet.Constant,''none.RuleSet.Constant]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''append.Sort,'_`,_[''A:NatList.Variable, ''L:NatList.Variable]],'_`[_`][''__.Sort,'_`,_[''A:NatList.Variable, ''L:NatList.Variable]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''append.Sort, '_`,_[''A:QidList.Variable,''L:QidList.Variable]],'_`[_`][''__.Sort,'_`,_[ ''A:QidList.Variable,''L:QidList.Variable]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''delete.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]], ''S:QidSet.Variable,'owise.Attr],'eq_=_`[_`].['_`[_`][''delete.Sort,'_`,_[ ''E:Qid.Variable,'_`[_`][''_;_.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]]]],'_`[_`][''delete.Sort,'_`,_[''E:Qid.Variable, ''S:QidSet.Variable]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''front.Sort, '_`[_`][''__.Sort,'_`,_[''L:NatList.Variable,''E:Nat.Variable]]], ''L:NatList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''front.Sort, '_`[_`][''__.Sort,'_`,_[''L:QidList.Variable,''E:Qid.Variable]]], ''L:QidList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getContext.Sort, '_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[''T:Term.Variable,''T:Type.Variable, ''S:Substitution.Variable,''C:Context.Variable]]],''C:Context.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getContext.Sort,'_`[_`][ ''`{_`,_`}.Qid,'_`,_[''S:Substitution.Variable,''C:Context.Variable]]], ''C:Context.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getEqs.Sort, '_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''EQS:EquationSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getEqs.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''EQS:EquationSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getEqs.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''EQS:EquationSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getEqs.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''EQS:EquationSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getFrom.Sort,'_`[_`][''view_from_to_is__endv.Sort, '_`,_[''Q:Qid.Variable,''ME:ModuleExpression.Variable, ''ME':ModuleExpression.Variable,''SMS:SortMappingSet.Variable, ''OMS:OpMappingSet.Variable]]],''ME:ModuleExpression.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getImports.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''IL:ImportList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getImports.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''IL:ImportList.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getImports.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''IL:ImportList.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getImports.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''IL:ImportList.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getMbs.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''MAS:MembAxSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getMbs.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''MAS:MembAxSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getMbs.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''MAS:MembAxSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getMbs.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''MAS:MembAxSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getName.Sort,''C:Constant.Variable],'_`[_`][ ''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''C:Constant.Variable],''0.Zero.Constant,'_`[_`][''rfind.Sort,'_`,_[ '_`[_`][''string.Sort,''C:Constant.Variable],''".".Char.Constant,'_`[_`][ ''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,''V:Variable.Variable], '_`[_`][''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],''0.Zero.Constant,'_`[_`][''rfind.Sort,'_`,_[ '_`[_`][''string.Sort,''V:Variable.Variable],''":".Char.Constant,'_`[_`][ ''length.Sort,'_`[_`][''string.Sort,''V:Variable.Variable]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_['_`[_`][''_`{_`}.Sort,'_`,_[ ''Q:Qid.Variable,''PDL:ParameterDeclList.Variable]], ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''mod_is_sorts_._____endm.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''Q:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getName.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ '_`[_`][''_`{_`}.Sort,'_`,_[''Q:Qid.Variable, ''PDL:ParameterDeclList.Variable]],''IL:ImportList.Variable, ''SS:SortSet.Variable,''SSDS:SubsortDeclSet.Variable, ''OPDS:OpDeclSet.Variable,''MAS:MembAxSet.Variable, ''EQS:EquationSet.Variable,''RLS:RuleSet.Variable]]],''Q:Qid.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getName.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''Q:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getName.Sort,'_`[_`][''view_from_to_is__endv.Sort,'_`,_[ ''Q:Qid.Variable,''ME:ModuleExpression.Variable, ''ME':ModuleExpression.Variable,''SMS:SortMappingSet.Variable, ''OMS:OpMappingSet.Variable]]],''Q:Qid.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getOpMappings.Sort,'_`[_`][ ''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''OMS:OpMappingSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''OPDS:OpDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''OPDS:OpDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getOps.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''OPDS:OpDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getOps.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''OPDS:OpDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getRls.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''none.RuleSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getRls.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''none.RuleSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getRls.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''RLS:RuleSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getRls.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''RLS:RuleSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSortMappings.Sort,'_`[_`][ ''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''SMS:SortMappingSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSorts.Sort,'_`[_`][''fmod_is_sorts_.____endfm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SS:SortSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getSorts.Sort, '_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SS:SortSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getSorts.Sort, '_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SS:SortSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSorts.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SS:SortSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubsorts.Sort,'_`[_`][ ''fmod_is_sorts_.____endfm.Constant,'_`,_[''H:Header.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SSDS:SubsortDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubsorts.Sort,'_`[_`][''fth_is_sorts_.____endfth.Constant,'_`,_[ ''Q:Qid.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable]]], ''SSDS:SubsortDeclSet.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubsorts.Sort,'_`[_`][''mod_is_sorts_._____endm.Constant,'_`,_[ ''H:Header.Variable,''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SSDS:SubsortDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubsorts.Sort,'_`[_`][ ''th_is_sorts_._____endth.Constant,'_`,_[''Q:Qid.Variable, ''IL:ImportList.Variable,''SS:SortSet.Variable, ''SSDS:SubsortDeclSet.Variable,''OPDS:OpDeclSet.Variable, ''MAS:MembAxSet.Variable,''EQS:EquationSet.Variable, ''RLS:RuleSet.Variable]]],''SSDS:SubsortDeclSet.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubstitution.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable, ''C:Context.Variable]]],''S:Substitution.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''getSubstitution.Sort,'_`[_`][''`{_`,_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable]]], ''S:Substitution.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getSubstitution.Sort,'_`[_`][''`{_`,_`}.Qid,'_`,_[ ''S:Substitution.Variable,''C:Context.Variable]]], ''S:Substitution.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getTerm.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable,''S:Substitution.Variable,''C:Context.Variable]]], ''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][''getTerm.Sort, '_`[_`][''`{_`,_`,_`}.Qid,'_`,_[''T:Term.Variable,''T:Type.Variable, ''S:Substitution.Variable]]],''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getTerm.Sort,'_`[_`][''`{_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable]]],''T:Term.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getTo.Sort,'_`[_`][''view_from_to_is__endv.Sort,'_`,_[''Q:Qid.Variable, ''ME:ModuleExpression.Variable,''ME':ModuleExpression.Variable, ''SMS:SortMappingSet.Variable,''OMS:OpMappingSet.Variable]]], ''ME':ModuleExpression.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''getType.Sort,''C:Constant.Variable],'_`[_`][''qid.Sort,'_`[_`][ ''substr.Sort,'_`,_['_`[_`][''string.Sort,''C:Constant.Variable],'_`[_`][ ''_+_.Sort,'_`,_['_`[_`][''s_.Sort,''0.Zero.Constant],'_`[_`][''rfind.Sort, '_`,_['_`[_`][''string.Sort,''C:Constant.Variable],''".".Char.Constant, '_`[_`][''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]]], '_`[_`][''length.Sort,'_`[_`][''string.Sort,''C:Constant.Variable]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getType.Sort,''V:Variable.Variable], '_`[_`][''qid.Sort,'_`[_`][''substr.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],'_`[_`][''_+_.Sort,'_`,_['_`[_`][''s_.Sort, ''0.Zero.Constant],'_`[_`][''rfind.Sort,'_`,_['_`[_`][''string.Sort, ''V:Variable.Variable],''":".Char.Constant,'_`[_`][''length.Sort,'_`[_`][ ''string.Sort,''V:Variable.Variable]]]]]],'_`[_`][''length.Sort,'_`[_`][ ''string.Sort,''V:Variable.Variable]]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getType.Sort,'_`[_`][''`{_`,_`,_`,_`}.Qid,'_`,_[ ''T:Term.Variable,''T:Type.Variable,''S:Substitution.Variable, ''C:Context.Variable]]],''T:Type.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''getType.Sort,'_`[_`][''`{_`,_`,_`}.Qid,'_`,_[''T:Term.Variable, ''T:Type.Variable,''S:Substitution.Variable]]],''T:Type.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''getType.Sort,'_`[_`][''`{_`,_`}.Qid, '_`,_[''T:Term.Variable,''T:Type.Variable]]],''T:Type.Variable, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''head.Sort,'_`[_`][''__.Sort,'_`,_[ ''E:Nat.Variable,''L:NatList.Variable]]],''E:Nat.Variable,'none.AttrSet], 'eq_=_`[_`].['_`[_`][''head.Sort,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]]],''E:Qid.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''insert.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]],'_`[_`][ ''_;_.Sort,'_`,_[''E:Qid.Variable,''S:QidSet.Variable]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''intersection.Sort,'_`,_[''S:QidSet.Variable, ''N:NeQidSet.Variable]],'_`[_`][''$intersect.Sort,'_`,_[ ''S:QidSet.Variable,''N:NeQidSet.Variable,''none.EmptyTypeSet.Constant]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''intersection.Sort,'_`,_[ ''S:QidSet.Variable,''none.EmptyTypeSet.Constant]], ''none.EmptyTypeSet.Constant,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''last.Sort,'_`[_`][''__.Sort,'_`,_[''L:NatList.Variable, ''E:Nat.Variable]]],''E:Nat.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''last.Sort,'_`[_`][''__.Sort,'_`,_[''L:QidList.Variable, ''E:Qid.Variable]]],''E:Qid.Variable,'none.AttrSet],'eq_=_`[_`].['_`[_`][ ''metaPrettyPrint.Sort,'_`,_[''M:Module.Variable,''T:Term.Variable]], '_`[_`][''metaPrettyPrint.Sort,'_`,_[''M:Module.Variable,''T:Term.Variable, '_`[_`][''__.Sort,'_`,_[''mixfix.PrintOption.Constant,'_`[_`][''__.Sort, '_`,_[''flat.PrintOption.Constant,'_`[_`][''__.Sort,'_`,_[ ''format.PrintOption.Constant,'_`[_`][''__.Sort,'_`,_[ ''number.PrintOption.Constant,''rat.PrintOption.Constant]]]]]]]]]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''not_.Sort,''A:Bool.Variable],'_`[_`][ ''_xor_.Sort,'_`,_[''true.Bool.Constant,''A:Bool.Variable]],'none.AttrSet], 'eq_=_`[_`].['_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable, ''nil.NatList.Constant]],''false.Bool.Constant,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable,'_`[_`][''__.Sort,'_`,_[ ''E':Nat.Variable,''L:NatList.Variable]]]],'_`[_`][''if_then_else_fi.Sort, '_`,_['_`[_`][''_==_.Sort,'_`,_[''E:Nat.Variable,''E':Nat.Variable]], ''true.Bool.Constant,'_`[_`][''occurs.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]]]],'none.AttrSet],'eq_=_`[_`].['_`[_`][''occurs.Sort, '_`,_[''E:Qid.Variable,''nil.TypeList.Constant]],''false.Bool.Constant, 'none.AttrSet],'eq_=_`[_`].['_`[_`][''occurs.Sort,'_`,_[''E:Qid.Variable, '_`[_`][''__.Sort,'_`,_[''E':Qid.Variable,''L:QidList.Variable]]]],'_`[_`][ ''if_then_else_fi.Sort,'_`,_['_`[_`][''_==_.Sort,'_`,_[''E:Qid.Variable, ''E':Qid.Variable]],''true.Bool.Constant,'_`[_`][''occurs.Sort,'_`,_[ ''E:Qid.Variable,''L:QidList.Variable]]]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''reverse.Sort,''L:NatList.Variable],'_`[_`][''$reverse.Sort,'_`,_[ ''L:NatList.Variable,''nil.NatList.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''reverse.Sort,''L:QidList.Variable],'_`[_`][''$reverse.Sort,'_`,_[ ''L:QidList.Variable,''nil.TypeList.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''size.Sort,''L:NatList.Variable],'_`[_`][''$size.Sort,'_`,_[ ''L:NatList.Variable,''0.Zero.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''size.Sort,''L:QidList.Variable],'_`[_`][''$size.Sort,'_`,_[ ''L:QidList.Variable,''0.Zero.Constant]],'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''tail.Sort,'_`[_`][''__.Sort,'_`,_[''E:Nat.Variable, ''L:NatList.Variable]]],''L:NatList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''tail.Sort,'_`[_`][''__.Sort,'_`,_[''E:Qid.Variable, ''L:QidList.Variable]]],''L:QidList.Variable,'none.AttrSet],'eq_=_`[_`].[ '_`[_`][''union.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], '_`[_`][''_;_.Sort,'_`,_[''S:QidSet.Variable,''S':QidSet.Variable]], 'none.AttrSet],'eq_=_`[_`].['_`[_`][''|_|.Sort,''S:QidSet.Variable], '_`[_`][''$card.Sort,'_`,_[''S:QidSet.Variable,''0.Zero.Constant]], 'none.AttrSet]]],'FModule} ========================================== reduce in META-LEVEL : metaReduce(upModule('META-LEVEL, true), 'upModule[ upTerm('META-LEVEL),upTerm(true)]) == {upTerm(upModule('META-LEVEL, true)), 'FModule} . rewrites: 9 result Bool: false Maude> Bye. Maude-2.7/tests/Meta/metaUnify0000755000147300135640000000034011002250646013256 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaUnify.maude -no-banner -no-advise \ > metaUnify.out 2>&1 diff $srcdir/metaUnify.expected metaUnify.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaParse.expected0000644000147300135640000000341210025726011015034 00000000000000Maude> ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, '1.0 '+ '1.0, anyType) . rewrites: 1 result ResultPair: {'_+_['1.0.FiniteFloat,'1.0.FiniteFloat],'Float} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '3, anyType) . rewrites: 1 result ResultPair: {'s_^3['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '-3, anyType) . rewrites: 1 result ResultPair: {'-_['s_^3['0.Zero]],'NzInt} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '-2/3, anyType) . rewrites: 1 result ResultPair: {'_/_['-_['s_^2['0.Zero]],'s_^3['0.Zero]],'NzRat} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, 's_^2 '`( '0 '`), anyType) . rewrites: 1 result ResultPair: {'s_^2['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'RAT . sorts 'Foo . none none none none endfm, '-256789/387654, anyType) . rewrites: 1 result ResultPair: {'_/_['-_['s_^256789['0.Zero]],'s_^387654['0.Zero]],'NzRat} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'BOOL . sorts 'Foo . none op 's : 'Bool -> 'Bool [iter] . none none endfm, 's^1234 '`( 'true '`), anyType) . rewrites: 1 result ResultPair: {'s^1234['true.Bool],'Bool} Maude> Bye. Maude-2.7/tests/Meta/metaModExp.expected0000644000147300135640000000566110026164547015201 00000000000000Maude> ========================================== reduce in META-LEVEL : fmod 'FOO is including ('INT + 'NAT) * ( sort 'Nat to 'Nat2, (label 'foo to 'bar, op 'baz : 'Quux 'Quux -> 'Quux to 'quux [prec(10)]), op 'foo to 'bar [none] ) . sorts 'Foo . none none none none endfm . rewrites: 0 result FModule: fmod 'FOO is including ('INT + 'NAT) * ( sort 'Nat to 'Nat2, label 'foo to 'bar, op 'foo to 'bar [none], op 'baz : 'Quux 'Quux -> 'Quux to 'quux [prec(10)] ) . sorts 'Foo . none none none none endfm ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'INT + 'NAT . sorts 'Foo . none none none none endfm, '0.Nat) . rewrites: 1 result ResultPair: {'0.Zero,'Zero} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'NAT * ( sort 'Zero to 'ZZ ) . sorts 'Foo . none none none none endfm, '0.Nat) . rewrites: 1 result ResultPair: {'0.ZZ,'ZZ} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including ('FLOAT + 'NAT) * ( sort 'Zero to 'ZZ, op '_+_ to 'plus [none] ) . sorts 'Foo . none none none none endfm, 'plus['s_^2['0.Nat],'s_^2['0.Nat]]) . rewrites: 2 result ResultPair: {'s_^4['0.ZZ],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'NAT * ( op '_+_ to 'plus [none] ) . sorts 'Foo . none none none none endfm, 'plus['s_^2['0.Nat],'s_^2['0.Nat]]) . rewrites: 2 result ResultPair: {'s_^4['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'NAT . sorts 'Foo . none none none none endfm, '_+_['s_^2['0.Nat],'s_^2['0.Nat]]) . rewrites: 2 result ResultPair: {'s_^4['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'NAT * ( op '_+_ to 'plus [none] ) . sorts 'Foo . none none none none endfm, '_*_['s_^2['0.Nat],'s_^2['0.Nat]]) . rewrites: 2 result ResultPair: {'s_^4['0.Zero],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'NAT * ( sort 'Zero to 'ZZ ) . sorts 'Foo . none none none none endfm, '_*_['s_^2['0.Nat],'s_^2['0.Nat]]) . rewrites: 2 result ResultPair: {'s_^4['0.ZZ],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'NAT * ( sort 'Zero to 'ZZ ) . sorts 'Foo . none none none none endfm, 'sd['s_^3['0.Nat],'s_^2['0.Nat]]) . rewrites: 2 result ResultPair: {'s_['0.ZZ],'NzNat} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is including 'NAT * ( op '_+_ to 'plus [none] ) . sorts 'Foo . none none none none endfm, '0.Nat) . rewrites: 1 result ResultPair: {'0.Zero,'Zero} Maude> Bye. Maude-2.7/tests/Meta/metaRewrite.maude0000644000147300135640000000350010025725430014677 00000000000000set show timing off . set show advisories off . red in META-LEVEL : metaRewrite( mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'a.Foo [none] . endm, 'a.Foo, 1) . red in META-LEVEL : metaRewrite( mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'a.Foo [none] . endm, 'a.Foo, 2) . red in META-LEVEL : metaRewrite( mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'a.Foo [none] . endm, 'a.Foo, 3) . red in META-LEVEL : metaRewrite( mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, unbounded) . red in META-LEVEL : metaRewrite( mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, 1000000000000000000000000000000000000000000000000000) . red in META-LEVEL : metaRewrite( mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, JUNK:Nat) . red in META-LEVEL : metaRewrite( mod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [none] . rl 'b.Foo => 'c.Foo [none] . endm, 'a.Foo, 0) . Maude-2.7/tests/Meta/metaSpecial.expected0000644000147300135640000001362110025726011015345 00000000000000Maude> ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'QID . sorts 'Foo ; 'Token . none op '`[_`] : 'Token -> 'Foo [none] . op 'token : 'Qid -> 'Token [special( id-hook('Bubble, '1 '1) op-hook('qidSymbol, ', nil, 'Qid))] . none none endfm, '`[ 'unseen '`], anyType) . rewrites: 1 result ResultPair: {'`[_`]['token[''unseen.Qid]],'Foo} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'QID-LIST . sorts 'Foo ; 'Token . none op '`[_`] : 'Token -> 'Foo [none] . op 'token : 'Qid -> 'Token [special( id-hook('Bubble, '0 '1) op-hook('qidSymbol, ', nil, 'Qid) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) id-hook('Exclude, 'assoc 'com 'memo))] . none none endfm, '`[ '`], anyType) . rewrites: 1 result ResultPair: {'`[_`]['token['nil.QidList]],'`[Foo`]} ========================================== reduce in META-LEVEL : metaParse(fmod 'FOO is including 'QID-LIST . sorts 'Foo ; 'Token . none op '`[_`] : 'Token -> 'Foo [none] . op 'tokens : 'Qid -> 'Token [special( id-hook('Bubble, '0 '10) op-hook('qidSymbol, ', nil, 'Qid) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) op-hook('qidListSymbol, '__, 'QidList 'QidList, 'QidList) id-hook('Exclude, 'assoc 'com 'memo))] . none none endfm, '`[ 'a 'b 'c '`], anyType) . rewrites: 1 result ResultPair: {'`[_`]['tokens['__[''a.Qid,''b.Qid,''c.Qid]]],'`[Foo`]} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . none none endfm, '_::`Foo['a.Foo]) . rewrites: 0 result [ResultPair?]: metaReduce(fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . none none endfm, '_::`Foo['a.Foo]) ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Bool ; 'Foo . none (op 'a : nil -> 'Foo [none] . op 'false : nil -> 'Bool [special( id-hook('SystemFalse, nil))] .) op 'true : nil -> 'Bool [special( id-hook('SystemTrue, nil))] . none none endfm, '_::`Foo['a.Foo]) . rewrites: 2 result ResultPair: {'true.Bool,'Bool} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Foo . none (op '+ : 'Foo 'Foo -> 'Foo [id('id.Foo)] . op 'a : nil -> 'Foo [none] .) op 'id : nil -> 'Foo [none] . none none endfm, '+['a.Foo,'id.Foo]) . rewrites: 1 result ResultPair: {'a.Foo,'Foo} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Foo . none (op '+ : 'Foo 'Foo -> 'Foo [left-id('id.Foo)] . op 'a : nil -> 'Foo [none] .) op 'id : nil -> 'Foo [none] . none none endfm, '+['a.Foo,'id.Foo]) . rewrites: 1 result ResultPair: {'+['a.Foo,'id.Foo],'Foo} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Foo . none (op 'a : nil -> 'Foo [none] . op 'id : nil -> 'Foo [none] .) op '+ : 'Foo 'Foo -> 'Foo [right-id('id.Foo)] . none none endfm, '+['a.Foo,'id.Foo]) . rewrites: 1 result ResultPair: {'a.Foo,'Foo} ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Bool ; 'Foo . none (((op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] .) op 'false : nil -> 'Bool [none] .) op 'true : nil -> 'Bool [none] .) op 'itef : 'Bool 'Universal 'Universal -> 'Universal [special( id-hook('BranchSymbol, nil) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . none none endfm, 'itef['true.Bool,'a.Foo,'b.Foo]) . rewrites: 0 result [ResultPair?]: metaReduce(fmod 'FOO is nil sorts 'Bool ; 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'false : nil -> 'Bool [none] . op 'itef : 'Bool 'Universal 'Universal -> 'Universal [special( id-hook('BranchSymbol, nil) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'true : nil -> 'Bool [none] . none none endfm, 'itef['true.Bool,'a.Foo,'b.Foo]) ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Bool ; 'Foo . none (((op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] .) op 'false : nil -> 'Bool [none] .) op 'true : nil -> 'Bool [none] .) op 'itef : 'Bool 'Universal 'Universal -> 'Universal [special( id-hook('BranchSymbol, nil) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . none none endfm, 'itef['false.Bool,'a.Foo,'b.Foo]) . rewrites: 0 result [ResultPair?]: metaReduce(fmod 'FOO is nil sorts 'Bool ; 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'false : nil -> 'Bool [none] . op 'itef : 'Bool 'Universal 'Universal -> 'Universal [special( id-hook('BranchSymbol, nil) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'true : nil -> 'Bool [none] . none none endfm, 'itef['false.Bool,'a.Foo,'b.Foo]) ========================================== reduce in META-LEVEL : metaReduce(fmod 'FOO is nil sorts 'Bit ; 'Foo . none (((op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] .) op '0 : nil -> 'Bit [none] .) op '1 : nil -> 'Bit [none] .) op '= : 'Universal 'Universal -> 'Bit [special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, '1.Bit) term-hook('notEqualTerm, '0.Bit))] . none none endfm, '=['a.Foo,'b.Foo]) . rewrites: 0 result [ResultPair?]: metaReduce(fmod 'FOO is nil sorts 'Bit ; 'Foo . none op '0 : nil -> 'Bit [none] . op '1 : nil -> 'Bit [none] . op '= : 'Universal 'Universal -> 'Bit [special( id-hook('EqualitySymbol, nil) term-hook('equalTerm, '1.Bit) term-hook('notEqualTerm, '0.Bit))] . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none endfm, '=['a.Foo,'b.Foo]) Maude> Bye. Maude-2.7/tests/Meta/metaMatch.maude0000644000147300135640000000706710025725255014333 00000000000000set show timing off . set show advisories off . mod SEARCH-TEST is sort Nat . op _+_ : Nat Nat -> Nat [assoc comm prec 5] . op _*_ : Nat Nat -> Nat [assoc comm prec 3] . ops a b c d e 0 1 : -> Nat . vars W X Y Z : Nat . eq 0 * X = 0 . eq 1 * X = X . eq 0 + X = X . rl X * (Y + Z) => X * Y + X * Z . rl X * Y + X * Z => X * (Y + Z) . endm select META-LEVEL . red metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_*_['Y:Nat, 'Z:Nat] := 'X:Nat, 0) . red metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_*_['Y:Nat, 'Z:Nat] := 'X:Nat, 1) . red metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_*_['Y:Nat, 'Z:Nat] := 'X:Nat, 2) . red metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_*_['Y:Nat, 'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, 0) . red metaMatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat, '_+_['b.Nat, 'c.Nat]], '_*_['Y:Nat, 'Z:Nat] := 'X:Nat /\ 'Y:Nat = 'a.Nat, 1) . red in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none endfm, 'f['Y:Foo, 'Y:Foo], 'f['b.Foo, 'b.Foo], nil, 0) . red in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none endfm, 'f['Y:Foo, 'Y:Foo], 'f['b.Foo, 'b.Foo], nil, 1) . red in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo], nil, 0) . red in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo], nil, 1) . red in META-LEVEL : metaMatch(fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none endfm, 'f['X:Foo, 'Y:Foo], 'f['a.Foo, 'b.Foo], nil, 2) . red in META-LEVEL : metaMatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 0) . red in META-LEVEL : metaMatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 2) . red in META-LEVEL : metaMatch( fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none endfm, 'g['f['X:Foo, 'Y:Foo], 'Z:Foo], 'g['f['a.Foo, 'b.Foo], 'f['c.Foo, 'c.Foo]], nil, 1) . Maude-2.7/tests/Meta/metaPrettyPrint.expected0000644000147300135640000000564410272555467016322 00000000000000Maude> ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, '_+_['1.0.FiniteFloat,'1.0.FiniteFloat]) . rewrites: 2 result NeQidList: '1.0 '+ '1.0 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, 'X:Float) . rewrites: 2 result Variable: 'X:Float r g b ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, 's_['0.Zero]) . rewrites: 2 result Sort: '1 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, 's_['s_['0.Zero]], mixfix flat format number rat) . rewrites: 1 result NeTypeList: 's '1 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, 's_['s_['0.Zero]], none) . rewrites: 1 result NeTypeList: 's_ '`( 's_ '`( '0 '`) '`) ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '-_['s_['0.Zero]]) . rewrites: 2 result Sort: '-1 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_['0.Zero]],'s_['0.Zero]]) . rewrites: 2 result Sort: '-1/1 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '-_['s_^22['0.Zero]]) . rewrites: 2 result Sort: '-22 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]],'s_^12345['0.Zero]]) . rewrites: 2 result Sort: '-6789/12345 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]],'s_^12345['0.Zero]], mixfix) . rewrites: 1 result NeTypeList: '- 's_^6789 '`( '0 '`) '/ 's_^12345 '`( '0 '`) ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]],'s_^12345['0.Zero]], mixfix number) . rewrites: 1 result NeTypeList: '-6789 '/ '12345 ========================================== reduce in META-LEVEL : metaPrettyPrint(fmod 'FOO is protecting 'RAT . sorts none . none none none none endfm, '_/_['-_['s_^6789['0.Zero]],'s_^12345['0.Zero]], mixfix rat) . rewrites: 1 result Sort: '-6789/12345 Maude> Bye. Maude-2.7/tests/Meta/Makefile.in0000644000147300135640000003316712305230426013452 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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 = tests/Meta DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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@ TESTS = \ metaApply \ metaUnify \ metaFrewrite \ metaMatch \ metaMeta \ metaModule \ metaParse \ metaPrettyPrint \ metaReduce \ metaRewrite \ metaSearch \ metaSort \ metaSpecial \ metaTerm \ metaUp \ metaWellFormed \ metaXapply \ metaXmatch \ metaUp2 \ metaUpModExp \ metaModExp \ metaPolymorph \ metaUpDown \ metaPrintAttr \ metaMetadata \ metaVariantUnify \ metaGetVariant MAUDE_FILES = \ metaApply.maude \ metaUnify.maude \ metaFrewrite.maude \ metaMatch.maude \ metaMeta.maude \ metaModule.maude \ metaParse.maude \ metaPrettyPrint.maude \ metaReduce.maude \ metaRewrite.maude \ metaSearch.maude \ metaSort.maude \ metaSpecial.maude \ metaTerm.maude \ metaUp.maude \ metaWellFormed.maude \ metaXapply.maude \ metaXmatch.maude \ metaUp2.maude \ metaUpModExp.maude \ metaModExp.maude \ metaPolymorph.maude \ metaUpDown.maude \ metaPrintAttr.maude \ metaMetadata.maude \ metaVariantUnify.maude \ metaGetVariant.maude RESULT_FILES = \ metaApply.expected \ metaUnify.expected \ metaFrewrite.expected \ metaApply.expected \ metaFrewrite.expected \ metaMatch.expected \ metaMeta.expected \ metaModule.expected \ metaParse.expected \ metaPrettyPrint.expected \ metaReduce.expected \ metaRewrite.expected \ metaSearch.expected \ metaSort.expected \ metaSpecial.expected \ metaTerm.expected \ metaUp.expected \ metaWellFormed.expected \ metaXapply.expected \ metaXmatch.expected \ metaUp2.expected \ metaUpModExp.expected \ metaModExp.expected \ metaPolymorph.expected \ metaUpDown.expected \ metaPrintAttr.expected \ metaMetadata.expected \ metaVariantUnify.expected \ metaGetVariant.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) all: all-am .SUFFIXES: $(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 tests/Meta/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Meta/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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): tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(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 $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile 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 mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ distclean distclean-generic 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-generic pdf pdf-am ps ps-am uninstall \ uninstall-am # 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-2.7/tests/Meta/metaUpModExp.maude0000644000147300135640000000200610026156326014762 00000000000000set show timing off . set show advisories off . red in META-LEVEL : upImports('META-LEVEL) . fmod FOO is sorts Foo Bar . subsort Foo < Bar . op a : -> Foo . endfm fmod BAR is inc FOO * (sort Foo to Baz, op a to b) . endfm red in META-LEVEL : upImports('BAR) . fmod FOO' is sorts Foo Bar Baz . subsort Foo < Bar . op a : -> Baz . op _+_ : Foo Foo -> Foo [prec 31 gather (e E) assoc comm] . op _+_ : Baz Baz -> Foo [prec 31 gather (e E)] . endfm fmod BAR' is inc FOO' * ( sort Foo to Quux, op _+_ : Foo Foo -> Foo to _*_ [prec 29 gather (E e)], op _+_ : Baz Baz -> Foo to _._ [prec 27 gather (E e)] ) . endfm red in META-LEVEL : upImports('BAR') . fmod BAZ is inc FOO' * ( sort Foo to Quux, op _+_ : Foo Foo -> Foo to _*_ [prec 29 format (s s s s)], op _+_ : Baz Baz -> Foo to _._ [prec 27 gather (E e)], label a to b ) + NAT . endfm red in META-LEVEL : upImports('BAZ) . red in META-LEVEL : upModule('BAZ, false) . red in META-LEVEL : upModule('BAZ, true) . Maude-2.7/tests/Meta/metaUpModExp0000755000147300135640000000035410511605640013674 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaUpModExp.maude -no-banner -no-advise \ > metaUpModExp.out 2>&1 diff $srcdir/metaUpModExp.expected metaUpModExp.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaSpecial.maude0000644000147300135640000000736110025725516014654 00000000000000set show timing off . set show advisories off . red in META-LEVEL : metaParse( fmod 'FOO is including 'QID . sorts 'Token ; 'Foo . none op 'token : 'Qid -> 'Token [special(id-hook('Bubble, '1 '1) op-hook('qidSymbol, ', nil, 'Qid))] . op '`[_`] : 'Token -> 'Foo [none] . none none endfm, '`[ 'unseen '`] , anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'QID-LIST . sorts 'Token ; 'Foo . none op 'token : 'Qid -> 'Token [special(id-hook('Bubble, '0 '1) op-hook('qidSymbol, ', nil, 'Qid) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) id-hook('Exclude, 'assoc 'com 'memo))] . op '`[_`] : 'Token -> 'Foo [none] . none none endfm, '`[ '`] , anyType) . red in META-LEVEL : metaParse( fmod 'FOO is including 'QID-LIST . sorts 'Token ; 'Foo . none op 'tokens : 'Qid -> 'Token [special(id-hook('Bubble, '0 '10) op-hook('qidSymbol, ', nil, 'Qid) op-hook('nilQidListSymbol, 'nil, nil, 'QidList) op-hook('qidListSymbol, '__, 'QidList 'QidList, 'QidList) id-hook('Exclude, 'assoc 'com 'memo))] . op '`[_`] : 'Token -> 'Foo [none] . none none endfm, '`[ 'a 'b 'c '`] , anyType) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo . none op 'a : nil -> 'Foo [none] . none none endfm, '_::`Foo['a.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo ; 'Bool . none op 'true : nil -> 'Bool [special(id-hook('SystemTrue, nil))] . op 'false : nil -> 'Bool [special(id-hook('SystemFalse, nil))] . op 'a : nil -> 'Foo [none] . none none endfm, '_::`Foo['a.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo . none op 'id : nil -> 'Foo [none] . op '+ : 'Foo 'Foo -> 'Foo [id('id.Foo)] . op 'a : nil -> 'Foo [none] . none none endfm, '+['a.Foo, 'id.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo . none op 'id : nil -> 'Foo [none] . op '+ : 'Foo 'Foo -> 'Foo [left-id('id.Foo)] . op 'a : nil -> 'Foo [none] . none none endfm, '+['a.Foo, 'id.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo . none op '+ : 'Foo 'Foo -> 'Foo [right-id('id.Foo)] . op 'id : nil -> 'Foo [none] . op 'a : nil -> 'Foo [none] . none none endfm, '+['a.Foo, 'id.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo ; 'Bool . none op 'itef : 'Bool 'Universal 'Universal -> 'Universal [special(id-hook('BranchSymbol, nil) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'true : nil -> 'Bool [none] . op 'false : nil -> 'Bool [none] . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none endfm, 'itef['true.Bool, 'a.Foo, 'b.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo ; 'Bool . none op 'itef : 'Bool 'Universal 'Universal -> 'Universal [special(id-hook('BranchSymbol, nil) term-hook('trueTerm, 'true.Bool) term-hook('falseTerm, 'false.Bool))] . op 'true : nil -> 'Bool [none] . op 'false : nil -> 'Bool [none] . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none endfm, 'itef['false.Bool, 'a.Foo, 'b.Foo]) . red in META-LEVEL : metaReduce( fmod 'FOO is nil sorts 'Foo ; 'Bit . none op '= : 'Universal 'Universal -> 'Bit [special(id-hook('EqualitySymbol, nil) term-hook('equalTerm, '1.Bit) term-hook('notEqualTerm, '0.Bit))] . op '1 : nil -> 'Bit [none] . op '0 : nil -> 'Bit [none] . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none endfm, '=['a.Foo, 'b.Foo]) . Maude-2.7/tests/Meta/metaMeta.maude0000644000147300135640000000067510025725274014164 00000000000000set show timing off . set show advisories off . mod FOO is sort Foo . ops a b : -> Foo . rl a => b . endm red in META-LEVEL : metaRewrite(['FOO], 'a.Foo, 10) . mod SELF-REFLECTION is pr META-LEVEL . sort Foo . ops a b : -> Foo . rl a => b . op r : Term -> Term . rl r(T:Term) => getTerm(metaRewrite(['SELF-REFLECTION], T:Term, 100)) . endm red in META-LEVEL : metaRewrite(['SELF-REFLECTION], 'r[''a.Foo.Constant], 10) . Maude-2.7/tests/Meta/metaModule.expected0000644000147300135640000000402710025726011015212 00000000000000Maude> ========================================== reduce in META-MODULE : subsort 'Foo < 'Bar . . rewrites: 0 result SubsortDecl: subsort 'Foo < 'Bar . ========================================== reduce in META-MODULE : op 'f : 'Foo -> 'Bar [none] . . rewrites: 0 result OpDecl: op 'f : 'Foo -> 'Bar [none] . ========================================== reduce in META-MODULE : ceq 'f['X:Foo] = 'a.Bar if 'g['a.Foo,'Y:Foo] := 'X:Foo [none] . . rewrites: 0 result Equation: ceq 'f['X:Foo] = 'a.Bar if 'g['a.Foo,'Y:Foo] := 'X:Foo [none] . ========================================== reduce in META-MODULE : 'g['a.Foo,'Y:Foo] := 'X:Foo . rewrites: 0 result EqCondition: 'g['a.Foo,'Y:Foo] := 'X:Foo ========================================== reduce in META-MODULE : fmod 'FOO is including 'MACHINE-INT . sorts 'Bar ; 'Foo . subsort 'Foo < 'Bar . op 'f : 'Foo -> 'Bar [none] . op 'g : '`[Bar`] -> '`[Bar`] [none] . cmb 'X:Bar : 'Foo if 'f['Y:Bar] := 'f['X:Bar] /\ 'g['Y:Bar,'a.Foo] = 'a.Foo [ none] . eq 'f['X:Foo] = 'g['a.Foo,'X:Foo] [none] . ceq 'f['X:Foo] = 'a.Bar if 'g['a.Foo,'Y:Foo] := 'X:Foo [none] . endfm . rewrites: 0 result FModule: fmod 'FOO is including 'MACHINE-INT . sorts 'Bar ; 'Foo . subsort 'Foo < 'Bar . op 'f : 'Foo -> 'Bar [none] . op 'g : '`[Bar`] -> '`[Bar`] [none] . cmb 'X:Bar : 'Foo if 'f['Y:Bar] := 'f['X:Bar] /\ 'g['Y:Bar,'a.Foo] = 'a.Foo [ none] . eq 'f['X:Foo] = 'g['a.Foo,'X:Foo] [none] . ceq 'f['X:Foo] = 'a.Bar if 'g['a.Foo,'Y:Foo] := 'X:Foo [none] . endfm ========================================== reduce in META-MODULE : fmod 'FOO is including 'MACHINE-INT . sorts 'Bar ; 'Foo . subsort 'Foo < 'Bar . op 'f : 'Foo -> 'Bar [none] . op 'g : '`[Bar`] -> '`[Bar`] [none] . none eq 'f['X:Foo] = 'g['a.Foo,'X:Foo] [none] . endfm . rewrites: 0 result FModule: fmod 'FOO is including 'MACHINE-INT . sorts 'Bar ; 'Foo . subsort 'Foo < 'Bar . op 'f : 'Foo -> 'Bar [none] . op 'g : '`[Bar`] -> '`[Bar`] [none] . none eq 'f['X:Foo] = 'g['a.Foo,'X:Foo] [none] . endfm Maude> Bye. Maude-2.7/tests/Meta/metaFrewrite.maude0000644000147300135640000000170410025701604015046 00000000000000set show timing off . set show advisories off . fmod TEST is pr META-LEVEL . op m : -> Module . eq m = (mod 'FAIR is protecting 'INT . sorts 'Foo . none op 'i : 'Int -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [none] . none none rl 'i['M:NzInt] => 'i['_-_['M:NzInt, 's_['0.Nat]]] [none] . rl 'f['X:Foo, 'i['0.Nat]] => 'X:Foo [none] . endm) . op t : -> Term . eq t = 'f['f['i['s_^2['0.Nat]], 'i['s_['0.Nat]]], 'f['i['s_^3['0.Nat]], 'i['s_^2['0.Nat]]]] . endfm red metaFrewrite(m, t, 1, 1) . red metaFrewrite(m, t, 2, 1) . red metaFrewrite(m, t, 3, 1) . red metaFrewrite(m, t, 4, 1) . red metaFrewrite(m, t, 5, 1) . red metaFrewrite(m, t, 6, 1) . red metaFrewrite(m, t, 7, 1) . red metaFrewrite(m, t, 8, 1) . red metaFrewrite(m, t, 9, 1) . red metaFrewrite(m, t, 10, 1) . red metaFrewrite(m, t, 11, 1) . red metaFrewrite(m, t, unbounded, 1) . *** shouldn't work red metaFrewrite(m, t, 0, 1) . red metaFrewrite(m, t, 1, 0) . Maude-2.7/tests/Meta/metaApply.maude0000644000147300135640000001734010025701635014353 00000000000000set show timing off . set show advisories off . *** *** Test the metaApply() descent function. *** fmod TEST is pr META-LEVEL . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [label('k)] . endm) . endfm red metaApply(m, 'a.Foo, 'k, none, 0) . red metaApply(m, 'a.Foo, 'k, none, 1) . red metaApply(m, 'a.Foo, 'k, none, unbounded) . red metaApply(m, 'a.Foo, 'k, none, 10000000000000000000000000000) . fmod TEST2 is pr META-LEVEL . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm) . endfm red metaApply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0) . red metaApply(m, 'f['a.Foo, 'b.Foo], 'k, none, 1) . red metaApply(m, 'f['a.Foo, 'b.Foo], 'k, none, 2) . red metaApply(m, 'f['a.Foo, 'b.Foo], 'k, none, 10000000000000000000000000000) . *** Testing substitutions fmod TEST3 is pr META-LEVEL . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm) . endfm red metaApply(m, 'f['a.Foo, 'b.Foo], 'k, 'Y:Foo <- 'b.Foo, 0) . red metaApply(m, 'f['a.Foo, 'b.Foo], 'k, 'Y:Foo <- 'b.Foo, 1) . red metaApply(m, 'f['b.Foo, 'b.Foo], 'k, 'X:Foo <- 'b.Foo, 0) . red metaApply(m, 'f['b.Foo, 'b.Foo], 'k, 'X:Foo <- 'b.Foo, 1) . red metaApply(m, 'f['b.Foo, 'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 0) . red metaApply(m, 'f['b.Foo, 'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 1) . *** Testing conditional fmod TEST4 is pr META-LEVEL . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [comm] . none none crl 'f['Y:Foo, 'Y:Foo] => 'X:Foo if 'X:Foo := 'f['Y:Foo, 'a.Foo] [label('k)] . endm) . endfm red metaApply(m, 'f['b.Foo, 'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 0) . red metaApply(m, 'f['b.Foo, 'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 1) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none crl 'f['X:Foo, 'Y:Foo] => 'Z:Foo if 'Q:Foo := 'g['X:Foo, 'Y:Foo] /\ 'g['Z:Foo, 'A:Foo] := 'Q:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, 'A:Foo <- 'b.Foo, 0) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none crl 'f['X:Foo, 'Y:Foo] => 'Z:Foo if 'Q:Foo := 'g['X:Foo, 'Y:Foo] /\ 'g['Z:Foo, 'A:Foo] := 'Q:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, 'A:Foo <- 'b.Foo, 1) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none crl 'f['X:Foo, 'Y:Foo] => 'Z:Foo if 'Q:Foo := 'g['X:Foo, 'Y:Foo] /\ 'g['Z:Foo, 'A:Foo] := 'Q:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, 'A:Foo <- 'b.Foo, 2) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, none, 0) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, none, 1) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, none, 2) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, none, 3) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, none, 4) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, none, 5) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo, 'c.Foo], 'k, none, 6) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . rl 'a.Foo => 'c.Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo], 'k, none, 0) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . rl 'a.Foo => 'c.Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo], 'k, none, 1) . red in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . rl 'a.Foo => 'c.Foo [label('k)] . endm, 'f['a.Foo, 'b.Foo], 'k, none, 2) . Maude-2.7/tests/Meta/metaMatch0000755000147300135640000000034010511605036013221 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaMatch.maude -no-banner -no-advise \ > metaMatch.out 2>&1 diff $srcdir/metaMatch.expected metaMatch.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaMetadata.maude0000644000147300135640000000225610155720000014775 00000000000000set show timing off . set show advisories off . set protect BOOL off . fmod FOO is sort Foo . ops a b : -> Foo [metadata "bla bla"] . eq a = b [metadata "hmm"] . endfm show mod . show all . red in META-LEVEL : upModule('FOO, false) . fmod FOO2 is sort Foo . ops a b : -> Foo [metadata bla] . eq a = b [metadata hmm] . endfm show mod . show all . red in META-LEVEL : upModule('FOO, false) . fmod FOO3 is inc FOO . endfm show all . red in META-LEVEL : upModule('FOO3, true) . fmod FOO4 is sort Foo . op f : ??? -> Foo [poly (1) metadata "bla bla"] . endfm show mod . show all . red in META-LEVEL : upModule('FOO4, false) . fmod FOO5 is inc FOO4 . endfm show all . red in META-LEVEL : upModule('FOO5, true) . red in META-LEVEL : metaReduce( fmod 'FOO is protecting 'BOOL . sorts 'Foo . none op 'a : nil -> 'Foo [metadata("bla bla")] . op 'b : nil -> 'Foo [metadata("bla bla")] . none eq 'a.Foo = 'b.Foo [metadata("hmm")] . endfm, 'a.Foo) . fmod BAR is sorts Foo Bar . subsort Foo < Bar . op f : Foo -> Foo [metadata "fooy"] . op f : Bar -> Bar [metadata "fubar"] . endfm show mod . show all . red in META-LEVEL : upModule('BAR, false) . Maude-2.7/tests/Meta/metaPrintAttr0000755000147300135640000000036011064254401014116 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaPrintAttr.maude -no-banner -no-advise \ > metaPrintAttr.out 2>&1 diff $srcdir/metaPrintAttr.expected metaPrintAttr.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaXmatch.expected0000644000147300135640000003731210025726011015214 00000000000000Maude> ========================================== reduce in META-LEVEL : metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_+_['Y:Nat,'Z:Nat] := 'X:Nat, 1, 2, 0) . rewrites: 2 result MatchPair: { 'X:Nat <- '_+_['b.Nat,'c.Nat] ; 'Y:Nat <- 'c.Nat ; 'Z:Nat <- 'b.Nat,'_*_['a.Nat,[]]} ========================================== reduce in META-LEVEL : metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_+_['Y:Nat,'Z:Nat] := 'X:Nat, 1, 2, 1) . rewrites: 2 result MatchPair: { 'X:Nat <- '_+_['b.Nat,'c.Nat] ; 'Y:Nat <- 'b.Nat ; 'Z:Nat <- 'c.Nat,'_*_['a.Nat,[]]} ========================================== reduce in META-LEVEL : metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_+_['Y:Nat,'Z:Nat] := 'X:Nat, 1, 2, 2) . rewrites: 2 result MatchPair?: (noMatch).MatchPair? ========================================== reduce in META-LEVEL : metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_+_['Y:Nat,'Z:Nat] := 'X:Nat, 1, unbounded, 0) . rewrites: 2 result MatchPair: { 'X:Nat <- '_+_['b.Nat,'c.Nat] ; 'Y:Nat <- 'c.Nat ; 'Z:Nat <- 'b.Nat,'_*_['a.Nat,[]]} ========================================== reduce in META-LEVEL : metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_+_['Y:Nat,'Z:Nat] := 'X:Nat, 1, unbounded, 1) . rewrites: 2 result MatchPair: { 'X:Nat <- '_+_['b.Nat,'c.Nat] ; 'Y:Nat <- 'b.Nat ; 'Z:Nat <- 'c.Nat,'_*_['a.Nat,[]]} ========================================== reduce in META-LEVEL : metaXmatch(['SEARCH-TEST], 'X:Nat, '_*_['a.Nat,'_+_[ 'b.Nat,'c.Nat]], '_+_['Y:Nat,'Z:Nat] := 'X:Nat, 1, unbounded, 2) . rewrites: 2 result MatchPair?: (noMatch).MatchPair? ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, 100, 0) . rewrites: 1 result MatchPair: { 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo ; 'Z:Foo <- 'f['c.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, unbounded, 0) . rewrites: 1 result MatchPair: { 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo ; 'Z:Foo <- 'f['c.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, unbounded, 1) . rewrites: 1 result MatchPair: { 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo ; 'Z:Foo <- 'f['c.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, unbounded, 2) . rewrites: 1 result MatchPair: { 'X:Foo <- 'c.Foo ; 'Y:Foo <- 'c.Foo ; 'Z:Foo <- 'f['a.Foo,'b.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'g['f['X:Foo,'Y:Foo],'Z:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, unbounded, 3) . rewrites: 1 result MatchPair?: (noMatch).MatchPair? ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, 100, 0) . rewrites: 1 result MatchPair: { 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo,'g['f['c.Foo,'c.Foo],[]]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, 100, 1) . rewrites: 1 result MatchPair: { 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo,'g['f['c.Foo,'c.Foo],[]]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, 100, 2) . rewrites: 1 result MatchPair: { 'X:Foo <- 'c.Foo ; 'Y:Foo <- 'c.Foo,'g['f['a.Foo,'b.Foo],[]]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'g['f['a.Foo,'b.Foo],'f['c.Foo,'c.Foo]], nil, 0, 100, 3) . rewrites: 1 result MatchPair?: (noMatch).MatchPair? ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 0) . rewrites: 1 result MatchPair: { 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'f['b.Foo,'c.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 1) . rewrites: 1 result MatchPair: { 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'f['a.Foo,'c.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 2) . rewrites: 1 result MatchPair: { 'X:Foo <- 'c.Foo ; 'Y:Foo <- 'f['a.Foo,'b.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 3) . rewrites: 1 result MatchPair: { 'X:Foo <- 'f['a.Foo,'b.Foo] ; 'Y:Foo <- 'f['c.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 4) . rewrites: 1 result MatchPair: { 'X:Foo <- 'f['a.Foo,'c.Foo] ; 'Y:Foo <- 'f['b.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 5) . rewrites: 1 result MatchPair: { 'X:Foo <- 'f['b.Foo,'c.Foo] ; 'Y:Foo <- 'f['a.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 4) . rewrites: 1 result MatchPair: { 'X:Foo <- 'f['a.Foo,'c.Foo] ; 'Y:Foo <- 'f['b.Foo,'c.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 6) . rewrites: 1 result MatchPair: { 'X:Foo <- 'f['c.Foo,'c.Foo] ; 'Y:Foo <- 'f['a.Foo,'b.Foo],[]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 7) . rewrites: 1 result MatchPair: { 'X:Foo <- 'f['a.Foo,'b.Foo,'c.Foo] ; 'Y:Foo <- 'c.Foo,[]} Maude> ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 10) . rewrites: 1 result MatchPair: { 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'f['c.Foo,'c.Foo],'f['a.Foo,[]]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 14) . rewrites: 1 result MatchPair: { 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'f['c.Foo,'c.Foo],'f['b.Foo,[]]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 17) . rewrites: 1 result MatchPair: { 'X:Foo <- 'f['c.Foo,'c.Foo] ; 'Y:Foo <- 'a.Foo,'f['b.Foo,[]]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 20) . rewrites: 1 result MatchPair: { 'X:Foo <- 'c.Foo ; 'Y:Foo <- 'f['a.Foo,'b.Foo],'f['c.Foo,[]]} ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 31) . rewrites: 1 result MatchPair?: (noMatch).MatchPair? ========================================== reduce in META-LEVEL : metaXmatch(fmod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . ((op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none endfm, 'f['X:Foo,'Y:Foo], 'f['a.Foo,'b.Foo,'c.Foo,'c.Foo], nil, 0, 100, 30) . rewrites: 1 result MatchPair: { 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo,'f['f['c.Foo,'c.Foo],[]]} ========================================== xmatch in FOO : f(X:Foo, Y:Foo) <=? f(a, b, c, c) . Solution 1 Matched portion = (whole) X:Foo --> a Y:Foo --> f(b, c, c) Solution 2 Matched portion = (whole) X:Foo --> b Y:Foo --> f(a, c, c) Solution 3 Matched portion = (whole) X:Foo --> c Y:Foo --> f(a, b, c) Solution 4 Matched portion = (whole) X:Foo --> f(a, b) Y:Foo --> f(c, c) Solution 5 Matched portion = (whole) X:Foo --> f(a, c) Y:Foo --> f(b, c) Solution 6 Matched portion = (whole) X:Foo --> f(b, c) Y:Foo --> f(a, c) Solution 7 Matched portion = (whole) X:Foo --> f(c, c) Y:Foo --> f(a, b) Solution 8 Matched portion = (whole) X:Foo --> f(a, b, c) Y:Foo --> c Solution 9 Matched portion = (whole) X:Foo --> f(a, c, c) Y:Foo --> b Solution 10 Matched portion = (whole) X:Foo --> f(b, c, c) Y:Foo --> a Solution 11 Matched portion = f(b, c, c) X:Foo --> b Y:Foo --> f(c, c) Solution 12 Matched portion = f(b, c, c) X:Foo --> c Y:Foo --> f(b, c) Solution 13 Matched portion = f(b, c, c) X:Foo --> f(b, c) Y:Foo --> c Solution 14 Matched portion = f(b, c, c) X:Foo --> f(c, c) Y:Foo --> b Solution 15 Matched portion = f(a, c, c) X:Foo --> a Y:Foo --> f(c, c) Solution 16 Matched portion = f(a, c, c) X:Foo --> c Y:Foo --> f(a, c) Solution 17 Matched portion = f(a, c, c) X:Foo --> f(a, c) Y:Foo --> c Solution 18 Matched portion = f(a, c, c) X:Foo --> f(c, c) Y:Foo --> a Solution 19 Matched portion = f(a, b, c) X:Foo --> a Y:Foo --> f(b, c) Solution 20 Matched portion = f(a, b, c) X:Foo --> b Y:Foo --> f(a, c) Solution 21 Matched portion = f(a, b, c) X:Foo --> c Y:Foo --> f(a, b) Solution 22 Matched portion = f(a, b, c) X:Foo --> f(a, b) Y:Foo --> c Solution 23 Matched portion = f(a, b, c) X:Foo --> f(a, c) Y:Foo --> b Solution 24 Matched portion = f(a, b, c) X:Foo --> f(b, c) Y:Foo --> a Solution 25 Matched portion = f(c, c) X:Foo --> c Y:Foo --> c Solution 26 Matched portion = f(b, c) X:Foo --> b Y:Foo --> c Solution 27 Matched portion = f(b, c) X:Foo --> c Y:Foo --> b Solution 28 Matched portion = f(a, c) X:Foo --> a Y:Foo --> c Solution 29 Matched portion = f(a, c) X:Foo --> c Y:Foo --> a Solution 30 Matched portion = f(a, b) X:Foo --> a Y:Foo --> b Solution 31 Matched portion = f(a, b) X:Foo --> b Y:Foo --> a Maude> Bye. Maude-2.7/tests/Meta/metaPrettyPrint0000755000147300135640000000037010511605205014472 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaPrettyPrint.maude -no-banner -no-advise \ > metaPrettyPrint.out 2>&1 diff $srcdir/metaPrettyPrint.expected metaPrettyPrint.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaPolymorph.maude0000644000147300135640000000646610026157731015271 00000000000000set show timing off . set show advisories off . *** EqualitySymbol red in META-LEVEL : metaReduce( (fmod 'FOO is including 'STRING . sorts 'Value . none op 'tt : nil -> 'Value [none] . op 'ff : nil -> 'Value [none] . op 'eq : 'Universal 'Universal -> 'Value [poly (1 2) special(id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'tt.Value) term-hook('notEqualTerm, 'ff.Value))] . none none endfm) , 'eq['"a".String, '"a".String]) . red in META-LEVEL : metaReduce( (fmod 'FOO is including 'STRING . sorts 'Value . none op 'tt : nil -> 'Value [none] . op 'ff : nil -> 'Value [none] . op 'eq : 'Universal 'Universal -> 'Value [poly (1 2) special(id-hook('EqualitySymbol, nil) term-hook('equalTerm, 'tt.Value) term-hook('notEqualTerm, 'ff.Value))] . none none endfm) , 'eq['"a".String, '"b".String]) . red in META-LEVEL : metaReduce( (fmod 'FOO is including 'STRING . sorts 'Value . none op 'tt : nil -> 'Value [none] . op 'ff : nil -> 'Value [none] . op '? : 'Value 'Universal 'Universal -> 'Universal [poly (2 3 0) special(id-hook('BranchSymbol, nil) term-hook('1, 'tt.Value) term-hook('2, 'ff.Value))] . none none endfm) , '?['tt.Value, '"a".String, '"b".String]) . red in META-LEVEL : metaReduce( (fmod 'FOO is including 'STRING . sorts 'Value . none op 'tt : nil -> 'Value [none] . op 'ff : nil -> 'Value [none] . op '? : 'Value 'Universal 'Universal -> 'Universal [poly (2 3 0) special(id-hook('BranchSymbol, nil) term-hook('1, 'tt.Value) term-hook('2, 'ff.Value))] . none none endfm) , '?['ff.Value, '"a".String, '"b".String]) . red in META-LEVEL : metaReduce( (fmod 'FOO is including 'STRING . including 'META-LEVEL . sorts none . none op '^ : 'Universal -> 'Term [poly (1) special(id-hook('MetaLevelOpSymbol, 'metaUpTerm) op-hook('shareWith, 'metaReduce, 'Module 'Term, 'ResultPair))] . none none endfm) , '^['"a".String]) . red in META-LEVEL : metaReduce( (fmod 'FOO is including 'STRING . including 'META-LEVEL . sorts none . none op '! : 'Term 'Universal -> 'Universal [poly (2 0) special(id-hook('MetaLevelOpSymbol, 'metaDownTerm) op-hook('shareWith, 'metaReduce, 'Module 'Term, 'ResultPair))] . none none endfm) , '![''"a".String.Constant, '"b".String]) . red in META-LEVEL : metaReduce( (fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none op '1 : nil -> 'Foo [none] . op 'f : 'Universal 'Foo -> 'Universal [poly (1 0) right-id('1.Foo)] . none none endfm) , 'f['true.Bool, '1.Foo]) . red in META-LEVEL : metaReduce( (fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none op '1 : nil -> 'Foo [none] . op 'f : 'Universal 'Foo -> 'Universal [poly (1 0) right-id('1.Foo)] . op 'g : 'Univeral -> 'Universal [poly (1 0)] . none eq 'g['f['true.Bool, 'X:Foo]] = 'false.Bool [none] . endfm) , 'g['true.Bool]) . red in META-LEVEL : metaReduce( (fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none op '1 : nil -> 'Universal [poly (0)] . none none endfm) , '1.Bool) . red in META-LEVEL : metaReduce( (fmod 'POLY-ID3 is including 'BOOL . sorts 'Foo . none op '1 : nil -> 'Universal [poly (0)] . none none endfm) , '1.Foo) . Maude-2.7/tests/Meta/metaXapply.expected0000644000147300135640000001001510721147402015240 00000000000000Maude> ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, 100, 0) . rewrites: 3 result Result4Tuple: {'a.Foo,'Foo, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo,[]} ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, 100, 1) . rewrites: 3 result Result4Tuple: {'b.Foo,'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo,[]} ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, 100, 2) . rewrites: 3 result Result4Tuple: {'f['b.Foo,'c.Foo],'Foo,none,'f['b.Foo,[]]} ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, 100, 3) . rewrites: 2 result Result4Tuple?: (failure).Result4Tuple? ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, unbounded, 0) . rewrites: 3 result Result4Tuple: {'a.Foo,'Foo, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo,[]} ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, unbounded, 1) . rewrites: 3 result Result4Tuple: {'b.Foo,'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo,[]} ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, unbounded, 2) . rewrites: 3 result Result4Tuple: {'f['b.Foo,'c.Foo],'Foo,none,'f['b.Foo,[]]} ========================================== reduce in TEST : metaXapply(m, 'f['a.Foo,'b.Foo], 'k, none, 0, unbounded, 3) . rewrites: 2 result Result4Tuple?: (failure).Result4Tuple? ========================================== reduce in TEST2 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'k, none, 0, 100, 0) . rewrites: 3 result Result4Tuple: {'g['c.Foo,'f['a.Foo,'b.Foo]],'Foo,none,'g['f['a.Foo, 'b.Foo],[]]} ========================================== reduce in TEST2 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'k, none, 0, 100, 1) . rewrites: 3 result Result4Tuple: {'g['a.Foo,'a.Foo],'Foo, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo,'g['a.Foo,[]]} ========================================== reduce in TEST2 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'k, none, 0, 100, 2) . rewrites: 3 result Result4Tuple: {'g['a.Foo,'b.Foo],'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo,'g['a.Foo,[]]} ========================================== reduce in TEST2 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'k, none, 0, 100, 3) . rewrites: 3 result Result4Tuple: {'g['a.Foo,'f['b.Foo,'c.Foo]],'Foo,none,'g['a.Foo,'f[ 'b.Foo,[]]]} ========================================== reduce in TEST2 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'k, none, 0, 100, 4) . rewrites: 2 result Result4Tuple?: (failure).Result4Tuple? ========================================== reduce in TEST3 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'l, none, 0, 100, 0) . rewrites: 3 result Result4Tuple: {'g['f['c.Foo,'c.Foo],'f['a.Foo,'b.Foo]],'Foo,none,'g['f[ 'a.Foo,'b.Foo],[]]} ========================================== reduce in TEST3 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'l, none, 0, 100, 1) . rewrites: 3 result Result4Tuple: {'g['a.Foo,'f['b.Foo,'c.Foo,'c.Foo]],'Foo,none,'g['a.Foo, 'f['b.Foo,[]]]} ========================================== reduce in TEST3 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'l, none, 0, 100, 0) . rewrites: 3 result Result4Tuple: {'g['f['c.Foo,'c.Foo],'f['a.Foo,'b.Foo]],'Foo,none,'g['f[ 'a.Foo,'b.Foo],[]]} ========================================== reduce in TEST3 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'l, none, 0, 100, 2) . rewrites: 2 result Result4Tuple?: (failure).Result4Tuple? ========================================== reduce in TEST3 : metaXapply(m, 'g['f['a.Foo,'b.Foo],'a.Foo], 'l, none, 0, 100, 0) . rewrites: 3 result Result4Tuple: {'g['f['c.Foo,'c.Foo],'f['a.Foo,'b.Foo]],'Foo,none,'g['f[ 'a.Foo,'b.Foo],[]]} ========================================== reduce in ALL-ONE-STEP-REWRITES : findAllRews(m, 'f['a.Foo,'b.Foo], 'k) . rewrites: 27 result TermSet: 'a.Foo | 'b.Foo | ('f['b.Foo,'c.Foo]) Maude> Bye. Maude-2.7/tests/Meta/metaUp.expected0000644000147300135640000004457211370603077014374 00000000000000Maude> ========================================== reduce in META-LEVEL : upEqs('ATTR-TEST, true) . rewrites: 1 result EquationSet: eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool,'B:Bool]]] [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq 'f['X:Foo,'a.Foo] = 'X:Foo [label('first) metadata( "this is the first equation")] . eq 'f['b.Foo,'Y:Foo] = 'b.Foo [metadata("this is the second equation")] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . ========================================== reduce in META-LEVEL : upRls('ATTR-TEST, true) . rewrites: 1 result Rule: rl 'a.Foo => 'b.Foo [label('r1)] . ========================================== reduce in META-LEVEL : upMbs('ATTR-TEST, true) . rewrites: 1 result MembAx: mb 'a.Foo : 'Foo [label('baz) metadata("this is an mb")] . ========================================== reduce in META-LEVEL : upEqs('ATTR-TEST, false) . rewrites: 1 result EquationSet: eq 'f['X:Foo,'a.Foo] = 'X:Foo [label('first) metadata( "this is the first equation")] . eq 'f['b.Foo,'Y:Foo] = 'b.Foo [metadata("this is the second equation")] . ========================================== reduce in META-LEVEL : upRls('ATTR-TEST, false) . rewrites: 1 result Rule: rl 'a.Foo => 'b.Foo [label('r1)] . ========================================== reduce in META-LEVEL : upMbs('ATTR-TEST, false) . rewrites: 1 result MembAx: mb 'a.Foo : 'Foo [label('baz) metadata("this is an mb")] . ========================================== reduce in META-LEVEL : upRls('BOOL, true) . rewrites: 1 result RuleSet: (none).RuleSet ========================================== reduce in META-LEVEL : upRls('KNIGHT, true) . rewrites: 1 result RuleSet: rl 'knight['0.Zero] => '`[_`,_`]['s_['0.Zero],'s_['0.Zero]] [ none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_+_['X:Int,'s_['0.Zero]], '_+_['Y:Int,'s_^2['0.Zero]]] [none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_+_['X:Int,'s_['0.Zero]], '_-_['Y:Int,'s_^2['0.Zero]]] [none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_+_['X:Int,'s_^2['0.Zero]], '_+_['Y:Int,'s_['0.Zero]]] [none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_+_['X:Int,'s_^2['0.Zero]], '_-_['Y:Int,'s_['0.Zero]]] [none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_-_['X:Int,'s_['0.Zero]], '_+_['Y:Int,'s_^2['0.Zero]]] [none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_-_['X:Int,'s_['0.Zero]], '_-_['Y:Int,'s_^2['0.Zero]]] [none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_-_['X:Int,'s_^2['0.Zero]], '_+_['Y:Int,'s_['0.Zero]]] [none] . rl 'move_['`[_`,_`]['X:Int,'Y:Int]] => '`[_`,_`]['_-_['X:Int,'s_^2['0.Zero]], '_-_['Y:Int,'s_['0.Zero]]] [none] . crl 'knight['N:Int] => '__['L:List,'__['P:Pair,'Q:Pair]] if '_>_['N:Int, '0.Zero] = 'true.Bool /\ 'knight['_-_['N:Int,'s_['0.Zero]]] => '__['L:List, 'P:Pair] /\ 'move_['P:Pair] => 'Q:Pair /\ 'legal['Q:Pair] = 'true.Bool /\ 'not_['contains['__['L:List,'P:Pair],'Q:Pair]] = 'true.Bool [none] . ========================================== rewrite in INTROSPECTION : rules . rewrites: 2 result Rule: rl 'rules.RuleSet => 'upRls[''INTROSPECTION.Sort,'false.Bool] [ none] . ========================================== rewrite in SELF-REFLECTION : myRules . rewrites: 2 result RuleSet: rl 'allRules.RuleSet => 'upRls[''SELF-REFLECTION.Sort, 'true.Bool] [none] . rl 'myRules.RuleSet => 'upRls[''SELF-REFLECTION.Sort,'false.Bool] [none] . ========================================== rewrite in SELF-REFLECTION : allRules . rewrites: 2 result RuleSet: rl 'allRules.RuleSet => 'upRls[''SELF-REFLECTION.Sort, 'true.Bool] [none] . rl 'myRules.RuleSet => 'upRls[''SELF-REFLECTION.Sort,'false.Bool] [none] . rl 'rules.RuleSet => 'upRls[''INTROSPECTION.Sort,'false.Bool] [none] . ========================================== reduce in META-LEVEL : upEqs('META-LEVEL, true) . rewrites: 1 result EquationSet: eq '$card['none.EmptyTypeSet,'C:Nat] = 'C:Nat [none] . eq '$card['_;_['E:Qid,'S:QidSet],'C:Nat] = '$card['S:QidSet,'_+_['C:Nat,'s_[ '0.Zero]]] [owise] . eq '$card['_;_['N:NeQidSet,'N:NeQidSet,'S:QidSet],'C:Nat] = '$card['_;_[ 'N:NeQidSet,'S:QidSet],'C:Nat] [none] . eq '$diff['none.EmptyTypeSet,'S':QidSet,'A:QidSet] = 'A:QidSet [none] . eq '$diff['_;_['E:Qid,'S:QidSet],'S':QidSet,'A:QidSet] = '$diff['S:QidSet, 'S':QidSet,'if_then_else_fi['_in_['E:Qid,'S':QidSet],'A:QidSet,'_;_['E:Qid, 'A:QidSet]]] [none] . eq '$intersect['none.EmptyTypeSet,'S':QidSet,'A:QidSet] = 'A:QidSet [none] . eq '$intersect['_;_['E:Qid,'S:QidSet],'S':QidSet,'A:QidSet] = '$intersect[ 'S:QidSet,'S':QidSet,'if_then_else_fi['_in_['E:Qid,'S':QidSet],'_;_['E:Qid, 'A:QidSet],'A:QidSet]] [none] . eq '$reverse['nil.NatList,'A:NatList] = 'A:NatList [none] . eq '$reverse['nil.TypeList,'A:QidList] = 'A:QidList [none] . eq '$reverse['__['E:Nat,'L:NatList],'A:NatList] = '$reverse['L:NatList,'__[ 'E:Nat,'A:NatList]] [none] . eq '$reverse['__['E:Qid,'L:QidList],'A:QidList] = '$reverse['L:QidList,'__[ 'E:Qid,'A:QidList]] [none] . eq '$size['nil.NatList,'C:Nat] = 'C:Nat [none] . eq '$size['nil.TypeList,'C:Nat] = 'C:Nat [none] . eq '$size['__['E:Nat,'L:NatList],'C:Nat] = '$size['L:NatList,'_+_['C:Nat,'s_[ '0.Zero]]] [none] . eq '$size['__['E:Qid,'L:QidList],'C:Nat] = '$size['L:QidList,'_+_['C:Nat,'s_[ '0.Zero]]] [none] . eq '_;_['A:Assignment,'A:Assignment] = 'A:Assignment [none] . eq '_;_['N:NeQidSet,'N:NeQidSet] = 'N:NeQidSet [none] . eq '_;_['T:TypeList,'T:TypeList] = 'T:TypeList [none] . eq '_\_['S:QidSet,'N:NeQidSet] = '$diff['S:QidSet,'N:NeQidSet, 'none.EmptyTypeSet] [none] . eq '_\_['S:QidSet,'none.EmptyTypeSet] = 'S:QidSet [none] . eq '__['A:Attr,'A:Attr] = 'A:Attr [none] . eq '__['E:Equation,'E:Equation] = 'E:Equation [none] . eq '__['M:MembAx,'M:MembAx] = 'M:MembAx [none] . eq '__['O:OpDecl,'O:OpDecl] = 'O:OpDecl [none] . eq '__['O:OpMapping,'O:OpMapping] = 'O:OpMapping [none] . eq '__['R:Rule,'R:Rule] = 'R:Rule [none] . eq '__['S:SortMapping,'S:SortMapping] = 'S:SortMapping [none] . eq '__['S:SubsortDecl,'S:SubsortDecl] = 'S:SubsortDecl [none] . eq '_and-then_['false.Bool,'B:`[Bool`]] = 'false.Bool [none] . eq '_and-then_['true.Bool,'B:`[Bool`]] = 'B:`[Bool`] [none] . eq '_and_['A:Bool,'A:Bool] = 'A:Bool [none] . eq '_and_['A:Bool,'_xor_['B:Bool,'C:Bool]] = '_xor_['_and_['A:Bool,'B:Bool], '_and_['A:Bool,'C:Bool]] [none] . eq '_and_['false.Bool,'A:Bool] = 'false.Bool [none] . eq '_and_['true.Bool,'A:Bool] = 'A:Bool [none] . eq '_implies_['A:Bool,'B:Bool] = 'not_['_xor_['A:Bool,'_and_['A:Bool,'B:Bool]]] [none] . eq '_in_['E:Qid,'S:QidSet] = 'false.Bool [owise] . eq '_in_['E:Qid,'_;_['E:Qid,'S:QidSet]] = 'true.Bool [none] . eq '_or-else_['false.Bool,'B:`[Bool`]] = 'B:`[Bool`] [none] . eq '_or-else_['true.Bool,'B:`[Bool`]] = 'true.Bool [none] . eq '_or_['A:Bool,'B:Bool] = '_xor_['_and_['A:Bool,'B:Bool],'_xor_['A:Bool, 'B:Bool]] [none] . eq '_psubset_['S:QidSet,'S':QidSet] = '_and-then_['_=/=_['S:QidSet,'S':QidSet], '_subset_['S:QidSet,'S':QidSet]] [none] . eq '_subset_['none.EmptyTypeSet,'S':QidSet] = 'true.Bool [none] . eq '_subset_['_;_['E:Qid,'S:QidSet],'S':QidSet] = '_and-then_['_in_['E:Qid, 'S':QidSet],'_subset_['S:QidSet,'S':QidSet]] [none] . eq '_xor_['A:Bool,'A:Bool] = 'false.Bool [none] . eq '_xor_['false.Bool,'A:Bool] = 'A:Bool [none] . eq '`[_`]['Q:Qid] = 'th_is_sorts_._____endth['Q:Qid,'including_.['Q:Qid], 'none.EmptyTypeSet,'none.SubsortDeclSet,'none.OpDeclSet,'none.MembAxSet, 'none.EquationSet,'none.RuleSet] [none] . eq 'append['A:NatList,'L:NatList] = '__['A:NatList,'L:NatList] [none] . eq 'append['A:QidList,'L:QidList] = '__['A:QidList,'L:QidList] [none] . eq 'delete['E:Qid,'S:QidSet] = 'S:QidSet [owise] . eq 'delete['E:Qid,'_;_['E:Qid,'S:QidSet]] = 'delete['E:Qid,'S:QidSet] [none] . eq 'front['__['L:NatList,'E:Nat]] = 'L:NatList [none] . eq 'front['__['L:QidList,'E:Qid]] = 'L:QidList [none] . eq 'getContext['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getContext['`{_`,_`}['S:Substitution,'C:Context]] = 'C:Context [none] . eq 'getEqs['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'EQS:EquationSet [none] . eq 'getEqs['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'EQS:EquationSet [none] . eq 'getEqs['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'EQS:EquationSet [none] . eq 'getEqs['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'EQS:EquationSet [none] . eq 'getFrom['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'ME:ModuleExpression [none] . eq 'getImports['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'IL:ImportList [none] . eq 'getImports['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'IL:ImportList [none] . eq 'getImports['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'IL:ImportList [none] . eq 'getImports['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'IL:ImportList [none] . eq 'getMbs['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'MAS:MembAxSet [none] . eq 'getMbs['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'MAS:MembAxSet [none] . eq 'getName['C:Constant] = 'qid['substr['string['C:Constant],'0.Zero,'rfind[ 'string['C:Constant],'".".Char,'length['string['C:Constant]]]]] [none] . eq 'getName['V:Variable] = 'qid['substr['string['V:Variable],'0.Zero,'rfind[ 'string['V:Variable],'":".Char,'length['string['V:Variable]]]]] [none] . eq 'getName['fmod_is_sorts_.____endfm['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['fmod_is_sorts_.____endfm['_`{_`}['Q:Qid,'PDL:ParameterDeclList], 'IL:ImportList,'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet, 'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'Q:Qid [none] . eq 'getName['mod_is_sorts_._____endm['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['mod_is_sorts_._____endm['_`{_`}['Q:Qid,'PDL:ParameterDeclList], 'IL:ImportList,'SS:SortSet,'SSDS:SubsortDeclSet,'OPDS:OpDeclSet, 'MAS:MembAxSet,'EQS:EquationSet,'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'Q:Qid [none] . eq 'getName['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'Q:Qid [ none] . eq 'getOpMappings['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'OMS:OpMappingSet [none] . eq 'getOps['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'OPDS:OpDeclSet [none] . eq 'getOps['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'OPDS:OpDeclSet [none] . eq 'getRls['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'none.RuleSet [none] . eq 'getRls['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'none.RuleSet [none] . eq 'getRls['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'RLS:RuleSet [none] . eq 'getRls['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'RLS:RuleSet [none] . eq 'getSortMappings['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'SMS:SortMappingSet [none] . eq 'getSorts['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SS:SortSet [none] . eq 'getSorts['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SS:SortSet [none] . eq 'getSorts['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SS:SortSet [none] . eq 'getSorts['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SS:SortSet [none] . eq 'getSubsorts['fmod_is_sorts_.____endfm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['fth_is_sorts_.____endfth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['mod_is_sorts_._____endm['H:Header,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubsorts['th_is_sorts_._____endth['Q:Qid,'IL:ImportList,'SS:SortSet, 'SSDS:SubsortDeclSet,'OPDS:OpDeclSet,'MAS:MembAxSet,'EQS:EquationSet, 'RLS:RuleSet]] = 'SSDS:SubsortDeclSet [none] . eq 'getSubstitution['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution, 'C:Context]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'S:Substitution [none] . eq 'getSubstitution['`{_`,_`}['S:Substitution,'C:Context]] = 'S:Substitution [ none] . eq 'getTerm['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Term [none] . eq 'getTerm['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Term [none] . eq 'getTerm['`{_`,_`}['T:Term,'T:Type]] = 'T:Term [none] . eq 'getTo['view_from_to_is__endv['Q:Qid,'ME:ModuleExpression, 'ME':ModuleExpression,'SMS:SortMappingSet,'OMS:OpMappingSet]] = 'ME':ModuleExpression [none] . eq 'getType['C:Constant] = 'qid['substr['string['C:Constant],'_+_['s_['0.Zero], 'rfind['string['C:Constant],'".".Char,'length['string['C:Constant]]]], 'length['string['C:Constant]]]] [none] . eq 'getType['V:Variable] = 'qid['substr['string['V:Variable],'_+_['s_['0.Zero], 'rfind['string['V:Variable],'":".Char,'length['string['V:Variable]]]], 'length['string['V:Variable]]]] [none] . eq 'getType['`{_`,_`,_`,_`}['T:Term,'T:Type,'S:Substitution,'C:Context]] = 'T:Type [none] . eq 'getType['`{_`,_`,_`}['T:Term,'T:Type,'S:Substitution]] = 'T:Type [none] . eq 'getType['`{_`,_`}['T:Term,'T:Type]] = 'T:Type [none] . eq 'head['__['E:Nat,'L:NatList]] = 'E:Nat [none] . eq 'head['__['E:Qid,'L:QidList]] = 'E:Qid [none] . eq 'insert['E:Qid,'S:QidSet] = '_;_['E:Qid,'S:QidSet] [none] . eq 'intersection['S:QidSet,'N:NeQidSet] = '$intersect['S:QidSet,'N:NeQidSet, 'none.EmptyTypeSet] [none] . eq 'intersection['S:QidSet,'none.EmptyTypeSet] = 'none.EmptyTypeSet [none] . eq 'last['__['L:NatList,'E:Nat]] = 'E:Nat [none] . eq 'last['__['L:QidList,'E:Qid]] = 'E:Qid [none] . eq 'metaPrettyPrint['M:Module,'T:Term] = 'metaPrettyPrint['M:Module,'T:Term, '__['mixfix.PrintOption,'__['flat.PrintOption,'__['format.PrintOption,'__[ 'number.PrintOption,'rat.PrintOption]]]]] [none] . eq 'not_['A:Bool] = '_xor_['true.Bool,'A:Bool] [none] . eq 'occurs['E:Nat,'nil.NatList] = 'false.Bool [none] . eq 'occurs['E:Nat,'__['E':Nat,'L:NatList]] = 'if_then_else_fi['_==_['E:Nat, 'E':Nat],'true.Bool,'occurs['E:Nat,'L:NatList]] [none] . eq 'occurs['E:Qid,'nil.TypeList] = 'false.Bool [none] . eq 'occurs['E:Qid,'__['E':Qid,'L:QidList]] = 'if_then_else_fi['_==_['E:Qid, 'E':Qid],'true.Bool,'occurs['E:Qid,'L:QidList]] [none] . eq 'reverse['L:NatList] = '$reverse['L:NatList,'nil.NatList] [none] . eq 'reverse['L:QidList] = '$reverse['L:QidList,'nil.TypeList] [none] . eq 'size['L:NatList] = '$size['L:NatList,'0.Zero] [none] . eq 'size['L:QidList] = '$size['L:QidList,'0.Zero] [none] . eq 'tail['__['E:Nat,'L:NatList]] = 'L:NatList [none] . eq 'tail['__['E:Qid,'L:QidList]] = 'L:QidList [none] . eq 'union['S:QidSet,'S':QidSet] = '_;_['S:QidSet,'S':QidSet] [none] . eq '|_|['S:QidSet] = '$card['S:QidSet,'0.Zero] [none] . Maude> Bye. Maude-2.7/tests/Meta/metaSearch0000755000147300135640000000034410511605304013374 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaSearch.maude -no-banner -no-advise \ > metaSearch.out 2>&1 diff $srcdir/metaSearch.expected metaSearch.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaSort.maude0000644000147300135640000001061110154226762014215 00000000000000set show timing off . set show advisories off . select META-LEVEL . red sortLeq( fmod 'FOO is nil sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'NzNat, 'Int) . red sortLeq( fmod 'FOO is nil sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Int, 'NzInt) . red sameKind( fmod 'FOO is nil sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, '`[Int`], 'NzInt) . red sameKind( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, '`[Int`], 'Bool) . red leastSort( fmod 'FOO is protecting 'FLOAT . sorts none . none none none none endfm, 'pi.Float) . red completeName( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . none none none endfm, '`[NzInt`]) . red completeName( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . none none none endfm, '`[NzInt`,Nat`]) . red lesserSorts( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Int) . red lesserSorts( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'NzNat) . red lesserSorts( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat) . red glbSorts( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat, 'NzInt) . red glbSorts( fmod 'FOO is protecting 'BOOL . sorts 'NzNat ; 'Nat ; 'NzInt ; 'Int . subsort 'NzNat < 'Nat . subsort 'NzNat < 'NzInt . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat, 'Int) . red glbSorts( fmod 'FOO is protecting 'BOOL . sorts 'Nat ; 'NzInt ; 'Int . subsort 'Nat < 'Int . subsort 'NzInt < 'Int . none none none endfm, 'Nat, 'NzInt) . red getKind(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'Foo) . red getKind(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'Bar) . red getKind(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, '`[Bar`]) . red getKinds(fmod 'FOO is nil sorts none . none none none none endfm) . red getKinds(fmod 'FOO is protecting 'BOOL . sorts none . none none none none endfm) . red getKinds(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm) . red maximalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, '`[Qid`]) . red minimalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, '`[Qid`]) . *** These two don't reduce because the 2nd arg should be a kind red maximalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, 'Qid) . red minimalSorts(fmod 'FOO is protecting 'META-LEVEL . sorts none . none none none none endfm, 'Qid) . red maximalAritySet(['RAT], '_+_, 'Nat 'Nat, 'PosRat) . red maximalAritySet(['RAT], '_+_, 'Nat 'Nat, 'Rat) . red maximalAritySet(['RAT], '_/_, 'Nat 'Nat, 'Nat) . red maximalAritySet(['META-LEVEL], '_;_, 'TypeSet 'TypeSet, 'KindSet) . red maximalAritySet(['NAT], '0, nil, 'Nat) . red glbSorts(['RAT], '`[Int`], 'Int) . Maude-2.7/tests/Meta/metaTerm0000755000147300135640000000033410511605402013074 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaTerm.maude -no-banner -no-advise \ > metaTerm.out 2>&1 diff $srcdir/metaTerm.expected metaTerm.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaGetVariant0000755000147300135640000000036412006107277014244 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaGetVariant.maude -no-banner -no-advise \ > metaGetVariant.out 2>&1 diff $srcdir/metaGetVariant.expected metaGetVariant.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaMeta.expected0000644000147300135640000000054210025726011014651 00000000000000Maude> ========================================== reduce in META-LEVEL : metaRewrite(['FOO], 'a.Foo, 10) . rewrites: 3 result ResultPair: {'b.Foo,'Foo} ========================================== reduce in META-LEVEL : metaRewrite(['SELF-REFLECTION], 'r[''a.Foo.Constant], 10) . rewrites: 7 result ResultPair: {''b.Foo.Constant,'Constant} Maude> Bye. Maude-2.7/tests/Meta/Makefile.am0000644000147300135640000000327712006107405013436 00000000000000TESTS = \ metaApply \ metaUnify \ metaFrewrite \ metaMatch \ metaMeta \ metaModule \ metaParse \ metaPrettyPrint \ metaReduce \ metaRewrite \ metaSearch \ metaSort \ metaSpecial \ metaTerm \ metaUp \ metaWellFormed \ metaXapply \ metaXmatch \ metaUp2 \ metaUpModExp \ metaModExp \ metaPolymorph \ metaUpDown \ metaPrintAttr \ metaMetadata \ metaVariantUnify \ metaGetVariant MAUDE_FILES = \ metaApply.maude \ metaUnify.maude \ metaFrewrite.maude \ metaMatch.maude \ metaMeta.maude \ metaModule.maude \ metaParse.maude \ metaPrettyPrint.maude \ metaReduce.maude \ metaRewrite.maude \ metaSearch.maude \ metaSort.maude \ metaSpecial.maude \ metaTerm.maude \ metaUp.maude \ metaWellFormed.maude \ metaXapply.maude \ metaXmatch.maude \ metaUp2.maude \ metaUpModExp.maude \ metaModExp.maude \ metaPolymorph.maude \ metaUpDown.maude \ metaPrintAttr.maude \ metaMetadata.maude \ metaVariantUnify.maude \ metaGetVariant.maude RESULT_FILES = \ metaApply.expected \ metaUnify.expected \ metaFrewrite.expected \ metaApply.expected \ metaFrewrite.expected \ metaMatch.expected \ metaMeta.expected \ metaModule.expected \ metaParse.expected \ metaPrettyPrint.expected \ metaReduce.expected \ metaRewrite.expected \ metaSearch.expected \ metaSort.expected \ metaSpecial.expected \ metaTerm.expected \ metaUp.expected \ metaWellFormed.expected \ metaXapply.expected \ metaXmatch.expected \ metaUp2.expected \ metaUpModExp.expected \ metaModExp.expected \ metaPolymorph.expected \ metaUpDown.expected \ metaPrintAttr.expected \ metaMetadata.expected \ metaVariantUnify.expected \ metaGetVariant.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) Maude-2.7/tests/Meta/metaUp.maude0000644000147300135640000000411010025725547013651 00000000000000set show timing off . set show advisories off . mod ATTR-TEST is sort Foo . ops a b c d e : -> Foo . op f : Foo Foo -> Foo . var Y : Foo . eq [first]: f(X:Foo, a) = X:Foo [metadata "this is the first equation"]. eq f(b, Y) = b [metadata "this is the second equation"]. mb [baz]: a : Foo [metadata "this is an mb"]. rl a => b [label r1] . endm red in META-LEVEL : upEqs('ATTR-TEST, true) . red in META-LEVEL : upRls('ATTR-TEST, true) . red in META-LEVEL : upMbs('ATTR-TEST, true) . red in META-LEVEL : upEqs('ATTR-TEST, false) . red in META-LEVEL : upRls('ATTR-TEST, false) . red in META-LEVEL : upMbs('ATTR-TEST, false) . select META-LEVEL . red upRls('BOOL, true) . mod KNIGHT is pr INT . sorts Pair List . subsort Pair < List . op nil : -> List . op __ : List List -> List [assoc id: nil] . op [_,_] : Int Int -> Pair . op move_ : Pair -> [Pair] . op legal : Pair -> Bool . op contains : List Pair -> Bool . op knight : Int -> [List] . vars N X Y : Int . var P Q : Pair . var L : List . eq legal([X, Y]) = X >= 1 and Y >= 1 and X <= 3 and Y <= 4 . eq contains(nil, P) = false . eq contains(Q L, P) = if P == Q then true else contains(L, P) fi . rl knight(0) => [1, 1] . crl knight(N) => L P Q if N > 0 /\ knight(N - 1) => L P /\ move P => Q /\ legal(Q) /\ not(contains(L P, Q)) . rl move [X, Y] => [X + 2, Y + 1] . rl move [X, Y] => [X + 2, Y - 1] . rl move [X, Y] => [X - 2, Y + 1] . rl move [X, Y] => [X - 2, Y - 1] . rl move [X, Y] => [X + 1, Y + 2] . rl move [X, Y] => [X + 1, Y - 2] . rl move [X, Y] => [X - 1, Y + 2] . rl move [X, Y] => [X - 1, Y - 2] . endm select META-LEVEL . red upRls('KNIGHT, true) . mod INTROSPECTION is inc META-LEVEL . op rules : -> RuleSet . rl rules => upRls('INTROSPECTION, false) . endm rew rules . mod SELF-REFLECTION is inc INTROSPECTION . op allRules : -> RuleSet . rl allRules => upRls('SELF-REFLECTION, true) . op myRules : -> RuleSet . rl myRules => upRls('SELF-REFLECTION, false) . endm rew myRules . rew allRules . red in META-LEVEL : upEqs('META-LEVEL, true) . Maude-2.7/tests/Meta/metaWellFormed.maude0000644000147300135640000000547310025725564015341 00000000000000set show timing off . set show advisories off . select META-LEVEL . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . subsort 'Foo < 'Bar . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'a.Foo) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'b.Foo) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'a.Foo) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, none) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Foo <- 'a.Foo ; 'X:Foo <- 'b.Foo) . red wellFormed(fmod 'FOO is protecting 'FLOAT . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none endfm, 'X:Bar <- 'a.Foo) . red wellFormed(fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Bar <- 'true.Bool) . red wellFormed(fmod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . mb 'a.Foo : 'Bar [none] . none endfm, 'X:Bool <- 'true.Bool) . red wellFormed(mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [label('k)] . endm, 'X:Bar <- 'true.Bool) . Maude-2.7/tests/Meta/metaReduce0000755000147300135640000000034410511605241013376 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaReduce.maude -no-banner -no-advise \ > metaReduce.out 2>&1 diff $srcdir/metaReduce.expected metaReduce.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaSort0000755000147300135640000000033410511605340013115 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaSort.maude -no-banner -no-advise \ > metaSort.out 2>&1 diff $srcdir/metaSort.expected metaSort.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaXapply.maude0000644000147300135640000000723110025725602014541 00000000000000set show timing off . set show advisories off . *** *** Test the metaXapply() descent function. *** fmod TEST is pr META-LEVEL . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . rl 'a.Foo => 'c.Foo [label('k)] . endm) . endfm red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, 100, 0) . red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, 100, 1) . red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, 100, 2) . red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, 100, 3) . red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, unbounded, 0) . red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, unbounded, 1) . red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, unbounded, 2) . red metaXapply(m, 'f['a.Foo, 'b.Foo], 'k, none, 0, unbounded, 3) . fmod TEST2 is pr META-LEVEL . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . rl 'a.Foo => 'c.Foo [label('k)] . endm) . endfm red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'k, none, 0, 100, 0) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'k, none, 0, 100, 1) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'k, none, 0, 100, 2) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'k, none, 0, 100, 3) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'k, none, 0, 100, 4) . fmod TEST3 is pr META-LEVEL . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . rl 'a.Foo => 'f['c.Foo, 'c.Foo] [label('l)] . endm) . endfm red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'l, none, 0, 100, 0) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'l, none, 0, 100, 1) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'l, none, 0, 100, 0) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'l, none, 0, 100, 2) . red metaXapply(m, 'g['f['a.Foo, 'b.Foo], 'a.Foo], 'l, none, 0, 100, 0) . fmod ALL-ONE-STEP-REWRITES is including META-LEVEL . sort TermSet . subsort Term < TermSet . op _|_ : TermSet TermSet -> TermSet [assoc comm id: mt ctor] . op mt : -> TermSet [ctor] . var T : Term . var M : Module . var L : Qid . var N : Nat . op findAllRews : Module Term Qid -> TermSet . op findAllRewsAux : Module Term Qid Nat -> TermSet . eq findAllRews(M, T, L) = findAllRewsAux(M, T, L, 0) . eq findAllRewsAux(M, T, L, N) = if metaXapply(M, T, L, none, 0, unbounded, N) :: Result4Tuple then (getTerm(metaXapply(M, T, L, none, 0, unbounded, N)) | findAllRewsAux(M, T, L, N + 1)) else mt fi . op m : -> Module . eq m = (mod 'FOO is protecting 'BOOL . sorts 'Foo ; 'Bar . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . none none rl 'f['X:Foo, 'Y:Foo] => 'X:Foo [label('k)] . rl 'a.Foo => 'c.Foo [label('k)] . endm) . endfm red findAllRews(m, 'f['a.Foo, 'b.Foo], 'k) . Maude-2.7/tests/Meta/metaMetadata0000755000147300135640000000035410511606033013710 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaMetadata.maude -no-banner -no-advise \ > metaMetadata.out 2>&1 diff $srcdir/metaMetadata.expected metaMetadata.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaApply.expected0000644000147300135640000002501610154225777015073 00000000000000Maude> ========================================== reduce in TEST : metaApply(m, 'a.Foo, 'k, none, 0) . rewrites: 3 result ResultTriple: {'b.Foo,'Foo,(none).Substitution} ========================================== reduce in TEST : metaApply(m, 'a.Foo, 'k, none, 1) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in TEST : metaApply(m, 'a.Foo, 'k, none, unbounded) . rewrites: 1 result [ResultTriple?]: metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . none none rl 'a.Foo => 'b.Foo [label('k)] . endm, 'a.Foo, 'k, none, unbounded) ========================================== reduce in TEST : metaApply(m, 'a.Foo, 'k, none, 10000000000000000000000000000) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in TEST2 : metaApply(m, 'f['a.Foo,'b.Foo], 'k, none, 0) . rewrites: 3 result ResultTriple: {'a.Foo,'Foo, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo} ========================================== reduce in TEST2 : metaApply(m, 'f['a.Foo,'b.Foo], 'k, none, 1) . rewrites: 3 result ResultTriple: {'b.Foo,'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo} ========================================== reduce in TEST2 : metaApply(m, 'f['a.Foo,'b.Foo], 'k, none, 2) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in TEST2 : metaApply(m, 'f['a.Foo,'b.Foo], 'k, none, 10000000000000000000000000000) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in TEST3 : metaApply(m, 'f['a.Foo,'b.Foo], 'k, 'Y:Foo <- 'b.Foo, 0) . rewrites: 3 result ResultTriple: {'a.Foo,'Foo, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo} ========================================== reduce in TEST3 : metaApply(m, 'f['a.Foo,'b.Foo], 'k, 'Y:Foo <- 'b.Foo, 1) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in TEST3 : metaApply(m, 'f['b.Foo,'b.Foo], 'k, 'X:Foo <- 'b.Foo, 0) . rewrites: 3 result ResultTriple: {'b.Foo,'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'b.Foo} ========================================== reduce in TEST3 : metaApply(m, 'f['b.Foo,'b.Foo], 'k, 'X:Foo <- 'b.Foo, 1) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in TEST3 : metaApply(m, 'f['b.Foo,'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 0) . rewrites: 3 result ResultTriple: {'b.Foo,'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'b.Foo} ========================================== reduce in TEST3 : metaApply(m, 'f['b.Foo,'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 1) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in TEST4 : metaApply(m, 'f['b.Foo,'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 0) . rewrites: 3 result ResultTriple: {'f['a.Foo,'b.Foo],'Foo, 'X:Foo <- 'f['a.Foo,'b.Foo] ; 'Y:Foo <- 'b.Foo} ========================================== reduce in TEST4 : metaApply(m, 'f['b.Foo,'b.Foo], 'k, 'Z:Foo <- 'b.Foo, 1) . rewrites: 2 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none crl 'f['X:Foo,'Y:Foo] => 'Z:Foo if 'Q:Foo := 'g['X:Foo,'Y:Foo] /\ 'g['Z:Foo, 'A:Foo] := 'Q:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, 'A:Foo <- 'b.Foo, 0) . rewrites: 2 result ResultTriple: {'f['a.Foo,'c.Foo],'Foo, 'A:Foo <- 'b.Foo ; 'Q:Foo <- 'g['b.Foo,'f['a.Foo,'c.Foo]] ; 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'f['a.Foo,'c.Foo] ; 'Z:Foo <- 'f['a.Foo,'c.Foo]} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none crl 'f['X:Foo,'Y:Foo] => 'Z:Foo if 'Q:Foo := 'g['X:Foo,'Y:Foo] /\ 'g['Z:Foo, 'A:Foo] := 'Q:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, 'A:Foo <- 'b.Foo, 1) . rewrites: 2 result ResultTriple: {'f['a.Foo,'c.Foo],'Foo, 'A:Foo <- 'b.Foo ; 'Q:Foo <- 'g['b.Foo,'f['a.Foo,'c.Foo]] ; 'X:Foo <- 'f['a.Foo,'c.Foo] ; 'Y:Foo <- 'b.Foo ; 'Z:Foo <- 'f['a.Foo,'c.Foo]} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none crl 'f['X:Foo,'Y:Foo] => 'Z:Foo if 'Q:Foo := 'g['X:Foo,'Y:Foo] /\ 'g['Z:Foo, 'A:Foo] := 'Q:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, 'A:Foo <- 'b.Foo, 2) . rewrites: 1 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, none, 0) . rewrites: 2 result ResultTriple: {'a.Foo,'Foo, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'f['b.Foo,'c.Foo]} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, none, 1) . rewrites: 2 result ResultTriple: {'b.Foo,'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'f['a.Foo,'c.Foo]} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, none, 2) . rewrites: 2 result ResultTriple: {'c.Foo,'Foo, 'X:Foo <- 'c.Foo ; 'Y:Foo <- 'f['a.Foo,'b.Foo]} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, none, 3) . rewrites: 2 result ResultTriple: {'f['a.Foo,'b.Foo],'Foo, 'X:Foo <- 'f['a.Foo,'b.Foo] ; 'Y:Foo <- 'c.Foo} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, none, 4) . rewrites: 2 result ResultTriple: {'f['a.Foo,'c.Foo],'Foo, 'X:Foo <- 'f['a.Foo,'c.Foo] ; 'Y:Foo <- 'b.Foo} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, none, 5) . rewrites: 2 result ResultTriple: {'f['b.Foo,'c.Foo],'Foo, 'X:Foo <- 'f['b.Foo,'c.Foo] ; 'Y:Foo <- 'a.Foo} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo,'c.Foo], 'k, none, 6) . rewrites: 1 result ResultTriple?: (failure).ResultTriple? ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'a.Foo => 'c.Foo [label('k)] . rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo], 'k, none, 0) . rewrites: 2 result ResultTriple: {'a.Foo,'Foo, 'X:Foo <- 'a.Foo ; 'Y:Foo <- 'b.Foo} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'a.Foo => 'c.Foo [label('k)] . rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo], 'k, none, 1) . rewrites: 2 result ResultTriple: {'b.Foo,'Foo, 'X:Foo <- 'b.Foo ; 'Y:Foo <- 'a.Foo} ========================================== reduce in META-LEVEL : metaApply(mod 'FOO is protecting 'BOOL . sorts 'Bar ; 'Foo . subsort 'Bar < 'Foo . (((op 'f : 'Foo 'Foo -> 'Foo [assoc comm] . op 'g : 'Foo 'Foo -> 'Foo [assoc comm] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none none rl 'a.Foo => 'c.Foo [label('k)] . rl 'f['X:Foo,'Y:Foo] => 'X:Foo [label('k)] . endm, 'f['a.Foo,'b.Foo], 'k, none, 2) . rewrites: 1 result ResultTriple?: (failure).ResultTriple? Maude> Bye. Maude-2.7/tests/Meta/metaPrintAttr.maude0000644000147300135640000000240011064254236015210 00000000000000set show timing off . fmod COND is sort Foo . ops a b c d e : -> Foo . ops f g : Foo Foo -> Foo . op h : Foo -> Foo . var X Y Z : Foo . ceq f(X, Y) = g(X, Z) if Z := h(Y) [print "X = " X ", Z = " Z] . endfm red f(a, b) . red in META-LEVEL : upModule('COND, false) . set print attribute on . red in META-LEVEL : metaReduce( fmod 'COND is including 'BOOL . sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'd : nil -> 'Foo [none] . op 'e : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [none] . op 'g : 'Foo 'Foo -> 'Foo [none] . op 'h : 'Foo -> 'Foo [none] . none ceq 'f['X:Foo,'Y:Foo] = 'g['X:Foo,'Z:Foo] if 'Z:Foo := 'h['Y:Foo] [print('"X = " 'X:Foo '", Z = " 'Z:Foo)] . endfm, 'f['a.Foo, 'b.Foo]) . red in META-LEVEL : metaReduce( fmod 'COND is including 'BOOL . sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'd : nil -> 'Foo [none] . op 'e : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [none] . op 'g : 'Foo 'Foo -> 'Foo [none] . op 'h : 'Foo -> 'Foo [none] . none ceq 'f['X:Foo,'Y:Foo] = 'g['X:Foo,'Z:Foo] if 'Z:Foo := 'h['Y:Foo] [print(nil)] . endfm, 'f['a.Foo, 'b.Foo]) . Maude-2.7/tests/Meta/metaGetVariant.expected0000644000147300135640000000417512305225230016035 00000000000000Maude> ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst1 + X:XOR), empty, 0, 0) . rewrites: 3 result Variant: {'_+_['cst1.Elem,'#1:XOR], 'X:XOR <- '#1:XOR,1} ========================================== reduce in TEST : metaGetVariant(upModule('XOR, false), upTerm(cst1 + X:XOR), empty, 0, 0) . rewrites: 3 result Variant: {'_+_['cst1.Elem,'#1:XOR], 'X:XOR <- '#1:XOR,1} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst1 + X:XOR), empty, 10, 0) . rewrites: 3 result Variant: {'_+_['cst1.Elem,'#11:XOR], 'X:XOR <- '#11:XOR,11} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst1 + X:XOR), empty, 0, 1) . rewrites: 6 result Variant: {'cst1.Elem, 'X:XOR <- '0.XOR,(0).Zero} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst1 + X:XOR), empty, 0, 2) . rewrites: 3 result Variant: {'0.XOR, 'X:XOR <- 'cst1.Elem,(0).Zero} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst1 + X:XOR), empty, 0, 3) . rewrites: 3 result Variant: {'%1:XOR, 'X:XOR <- '_+_['cst1.Elem,'%1:XOR],1} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst1 + X:XOR), empty, 0, 4) . rewrites: 3 result Variant?: noVariant ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst2 + X:XOR), upTerm(a + X:XOR), 0, 0) . rewrites: 4 result Variant: {'_+_['cst2.Elem,'#1:XOR], 'X:XOR <- '#1:XOR,1} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst2 + X:XOR), upTerm(a + X:XOR), 0, 1) . rewrites: 6 result Variant: {'0.XOR, 'X:XOR <- 'cst2.Elem,(0).Zero} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst2 + X:XOR), upTerm(a + X:XOR), 0, 2) . rewrites: 4 result Variant: {'%1:XOR, 'X:XOR <- '_+_['cst2.Elem,'%1:XOR],1} ========================================== reduce in TEST : metaGetVariant(['XOR], upTerm(cst2 + X:XOR), upTerm(a + X:XOR), 0, 3) . rewrites: 4 result Variant?: noVariant Maude> Bye. Maude-2.7/tests/Meta/metaModule0000755000147300135640000000034410511605132013413 00000000000000#!/bin/sh MAUDE_LIB=$srcdir/../../src/Main export MAUDE_LIB ../../src/Main/maude \ < $srcdir/metaModule.maude -no-banner -no-advise \ > metaModule.out 2>&1 diff $srcdir/metaModule.expected metaModule.out > /dev/null 2>&1 Maude-2.7/tests/Meta/metaPrintAttr.expected0000644000147300135640000000357011064255021015720 00000000000000Maude> ========================================== reduce in COND : f(a, b) . rewrites: 1 result Foo: g(a, h(b)) ========================================== reduce in META-LEVEL : upModule('COND, false) . rewrites: 1 result FModule: fmod 'COND is including 'BOOL . sorts 'Foo . none op 'a : nil -> 'Foo [none] . op 'b : nil -> 'Foo [none] . op 'c : nil -> 'Foo [none] . op 'd : nil -> 'Foo [none] . op 'e : nil -> 'Foo [none] . op 'f : 'Foo 'Foo -> 'Foo [none] . op 'g : 'Foo 'Foo -> 'Foo [none] . op 'h : 'Foo -> 'Foo [none] . none ceq 'f['X:Foo,'Y:Foo] = 'g['X:Foo,'Z:Foo] if 'Z:Foo := 'h['Y:Foo] [print( '"X = " 'X:Foo '", Z = " 'Z:Foo)] . endfm ========================================== reduce in META-LEVEL : metaReduce(fmod 'COND is including 'BOOL . sorts 'Foo . none ((((((op 'g : 'Foo 'Foo -> 'Foo [none] . op 'h : 'Foo -> 'Foo [none] .) op 'f : 'Foo 'Foo -> 'Foo [none] .) op 'e : nil -> 'Foo [none] .) op 'd : nil -> 'Foo [none] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none ceq 'f['X:Foo,'Y:Foo] = 'g['X:Foo,'Z:Foo] if 'Z:Foo := 'h['Y:Foo] [print( '"X = " 'X:Foo '", Z = " 'Z:Foo)] . endfm, 'f['a.Foo,'b.Foo]) . X = a, Z = h(b) rewrites: 2 result ResultPair: {'g['a.Foo,'h['b.Foo]],'Foo} ========================================== reduce in META-LEVEL : metaReduce(fmod 'COND is including 'BOOL . sorts 'Foo . none ((((((op 'g : 'Foo 'Foo -> 'Foo [none] . op 'h : 'Foo -> 'Foo [none] .) op 'f : 'Foo 'Foo -> 'Foo [none] .) op 'e : nil -> 'Foo [none] .) op 'd : nil -> 'Foo [none] .) op 'c : nil -> 'Foo [none] .) op 'b : nil -> 'Foo [none] .) op 'a : nil -> 'Foo [none] . none ceq 'f['X:Foo,'Y:Foo] = 'g['X:Foo,'Z:Foo] if 'Z:Foo := 'h['Y:Foo] [print( nil)] . endfm, 'f['a.Foo,'b.Foo]) . rewrites: 2 result ResultPair: {'g['a.Foo,'h['b.Foo]],'Foo} Maude> Bye. Maude-2.7/ChangeLog0000744000147300135640000002042112275063143011123 000000000000002014-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-2.7/missing0000755000147300135640000002403607704647736010776 00000000000000#! /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-2.7/install-sh0000755000147300135640000001270107704647736011377 00000000000000#!/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-2.7/config.h.in0000644000147300135640000000671212305230437011376 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* annotate comiler output */ #undef ANNOTATED /* support bubbles when parsing */ #undef BUBBLES /* 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 `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* 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 /* 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 /* use MSCP10 calling conventions */ #undef SCP /* 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 libsigsegv to handle segmentation faults */ #undef USE_LIBSIGSEGV /* use Tecla command line editing library */ #undef USE_TECLA /* Version number of package */ #undef VERSION Maude-2.7/config.guess0000755000147300135640000011576307704647736011727 00000000000000#! /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-2.7/src/0000755000147300135640000000000012305232002010202 500000000000000Maude-2.7/src/AU_Theory/0000755000147300135640000000000012305232003012042 500000000000000Maude-2.7/src/AU_Theory/AU_DagArgumentIterator.hh0000644000147300135640000000262107666303243016624 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/ChangeLog0000644000147300135640000020634711742127133013563 000000000000002012-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-2.7/src/AU_Theory/AU_Subproblem.cc0000644000147300135640000000672407666303243015024 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_DagNode.hh0000644000147300135640000001116711742127075014217 00000000000000/* This file is part of the Maude 2 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 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); void stackArguments(Vector& stack, int parentIndex, bool respectFrozen); // // 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); // // 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(); 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 }; 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-2.7/src/AU_Theory/AU_LhsCompiler.cc0000644000147300135640000003723711347774227015143 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_DequeDagNode.cc0000644000147300135640000001155610714455500015166 00000000000000/* This file is part of the Maude 2 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() { return dequeToArgVec(this)->copyEagerUptoReduced2(); } 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); } void AU_DequeDagNode::stackArguments(Vector& stack, int parentIndex, bool respectFrozen) { if (respectFrozen && !(symbol()->getFrozen().empty())) return; int j = 0; for (AU_DequeIter i(deque); i.valid(); i.next(), ++j) { DagNode* d = i.getDagNode(); if (!(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, j)); } } 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-2.7/src/AU_Theory/AU_BaseDagNode.hh0000644000147300135640000000512011351020665014773 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_RhsAutomaton.cc0000644000147300135640000000563211346606672015335 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_ExtensionInfo.cc0000644000147300135640000000423307666303243015473 00000000000000/* This file is part of the Maude 2 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(ExtensionInfo* extensionInfo) { AU_ExtensionInfo* e = safeCast(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-2.7/src/AU_Theory/AU_Symbol.hh0000644000147300135640000000640111735436150014155 00000000000000/* This file is part of the Maude 2 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); 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); // // 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-2.7/src/AU_Theory/Makefile.in0000644000147300135640000011774612305230424014054 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 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_OBJECTS = $(am_libAU_Theory_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libAU_Theory_a_SOURCES) DIST_SOURCES = $(libAU_Theory_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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 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 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 .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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) -rm -f libAU_Theory.a $(libAU_Theory_a_AR) libAU_Theory.a $(libAU_Theory_a_OBJECTS) $(libAU_Theory_a_LIBADD) $(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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DagNode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Layer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Symbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Term.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libAU_Theory_a-AU_Symbol.o: AU_Symbol.cc @am__fastdepCXX_TRUE@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Symbol.Tpo $(DEPDIR)/libAU_Theory_a-AU_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Symbol.Tpo $(DEPDIR)/libAU_Theory_a-AU_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Term.Tpo $(DEPDIR)/libAU_Theory_a-AU_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Term.Tpo $(DEPDIR)/libAU_Theory_a-AU_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Tpo $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Tpo $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Layer.Tpo $(DEPDIR)/libAU_Theory_a-AU_Layer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Layer.Tpo $(DEPDIR)/libAU_Theory_a-AU_Layer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Tpo $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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@ $(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__mv) $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Tpo $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ 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@ $(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` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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 -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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 all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags 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 uninstall \ uninstall-am # 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-2.7/src/AU_Theory/AU_DequeMatcher.cc0000644000147300135640000001124007666303243015246 00000000000000/* This file is part of the Maude 2 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 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_EACH_CONST(i, Vector, 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-2.7/src/AU_Theory/ChangeLog.A_Theory0000644000147300135640000006055407741124414015275 00000000000000Fri 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-2.7/src/AU_Theory/AU_Term.hh0000644000147300135640000000725610272231377013627 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_LhsAutomaton.hh0000644000147300135640000002321407666303243015333 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_DequeDagArgumentIterator.cc0000644000147300135640000000265407666303243017604 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_DequeDagArgumentIterator.hh0000644000147300135640000000265507666303243017617 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_Subproblem.hh0000644000147300135640000000457507666303243015040 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_DagArgumentIterator.cc0000644000147300135640000000277007666303243016617 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_GreedyMatcher.cc0000644000147300135640000002525310205443043015415 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_DagNode.cc0000644000147300135640000002655111742126612014204 00000000000000/* This file is part of the Maude 2 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_DagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Theory.hh" // interface class definitions #include "term.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_EACH_CONST(i, ArgVec, argArray) hashValue = hash(hashValue, (*i)->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_EACH_CONST(i, ArgVec, argArray) { int r = (*i)->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_EACH_CONST(i, ArgVec, argArray) { DagNode* d = *i; 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; } void AU_DagNode::clearCopyPointers2() { FOR_EACH_CONST(i, ArgVec, argArray) (*i)->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::stackArguments(Vector& stack, int parentIndex, bool respectFrozen) { if (respectFrozen && !(symbol()->getFrozen().empty())) return; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { DagNode* d = argArray[i]; if (!(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, i)); } } 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* AU_DagNode::instantiate2(const Substitution& substitution) { AU_Symbol* s = symbol(); int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; ++i) { if (DagNode* n = argArray[i]->instantiate(substitution)) { // // 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)) a = n; if (!(a->isGround())) ground = false; d->argArray[i] = a; } // // 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); return d; } } return 0; // unchanged } // // Narrowing code. // bool AU_DagNode::indexVariables2(NarrowingVariableInfo& indices, int baseIndex) { int nrArgs = argArray.length(); bool ground = true; for (int i = 0; i < nrArgs; i++) { if (!(argArray[i]->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 = 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); 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; } // // 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); return d; } } return 0; // unchanged } Maude-2.7/src/AU_Theory/AU_Layer.cc0000644000147300135640000002527307666303243013766 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_ArgumentIterator.hh0000644000147300135640000000263007666303243016210 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_DagOperations.cc0000644000147300135640000000772507666303243015453 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_CollapseMatcher.cc0000644000147300135640000002406611104704362015744 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_Normalize.cc0000644000147300135640000001427111062345614014637 00000000000000/* This file is part of the Maude 2 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_EACH_CONST(j, ArgVec, argArray2) buffer[p++] = *j; } 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-2.7/src/AU_Theory/Makefile.am0000644000147300135640000000205207741124444014036 00000000000000noinst_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 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 Maude-2.7/src/AU_Theory/AU_LhsAutomaton.cc0000644000147300135640000002425707666303243015331 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_Layer.hh0000644000147300135640000000633707666303243014000 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_Symbol.cc0000644000147300135640000003712511735421233014146 00000000000000/* This file is part of the Maude 2 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_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" // 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" 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()) { 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_EACH_CONST(i, ArgVec, args) { int index = (*i)->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_EACH_CONST(i, ArgVec, args) { int t = (*i)->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) { if (!(getFrozen().empty())) return; 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, true)); } } else { // // ArgVec case. // bool eager = (getPermuteStrategy() == EAGER); 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_EACH_CONST(i, ArgVec, argArray) { DagNode* a = *i; arguments.append(a->symbol()->termify(a)); } } return new AU_Term(this, arguments); } // // 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-2.7/src/AU_Theory/AU_FullMatcher.cc0000644000147300135640000001772711347776403015130 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_ExtensionInfo.hh0000644000147300135640000000433607666303243015511 00000000000000/* This file is part of the Maude 2 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(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-2.7/src/AU_Theory/AU_DequeDagNode.hh0000644000147300135640000000527610714453503015203 00000000000000/* This file is part of the Maude 2 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); void stackArguments(Vector& stack, int parentIndex, bool respectFrozen); // // 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(); 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-2.7/src/AU_Theory/AU_ArgumentIterator.cc0000644000147300135640000000270107666303243016175 00000000000000/* This file is part of the Maude 2 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-2.7/src/AU_Theory/AU_Theory.hh0000644000147300135640000000235207666303243014167 00000000000000/* This file is part of the Maude 2 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; #endif Maude-2.7/src/AU_Theory/AU_Matcher.cc0000644000147300135640000003272511350012626014260 00000000000000/* This file is part of the Maude 2 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 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_EACH_CONST(i, Vector, 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); return (loneVariable.abstracted == 0) ? (d->leq(loneVariable.sort)) : loneVariable.abstracted->match(d, solution, returnedSubproblem); } else if (matchStrategy != FAST_LONE_VARIABLE) { 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 { 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-2.7/src/AU_Theory/AU_Term.cc0000644000147300135640000003371711346604725013622 00000000000000/* This file is part of the Maude 2 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_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_EACH_CONST(i, Vector, argArray) i->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_EACH_CONST(i, Vector, argArray) hashValue = hash(hashValue, i->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_EACH_CONST(i, Vector, argArray) i->term->findEagerVariables(false, eagerVariables); } } void AU_Term::markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables) { if (symbol()->getPermuteStrategy() == BinarySymbol::EAGER) { FOR_EACH_CONST(i, Vector, argArray) i->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. // int nrArgs = argArray.length(); { FOR_EACH_CONST(i, Vector, argArray) i->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 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_EACH_CONST(i, Vector, 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_EACH_CONST(i, Vector, argArray) i->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 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_EACH_CONST(i, PairVec, 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. // 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_EACH_CONST(i, Vector, argArray) { const Tuple& p = *i; 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-2.7/src/AU_Theory/AU_RhsAutomaton.hh0000644000147300135640000000353211346606307015337 00000000000000/* This file is part of the Maude 2 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-2.7/src/ObjectSystem/0000755000147300135640000000000012305232004012617 500000000000000Maude-2.7/src/ObjectSystem/ChangeLog0000744000147300135640000004502012275057176014340 000000000000002014-02-06 Steven Eker * pseudoThread.cc (processCallBacks): added comment (eventLoop): fix a bug where we were putting wait in a shadowing variable ===================================Maude100a=========================================== 2012-11-09 Steven Eker * pseudoThread.cc (processFds): update idea of time after poll() call (eventLoop): rewritten so we can never return 0; we loop until we handle an event, get interrupted or there are no pending call backs * pseudoThread.hh (P): added comments explaining the arguments to public member functions; removed default argument value for requestCallBack() (CallBackRequest, <): moved out of class declaration 2012-11-08 Steven Eker * pseudoThread.cc (processFds): fix bugs where we were writing wrong thing into info.flags in POLLIN and POLLOUT cases; code cleaning 2012-10-19 Steven Eker * socketManagerSymbol.hh (PseudoThread): updated decl for getActiveSocket() * socketStuff.cc (getActiveSocket): pass back pointer to ActiveSocket object (acceptClient): use ActiveSocket pointer (send): use ActiveSocket pointer (receive): use ActiveSocket pointer (closeSocket, cleanUp): pass extra argument to getActiveSocket * socketOutcomes.cc (acceptedClientReply): don't set state here * socketStuff.cc (acceptClient): set state on new accept socket here * socketAsync.cc (doWrite): set state after call to createdSocketReply() (doRead): set state on new accept socket here * socketOutcomes.cc (createdSocketReply): don't set state here * socketStuff.cc (createServerTcpSocket): changed comment on line that sets state (createClientTcpSocket): set state here rather than rely on createdSocketReply() * socketAsync.cc (doRead): commented out superfluous access of activeSockets 2012-10-16 Steven Eker * socketManagerSymbol.cc (ActiveSocket): added in order to fix a bug that we were implicitly deleting (via map) ActiveSockets with an uninitialized textArray field * socketManagerSymbol.hh (PseudoThread): added decl for explicit ActiveSocket ctor ===================================Maude96b=========================================== 2011-12-31 Steven Eker * socketManagerSymbol.cc (ActiveSocket): added * socketManagerSymbol.hh (class SocketManagerSymbol): replace text with textArray in struct ActiveSocket * socketStuff.cc (SocketManagerSymbol::send): fix bug where we were extracting a c_str() from a rope that then went out of scope, potentially before we were finished with the const char* from c_str() (SocketManagerSymbol::send): check errno == EWOULDBLOCK for POSIX compliance ===================================Maude95c=========================================== 2009-01-29 Steven Eker * socketManagerSymbol.cc (attachData, attachSymbol, copyAttachments) (getDataAttachments, getSymbolAttachments): call ExternalObjectManagerSymbol functions rather the FreeSymbol functions ===================================Maude92=========================================== 2008-09-11 Steven Eker * socketAsync.cc (doError, doWrite): added #ifdef NO_ASSERT to avoid compiler warning * socketStuff.cc (createClientTcpSocket): delete decl of unused domain variable ===================================Maude91a=========================================== 2005-04-29 Steven Eker * socketStuff.cc (createClientTcpSocket, createServerTcpSocket) (acceptClient, send, receive, closeSocket): most DebugAdvisory()s turned into IssueAdvisory()s 2005-04-15 Steven Eker * socketStuff.cc (receive): added extra DebugAdvisory() ===================================Maude86a=========================================== 2005-03-15 Steven Eker * socketStuff.cc (createServerTcpSocket): set SO_REUSEADDR flag 2005-03-14 Steven Eker * socketStuff.cc (createServerTcpSocket): make DebugAdvisory() more elaborate * objectSystemRewritingContext.cc (ObjectSystemRewritingContext): added DebugAdvisory() to check for server sockets not being closed after ^C ===================================Maude86=========================================== 2004-12-23 Steven Eker * socketAsync.cc (doError): use getsockopt() for more accurate error message * socketStuff.cc (send): don't accept 0 length sends (send): don't accept send unless socket is in a suitable state (receive): don't accept receive unless socket is in a suitable state 2004-12-22 Steven Eker * socketAsync.cc (doWrite): new closedSocketReply() convention (doRead): new closedSocketReply() convention (doError): new closedSocketReply() convention (doHungUp): new closedSocketReply() convention * socketStuff.cc (getDomain): deleted (send): new closedSocketReply() convention (receive): new closedSocketReply() convention * socketManagerSymbol.hh (class SocketManagerSymbol): updated decl for closedSocketReply() (class SocketManagerSymbol): deleted decl for getDomain() * socketOutcomes.cc (closedSocketReply): handle errorMessage arg * socketStuff.cc (createClientTcpSocket): new message format (createServerTcpSocket): new message format, check that backlog > 0 * socketSignature.cc: updated decls for createClientTcpSocketMsg, createServer, TcpSocketMsg, receiveMsg, closedSocketMsg * socketAsync.cc (doRead): handle accept case * socketStuff.cc (createClientTcpSocket): use setonblockingFlag() (createServerTcpSocket): use setNonblockingFlag() (acceptClient): use setNonblockingFlag() * socketManagerSymbol.hh (class SocketManagerSymbol): added decl for setNonblockingFlag() * socketStuff.cc (setNonblockingFlag): added * socketManagerSymbol.hh (class SocketManagerSymbol): added decl for acceptedClientReply() * socketOutcomes.cc (acceptedClientReply): added 2004-12-21 Steven Eker * socketStuff.cc (acceptClient): implemented * socketSignature.cc (MACRO): updated decls for createServerTcpSocketMsg and acceptedClientMsg * socketManagerSymbol.hh (class SocketManagerSymbol): added LISTENING and WAITING_TO_ACCEPT to enum SocketState * socketStuff.cc (createServerTcpSocket): implemented * socketAsync.cc (doError): implemented (doHungUp): implemented * socketStuff.cc (cleanUp): call PseudoThread::clearFlags() 2004-12-20 Steven Eker DebugAdvisory() * socketStuff.cc (receive): handle async read (send): hande async write (createClientTcpSocket): allow nonblocking sockets * socketAsync.cc (doWrite): handle async write * socketManagerSymbol.hh (class SocketManagerSymbol): added decl for sentMsgReply() * socketOutcomes.cc (sentMsgReply): added * socketManagerSymbol.hh (class SocketManagerSymbol): added text, unsent and nrUnsent members to struct ActiveSocket * socketAsync.cc (doRead): handle error and zero byte cases by closing socket * socketStuff.cc (receive): use strerror() in place of sys_errlist[] (createClientTcpSocket): DebugAdvisory() for unexpected connect() error (createClientTcpSocket): added DebugAdvisory() for declined message (closeSocket): added DebugAdvisory() for declined message (receive): added DebugAdvisory() for declined message (send): added DebugAdvisory() for declined message (acceptClient, createServerTcpSocket): added DebugAdvisory() for declined message (createClientTcpSocket): added more DebugAdvisory()s 2004-12-17 Steven Eker * socketStuff.cc (receive): handle interrupts during read() (receive): treat unrecognized error messages as a far end close * socketAsync.cc (doRead): implemented * socketStuff.cc (receive): use closedSocketReply() (closeSocket): use closedSocketReply() * socketOutcomes.cc (closedSocketReply): added * socketManagerSymbol.hh (class SocketManagerSymbol): added enum Sizes * socketStuff.cc (receive): use receivedMsgReply() * socketManagerSymbol.hh (class SocketManagerSymbol): added decl for receivedMsgReply() * socketOutcomes.cc (receivedMsgReply): added * socketManagerSymbol.hh (class SocketManagerSymbol): added NOMINAL, WAITING_TO_READ, WAITING_TO_WRITE to enum SocketState, removed READY_TO_SEND 2004-12-16 Steven Eker * socketAsync.cc (doWrite): handle async connects * socketManagerSymbol.hh (class SocketManagerSymbol): added WAITING_TO_CONNECT to enum SocketState * socketAsync.cc (doRead, doWrite, doError, doHungUp): moved here * socketStuff.cc (createClientTcpSocket): use createdSocketReply() (createClientTcpSocket): don't accept badly formed messages * socketManagerSymbol.hh (class SocketManagerSymbol): added decl for createdSocketReply() * socketOutcomes.cc (errorReply): moved here (createdSocketReply): addded * socketManagerSymbol.hh (class SocketManagerSymbol): added lastMessage and context fields to struct ActiveSocket 2004-12-06 Steven Eker * socketStuff.cc: include netinet/in.h 2004-10-08 Steven Eker * pseudoThread.cc: added #include 2004-08-03 Steven Eker * configSymbol.cc (ruleRewrite): only do external stuff if mode is external; put check for incoming external messages in second loop rather than first * socketManagerSymbol.hh (class SocketManagerSymbol): added decl for 2nd closeSocket() * socketStuff.cc (closeSocket): added 2nd version (closeSocket): use other closeSocket() (receive): handle far end closed 2004-08-02 Steven Eker * objectSystemRewritingContext.cc (~ObjectSystemRewritingContext): added * objectSystemRewritingContext.hh (class ObjectSystemRewritingContext): adde decl for dtor * socketManagerSymbol.hh (class SocketManagerSymbol): added decl for cleanUp() * socketStuff.cc (closeSocket): erase closed socket from activeSockets * externalObjectManagerSymbol.hh (class ExternalObjectManagerSymbol): added decl for cleanUp() * socketStuff.cc (closeSocket): fixed bug where we were sending back sentMsg 2004-07-30 Steven Eker * objectSystemRewritingContext.cc (getExternalMessages): added (offerMessageExternally): added * objectSystemRewritingContext.hh (class ObjectSystemRewritingContext): added decls for getExternalMessages() and offerMessageExternally() * configSymbol.cc (ruleRewrite): call getExternalMessages() and offerMessageExternally() * objectSystem.hh: added ExternalObjectManagerSymbol * socketStuff.cc (closeSocket): use deleteExternalObject() (createClientTcpSocket): use addExternalObject() * objectSystemRewritingContext.hh (class ObjectSystemRewritingContext): added decls for addExternalObject(), deleteExternalObject() * objectSystemRewritingContext.cc (markReachableNodes): rewritten (addExternalObject): added (deleteExternalObject): added * objectSystemRewritingContext.hh (class ObjectSystemRewritingContext): turned class MessageMap into a typedef (class ObjectSystemRewritingContext): added typedef for ObjectSet and data member externalObjects; added decl for markReachableNodes(); messageMap becomes incomingMessages 2004-07-29 Steven Eker * objectSystemRewritingContext.cc (markReachableNodes): added * objectSystemRewritingContext.hh (class ObjectSystemRewritingContext): added class MessageMap and dagNodeLt() * objectSystemRewritingContext.cc: created * externalObjectManagerSymbol.hh (class ExternalObjectManagerSymbol): updated decls for use ObjectSystemRewritingContext& * socketStuff.cc (errorReply): implemented * objectSystemRewritingContext.hh (class ObjectSystemRewritingContext): added deck for bufferMessage() (bufferMessage): added stub * socketManagerSymbol.hh (class SocketManagerSymbol): updated many declarations * socketStuff.cc (createClientTcpSocket): take ObjectSystemRewritingContext& (createServerTcpSocket): take ObjectSystemRewritingContext& (acceptClient): take ObjectSystemRewritingContext& (send): take ObjectSystemRewritingContext& (receive): take ObjectSystemRewritingContext& (closeSocket): take ObjectSystemRewritingContext& * socketManagerSymbol.cc (handleManagerMessage): take ObjectSystemRewritingContext& (handleMessage): take ObjectSystemRewritingContext& 2004-07-28 Steven Eker * socketManagerSymbol.hh (class SocketManagerSymbol): added decls for getText() and getActiveSocket() * socketStuff.cc (getActiveSocket): added (getText): added 2004-07-23 Steven Eker * pseudoThread.cc (doCallBack): added * socketManagerSymbol.hh (class SocketManagerSymbol): derive from PseudoThread (class SocketManagerSymbol): added enum SocketState, struct ActiveSocket, typedef SocketMap, data member activeSockets * socketStuff.cc (getDomain): added * pseudoThread.cc (processCallBacks): rewritten * pseudoThread.hh (class PseudoThread): updated decls for processCallBacks() and processFds() * pseudoThread.cc (eventLoop): rewritten (processFds): rewritten * pseudoThread.hh (class PseudoThread): added enum ReturnStatus; updated decl for eventLoop() 2004-07-21 Steven Eker * pseudoThread.hh: created * pseudoThread.cc: created 2004-07-14 Steven Eker * socketManagerSymbol.hh (class SocketManagerSymbol): added decls for getProtocol(), getPort(), errorReply() * socketManagerSymbol.cc (handleManagerMessage): added * externalObjectManagerSymbol.hh (class ExternalObjectManagerSymbol): added decl for handleManangerMessage() * socketManagerSymbol.hh (class SocketManagerSymbol): added decls for createClientTcpSocket(), createServerTcpSocket(), acceptClient(), send(), receive(), closeSocket() * socketStuff.cc: created * socketManagerSymbol.cc (handleMessage): added * socketManagerSymbol.hh (class SocketManagerSymbol): derive from ExternalObjectManagerSymbol * socketManagerSymbol.cc (SocketManagerSymbol): call ExternalObjectManagerSymbol() * externalObjectManagerSymbol.cc: created * externalObjectManagerSymbol.hh: created 2004-07-13 Steven Eker * socketManagerSymbol.hh (class SocketManagerSymbol): added decls for getDataAttachments() and getSymbolAttachments() * socketManagerSymbol.cc (getDataAttachments): added (getSymbolAttachments): added 2004-07-12 Steven Eker * socketManagerSymbol.cc (attachTerm): deleted (copyAttachments): added * socketManagerSymbol.hh (class SocketManagerSymbol): deleted decl for attachTerm(); added decl for copyAttachments() * socketManagerSymbol.cc (SocketManagerSymbol): use socketSignature.cc (attachSymbol): use socketSignature.cc (attachData): use NULL_DATA() (attachSymbol): use BIND_SYMBOL() * socketManagerSymbol.hh (MACRO): use socketSignature.cc * socketSignature.cc: created * objectSystem.hh: deleted class ExternalObjectManager * socketManager.cc: deleted * socketManager.hh: deleted * externalObjectManager.cc: deleted * externalObjectManager.hh: deleted 2004-07-09 Steven Eker * socketManagerSymbol.cc: created * socketManagerSymbol.hh: created 2004-07-07 Steven Eker * socketManager.cc: created * socketManager.hh: created * objectSystem.hh: added class ExternalObjectManager 2004-06-30 Steven Eker * externalObjectManager.cc: created * externalObjectManager.hh: created ===================================Maude84d=========================================== 2003-05-23 Steven Eker * configSymbol.cc (compileRules): use isNonexec(); no longer check for unbound variables (ruleRewrite): added a call to tracePreRuleRewrite() 2003-05-21 Steven Eker * configSymbol.cc (ruleRewrite): use leftOverRewrite() * configSymbol.hh (class ConfigSymbol): added decl for leftOverRewrite() * configSymbol.cc (resetRules): added (compileRules): fill out leftOver (objMsgRewrite): attempt rule fairness (compileRules): only put rule that have no unbound variables in leftOver (leftOverRewrite): added * configSymbol.hh (class ConfigSymbol): added decl for resetRules() * configSymbol.cc (checkArgs): chech that object and message patterns are stable (compileRules): fill out ruleMap (objMsgRewrite): take messageSymbol arg (ruleRewrite): use new objMsgRewrite() semantics * configSymbol.hh (class ConfigSymbol): added struct symbolLt and struct RuleSet, typedef RuleMap and data members ruleMap and leftOvers; deleted data member objMsgRules * configSymbol.cc (ConfigSymbol): don't init mode (ruleRewrite): use ObjectSystemRewritingContext * configSymbol.hh (class ConfigSymbol): delete enum Mode, data memeber mode and decl for setMode(); (setMode): deleted (class ConfigSymbol): deleted struct AutomatonPair * objectSystem.hh: added class ObjectSystemRewritingContext * objectSystemRewritingContext.hh (class ObjectSystemRewritingContext): created 2003-05-20 Steven Eker * configSymbol.cc (objMsgRewrite): use objMsgRules (compileRules): use objMsgRules (ruleRewrite): handle mode (ruleRewrite): rewrote obj-msg recognition loop; use Asserts() that DagArgumentIterators are valid; handle duplicate object more gracefully * configSymbol.hh (class ConfigSymbol): dleted data member automatonPairs; added data members mode and objMsgRules 2003-05-19 Steven Eker * configSymbol.cc (ruleRewrite): rewritten using objMsgRewrite() and retrieveObject() * configSymbol.hh (class ConfigSymbol): added decls for objMsgRewrite() and retrieveObject() (class ConfigSymbol): added enum Mode * configSymbol.cc (objMsgRewrite): added (retrieveObject): added * remainder.cc: created * configSymbol.cc (ConfigSymbol): pass useTree = false to ACU_Symbol() * objectMap.cc: moved ObjectMap decls here (dump): added * configSymbol.cc (markReachableNodes): use FOR_EACH_CONST() (markReachableNodes): use FOR_EACH_CONST() ===================================Maude80a=========================================== 2003-02-25 Steven Eker * configSymbol.cc: removed #pragma (checkArgs): updated Assert() * configSymbol.hh: removed #pragma ===================================Maude79=========================================== 2001-04-20 Steven Eker * configSymbol.hh (class ConfigSymbol): added struct MessageQueue, struct dagNodeLt, class ObjectMap (class ConfigSymbol): added struct AutomatonPair and data member automatonPairs * configSymbol.cc (checkArgs): added 2001-04-17 Steven Eker * configSymbol.hh: created * objectSystem.hh: created Maude-2.7/src/ObjectSystem/objectSystemRewritingContext.cc0000644000147300135640000000617110217616331020777 00000000000000/* This file is part of the Maude 2 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 ObjectSystemRewritingContext. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "objectSystem.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // object system class definitions #include "objectSystemRewritingContext.hh" #include "externalObjectManagerSymbol.hh" ObjectSystemRewritingContext::~ObjectSystemRewritingContext() { //DebugAdvisory("~ObjectSystemRewritingContext() called; " << externalObjects.size() << " external objects"); if (!(externalObjects.empty())) { FOR_EACH_CONST(i, ObjectMap, externalObjects) i->second->cleanUp(i->first); } } void ObjectSystemRewritingContext::bufferMessage(DagNode* target, DagNode* message) { incomingMessages[target].push_back(message); } void ObjectSystemRewritingContext::addExternalObject(DagNode* name, ExternalObjectManagerSymbol* manager) { externalObjects.insert(ObjectMap::value_type(name, manager)); } void ObjectSystemRewritingContext::deleteExternalObject(DagNode* name) { externalObjects.erase(name); } bool ObjectSystemRewritingContext::getExternalMessages(DagNode* target, list& messages) { MessageMap::iterator i = incomingMessages.find(target); if (i != incomingMessages.end()) { messages.splice(messages.end(), i->second); incomingMessages.erase(i); return true; } return false; } bool ObjectSystemRewritingContext::offerMessageExternally(DagNode* target, DagNode* message) { //cerr << "offerMessageExternally(): saw " << message << endl; ObjectMap::iterator i = externalObjects.find(target); if (i != externalObjects.end()) return i->second->handleMessage(message, *this); else if (ExternalObjectManagerSymbol* m = dynamic_cast(target->symbol())) return m->handleManagerMessage(message, *this); return false; } void ObjectSystemRewritingContext::markReachableNodes() { { FOR_EACH_CONST(i, ObjectMap, externalObjects) i->first->mark(); } { FOR_EACH_CONST(i, MessageMap, incomingMessages) { FOR_EACH_CONST(j, list, i->second) (*j)->mark(); } } RewritingContext::markReachableNodes(); } Maude-2.7/src/ObjectSystem/socketStuff.cc0000644000147300135640000003166212040374152015365 00000000000000/* This file is part of the Maude 2 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. */ // // Main socket manipulation code. // #include #include #include #include #include #include #include #include bool SocketManagerSymbol::getPort(DagNode* portArg, int& port) { return succSymbol->getSignedInt(portArg, port) && port <= 65535; // HACK } bool SocketManagerSymbol::getActiveSocket(DagNode* socketArg, int& socketId, ActiveSocket*& asp) { if (socketArg->symbol() == socketOidSymbol) { DagNode* idArg = safeCast(FreeDagNode*, socketArg)->getArgument(0); if (succSymbol->getSignedInt(idArg, socketId)) { SocketMap::iterator i = activeSockets.find(socketId); if (activeSockets.find(socketId) != activeSockets.end()) { asp = &(i->second); return true; } } } return false; } bool SocketManagerSymbol::getText(DagNode* textArg, crope& text) { if (textArg->symbol() == stringSymbol) { text = safeCast(StringDagNode*, textArg)->getValue(); return true; } return false; } bool SocketManagerSymbol::setNonblockingFlag(int fd, FreeDagNode* message, ObjectSystemRewritingContext& context) { // // Set nonblocking flag for a nascent socket; since it is not yet an external object we // can just close it and generate an error reply if things don't work out. // int flags = fcntl(fd, F_GETFL); if (flags == -1) { const char* errText = strerror(errno); DebugAdvisory("unexpected fcntl() GETFL: " << errText); close(fd); errorReply(errText, message, context); return false; } if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) { const char* errText = strerror(errno); DebugAdvisory("unexpected fcntl() GETFL: " << errText); close(fd); errorReply(errText, message, context); return false; } return true; } bool SocketManagerSymbol::createClientTcpSocket(FreeDagNode* message, ObjectSystemRewritingContext& context) { Assert(message->getArgument(0)->symbol() == this, "misdirected message"); int port; DagNode* addressArg = message->getArgument(2); if (getPort(message->getArgument(3), port) && addressArg->symbol() == stringSymbol) { // // We accept the message. // // // Look up the address. // const crope& address = safeCast(StringDagNode*, addressArg)->getValue(); hostent* record = gethostbyname(address.c_str()); // HACK - might block if (record == 0) { DebugAdvisory("unexpected gethostbyname(() error: " << strerror(errno)); errorReply("bad address", message, context); return true; } // // Create a socket. // int fd = socket(PF_INET, SOCK_STREAM, 0); if (fd == -1) { const char* errText = strerror(errno); DebugAdvisory("unexpected socket() error: " << errText); errorReply(errText, message, context); return true; } // // Make it non-blocking. // if (!setNonblockingFlag(fd, message, context)) return true; // // Try to connect to host. // sockaddr_in sockName; sockName.sin_family = AF_INET; sockName.sin_port = htons(port); sockName.sin_addr = *(reinterpret_cast(record->h_addr_list[0])); // HACK if (connect(fd, reinterpret_cast(&sockName), sizeof(sockName)) == 0) { createdSocketReply(fd, message, context); // instant success activeSockets[fd].state = NOMINAL; // this creates the ActiveSocket object } else if (errno == EINPROGRESS) { // // Incomplete transaction on an asynchronous socket, so save details // so we know what to do when transaction completes. // ActiveSocket& as = activeSockets[fd]; // this creates the ActiveSocket object as.state = WAITING_TO_CONNECT; as.lastMessage.setNode(message); as.originalContext = &context; // // Completion (could be success or failure) is indicated by the operation system // making the socket writable. // wantTo(WRITE, fd); } else { // // Connect failed, so report error and pretend that socket never existed. // DebugAdvisory("unexpected connect() error: " << strerror(errno)); close(fd); errorReply("failed to connect", message, context); } return true; } IssueAdvisory("socket manager declined malformed message " << QUOTE(message) << '.'); return false; } bool SocketManagerSymbol::createServerTcpSocket(FreeDagNode* message, ObjectSystemRewritingContext& context) { Assert(message->getArgument(0)->symbol() == this, "misdirected message"); int port; int backlog; if (getPort(message->getArgument(2), port) && succSymbol->getSignedInt(message->getArgument(3), backlog) && backlog > 0) { // // Create a socket. // int fd = socket(PF_INET, SOCK_STREAM, 0); if (fd == -1) { const char* errText = strerror(errno); DebugAdvisory("unexpected socket() error: " << errText); errorReply(errText, message, context); return true; } // // Make it non-blocking. // if (!setNonblockingFlag(fd, message, context)) return true; { // // Set SO_REUSEADDR so port can be immediately reused following the close() // of this socket. // int value = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)) == -1) { const char* errText = strerror(errno); DebugAdvisory("setsockopt(SO_REUSEADDR) failed: " << errText); errorReply(errText, message, context); close(fd); return true; } } { // // Bind it to the local port. // sockaddr_in sockName; sockName.sin_family = AF_INET; sockName.sin_port = htons(port); sockName.sin_addr.s_addr = htonl(INADDR_ANY); // HACK - what is the portable way to set this? if (bind(fd, reinterpret_cast(&sockName), sizeof(sockName)) == -1) { const char* errText = strerror(errno); DebugAdvisory("unexpected bind() error with fd " << fd << ": " << errText); errorReply(errText, message, context); close(fd); return true; } } // // Start listening for connections. // if (listen(fd, backlog) == -1) { const char* errText = strerror(errno); DebugAdvisory("unexpected listen() error: " << errText); errorReply(errText, message, context); close(fd); return true; } // // Return a message now that we have a bound and listening server socket. // createdSocketReply(fd, message, context); activeSockets[fd].state = LISTENING; // this creates the ActiveSocket object return true; } IssueAdvisory("socket manager declined malformed message " << QUOTE(message) << '.'); return false; } bool SocketManagerSymbol::acceptClient(FreeDagNode* message, ObjectSystemRewritingContext& context) { int socketId; ActiveSocket* asp; DagNode* socketName = message->getArgument(0); if (getActiveSocket(socketName, socketId, asp)) { ActiveSocket& as = *asp; if (as.state == LISTENING) { sockaddr_in sockName; socklen_t addrLen = sizeof(sockName); int r; do r = accept(socketId, reinterpret_cast(&sockName), &addrLen); while (r == -1 && errno == EINTR); if (r >= 0) { if (setNonblockingFlag(r, message, context)) { acceptedClientReply(inet_ntoa(sockName.sin_addr), r, message, context); activeSockets[r].state = NOMINAL; // this creates the new ActiveSocket object } } else if (errno == EAGAIN) { as.state = WAITING_TO_ACCEPT; as.lastMessage.setNode(message); as.originalContext = &context; wantTo(READ, socketId); } else { // // What should we do with a socket that we failed to accept on? // const char* errText = strerror(errno); DebugAdvisory("unexpected accept() error: " << errText); errorReply(errText, message, context); } return true; } IssueAdvisory(socketName << " declined message " << QUOTE(message) << '.'); return false; } IssueAdvisory("no socket to receive message " << QUOTE(message) << '.'); return false; } bool SocketManagerSymbol::send(FreeDagNode* message, ObjectSystemRewritingContext& context) { int socketId; ActiveSocket* asp; crope text; DagNode* socketName = message->getArgument(0); if (getActiveSocket(socketName, socketId, asp) && getText(message->getArgument(2), text) && text.size() != 0) { //ActiveSocket& as = activeSockets[socketId]; ActiveSocket& as = *asp; if ((as.state & ~WAITING_TO_READ) == 0) // check that all the state bits other than WAITING_TO_READ are clear { //as.text = text; as.textArray = makeZeroTerminatedString(text); //as.unsent = as.text.c_str(); as.unsent = as.textArray; as.nrUnsent = text.size(); // how to deal with empty message? // // Write some characters to the socket; we might get interrupted and have to restart. // ssize_t n; do n = write(socketId, as.unsent, as.nrUnsent); while (n == -1 && errno == EINTR); if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) // treat blocking situation as zero chars send n = 0; if (n >= 0) { as.nrUnsent -= n; if (as.nrUnsent == 0) // done { sentMsgReply(message, context); // clear as.text delete [] as.textArray; as.textArray = 0; } else // at least some characters pending { as.state |= WAITING_TO_WRITE; as.lastMessage.setNode(message); as.originalContext = &context; as.unsent += n; wantTo(WRITE, socketId); } } else { const char* errText = strerror(errno); DebugAdvisory("unexpected write() error : " << errText); closedSocketReply(socketId, errText, message, context); } return true; } IssueAdvisory(socketName << " declined message " << QUOTE(message) << '.'); return false; } IssueAdvisory("no socket to receive message " << QUOTE(message) << '.'); return false; } bool SocketManagerSymbol::receive(FreeDagNode* message, ObjectSystemRewritingContext& context) { int socketId; ActiveSocket* asp; DagNode* socketName = message->getArgument(0); if (getActiveSocket(socketName, socketId, asp)) { //ActiveSocket& as = activeSockets[socketId]; ActiveSocket& as = *asp; if ((as.state & ~WAITING_TO_WRITE) == 0) // check that all the state bits other than WAITING_TO_WRITE are clear { char buffer[READ_BUFFER_SIZE]; ssize_t n; do n = read(socketId, buffer, READ_BUFFER_SIZE); while (n == -1 && errno == EINTR); if (n > 0) receivedMsgReply(buffer, n, message, context); else { if (n == -1) { if (errno == EAGAIN) { as.state |= WAITING_TO_READ; as.lastMessage.setNode(message); as.originalContext = &context; wantTo(READ, socketId); } else { const char* errText = strerror(errno); DebugAdvisory("unexpected read() error: " << errText); closedSocketReply(socketId, errText, message, context); } } else { DebugAdvisory("read 0 bytes"); closedSocketReply(socketId, "", message, context); } } return true; } else DebugAdvisory("as.state = " << as.state); IssueAdvisory(socketName << " declined message " << QUOTE(message) << '.'); return false; } IssueAdvisory("no socket to receive message " << QUOTE(message) << '.'); return false; } bool SocketManagerSymbol::closeSocket(FreeDagNode* message, ObjectSystemRewritingContext& context) { int socketId; ActiveSocket* asp; DagNode* socketName = message->getArgument(0); if (getActiveSocket(socketName, socketId, asp)) { closedSocketReply(socketId, "", message, context); return true; } IssueAdvisory("no socket to receive message " << QUOTE(message) << '.'); return false; } void SocketManagerSymbol::cleanUp(DagNode* objectId) { int socketId; ActiveSocket* asp; if (getActiveSocket(objectId, socketId, asp)) { DebugAdvisory("cleaning up " << objectId); close(socketId); activeSockets.erase(socketId); PseudoThread::clearFlags(socketId); // to avoid eventLoop() testing an invalid fd } else CantHappen("no socket for " << objectId); } Maude-2.7/src/ObjectSystem/externalObjectManagerSymbol.hh0000644000147300135640000000334610107245074020531 00000000000000/* This file is part of the Maude 2 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 external object mangager symbols. // #ifndef _ExternalObjectManagerSymbol_hh_ #define _ExternalObjectManagerSymbol_hh_ #include "freeSymbol.hh" class ExternalObjectManagerSymbol : public FreeSymbol { NO_COPYING(ExternalObjectManagerSymbol); public: ExternalObjectManagerSymbol(int id); // // This member function is used to handle messages sent to the // manager object itself. // virtual bool handleManagerMessage(DagNode* message, ObjectSystemRewritingContext& context) = 0; // // This member function is used to handle messages sent to the // external objects created by the manager object. // virtual bool handleMessage(DagNode* message, ObjectSystemRewritingContext& context) = 0; // // This member function is used to quietly free up any resources // allocated to an external object. // virtual void cleanUp(DagNode* objectId) = 0; }; #endif Maude-2.7/src/ObjectSystem/objectMap.cc0000644000147300135640000000443107666301674015004 00000000000000/* This file is part of the Maude 2 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. */ // // Map from object identifier to (object, message queue) pairs. // struct ConfigSymbol::MessageQueue { MessageQueue(); void markReachableNodes() const; DagNode* object; list messages; }; ConfigSymbol::MessageQueue::MessageQueue() { object = 0; } void ConfigSymbol::MessageQueue::markReachableNodes() const { if (object != 0) object->mark(); FOR_EACH_CONST(i, list, messages) (*i)->mark(); } struct ConfigSymbol::dagNodeLt { bool operator()(const DagNode* d1, const DagNode* d2) { return d1->compare(d2) < 0; } }; class ConfigSymbol::ObjectMap : public map, private SimpleRootContainer { public: void dump(ostream& s, int indentLevel = 0); private: void markReachableNodes(); }; void ConfigSymbol::ObjectMap::markReachableNodes() { FOR_EACH_CONST(i, ObjectMap, *this) i->second.markReachableNodes(); } void ConfigSymbol::ObjectMap::dump(ostream& s, int indentLevel) { s << Indent(indentLevel) << "begin{ObjectMap}\n"; FOR_EACH_CONST(i, ObjectMap, *this) { s << Indent(indentLevel + 1) << i->first << '\n'; if (i->second.object == 0) s << Indent(indentLevel + 2) << "*** NO OBJECT ***\n"; else s << Indent(indentLevel + 2) << i->second.object << '\n'; FOR_EACH_CONST(j, list, i->second.messages) s << Indent(indentLevel + 2) << *j << '\n'; s << '\n'; } s << Indent(indentLevel) << "end{ObjectMap}\n"; } Maude-2.7/src/ObjectSystem/configSymbol.hh0000644000147300135640000000440107666301674015542 00000000000000/* This file is part of the Maude 2 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 object-message configurations. // #ifndef _configSymbol_hh_ #define _configSymbol_hh_ #include "natSet.hh" #include "ACU_Symbol.hh" class ConfigSymbol : public ACU_Symbol { public: ConfigSymbol(int id, const Vector& strategy, bool memoFlag, Term* identity = 0); // // Override normal rule rewriting behavior. // void compileRules(); DagNode* ruleRewrite(DagNode* subject, RewritingContext& context); void resetRules(); // // Functions particular to ConfigSymbol. // void addObjects(NatSet& objSymbols); void addMessages(NatSet& msgSymbols); private: struct symbolLt { bool operator()(const Symbol* d1, const Symbol* d2) { return d1->compare(d2) < 0; } }; struct RuleSet { Vector rules; Vector::const_iterator next; }; typedef map RuleMap; struct MessageQueue; struct dagNodeLt; class ObjectMap; struct Remainder; bool checkArgs(Term* pattern, Term*& object, Term*& message); DagNode* objMsgRewrite(Symbol* messageSymbol, DagNode* subject, RewritingContext& context); DagNode* retrieveObject(DagNode* rhs, DagNode* name, Remainder& remainder); DagNode* leftOverRewrite(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo); NatSet objectSymbols; NatSet messageSymbols; RuleMap ruleMap; RuleSet leftOver; }; #endif Maude-2.7/src/ObjectSystem/Makefile.in0000644000147300135640000006344712305230426014630 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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/ObjectSystem DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 libobjectSystem_a_AR = $(AR) $(ARFLAGS) libobjectSystem_a_LIBADD = am_libobjectSystem_a_OBJECTS = \ libobjectSystem_a-configSymbol.$(OBJEXT) \ libobjectSystem_a-objectSystemRewritingContext.$(OBJEXT) \ libobjectSystem_a-externalObjectManagerSymbol.$(OBJEXT) \ libobjectSystem_a-socketManagerSymbol.$(OBJEXT) \ libobjectSystem_a-pseudoThread.$(OBJEXT) libobjectSystem_a_OBJECTS = $(am_libobjectSystem_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libobjectSystem_a_SOURCES) DIST_SOURCES = $(libobjectSystem_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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 = libobjectSystem.a libobjectSystem_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/ACU_Persistent \ -I$(top_srcdir)/src/ACU_Theory \ -I$(top_srcdir)/src/FreeTheory \ -I$(top_srcdir)/src/NA_Theory \ -I$(top_srcdir)/src/S_Theory \ -I$(top_srcdir)/src/BuiltIn \ -I$(top_srcdir)/src/3rdParty libobjectSystem_a_SOURCES = \ configSymbol.cc \ objectSystemRewritingContext.cc \ externalObjectManagerSymbol.cc \ socketManagerSymbol.cc \ pseudoThread.cc EXTRA_DIST = \ objectMap.cc \ remainder.cc \ socketSignature.cc \ socketStuff.cc \ socketAsync.cc \ socketOutcomes.cc noinst_HEADERS = \ configSymbol.hh \ objectSystem.hh \ objectSystemRewritingContext.hh \ externalObjectManagerSymbol.hh \ socketManagerSymbol.hh \ pseudoThread.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/ObjectSystem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ObjectSystem/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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) libobjectSystem.a: $(libobjectSystem_a_OBJECTS) $(libobjectSystem_a_DEPENDENCIES) $(EXTRA_libobjectSystem_a_DEPENDENCIES) -rm -f libobjectSystem.a $(libobjectSystem_a_AR) libobjectSystem.a $(libobjectSystem_a_OBJECTS) $(libobjectSystem_a_LIBADD) $(RANLIB) libobjectSystem.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libobjectSystem_a-configSymbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libobjectSystem_a-externalObjectManagerSymbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libobjectSystem_a-objectSystemRewritingContext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libobjectSystem_a-pseudoThread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libobjectSystem_a-socketManagerSymbol.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libobjectSystem_a-configSymbol.o: configSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-configSymbol.o -MD -MP -MF $(DEPDIR)/libobjectSystem_a-configSymbol.Tpo -c -o libobjectSystem_a-configSymbol.o `test -f 'configSymbol.cc' || echo '$(srcdir)/'`configSymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-configSymbol.Tpo $(DEPDIR)/libobjectSystem_a-configSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='configSymbol.cc' object='libobjectSystem_a-configSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-configSymbol.o `test -f 'configSymbol.cc' || echo '$(srcdir)/'`configSymbol.cc libobjectSystem_a-configSymbol.obj: configSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-configSymbol.obj -MD -MP -MF $(DEPDIR)/libobjectSystem_a-configSymbol.Tpo -c -o libobjectSystem_a-configSymbol.obj `if test -f 'configSymbol.cc'; then $(CYGPATH_W) 'configSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/configSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-configSymbol.Tpo $(DEPDIR)/libobjectSystem_a-configSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='configSymbol.cc' object='libobjectSystem_a-configSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-configSymbol.obj `if test -f 'configSymbol.cc'; then $(CYGPATH_W) 'configSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/configSymbol.cc'; fi` libobjectSystem_a-objectSystemRewritingContext.o: objectSystemRewritingContext.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-objectSystemRewritingContext.o -MD -MP -MF $(DEPDIR)/libobjectSystem_a-objectSystemRewritingContext.Tpo -c -o libobjectSystem_a-objectSystemRewritingContext.o `test -f 'objectSystemRewritingContext.cc' || echo '$(srcdir)/'`objectSystemRewritingContext.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-objectSystemRewritingContext.Tpo $(DEPDIR)/libobjectSystem_a-objectSystemRewritingContext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='objectSystemRewritingContext.cc' object='libobjectSystem_a-objectSystemRewritingContext.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-objectSystemRewritingContext.o `test -f 'objectSystemRewritingContext.cc' || echo '$(srcdir)/'`objectSystemRewritingContext.cc libobjectSystem_a-objectSystemRewritingContext.obj: objectSystemRewritingContext.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-objectSystemRewritingContext.obj -MD -MP -MF $(DEPDIR)/libobjectSystem_a-objectSystemRewritingContext.Tpo -c -o libobjectSystem_a-objectSystemRewritingContext.obj `if test -f 'objectSystemRewritingContext.cc'; then $(CYGPATH_W) 'objectSystemRewritingContext.cc'; else $(CYGPATH_W) '$(srcdir)/objectSystemRewritingContext.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-objectSystemRewritingContext.Tpo $(DEPDIR)/libobjectSystem_a-objectSystemRewritingContext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='objectSystemRewritingContext.cc' object='libobjectSystem_a-objectSystemRewritingContext.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-objectSystemRewritingContext.obj `if test -f 'objectSystemRewritingContext.cc'; then $(CYGPATH_W) 'objectSystemRewritingContext.cc'; else $(CYGPATH_W) '$(srcdir)/objectSystemRewritingContext.cc'; fi` libobjectSystem_a-externalObjectManagerSymbol.o: externalObjectManagerSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-externalObjectManagerSymbol.o -MD -MP -MF $(DEPDIR)/libobjectSystem_a-externalObjectManagerSymbol.Tpo -c -o libobjectSystem_a-externalObjectManagerSymbol.o `test -f 'externalObjectManagerSymbol.cc' || echo '$(srcdir)/'`externalObjectManagerSymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-externalObjectManagerSymbol.Tpo $(DEPDIR)/libobjectSystem_a-externalObjectManagerSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='externalObjectManagerSymbol.cc' object='libobjectSystem_a-externalObjectManagerSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-externalObjectManagerSymbol.o `test -f 'externalObjectManagerSymbol.cc' || echo '$(srcdir)/'`externalObjectManagerSymbol.cc libobjectSystem_a-externalObjectManagerSymbol.obj: externalObjectManagerSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-externalObjectManagerSymbol.obj -MD -MP -MF $(DEPDIR)/libobjectSystem_a-externalObjectManagerSymbol.Tpo -c -o libobjectSystem_a-externalObjectManagerSymbol.obj `if test -f 'externalObjectManagerSymbol.cc'; then $(CYGPATH_W) 'externalObjectManagerSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/externalObjectManagerSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-externalObjectManagerSymbol.Tpo $(DEPDIR)/libobjectSystem_a-externalObjectManagerSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='externalObjectManagerSymbol.cc' object='libobjectSystem_a-externalObjectManagerSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-externalObjectManagerSymbol.obj `if test -f 'externalObjectManagerSymbol.cc'; then $(CYGPATH_W) 'externalObjectManagerSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/externalObjectManagerSymbol.cc'; fi` libobjectSystem_a-socketManagerSymbol.o: socketManagerSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-socketManagerSymbol.o -MD -MP -MF $(DEPDIR)/libobjectSystem_a-socketManagerSymbol.Tpo -c -o libobjectSystem_a-socketManagerSymbol.o `test -f 'socketManagerSymbol.cc' || echo '$(srcdir)/'`socketManagerSymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-socketManagerSymbol.Tpo $(DEPDIR)/libobjectSystem_a-socketManagerSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='socketManagerSymbol.cc' object='libobjectSystem_a-socketManagerSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-socketManagerSymbol.o `test -f 'socketManagerSymbol.cc' || echo '$(srcdir)/'`socketManagerSymbol.cc libobjectSystem_a-socketManagerSymbol.obj: socketManagerSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-socketManagerSymbol.obj -MD -MP -MF $(DEPDIR)/libobjectSystem_a-socketManagerSymbol.Tpo -c -o libobjectSystem_a-socketManagerSymbol.obj `if test -f 'socketManagerSymbol.cc'; then $(CYGPATH_W) 'socketManagerSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/socketManagerSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-socketManagerSymbol.Tpo $(DEPDIR)/libobjectSystem_a-socketManagerSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='socketManagerSymbol.cc' object='libobjectSystem_a-socketManagerSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-socketManagerSymbol.obj `if test -f 'socketManagerSymbol.cc'; then $(CYGPATH_W) 'socketManagerSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/socketManagerSymbol.cc'; fi` libobjectSystem_a-pseudoThread.o: pseudoThread.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-pseudoThread.o -MD -MP -MF $(DEPDIR)/libobjectSystem_a-pseudoThread.Tpo -c -o libobjectSystem_a-pseudoThread.o `test -f 'pseudoThread.cc' || echo '$(srcdir)/'`pseudoThread.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-pseudoThread.Tpo $(DEPDIR)/libobjectSystem_a-pseudoThread.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pseudoThread.cc' object='libobjectSystem_a-pseudoThread.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-pseudoThread.o `test -f 'pseudoThread.cc' || echo '$(srcdir)/'`pseudoThread.cc libobjectSystem_a-pseudoThread.obj: pseudoThread.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libobjectSystem_a-pseudoThread.obj -MD -MP -MF $(DEPDIR)/libobjectSystem_a-pseudoThread.Tpo -c -o libobjectSystem_a-pseudoThread.obj `if test -f 'pseudoThread.cc'; then $(CYGPATH_W) 'pseudoThread.cc'; else $(CYGPATH_W) '$(srcdir)/pseudoThread.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libobjectSystem_a-pseudoThread.Tpo $(DEPDIR)/libobjectSystem_a-pseudoThread.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pseudoThread.cc' object='libobjectSystem_a-pseudoThread.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libobjectSystem_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libobjectSystem_a-pseudoThread.obj `if test -f 'pseudoThread.cc'; then $(CYGPATH_W) 'pseudoThread.cc'; else $(CYGPATH_W) '$(srcdir)/pseudoThread.cc'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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 -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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 all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags 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 uninstall \ uninstall-am # 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-2.7/src/ObjectSystem/objectSystem.hh0000644000147300135640000000205210102555744015546 00000000000000/* This file is part of the Maude 2 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 object system classes. // #ifndef _objectSystem_hh_ #define _objectSystem_hh_ class ObjectSystemRewritingContext; class ConfigSymbol; class ExternalObjectManagerSymbol; #endif Maude-2.7/src/ObjectSystem/externalObjectManagerSymbol.cc0000644000147300135640000000332510077606025020517 00000000000000/* This file is part of the Maude 2 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 ExternalObjectManagerSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "objectSystem.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 "stringSymbol.hh" //#include "stringDagNode.hh" //#include "stringOpSymbol.hh" //#include "bindingMacros.hh" // object system class definitions #include "externalObjectManagerSymbol.hh" ExternalObjectManagerSymbol::ExternalObjectManagerSymbol(int id) : FreeSymbol(id, 0) { } Maude-2.7/src/ObjectSystem/socketManagerSymbol.cc0000644000147300135640000001175112037622331017034 00000000000000/* This file is part of the Maude 2 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 SocketOidSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "NA_Theory.hh" #include "S_Theory.hh" #include "builtIn.hh" #include "objectSystem.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 "stringSymbol.hh" #include "stringDagNode.hh" //#include "stringOpSymbol.hh" #include "bindingMacros.hh" // object system class definitions #include "objectSystemRewritingContext.hh" // socket class definitions #include "socketManagerSymbol.hh" // our stuff #include "socketStuff.cc" #include "socketAsync.cc" #include "socketOutcomes.cc" SocketManagerSymbol::ActiveSocket::ActiveSocket() { textArray = 0; // make it safe for deletion } SocketManagerSymbol::ActiveSocket::~ActiveSocket() { delete [] textArray; // just in case we end up being delete while we're still waiting to send stuff } SocketManagerSymbol::SocketManagerSymbol(int id) : ExternalObjectManagerSymbol(id) { #define MACRO(SymbolName, SymbolClass, NrArgs) \ SymbolName = 0; #include "socketSignature.cc" #undef MACRO } bool SocketManagerSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { NULL_DATA(purpose, SocketManagerSymbol, data); return ExternalObjectManagerSymbol::attachData(opDeclaration, purpose, data); } bool SocketManagerSymbol::attachSymbol(const char* purpose, Symbol* symbol) { Assert(symbol != 0, "null symbol for " << purpose); #define MACRO(SymbolName, SymbolClass, NrArgs) \ BIND_SYMBOL(purpose, symbol, SymbolName, SymbolClass*) #include "socketSignature.cc" #undef MACRO return ExternalObjectManagerSymbol::attachSymbol(purpose, symbol); } void SocketManagerSymbol::copyAttachments(Symbol* original, SymbolMap* map) { SocketManagerSymbol* orig = safeCast(SocketManagerSymbol*, original); #define MACRO(SymbolName, SymbolClass, NrArgs) \ COPY_SYMBOL(orig, SymbolName, map, SymbolClass*) #include "socketSignature.cc" #undef MACRO ExternalObjectManagerSymbol::copyAttachments(original, map); } void SocketManagerSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "SocketManagerSymbol"; data.resize(nrDataAttachments + 1); ExternalObjectManagerSymbol::getDataAttachments(opDeclaration, purposes, data); } void SocketManagerSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { #define MACRO(SymbolName, SymbolClass, NrArgs) \ APPEND_SYMBOL(purposes, symbols, SymbolName) #include "socketSignature.cc" #undef MACRO ExternalObjectManagerSymbol::getSymbolAttachments(purposes, symbols); } bool SocketManagerSymbol::handleManagerMessage(DagNode* message, ObjectSystemRewritingContext& context) { //cerr << "SocketManagerSymbol::handleManagerMessage(): saw " << message << endl; Symbol* s = message->symbol(); if (s == createClientTcpSocketMsg) return createClientTcpSocket(safeCast(FreeDagNode*, message), context); if (s == createServerTcpSocketMsg) return createServerTcpSocket(safeCast(FreeDagNode*, message), context); return false; } bool SocketManagerSymbol::handleMessage(DagNode* message, ObjectSystemRewritingContext& context) { //cerr << "SocketManagerSymbol::handleMessage(): saw " << message << endl; Symbol* s = message->symbol(); if (s == acceptClientMsg) return acceptClient(safeCast(FreeDagNode*, message), context); if (s == sendMsg) return send(safeCast(FreeDagNode*, message), context); if (s == receiveMsg) return receive(safeCast(FreeDagNode*, message), context); if (s == closeSocketMsg) return closeSocket(safeCast(FreeDagNode*, message), context); return false; } Maude-2.7/src/ObjectSystem/socketOutcomes.cc0000644000147300135640000000755212040371502016071 00000000000000/* This file is part of the Maude 2 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 SocketManagerSymbol::errorReply(const char* errorMessage, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context) { Vector reply(3); reply[1] = originalMessage->getArgument(0); reply[2] = new StringDagNode(stringSymbol, errorMessage); DagNode* target = originalMessage->getArgument(1); reply[0] = target; context.bufferMessage(target, socketErrorMsg->makeDagNode(reply)); } void SocketManagerSymbol::createdSocketReply(int fd, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context) { //activeSockets[fd].state = NOMINAL; Vector reply(1, 3); reply[0] = succSymbol->makeNatDag(fd); DagNode* socketName = socketOidSymbol->makeDagNode(reply); context.addExternalObject(socketName, this); reply.resize(3); reply[2] = socketName; reply[1] = originalMessage->getArgument(0); DagNode* target = originalMessage->getArgument(1); reply[0] = target; context.bufferMessage(target, createdSocketMsg->makeDagNode(reply)); } void SocketManagerSymbol::acceptedClientReply(const char* addr, int fd, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context) { //activeSockets[fd].state = NOMINAL; Vector reply(1, 4); reply[0] = succSymbol->makeNatDag(fd); DagNode* socketName = socketOidSymbol->makeDagNode(reply); context.addExternalObject(socketName, this); reply.resize(4); reply[3] = socketName; reply[2] = new StringDagNode(stringSymbol, addr); reply[1] = originalMessage->getArgument(0); DagNode* target = originalMessage->getArgument(1); reply[0] = target; context.bufferMessage(target, acceptedClientMsg->makeDagNode(reply)); } void SocketManagerSymbol::sentMsgReply(FreeDagNode* originalMessage, ObjectSystemRewritingContext& context) { Vector reply(2); DagNode* target = originalMessage->getArgument(1); reply[0] = target; reply[1] = originalMessage->getArgument(0); context.bufferMessage(target, sentMsg->makeDagNode(reply)); } void SocketManagerSymbol::receivedMsgReply(char buffer[], ssize_t length, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context) { crope text(buffer, length); Vector reply(3); reply[1] = originalMessage->getArgument(0); reply[2] = new StringDagNode(stringSymbol, text); DagNode* target = originalMessage->getArgument(1); reply[0] = target; context.bufferMessage(target, receivedMsg->makeDagNode(reply)); } void SocketManagerSymbol::closedSocketReply(int socketId, const char* errorMessage, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context) { close(socketId); DagNode* socketName = originalMessage->getArgument(0); context.deleteExternalObject(socketName); activeSockets.erase(socketId); Vector reply(3); reply[1] = socketName; reply[2] = new StringDagNode(stringSymbol, errorMessage); DagNode* target = originalMessage->getArgument(1); reply[0] = target; context.bufferMessage(target, closedSocketMsg->makeDagNode(reply)); } Maude-2.7/src/ObjectSystem/Makefile.am0000644000147300135640000000163212010025115014571 00000000000000noinst_LIBRARIES = libobjectSystem.a libobjectSystem_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/ACU_Persistent \ -I$(top_srcdir)/src/ACU_Theory \ -I$(top_srcdir)/src/FreeTheory \ -I$(top_srcdir)/src/NA_Theory \ -I$(top_srcdir)/src/S_Theory \ -I$(top_srcdir)/src/BuiltIn \ -I$(top_srcdir)/src/3rdParty libobjectSystem_a_SOURCES = \ configSymbol.cc \ objectSystemRewritingContext.cc \ externalObjectManagerSymbol.cc \ socketManagerSymbol.cc \ pseudoThread.cc EXTRA_DIST = \ objectMap.cc \ remainder.cc \ socketSignature.cc \ socketStuff.cc \ socketAsync.cc \ socketOutcomes.cc noinst_HEADERS = \ configSymbol.hh \ objectSystem.hh \ objectSystemRewritingContext.hh \ externalObjectManagerSymbol.hh \ socketManagerSymbol.hh \ pseudoThread.hh Maude-2.7/src/ObjectSystem/configSymbol.cc0000644000147300135640000003064610162624133015521 00000000000000/* This file is part of the Maude 2 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 ConfigSymbol. // #include #include // 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" #include "objectSystem.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 "argumentIterator.hh" #include "dagArgumentIterator.hh" #include "rule.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_Term.hh" #include "ACU_ExtensionInfo.hh" // object system class definitions #include "objectSystemRewritingContext.hh" #include "configSymbol.hh" // our stuff #include "objectMap.cc" #include "remainder.cc" ConfigSymbol::ConfigSymbol(int id, const Vector& strategy, bool memoFlag, Term* identity) : ACU_Symbol(id, strategy, memoFlag, identity, false) { //cerr << "ConfigSymbol::ConfigSymbol()\n"; } void ConfigSymbol::addObjects(NatSet& objSymbols) { objectSymbols.insert(objSymbols); } void ConfigSymbol::addMessages(NatSet& msgSymbols) { messageSymbols.insert(msgSymbols); } bool ConfigSymbol::checkArgs(Term* pattern, Term*& object, Term*& message) { if (pattern->symbol() != this) return false; object = 0; message = 0; Term* name = 0; for (ArgumentIterator a(*pattern); a.valid(); a.next()) { Term* arg = a.argument(); int si = arg->symbol()->getIndexWithinModule(); if (objectSymbols.contains(si)) { if (object != 0 || !(arg->stable())) return false; object = arg; } else if (messageSymbols.contains(si)) { if (message != 0 || !(arg->stable())) return false; message = arg; } else return false; ArgumentIterator n(*arg); if (!(n.valid())) return false; if (name == 0) name = n.argument(); else { if (!(name->equal(n.argument()))) return false; } } Assert(object != 0 && message != 0, "object-message check error"); return true; } void ConfigSymbol::compileRules() { ACU_Symbol::compileRules(); const Vector& rules = getRules(); int nrRules = rules.length(); for (int i = 0; i < nrRules; i++) { Rule* rl = rules[i]; if (!(rl->isNonexec())) { Term* object; Term* message; if (checkArgs(rl->getLhs(), object, message)) { ruleMap[message->symbol()].rules.append(rl); DebugAdvisory("***obj-msg rule*** " << rl); } else leftOver.rules.append(rl); } } } void ConfigSymbol::resetRules() { Symbol::resetRules(); const RuleMap::iterator e = ruleMap.end(); for (RuleMap::iterator i = ruleMap.begin(); i != e; ++i) { RuleSet& rs = (*i).second; rs.next = rs.rules.begin(); } leftOver.next = leftOver.rules.begin(); } DagNode* ConfigSymbol::ruleRewrite(DagNode* subject, RewritingContext& context) { //cerr << "ruleRewrite() " << subject << endl; ObjectSystemRewritingContext* rc = safeCast(ObjectSystemRewritingContext*, &context); ObjectSystemRewritingContext::Mode mode = rc->getObjectMode(); if (mode == ObjectSystemRewritingContext::STANDARD) return ACU_Symbol::ruleRewrite(subject, context); bool external = (mode == ObjectSystemRewritingContext::EXTERNAL); ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int nrArgs = s->nrArgs(); ObjectMap objectMap; Remainder remainder; for (int i = 0; i < nrArgs; i++) { DagNode* d = s->getArgument(i); int m = s->getMultiplicity(i); int symbolNr = d->symbol()->getIndexWithinModule(); if (objectSymbols.contains(symbolNr)) { DagArgumentIterator j(d); Assert(j.valid(), "no args for object symbol"); DagNode* objectName = j.argument(); MessageQueue& mq = objectMap[objectName]; if (mq.object == 0) { mq.object = d; if (m == 1) continue; IssueWarning("saw duplicate object: " << BEGIN_QUOTE << d << END_QUOTE); --m; } else { IssueWarning("saw two objects with the same name: " << BEGIN_QUOTE << d << END_QUOTE << " and " << BEGIN_QUOTE << mq.object << END_QUOTE); } } else if (messageSymbols.contains(symbolNr)) { DagArgumentIterator j(d); Assert(j.valid(), "no args for message symbol"); MessageQueue& mq = objectMap[j.argument()]; for (int i = 0; i < m; ++i) mq.messages.push_back(d); continue; } // // Argument was not a valid object or message so it goes // into the remainder. // remainder.dagNodes.append(d); remainder.multiplicities.append(m); } //objectMap.dump(cerr); //remainder.dump(cerr); if (objectMap.empty()) return ACU_Symbol::ruleRewrite(subject, context); Vector dagNodes(2); Vector multiplicities(2); bool delivered = false; const ObjectMap::iterator e = objectMap.end(); for (ObjectMap::iterator i = objectMap.begin(); i != e; ++i) { list& messages = i->second.messages; if (external && rc->getExternalMessages(i->first, messages)) delivered = true; // make sure we do a rewrite FOR_EACH_CONST(j, list, messages) { DagNode* object = i->second.object; if (object != 0) { dagNodes[0] = object; dagNodes[1] = *j; multiplicities[0] = 1; multiplicities[1] = 1; DagNode* r = makeDagNode(dagNodes, multiplicities); RewritingContext* t = context.makeSubcontext(r); t->reduce(); // need normal form r = t->root(); if (r->symbol() == this) { r = objMsgRewrite((*j)->symbol(), r, *t); context.addInCount(*t); delete t; if (r != 0) { delivered = true; //cerr << "delivered " << *j << endl; t = context.makeSubcontext(r); t->reduce(); i->second.object = retrieveObject(t->root(), i->first, remainder); context.addInCount(*t); delete t; continue; // next message } } else { context.addInCount(*t); delete t; } } else { //cerr << "unresolved message " << *j << endl; // cerr << "external = " << external << endl; if (external && rc->offerMessageExternally(i->first, *j)) { delivered = true; // make sure we do a rewrite continue; // next message } } // // Message undelivered; put it into remainder. // //cerr << "failed to deliver " << *j << endl; remainder.dagNodes.append(*j); remainder.multiplicities.append(1); } // // All messages tried; if object still remains, put it into remainder. // DagNode* object = i->second.object; if (object != 0) { //cerr << "object still remains " << object << endl; remainder.dagNodes.append(object); remainder.multiplicities.append(1); } } if (!delivered) { if (leftOver.rules.empty()) return 0; ACU_ExtensionInfo extensionInfo(safeCast(ACU_DagNode*, subject)); return leftOverRewrite(subject, context, &extensionInfo); } // // Now deal with remainder. // if (remainder.multiplicities.length() == 1 && remainder.multiplicities[0] == 1) return remainder.dagNodes[0]; DagNode* r = makeDagNode(remainder.dagNodes, remainder.multiplicities); //cerr << "remainder = " << r << endl; RewritingContext* t = context.makeSubcontext(r); t->reduce(); r = t->root(); if (r->symbol() == this && !(leftOver.rules.empty())) { ACU_ExtensionInfo extensionInfo(safeCast(ACU_DagNode*, r)); DagNode* d = leftOverRewrite(r, context, &extensionInfo); if (d == 0) { if (RewritingContext::getTraceStatus()) context.tracePreRuleRewrite(subject, 0); // HACK } else r = d; } context.addInCount(*t); delete t; return r; } DagNode* ConfigSymbol::objMsgRewrite(Symbol* messageSymbol, DagNode* subject, RewritingContext& context) { RuleSet& rs = ruleMap[messageSymbol]; const Vector::const_iterator e = rs.rules.end(); for (int tries = rs.rules.length(); tries > 0; --tries) { Rule* rl = *(rs.next); if (++(rs.next) == e) rs.next = rs.rules.begin(); int nrVariables = rl->getNrProtectedVariables(); context.clear(nrVariables); Subproblem* sp; if (rl->getNonExtLhsAutomaton()->match(subject, context, sp)) { if ((sp == 0 || sp->solve(true, context)) && (!(rl->hasCondition()) || rl->checkCondition(subject, context, sp))) { if (RewritingContext::getTraceStatus()) { context.tracePreRuleRewrite(subject, rl); if (context.traceAbort()) { delete sp; context.finished(); return 0; } } DagNode* r = rl->getRhsBuilder().construct(context); if (RewritingContext::getTraceStatus()) context.tracePostRuleRewrite(r); context.incrementRlCount(); delete sp; context.finished(); return r; } delete sp; } context.finished(); } return 0; } DagNode* ConfigSymbol::leftOverRewrite(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo) { Assert(subject->getSortIndex() != Sort::SORT_UNKNOWN, "sort unknown"); const Vector::const_iterator e = leftOver.rules.end(); for (int tries = leftOver.rules.length(); tries > 0; --tries) { Rule* rl = *(leftOver.next); if (++(leftOver.next) == e) leftOver.next = leftOver.rules.begin(); int nrVariables = rl->getNrProtectedVariables(); context.clear(nrVariables); Subproblem* sp; if (rl->getLhsAutomaton()->match(subject, context, sp, extensionInfo)) { if ((sp == 0 || sp->solve(true, context)) && (!(rl->hasCondition()) || rl->checkCondition(subject, context, sp))) { if (RewritingContext::getTraceStatus()) { context.tracePreRuleRewrite(subject, rl); if (context.traceAbort()) { delete sp; context.finished(); return subject; } } DagNode* r = extensionInfo->matchedWhole() ? rl->getRhsBuilder().construct(context) : subject->partialConstruct(rl->getRhsBuilder().construct(context), extensionInfo); context.incrementRlCount(); delete sp; context.finished(); return r; } delete sp; } context.finished(); } return 0; } DagNode* ConfigSymbol::retrieveObject(DagNode* rhs, DagNode* name, Remainder& remainder) { Symbol* s = rhs->symbol(); if (s == this) { ACU_DagNode* r = safeCast(ACU_DagNode*, rhs); int nrArgs = r->nrArgs(); for (int i = 0; i < nrArgs; ++i) { DagNode* d = r->getArgument(i); int m = r->getMultiplicity(i); if (objectSymbols.contains(d->symbol()->getIndexWithinModule())) { if (m == 1) { DagArgumentIterator j(d); if (j.valid() && j.argument()->equal(name)) { for (++i; i < nrArgs; ++i) { remainder.dagNodes.append(r->getArgument(i)); remainder.multiplicities.append(r->getMultiplicity(i)); } return d; } } else { IssueWarning("saw duplicate object: " << BEGIN_QUOTE << d << END_QUOTE); } } remainder.dagNodes.append(d); remainder.multiplicities.append(m); } return 0; } else { // // Check to see if rhs is the object we are looking for. // if (objectSymbols.contains(s->getIndexWithinModule())) { DagArgumentIterator j(rhs); if (j.valid() && j.argument()->equal(name)) return rhs; } } remainder.dagNodes.append(rhs); remainder.multiplicities.append(1); return 0; } Maude-2.7/src/ObjectSystem/objectSystemRewritingContext.hh0000644000147300135640000000506410103551612021003 00000000000000/* This file is part of the Maude 2 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 object system rewriting contexts. // #ifndef _objectSystemRewritingContext_hh_ #define _objectSystemRewritingContext_hh_ #include #include #include "rewritingContext.hh" #include "simpleRootContainer.hh" #include "objectSystem.hh" class ObjectSystemRewritingContext : public RewritingContext { NO_COPYING(ObjectSystemRewritingContext); public: enum Mode { STANDARD, // use standard rewriting FAIR, // use object-message fair rewriting EXTERNAL // as above, but allow interactions with external objects }; ObjectSystemRewritingContext(DagNode* root); ~ObjectSystemRewritingContext(); void addExternalObject(DagNode* name, ExternalObjectManagerSymbol* manager); void deleteExternalObject(DagNode* name); void bufferMessage(DagNode* target, DagNode* message); bool getExternalMessages(DagNode* target, list& messages); bool offerMessageExternally(DagNode* target, DagNode* message); void setObjectMode(Mode m); Mode getObjectMode() const; protected: void markReachableNodes(); private: struct dagNodeLt { bool operator()(const DagNode* d1, const DagNode* d2) { return d1->compare(d2) < 0; } }; typedef map ObjectMap; typedef map, dagNodeLt> MessageMap; Mode mode; ObjectMap externalObjects; MessageMap incomingMessages; }; inline ObjectSystemRewritingContext::ObjectSystemRewritingContext(DagNode* root) : RewritingContext(root) { mode = STANDARD; } inline void ObjectSystemRewritingContext::setObjectMode(Mode m) { mode = m; } inline ObjectSystemRewritingContext::Mode ObjectSystemRewritingContext::getObjectMode() const { return mode; } #endif Maude-2.7/src/ObjectSystem/pseudoThread.hh0000644000147300135640000001010412047302341015510 00000000000000/* This file is part of the Maude 2 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 i/o event driven pseudo threads. // #ifndef _pseudoThread_hh_ #define _pseudoThread_hh_ #include #include #include "timeStuff.hh" class PseudoThread { NO_COPYING(PseudoThread); public: PseudoThread() {} enum Flags { READ = POLLIN, WRITE = POLLOUT }; enum ReturnStatus { // // No clients are waiting for events. // NOTHING_PENDING = 1, // // poll() was aborted by a signal. // INTERRUPTED = 2, // // Events were processed during the eventLoop() call. // EVENT_HANDLED = 4 }; // // Make any pending call backs. // If a call back was made or we were interrupted by a signal or there are no pending call backs, return appropriate code. // Otherwise sleep until interrupted or a call back happens. // static int eventLoop(); // // Clear any requests for call backs on a given fd. // static void clearFlags(int fd); // // Request a call back when reading or writing on a given fd is possible. // timeOutAt is specified as an absolute number of seconds since the Unix Epoch, or NONE for never. // Only one object can wait on a given fd. // void wantTo(int flags, int fd, long timeOutAt = NONE); // // Request a call back at or after a given time. // notBefore is specified as an absolute number of seconds since the Unix Epoch. // void requestCallBack(long notBefore); // // Call back functions. // virtual void doRead(int fd); // a read is possible (or the other end of a socket was closed for some OS) virtual void doWrite(int fd); // a write is possible virtual void doError(int fd); // a error happened virtual void doHungUp(int fd); // the other end of a socket was closed when wanting to do a write (for some OS, when wanting to do a read) virtual void doTimeOut(int fd); // timeOutAt time reached on an fd virtual void doCallBack(); // notBefore time reached for a requested call back private: enum Values { MAX_NR_FDS = 1024 }; struct FD_Info { PseudoThread* owner; // only one owner allowed per fd short flags; short nextActive; // maintain a linked list of active fds (those with non-zero flags) short prevActive; long timeOutAt; }; struct CallBackRequest { CallBackRequest(PseudoThread* client, long notBefore); bool operator<(const CallBackRequest& c) const; PseudoThread* client; long notBefore; }; typedef priority_queue CallBackQueue; static long getTime(); static long processCallBacks(int& returnValue); static int processFds(long wait); static void link(int fd); static void unlink(int fd); // // All data is shared between PseudoThread objects since it refers to a common set of fds and a global call back queue. // static FD_Info fdInfo[MAX_NR_FDS]; static int firstActive; static CallBackQueue callBackQueue; }; inline PseudoThread::CallBackRequest::CallBackRequest(PseudoThread* client, long notBefore) : client(client), notBefore(notBefore) { } inline bool PseudoThread::CallBackRequest::operator<(const CallBackRequest& c) const { return notBefore > c.notBefore; // reversed! } inline long PseudoThread::getTime() { timeval time; gettimeofday(&time, 0); return time.tv_sec; } #endif Maude-2.7/src/ObjectSystem/remainder.cc0000644000147300135640000000307207666301674015046 00000000000000/* This file is part of the Maude 2 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. */ // // Container for leftover args during object-message rewriting. // struct ConfigSymbol::Remainder : private SimpleRootContainer { void dump(ostream& s, int indentLevel = 0); Vector dagNodes; Vector multiplicities; private: void markReachableNodes(); }; void ConfigSymbol::Remainder::markReachableNodes() { FOR_EACH_CONST(i, Vector, dagNodes) (*i)->mark(); } void ConfigSymbol::Remainder::dump(ostream& s, int indentLevel) { s << Indent(indentLevel) << "begin{Remainder}\n"; int nrRem = dagNodes.length(); for (int i = 0; i < nrRem; ++i) { s << Indent(indentLevel + 1) << multiplicities[i] << '\t' << dagNodes[i] << '\n'; } s << Indent(indentLevel) << "end{Remainder}\n"; } Maude-2.7/src/ObjectSystem/socketSignature.cc0000644000147300135640000000322610162423053016230 00000000000000/* This file is part of the Maude 2 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 all recognized constructors by the socket subsystem. // // 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, number of args) // MACRO(succSymbol, SuccSymbol, 1) MACRO(stringSymbol, StringSymbol, 0) MACRO(socketOidSymbol, FreeSymbol, 1) MACRO(createClientTcpSocketMsg, FreeSymbol, 4) MACRO(createServerTcpSocketMsg, FreeSymbol, 4) MACRO(createdSocketMsg, Symbol, 3) MACRO(acceptClientMsg, FreeSymbol, 2) MACRO(acceptedClientMsg, Symbol, 4) MACRO(sendMsg, FreeSymbol, 3) MACRO(sentMsg, Symbol, 2) MACRO(receiveMsg, FreeSymbol, 2) MACRO(receivedMsg, Symbol, 3) MACRO(closeSocketMsg, FreeSymbol, 2) MACRO(closedSocketMsg, Symbol, 3) MACRO(socketErrorMsg, Symbol, 3) Maude-2.7/src/ObjectSystem/pseudoThread.cc0000744000147300135640000001652212275057125015523 00000000000000/* This file is part of the Maude 2 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 PseudoThread. // #include #include // utility stuff #include "macros.hh" #include "pseudoThread.hh" PseudoThread::FD_Info PseudoThread::fdInfo[MAX_NR_FDS]; int PseudoThread::firstActive = NONE; PseudoThread::CallBackQueue PseudoThread::callBackQueue; void PseudoThread::requestCallBack(long notBefore) { callBackQueue.push(CallBackRequest(this, notBefore)); } long PseudoThread::processCallBacks(int& returnValue) { long now = getTime(); do { CallBackRequest c = callBackQueue.top(); // deep copy long wait = c.notBefore - now; if (wait > 0) return wait; // because call-backs are on in a priority queue, the first one with a positive wait determines the wait period // // Need to pop current request before dispatching call back because call back may request a new one. // callBackQueue.pop(); c.client->doCallBack(); returnValue |= EVENT_HANDLED; } while (!(callBackQueue.empty())); return NONE; } int PseudoThread::processFds(long wait) { static pollfd ufds[MAX_NR_FDS]; int nfds = 0; // cerr << "firstActive is " << firstActive << endl; long now = getTime(); for (int i = firstActive; i != NONE; i = fdInfo[i].nextActive) { Assert(fdInfo[i].flags != 0, "zero flags for " << i); ufds[nfds].fd = i; //cout << "polling fd " << i << " for " << fdInfo[i].flags << endl; ufds[nfds].events = fdInfo[i].flags; if (fdInfo[i].timeOutAt != NONE) { long delay = fdInfo[i].timeOutAt - now; if (delay < 0) delay = 0; if (wait < 0 || delay < wait) wait = delay; } ++nfds; } int milliseconds = -1; if (wait >= 0) { if (wait <= (INT_MAX / 1000)) milliseconds = 1000 * wait; else milliseconds = INT_MAX; } //cout << "----calling poll with nfds = " << nfds << endl; int n = poll(ufds, nfds, milliseconds); now = getTime(); // a significant amount of time may have passed while we were in poll() call //cout << "poll returns " << n << endl; if (n <= 0) { Assert(errno == EINTR, "poll() failed with " << errno); return INTERRUPTED; // treat all errors as interrupts } // // Dispatch pending events. // int returnValue = 0; for (int i = 0; i < nfds; i++) { //cout << "fd = " << ufds[i].fd << " revents = " << ufds[i].revents << endl; int fd = ufds[i].fd; FD_Info& info = fdInfo[fd]; short t = ufds[i].revents; if (t != 0) { Assert(!(t & POLLNVAL), "invalid fd " << fd); // // When we have an error we need to removed fd from // active list to avoid going into a spin. // if (t & POLLERR) { info.flags = 0; unlink(fd); info.owner->doError(fd); returnValue = EVENT_HANDLED; continue; } // // This is tricky. If we are wanting to read but // get disconnected: // Linux sets POLLHUP but not POLLIN; // BSD & Solaris set POLLIN but not POLLHUP; // DEC UNIX sets both flags even if there are still // chars to read. // if (t & POLLIN) { info.flags &= ~POLLIN; // clear POLLIN flag //info.flags = t & ~POLLIN; // reproduce bug; if (info.flags == 0) unlink(fd); info.timeOutAt = NONE; info.owner->doRead(fd); returnValue = EVENT_HANDLED; } else if (t & POLLHUP) { // // Need to removed fd from active list to avoid going // into a spin. But we don't want to do this until all // available chars have been read. // info.flags = 0; unlink(fd); info.owner->doHungUp(fd); returnValue = EVENT_HANDLED; continue; } if (t & POLLOUT) { info.flags &= ~POLLOUT; // clear POLLOUT flag //info.flags = t & ~POLLOUT; // reproduce bug; if (info.flags == 0) unlink(fd); info.timeOutAt = NONE; info.owner->doWrite(fd); returnValue = EVENT_HANDLED; } } else { // // Check for time out. // if (info.timeOutAt != NONE && info.timeOutAt < now) { info.flags = 0; unlink(fd); info.owner->doTimeOut(fd); returnValue = EVENT_HANDLED; } } } return returnValue; } int PseudoThread::eventLoop() { // // We return for one or more of 3 reasons: // NOTHING_PENDING: no clients waiting for callbacks // INTERRUPTED: a non-ignored signal arrived // EVENT_HANDLED: at least one callback was made // int returnValue = 0; for(;;) { // // If we have timed call backs, dispatch any that are due, and // compute how many seconds until the next is ready to go. // long wait = NONE; if (!callBackQueue.empty()) wait = processCallBacks(returnValue); // // If we have fd call backs pending, process them. // if (firstActive != NONE) { returnValue |= processFds(wait); if (returnValue != 0) break; } else { if (returnValue != 0) break; if (wait == NONE) return NOTHING_PENDING; if (sleep(wait) != 0) return INTERRUPTED; } } return returnValue; } void PseudoThread::clearFlags(int fd) { if (fdInfo[fd].flags != 0) { fdInfo[fd].flags = 0; unlink(fd); } } void PseudoThread::wantTo(int flags, int fd, long timeOutAt) { Assert(flags != 0, "empty flags for " << fd); int t = fdInfo[fd].flags; if (t == 0) { link(fd); fdInfo[fd].owner = this; } else Assert(fdInfo[fd].owner == this, "owner mismatch for " << fd); fdInfo[fd].flags = t | flags; fdInfo[fd].timeOutAt = timeOutAt; } void PseudoThread::doRead(int fd) { Assert(false, "failed to do read on " << fd); } void PseudoThread::doWrite(int fd) { Assert(false, "failed to do write on " << fd); } void PseudoThread::doError(int fd) { Assert(false, "failed to do error on " << fd); } void PseudoThread::doHungUp(int fd) { Assert(false, "failed to do hung up on " << fd); } void PseudoThread::doTimeOut(int fd) { Assert(false, "failed to do time out on " << fd); } void PseudoThread::doCallBack() { Assert(false, "failed to do call back"); } void PseudoThread::link(int fd) { fdInfo[fd].prevActive = NONE; fdInfo[fd].nextActive = firstActive; if (firstActive != NONE) fdInfo[firstActive].prevActive = fd; firstActive = fd; } void PseudoThread::unlink(int fd) { int prev = fdInfo[fd].prevActive; int next = fdInfo[fd].nextActive; if (next != NONE) fdInfo[next].prevActive = prev; if (prev != NONE) fdInfo[prev].nextActive = next; else firstActive = next; } Maude-2.7/src/ObjectSystem/socketManagerSymbol.hh0000644000147300135640000001143112040374206017040 00000000000000/* This file is part of the Maude 2 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 socket manager symbols. // #ifndef _socketManagerSymbol_hh_ #define _socketManagerSymbol_hh_ #include #include "externalObjectManagerSymbol.hh" #include "pseudoThread.hh" #include "dagRoot.hh" class SocketManagerSymbol : public ExternalObjectManagerSymbol, public PseudoThread { NO_COPYING(SocketManagerSymbol); public: SocketManagerSymbol(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); // // Overridden methods from ExternalObjectManagerSymbol. // bool handleManagerMessage(DagNode* message, ObjectSystemRewritingContext& context); bool handleMessage(DagNode* message, ObjectSystemRewritingContext& context); void cleanUp(DagNode* objectId); // // Overridden methods from PseudoThread. // void doRead(int fd); void doWrite(int fd); void doError(int fd); void doHungUp(int fd); private: enum Sizes { READ_BUFFER_SIZE = 4096 }; enum SocketState { NOMINAL = 0, WAITING_TO_CONNECT= 1, WAITING_TO_READ = 2, WAITING_TO_WRITE = 4, LISTENING = 8, WAITING_TO_ACCEPT = 16 }; struct ActiveSocket { ActiveSocket(); ~ActiveSocket(); int state; // // If we are in a waiting state, we need to keep pointers to the last message // and the original rewriting context so that we can handle an asynchronous response from // the operating system. // DagRoot lastMessage; // must be protected from GC // // Since destruction of the context causes a cleanUp() call for each registered external // object, this should not become a dangling pointer. // ObjectSystemRewritingContext* originalContext; // // Outgoing text. // //crope text; char* textArray; const char* unsent; crope::size_type nrUnsent; }; typedef map SocketMap; bool getPort(DagNode* protocolArg, int& protocol); bool getActiveSocket(DagNode* socketArg, int& socketId, ActiveSocket*& asp); bool getText(DagNode* textArg, crope& text); bool setNonblockingFlag(int fd, FreeDagNode* message, ObjectSystemRewritingContext& context); void errorReply(const char* errorMessage, FreeDagNode* orignalMessage, ObjectSystemRewritingContext& context); void createdSocketReply(int fd, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context); void acceptedClientReply(const char* addr, int fd, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context); void sentMsgReply(FreeDagNode* originalMessage, ObjectSystemRewritingContext& context); void receivedMsgReply(char buffer[], ssize_t length, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context); void closedSocketReply(int socketId, const char* errorMessage, FreeDagNode* originalMessage, ObjectSystemRewritingContext& context); bool createClientTcpSocket(FreeDagNode* message, ObjectSystemRewritingContext& context); bool createServerTcpSocket(FreeDagNode* message, ObjectSystemRewritingContext& context); bool acceptClient(FreeDagNode* message, ObjectSystemRewritingContext& context); bool send(FreeDagNode* message, ObjectSystemRewritingContext& context); bool receive(FreeDagNode* message, ObjectSystemRewritingContext& context); bool closeSocket(FreeDagNode* message, ObjectSystemRewritingContext& context); // // Socket subsystem signature (generated by macro expansion). // #define MACRO(SymbolName, SymbolClass, NrArgs) \ SymbolClass* SymbolName; #include "socketSignature.cc" #undef MACRO SocketMap activeSockets; }; #endif Maude-2.7/src/ObjectSystem/socketAsync.cc0000644000147300135640000001647312040371226015355 00000000000000/* This file is part of the Maude 2 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. */ // // PseudoThread callbacks to handle nonblocking I/O. // void SocketManagerSymbol::doRead(int fd) { //cerr << "SocketManagerSymbol::doRead()" << endl; SocketMap::iterator i = activeSockets.find(fd); Assert(i != activeSockets.end(), "read callback for nonexistent socket " << fd); ActiveSocket& as = i->second; if (as.state & WAITING_TO_READ) { FreeDagNode* message = safeCast(FreeDagNode*, as.lastMessage.getNode()); ObjectSystemRewritingContext& context = *(as.originalContext); char buffer[READ_BUFFER_SIZE]; ssize_t n; do n = read(fd, buffer, READ_BUFFER_SIZE); while (n == -1 && errno == EINTR); //cerr << "n = " << n << endl; if (n > 0) { as.state = NOMINAL; receivedMsgReply(buffer, n, message, context); as.lastMessage.setNode(0); // allow GC of last message } else { if (n < 0) { const char* errText = strerror(errno); DebugAdvisory("unexpected read() error in callback: " << errText); closedSocketReply(fd, errText, message, context); } else { DebugAdvisory("read 0 bytes in callback"); closedSocketReply(fd, "", message, context); } } } else if (as.state & WAITING_TO_ACCEPT) { //ActiveSocket& as = activeSockets[fd]; sockaddr_in sockName; socklen_t addrLen = sizeof(sockName); int r; do r = accept(fd, reinterpret_cast(&sockName), &addrLen); while (r == -1 && errno == EINTR); FreeDagNode* message = safeCast(FreeDagNode*, as.lastMessage.getNode()); ObjectSystemRewritingContext& context = *(as.originalContext); as.state = LISTENING; if (r >= 0) { if (setNonblockingFlag(r, message, context)) { acceptedClientReply(inet_ntoa(sockName.sin_addr), r, message, context); activeSockets[r].state = NOMINAL; // this creates the new ActiveSocket object } } else { // // What should we do with a socket that we failed to accept on? // const char* errText = strerror(errno); DebugAdvisory("unexpected accept() error: " << errText); errorReply(errText, message, context); } as.lastMessage.setNode(0); // allow GC of last message } else { Assert(false, "unwanted read callback for socket " << fd); } } void SocketManagerSymbol::doWrite(int fd) { //cerr << "SocketManagerSymbol::doWrite()" << endl; SocketMap::iterator i = activeSockets.find(fd); Assert(i != activeSockets.end(), "write callback for nonexistent socket " << fd); ActiveSocket& as = i->second; if (as.state & WAITING_TO_CONNECT) { int errorCode; socklen_t errorSize = sizeof(errorCode); #ifdef NO_ASSERT (void) getsockopt(fd, SOL_SOCKET, SO_ERROR, &errorCode, &errorSize); #else int r = getsockopt(fd, SOL_SOCKET, SO_ERROR, &errorCode, &errorSize); Assert(r == 0 && errorSize == sizeof(errorCode), "getsockopt() problem"); #endif FreeDagNode* message = safeCast(FreeDagNode*, as.lastMessage.getNode()); ObjectSystemRewritingContext& context = *(as.originalContext); if (errorCode == 0) { createdSocketReply(fd, message, context); as.state = NOMINAL; as.lastMessage.setNode(0); // allow GC of last message } else { close(fd); errorReply("failed to connect", message, context); activeSockets.erase(i); } } else if (as.state & WAITING_TO_WRITE) { FreeDagNode* message = safeCast(FreeDagNode*, as.lastMessage.getNode()); ObjectSystemRewritingContext& context = *(as.originalContext); ssize_t n; do n = write(fd, as.unsent, as.nrUnsent); while (n == -1 && errno == EINTR); //cerr << "n = " << n << endl; if (n > 0) { as.nrUnsent -= n; //cerr << "as.nrUnsent = " << as.nrUnsent << endl; if (as.nrUnsent == 0) { as.state = NOMINAL; // clear as.text delete [] as.textArray; as.textArray = 0; sentMsgReply(message, context); as.lastMessage.setNode(0); // allow GC of last message } else { as.unsent += n; wantTo(WRITE, fd); } } else { if (n < 0) { const char* errText = strerror(errno); DebugAdvisory("unexpected write() error in callback: " << errText); closedSocketReply(fd, errText, message, context); } else { DebugAdvisory("wrote 0 bytes in callback"); closedSocketReply(fd, "", message, context); } } } else { Assert(false, "unwanted write callback for socket " << fd); } } void SocketManagerSymbol::doError(int fd) { //cerr << "SocketManagerSymbol::doError()" << endl; SocketMap::iterator i = activeSockets.find(fd); if (i == activeSockets.end()) // handle gracefully - may have already been closed { DebugAdvisory("error callback for nonexistent socket " << fd); } else { //cerr << "valid socket\n"; ActiveSocket& as = i->second; //cerr << "state = " << as.state << endl; if (as.state & (WAITING_TO_CONNECT | WAITING_TO_WRITE | WAITING_TO_READ)) { int errorCode; socklen_t errorSize = sizeof(errorCode); #ifdef NO_ASSERT getsockopt(fd, SOL_SOCKET, SO_ERROR, &errorCode, &errorSize); #else int r = getsockopt(fd, SOL_SOCKET, SO_ERROR, &errorCode, &errorSize); Assert(r == 0 && errorSize == sizeof(errorCode), "getsockopt() problem"); #endif //cerr << "injecting closed message\n"; FreeDagNode* message = safeCast(FreeDagNode*, as.lastMessage.getNode()); ObjectSystemRewritingContext& context = *(as.originalContext); closedSocketReply(fd, strerror(errorCode), message, context); } else { Assert(false, "unwanted error callback for socket " << fd); } } } void SocketManagerSymbol::doHungUp(int fd) { //cerr << "SocketManagerSymbol::doHungUp()" << endl; SocketMap::iterator i = activeSockets.find(fd); if (i == activeSockets.end()) // handle gracefully - may have already been closed { DebugAdvisory("hung up callback for nonexistent socket " << fd); } else { //cerr << "valid socket\n"; ActiveSocket& as = i->second; //cerr << "state = " << as.state << endl; if (as.state & (WAITING_TO_CONNECT | WAITING_TO_WRITE | WAITING_TO_READ)) { //cerr << "injecting closed message\n"; FreeDagNode* message = safeCast(FreeDagNode*, as.lastMessage.getNode()); ObjectSystemRewritingContext& context = *(as.originalContext); closedSocketReply(fd, "hung up callback", message, context); } else { Assert(false, "unwanted hung up callback for socket " << fd); } } } Maude-2.7/src/FreeTheory/0000755000147300135640000000000012305232004012260 500000000000000Maude-2.7/src/FreeTheory/freeLhsStructs.hh0000644000147300135640000000267411346034551015525 00000000000000/* This file is part of the Maude 2 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 structs shared between FreeLhsAutomaton and FreeRemainder. // #ifndef _freeLhsStructs_hh_ #define _freeLhsStructs_hh_ class FreeLhsStructs { protected: struct FreeVariable { short position; short argIndex; int varIndex; Sort* sort; }; struct BoundVariable { short position; short argIndex; int varIndex; }; struct GroundAlien { short position; short argIndex; Term* alien; }; struct NonGroundAlien { short position; short argIndex; LhsAutomaton* automaton; }; }; #endif Maude-2.7/src/FreeTheory/freeRemainder.hh0000744000147300135640000001662712273071674015330 00000000000000/* This file is part of the Maude 2 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 matching whats left of a pattern after free symbols have // been matched (could we derive FreeLhsAutomaton from this?). // #ifndef _freeRemainder_hh_ #define _freeRemainder_hh_ #include "freeLhsStructs.hh" #include "rewritingContext.hh" #include "equation.hh" class FreeRemainder : private FreeLhsStructs { NO_COPYING(FreeRemainder); public: FreeRemainder(Equation* eqn, const Vector& freeSymbols, const Vector& freeVars, const Vector& boundVars, const Vector& gndAliens, const Vector& nonGndAliens, const Vector& bestSequence, const Vector& subAutomata, const Vector& slotTranslation); FreeRemainder(Equation* eqn); // trivial FreeRemainder for foreign equations ~FreeRemainder(); bool fastMatchReplace(DagNode* subject, RewritingContext& context, Vector& stack) const; bool slowMatchReplace(DagNode* subject, RewritingContext& context, Vector& stack) const; bool isOwise() const; // // Stuff for stack machine execution // bool fastCheckAndBind(DagNode** binding, Vector& stack) const; bool generalCheckAndBind(DagNode** binding, Vector& stack) const; bool slowCheckAndBind(DagNode** binding, Vector& stack) const; Instruction* getFirstInstruction() const; bool fastHandling() const; #ifdef DUMP void dump(ostream& s, int indentLevel = 0); #endif private: bool slowMatchReplace2(DagNode* subject, RewritingContext& context, Vector& stack) const; // // To qualify for "fast" treatment the associated equation must: // (1) have a lhs that parses into a non-error sort // (2) have only free symbols in lhs // (3) be left linear // (4) be unconditional // (5) have no "problem" variables (ones which need their bindings copied to avoid // eager evaluation of lazy subterm) // (6) have the sort of each variable qualify with fastGeqSufficient() // To qualify for "super-fast", additionally each variable must have a sort that // is the unique maximal user sort in its component which must be error-free. // Byte fast; // > 0 super-fast; < 0 fast; = 0 slow const bool foreign; // remainder consists of a foreign equation that might collapse into free theory Vector freeVariables; Equation* const equation; // equation we are a remainder of Vector boundVariables; Vector groundAliens; Vector nonGroundAliens; //Instruction* firstInstruction; }; inline bool FreeRemainder::fastHandling() const { return fast != 0; } inline bool FreeRemainder::fastMatchReplace(DagNode* subject, RewritingContext& context, Vector& stack) const { if (!(RewritingContext::getTraceStatus())) { if (fast > 0) { Vector::const_iterator stackBase = stack.begin(); FOR_EACH_CONST(i, Vector, freeVariables) { DagNode* d = stackBase[i->position][i->argIndex]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information"); context.bind(i->varIndex, d); } } else if (fast < 0) { Vector::const_iterator stackBase = stack.begin(); FOR_EACH_CONST(i, Vector, freeVariables) { DagNode* d = stackBase[i->position][i->argIndex]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information"); if (d->fastLeq(i->sort)) context.bind(i->varIndex, d); else return false; } } else goto slow; equation->getRhsBuilder().replace(subject, context); context.incrementEqCount(); MemoryCell::okToCollectGarbage(); return true; } slow: return slowMatchReplace(subject, context, stack); } inline bool FreeRemainder::isOwise() const { return equation->isOwise(); } inline bool FreeRemainder::fastCheckAndBind(DagNode** binding, Vector& stack) const { // // We only handle the "super-fast" and "fast" cases. // Vector::const_iterator stackBase = stack.begin(); if (fast > 0) { // // Super-fast case: bind variables without sort check. // FOR_EACH_CONST(i, Vector, freeVariables) { DagNode* d = stackBase[i->position][i->argIndex]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information"); Assert(d->leq(i->sort), "super-fast case fails sort check"); binding[i->varIndex] = d; } } else { Assert(fast < 0, "neither super-fast nor fast case"); // // Fast case: bind variables after fast sort check. // FOR_EACH_CONST(i, Vector, freeVariables) { DagNode* d = stackBase[i->position][i->argIndex]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information"); if (d->fastLeq(i->sort)) binding[i->varIndex] = d; else return false; } } return true; } inline bool FreeRemainder::generalCheckAndBind(DagNode** binding, Vector& stack) const { // // Just like fastCheckAndBind() except that it calls slowCheckAndBind() // if the remainder is not "super-fast" or "fast". // This extra test, and especially the possibility of a function call, is // undesirable in tight code where fast-ness has already been determined, // hence the existence of fastCheckAndBind(). // Vector::const_iterator stackBase = stack.begin(); if (fast > 0) { // // Super-fast case: bind variables without sort check. // FOR_EACH_CONST(i, Vector, freeVariables) { DagNode* d = stackBase[i->position][i->argIndex]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information"); Assert(d->leq(i->sort), "super-fast case fails sort check"); binding[i->varIndex] = d; } } else if (fast < 0) { // // Fast case: bind variables after fast sort check. // FOR_EACH_CONST(i, Vector, freeVariables) { DagNode* d = stackBase[i->position][i->argIndex]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information"); if (d->fastLeq(i->sort)) binding[i->varIndex] = d; else return false; } } else { // // Remainder is neither "super-fast" nor "fast". Call out-lined code to // do the most general thing. // return slowCheckAndBind(binding, stack); } return true; } inline Instruction* FreeRemainder::getFirstInstruction() const { return equation->getInstructionSequence(); // HACK - eventually we should snap this pointer to avoid the extra dereference } #endif Maude-2.7/src/FreeTheory/freeTermFullCompiler.cc0000644000147300135640000000463607666302714016633 00000000000000/* This file is part of the Maude 2 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 help with full compilation of free terms // #include "freePositionTable.hh" #include "freeSubterm.hh" bool FreeTerm::scanFreeSkeleton(const NatSet& usedVariables, Vector& path, FreePositionTable& positions, NatSet& boundVariables, Vector& subterms) { bool unfailing = true; int last = path.length(); path.expandBy(1); int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { path[last] = i; Term* t = argArray[i]; if (FreeTerm* f = dynamic_cast(t)) { if (!(f->scanFreeSkeleton(usedVariables, path, positions, boundVariables, subterms))) unfailing = false; } else { int posIndex = positions.position2Index(path); if (VariableTerm* v = dynamic_cast(t)) { int varIndex = v->getIndex(); if (boundVariables.contains(varIndex)) { unfailing = false; subterms.append(FreeSubterm(FreeSubterm::BOUND_VARIABLE, posIndex)); } else { boundVariables.insert(varIndex); int efm = v->getSort()->errorFreeMaximal(); if (!efm) unfailing = false; if (!efm || usedVariables.contains(varIndex) || t->occursInContext().contains(varIndex)) subterms.append(FreeSubterm(FreeSubterm::FREE_VARIABLE, posIndex)); } } else { unfailing = false; if (t->ground()) subterms.append(FreeSubterm(FreeSubterm::GROUND_ALIEN, posIndex)); else subterms.append(FreeSubterm(FreeSubterm::NON_GROUND_ALIEN, posIndex)); } } } path.contractTo(last); return unfailing; } Maude-2.7/src/FreeTheory/freeTerm.hh0000744000147300135640000001062612223416377014320 00000000000000/* This file is part of the Maude 2 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 free theory. // #ifndef _freeTerm_hh_ #define _freeTerm_hh_ #include "term.hh" #include "freeSubterm.hh" class FreeTerm : public Term { public: FreeTerm(FreeSymbol* symbol, const Vector& arguments); ~FreeTerm(); // // 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; 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); // // Optional stuff that is easy to define for free theory. // bool earlyMatchFailOnInstanceOf(const Term* other) const; bool subsumes(const Term* other, bool sameVariableSet) const; int partialCompareArguments(const Substitution& partialSubstitution, DagNode* other) const; void computeMatchIndices() const; // // Functions particular to free terms. // FreeSymbol* symbol() const; Term* locateSubterm(const Vector& position, int backup = 0); Term* locateSubterm2(Vector& position); int getSlotIndex() const; void setSlotIndex(int index); void setVisitedFlag(bool state); void findActiveSlots(NatSet& slots); FreeRemainder* compileRemainder(Equation* equation, const Vector& slotTranslation); bool scanFreeSkeleton(const NatSet& usedVariables, Vector& path, FreePositionTable& positions, NatSet& boundVariables, Vector& subterms); void resetSlotIndices(); private: FreeTerm(const FreeTerm& original, FreeSymbol* symbol, SymbolMap* translator); struct CP_Sequence; static void findConstraintPropagationSequence(const Vector& aliens, const NatSet& boundUniquely, CP_Sequence& bestSequence); static void findConstraintPropagationSequence(const Vector& aliens, Vector& currentSequence, const NatSet& boundUniquely, int step, CP_Sequence& bestSequence); static bool remainingAliensContain(const Vector& aliens, Vector& currentSequence, int step, int us, const NatSet& interestingVariables); void scanFreeSkeleton(Vector& freeSymbols, Vector& otherSymbols, int parent = -1, int argIndex = -1); void compileRhsAliens(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext); int compileRhs3(FreeRhsAutomaton* automaton, RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext); Vector argArray; short slotIndex; Bool visitedFlag; }; inline FreeSymbol* FreeTerm::symbol() const { return safeCast(FreeSymbol*, Term::symbol()); } inline int FreeTerm::getSlotIndex() const { return slotIndex; } inline void FreeTerm::setSlotIndex(int index) { slotIndex = index; } inline void FreeTerm::setVisitedFlag(bool state) { visitedFlag = state; } #endif Maude-2.7/src/FreeTheory/freeTerm.cc0000744000147300135640000003075312223417552014305 00000000000000/* This file is part of the Maude 2 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 FreeTerm. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "rawArgumentIterator.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" // core class definitions #include "variableTerm.hh" #include "rewritingContext.hh" #include "equation.hh" #include "symbolMap.hh" #include "termBag.hh" #include "rhsBuilder.hh" // free theory class definitions #include "freeNet.hh" #include "freeSymbol.hh" #include "freeOccurrence.hh" #include "freeDagNode.hh" #include "freeArgumentIterator.hh" #include "freeLhsAutomaton.hh" #include "freeRhsAutomaton.hh" #include "freeRemainder.hh" #include "freeTerm.hh" #include "freeLhsCompiler.cc" //#ifdef COMPILER #include "freeTermFullCompiler.cc" //#endif FreeTerm::FreeTerm(FreeSymbol* symbol, const Vector& arguments) : Term(symbol), argArray(arguments.length()) { int nrArgs = arguments.length(); Assert(symbol->arity() == nrArgs, "number of arguments does not match symbol definition for " << symbol); for (int i = 0; i < nrArgs; i++) argArray[i] = arguments[i]; slotIndex = -1; visitedFlag = false; } FreeTerm::FreeTerm(const FreeTerm& original, FreeSymbol* symbol, SymbolMap* translator) : Term(symbol), argArray(original.argArray.length()) { int nrArgs = original.argArray.length(); for (int i = 0; i < nrArgs; ++i) argArray[i] = original.argArray[i]->deepCopy(translator); slotIndex = -1; visitedFlag = false; } FreeTerm::~FreeTerm() { } RawArgumentIterator* FreeTerm::arguments() { if (argArray.length() == 0) return 0; else return new FreeArgumentIterator(&argArray); } void FreeTerm::deepSelfDestruct() { int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) argArray[i]->deepSelfDestruct(); delete this; } Term* FreeTerm::deepCopy2(SymbolMap* translator) const { FreeSymbol* s = symbol(); if (translator != 0) { Symbol* s2 = translator->translate(s); if (s2 == 0) return translator->translateTerm(this); s = dynamic_cast(s2); if (s == 0) { int nrArgs = argArray.length(); Vector args(nrArgs); for (int i = 0; i < nrArgs; ++i) args[i] = argArray[i]->deepCopy(translator); return s2->makeTerm(args); } } return new FreeTerm(*this, s, translator); } Term* FreeTerm::normalize(bool full, bool& changed) { changed = false; unsigned int hashValue = symbol()->getHashValue(); int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { bool subtermChanged; Term* t = argArray[i]->normalize(full, subtermChanged); argArray[i] = t; hashValue = hash(hashValue, t->getHashValue()); if (subtermChanged) changed = true; } setHashValue(hashValue); return this; } int FreeTerm::compareArguments(const Term* other) const { Assert(symbol() == other->symbol(), "symbols differ"); int nrArgs = argArray.length(); Vector& ta = (const_cast(static_cast(other)))->argArray; for (int i = 0; i < nrArgs; i++) { int r = argArray[i]->compare(ta[i]); if (r != 0) return r; } return 0; } int FreeTerm::compareArguments(const DagNode* other) const { Assert(symbol() == other->symbol(), "symbols differ"); int nrArgs = other->symbol()->arity(); if (nrArgs != 0) { DagNode** q = static_cast(other)->argArray(); Vector::const_iterator p = argArray.begin(); for (;;) { int r = (*p)->compare(*q); if (r != 0) return r; if (--nrArgs == 0) break; ++p; ++q; } } return 0; } int FreeTerm::partialCompareArguments(const Substitution& partialSubstitution, DagNode* other) const { Assert(symbol() == other->symbol(), "symbols differ"); int nrArgs = argArray.length(); if (nrArgs != 0) { DagNode** da = safeCast(FreeDagNode*, other)->argArray(); FOR_EACH_CONST(i, Vector, argArray) { int r = (*i)->partialCompare(partialSubstitution, *da); if (r != EQUAL) return r; ++da; } } return 0; } void FreeTerm::findEagerVariables(bool atTop, NatSet& eagerVariables) const { int nrArgs = argArray.length(); FreeSymbol* sym = symbol(); for (int i = 0; i < nrArgs; i++) { if (atTop ? sym->eagerArgument(i) : sym->evaluatedArgument(i)) argArray[i]->findEagerVariables(false, eagerVariables); } } void FreeTerm::markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables) { int nrArgs = argArray.length(); FreeSymbol* sym = symbol(); for (int i = 0; i < nrArgs; i++) { if (sym->eagerArgument(i)) argArray[i]->markEager(nrVariables, eagerVariables, problemVariables); } } void FreeTerm::computeMatchIndices() const { // // Make sure each stable symbol at the top of one of our arguments has // a non-zero match index. This is done recursively. // FOR_EACH_CONST(i, Vector, argArray) { Term* t = *i; Symbol* s = t->symbol(); if (s->isStable() && s->getMatchIndex() == 0) s->setMatchIndex(s->rangeComponent()->getNewMatchIndex()); t->computeMatchIndices(); } } Term* FreeTerm::locateSubterm(const Vector& position, int backup) { Term* t = this; int nrSteps = position.length() - backup; for (int i = 0; i < nrSteps; i++) { FreeTerm* f = dynamic_cast(t); if (f == 0) return 0; int p = position[i]; if (p >= f->symbol()->arity()) return 0; t = (f->argArray)[p]; } return t; } Term* FreeTerm::locateSubterm2(Vector& position) { Term* t = this; int nrSteps = position.length(); for (int i = 0; i < nrSteps; i++) { FreeTerm* f = dynamic_cast(t); if (f == 0) { position.contractTo(i); return t; } int p = position[i]; if (p >= f->symbol()->arity()) { position.contractTo(i); return t; } t = (f->argArray)[p]; } return t; } void FreeTerm::findActiveSlots(NatSet& slots) { // // A free term's slot is active if it has been visited and it has // at least one subterm which has not been visited (or is alien) or // which has a save index for left -> right sharing. // int nrArgs = argArray.length(); bool active = false; for (int i = 0; i < nrArgs; i++) { FreeTerm* f = dynamic_cast(argArray[i]); if (f != 0 && f->visitedFlag) { f->findActiveSlots(slots); if (f->getSaveIndex() != NONE) active = true; } else active = true; } if (active) { Assert(slotIndex != NONE, "no slot index for active FreeTerm " << this); slots.insert(slotIndex); } } DagNode* FreeTerm::dagify2() { FreeDagNode* d = new FreeDagNode(symbol()); int nrArgs = symbol()->arity(); if (nrArgs != 0) { DagNode** p = d->argArray(); for (int i = 0; i < nrArgs; i++, p++) (*p) = argArray[i]->dagify(); } return d; } bool FreeTerm::earlyMatchFailOnInstanceOf(const Term* other) const { if (symbol() != other->symbol()) return other->stable(); // terms headed by free symbols are always stable int nrArgs = argArray.length(); Vector& argArray2 = const_cast(static_cast(other))->argArray; for (int i = 0; i < nrArgs; i++) { if (argArray[i]->earlyMatchFailOnInstanceOf(argArray2[i])) return true; } return false; } bool FreeTerm::subsumes(const Term* other, bool sameVariableSet) const { if (symbol() != other->symbol()) return false; int nrArgs = argArray.length(); const Vector& argArray2 = safeCast(const FreeTerm*, other)->argArray; for (int i = 0; i < nrArgs; i++) { if (!argArray[i]->subsumes(argArray2[i], sameVariableSet)) return false; } return true; } void FreeTerm::findAvailableTerms(TermBag& availableTerms, bool eagerContext, bool atTop) { if (ground()) return; int nrArgs = argArray.length(); FreeSymbol* s = symbol(); if (atTop) { for (int i = 0; i < nrArgs; i++) argArray[i]->findAvailableTerms(availableTerms, eagerContext && s->eagerArgument(i)); } else { availableTerms.insertMatchedTerm(this, eagerContext); for (int i = 0; i < nrArgs; i++) argArray[i]->findAvailableTerms(availableTerms, eagerContext && s->evaluatedArgument(i)); } } int FreeTerm::compileRhs2(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext) { compileRhsAliens(rhsBuilder, variableInfo, availableTerms, eagerContext); FreeRhsAutomaton* automaton = new FreeRhsAutomaton(); int index = compileRhs3(automaton, rhsBuilder, variableInfo, availableTerms, eagerContext); rhsBuilder.addRhsAutomaton(automaton); return index; } void FreeTerm::compileRhsAliens(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext) { // // Traverse the free skeleton, calling compileRhs() on all non-free subterms. // int nrArgs = argArray.length(); FreeSymbol* s = symbol(); for (int i = 0; i < nrArgs; i++) { bool argEager = eagerContext && s->eagerArgument(i); Term* t = argArray[i]; if (FreeTerm* f = dynamic_cast(t)) { if (!(availableTerms.findTerm(f, argEager))) f->compileRhsAliens(rhsBuilder, variableInfo, availableTerms, argEager); } else (void) t->compileRhs(rhsBuilder, variableInfo, availableTerms, argEager); } } int FreeTerm::compileRhs3(FreeRhsAutomaton* automaton, 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]->computeSize(); // larger terms to the front order[i].second = i; } sort(order.begin(), order.end()); // // Consider each argument in largest first order. // FreeSymbol* s = symbol(); Vector sources(nrArgs); FOR_EACH_CONST(i, PairVec, order) { int argNr = i->second; bool argEager = eagerContext && s->eagerArgument(argNr); Term* t = argArray[argNr]; if (FreeTerm* f = dynamic_cast(t)) { // // Argument is free - see if we need to compile it into current automaton. // if (!(availableTerms.findTerm(f, argEager))) { int source = f->compileRhs3(automaton, rhsBuilder, variableInfo, availableTerms, argEager); sources[argNr] = source; f->setSaveIndex(source); availableTerms.insertBuiltTerm(f, argEager); continue; } } // // Alien, variable or available term so use standard mechanism. // sources[argNr] = t->compileRhs(rhsBuilder, variableInfo, availableTerms, argEager); } // // Need to flag last use of each source. // { FOR_EACH_CONST(i, Vector, sources) variableInfo.useIndex(*i); } // // Add to free step to automaton. // int destination = variableInfo.makeConstructionIndex(); automaton->addFree(s, destination, sources); return destination; } void FreeTerm::resetSlotIndices() { slotIndex = -1; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { if (FreeTerm* f = dynamic_cast(argArray[i])) f->resetSlotIndices(); } } Maude-2.7/src/FreeTheory/ChangeLog0000744000147300135640000046665412277277357014034 000000000000002014-02-13 Steven Eker * freeRhsAutomaton.cc (recordInfo): don't pass needContiguous argument to recordFunctionEval() ===================================Maude101=========================================== 2014-01-31 Steven Eker * freeSymbol.cc (generateFinalInstruction, generateInstruction): check for fast handling and use most general case if not * freeNet.hh (fastHandling): added * freeNet.cc (FreeNet): added * freeNet.hh (F): declare ctor * freeNet.cc (buildRemainders): compute value for fast data member * freeRemainder.hh (fastCheckAndBind): added Assert() that we really don't require slow case processing (fastCheckAndBind, generalCheckAndBind): better commenting (fastHandling): added 2013-12-20 Steven Eker * freeGeneralExtorFinal.cc (execute): use generalCheckAndBind() * freeGeneralExtor.cc (execute): use generalCheckAndBind() * freeRemainder.cc (slowCheckAndBind): added * freeRemainder.hh (generalCheckAndBind): added (FreeLhsStructs): added decl for slowCheckAndBind 2013-11-21 Steven Eker * freeInstruction.cc (execute): refactored, so that ctor cases always preload symbol since this seems to give better code * freeRemainder.cc (FreeRemainder): rearranged "fast" and "super-fast" determination; use fastGeqSufficient() * freeRemainder.hh (fastMatchReplace, fastCheckAndBind): use fastLeq() ===================================Maude100a=========================================== 2013-10-27 Steven Eker * freeTheory.hh: added classes FreeGeneralExtor and FreeGeneralExtorFinal * freeSymbol.cc (generateFinalInstruction): use FreeGeneralExtorFinal() * freeGeneralExtorFinal.hh: created * freeGeneralExtorFinal.cc: created * freeDagNode.hh (DagNode): new friends FreeGeneralExtor and FreeGeneralExtorFinal * freeNet.hh (F): new friends FreeGeneralExtor and FreeGeneralExtorFinal * freeSymbol.cc (generateInstruction): use FreeGeneralExtor() * freeGeneralExtor.hh: created * freeGeneralExtor.cc: created * freeNetExec.cc (applyReplaceNoOwise2, applyReplaceFast2) (applyReplace2): make diff long to take advantage of long symbolIndex in new TestNode * freeNet.hh (F): new TestNode layout * freeNetExec.hh (findRemainderListIndex): change diff to long * freeNet.hh (F): undo "quick hack" from 2013/5/11 * freeInstruction.cc (execute): reverted to pre scratchpad code * freeRemainder.hh (fastCheckAndBind): reverted to pre scratchpad code * freeNetExec.hh (findRemainderListIndex): reverted to pre scratchpad code 2013-10-26 Steven Eker * freeInstruction.cc (execute): try storing pointer to localArgList in scratchpad at the outset (execute): fails - free net code craps on this pointer when it reuses the 0 slot * freeNetExec.hh (findRemainderListIndex): take argList as well * freeInstruction.cc (execute): rewritten use use rawScratchPad * freeRemainder.hh (fastCheckAndBind): take stackBase argument * freeNet.hh (F): updated decl for findRemainderListIndex() * freeNetExec.hh (findRemainderListIndex): use negation cheat on non-unrolled version (findRemainderListIndex): same cheat on unrolled loop (findRemainderListIndex): take stackBase argument 2013-10-25 Steven Eker * freeDagNode.hh (DagNode): new friends: FreeGeneralCtor, FreeGeneralCtorFinal * freeSymbol.cc (generateFinalInstruction): use FreeGeneralCtorFinal (generateInstruction): use FreeGeneralCtor * freeGeneralCtorFinal.cc: created * freeGeneralCtorFinal.hh: created * freeGeneralCtor.cc: created * freeGeneralCtor.hh: created * freeSymbol.cc (generateFinalInstruction, generateInstruction): use FreeGeneralInstruction * freeInstruction.cc (execute): added generalCtor code * freeGeneralInstruction.hh: created * freeGeneralInstruction.cc: created * freeInstruction.cc (FreeInstruction): don't set op code (execute): use FastInstruction * freeSymbol.cc (generateFinalInstruction, generateInstruction): use FreeFastInstruction * freeFastInstruction.cc: created * freeFastInstruction.hh: created * freeNullaryInstruction.cc: created * freeNullaryInstruction.hh: created * freeSymbol.cc (generateFinalInstruction, generateInstruction): use FreeNullaryInstruction 2013-10-24 Steven Eker * freeInstruction.cc (execute): use arg specific instruction classes (FreeInstruction): deleted argumentSlots version * freeSymbol.cc (generateFinalInstruction, generateInstruction): copied arg specific instruction versions from Alpha99 tree * freeInstruction.hh (NonFinalExtor): delete argIndex, and decl for argumentSlots version ctor * freeInstruction.cc (FreeInstruction): added version without argumentSlots * freeInstruction.hh (NonFinalExtor): added decl for ctor without argumentSlots * freePreNet.hh (F): remove FreeNet2 stuff * freeDagNode.hh (DagNode): FreeNet2 is no longer a friend * freeTheory.hh: removed all extor/ctor classes; FreeNet2 * freeSymbol.cc (compileEquations): removed all FreeNet2 stuff * freeSymbol.hh: removed all FreeNet2 stuff * freeSymbol.cc (generateInstruction, generateFinalInstruction): fix bugs by returning 0 for arity > 3 ===================================Maude100=========================================== 2013-10-17 Steven Eker * freeInstruction.cc (OK_TO_COLLECT_GARBAGE): call setTopFrame() (TRY_REMAINDERS): use fastPushFrame() (OK_TO_COLLECT_GARBAGE2): added (TRY_REMAINDERS): don't call popToFrame() (END_FRAME): use fastPop() in place of popFrame() and getTopFrame() (END_FRAME): use OK_TO_COLLECT_GARBAGE2() rather than okToCollectGarbage() (END_FRAME_NO_GC): use fastPop() in place of popFrame() and getTopFrame() (execute): use fastPushFrame() (execute): use setTopFrame(frame) before returning (WIN): increment local rewriteCount variable (TRY_REMAINDERS_FINAL): increment local rewriteCount variable (execute): increment local rewriteCount variable (execute): add local rewriteCount to machine rewrite count 2013-10-16 Steven Eker * freeInstruction.cc (execute): fixed bugs in ternaryCtorFinal and ternaryFastCtorFinal * freeRemainder.cc (dump): make sure fast is printed out as an integer * freeRemainder.hh (fastCheckAndBind): handle "super-fast" case * freeInstruction.cc (FreeInstruction): remove fall thru's in the hope of removing constraints on fallen into code (OK_TO_COLLECT_GARBAGE): added (WIN): call OK_TO_COLLECT_GARBAGE() (TRY_REMAINDERS_FINAL): call OK_TO_COLLECT_GARBAGE() (END_FRAME): call MemoryCell::okToCollectGarbage() (FreeInstruction): don't call MemoryCell::okToCollectGarbage() (NEXT): call OK_TO_COLLECT_GARBAGE() (WIN, TRY_REMAINDERS_FINAL): removed OK_TO_COLLECT_GARBAGE() (execute): rewritten using label pointers (execute): implement returnInstruction (END_FRAME_NO_GC): added (execute): no gc for nullary final ctor and return instruction (NEXT_NO_GC): added (execute): no gc for nullay nonfinal ctor (execute): use localArgList for fail case of binaryExtor and ternaryExtor 2013-10-15 Steven Eker * freeInsruction.hh: created * freeInstruction.cc: created 2013-10-11 Steven Eker * freeBinaryFastCtorFinal.cc (execute): don't pass getUniqueSortIndex() * freeBinaryFastCtor.cc (execute): don't pass getUniqueSortIndex() * freeUnaryFastCtorFinal.cc (execute): don't pass getUniqueSortIndex() * freeTernaryFastCtor.cc (execute): don't pass getUniqueSortIndex() * freeTernaryFastCtorFinal.cc (execute): don't pass getUniqueSortIndex() * freeUnaryFastCtor.cc (execute): don't pass getUniqueSortIndex() * freeDagNode.hh (FreeDagNode): (3 new ctors) sortIndex becomes dummy since we want to do the getUniqueSortIndex() after memory cell allocation to avoid register pressure * freeSymbol.cc (generateFinalInstruction, generateInstruction): utilize fast ctors * freeTheory.hh: added classes FreeUnaryFastCtor, FreeUnaryFastCtorFinal, FreeBinaryFastCtor, FreeBinaryFastCtorFinal, FreeTernaryFastCtor, FreeTernaryFastCtorFinal * freeTernaryFastCtorFinal.cc: created * freeTernaryFastCtorFinal.hh: created * freeTernaryFastCtor.cc: created * freeTernaryFastCtor.hh: created * freeBinaryFastCtorFinal.cc: created * freeBinaryFastCtorFinal.hh: created * freeBinaryFastCtor.cc: created * freeBinaryFastCtor.hh: created * freeUnaryFastCtorFinal.cc: created * freeUnaryFastCtorFinal.hh: created * freeUnaryFastCtor.cc: created * freeUnaryFastCtor.hh: created * freeDagNode.hh (FreeDagNode): added 3 ctors that take a sortIndex 2013-10-10 Steven Eker * freeNullaryCtor.cc (execute): don't load frame ptr until we need it * freeNullaryCtorFinal.cc (execute): don't load frame ptr until we need it * freeNullaryCtor.cc (execute): use getNode() optimization * freeNullaryCtorFinal.cc (execute): use getNode() optimization * freeNullaryCtor.cc (FreeNullaryCtor): cast symbol * freeNullaryCtorFinal.cc (FreeNullaryCtorFinal): cast symbol * freeNullaryCtorFinal.hh (FinalInstruction): symbol is now a FreeNullarySymbol* * freeTheory.hh: added classes FreeNullarySymbol, FreeUnarySymbol, FreeBinarySymbol, FreeTernarySymbol * freeNullaryCtor.hh (NonFinalCtor): symbol is now a FreeNullarySymbol* * freeSymbol.cc (newFreeSymbol): use freeNullarySymbol * freeNullarySymbol.hh: created * freeNullarySymbol.cc: created * freeNet2Exec.hh (findRemainderListIndex): rearrange loads (findRemainderListIndex): try unrolling * freeSymbol.hh: added macros GET_NET, FREE_NET, DISC_NET * freeNullaryFastExtorFinal.cc (execute): use FREE_NET/GET_NET * freeNullaryFastExtor.cc (execute): use FREE_NET/GET_NET * freeTernaryFastExtorFinal.cc (execute): use FREE_NET/GET_NET * freeTernaryFastExtor.cc (execute): use FREE_NET/GET_NET * freeBinaryFastExtorFinal.cc (execute): use FREE_NET/GET_NET * freeBinaryFastExtor.cc (execute): use FREE_NET/GET_NET * freeUnaryFastExtorFinal.cc (execute): use FREE_NET/GET_NET * freeUnaryFastExtor.cc (execute): use FREE_NET/GET_NET * freeTernarySymbol.cc (eqRewrite): use DISC_NET * freeUnarySymbol.cc (eqRewrite): use DISC_NET * freeSymbol.cc (memoStrategy): use DISC_NET (2 places) * freeBinarySymbol.cc (eqRewrite): use DISC_NET * freeSymbol.cc (makeDagNode): use DISC_NET macro (complexStrategy): use DISC_NET (2 places) * freeNet2Exec.cc (applyReplace2, applyReplaceNoOwise2): must set stack[0] to top arg array * freeNet2.cc (dump): added 2013-10-09 Steven Eker * freeNet2Exec.cc (applyReplace2, applyReplaceFast2) (applyReplaceNoOwise2): need to deal with the i == 0 failure case * freePreNetSemiCompiler2.cc (semiCompile): clear slots and conflicts * freeSymbol.cc (compileEquations): call new semiCompile() * freeSymbol.hh (Symbol): added data member discriminationNet2 (getNet2): added * freePreNet.hh (F): added decls for FreeNet2 versions of semiCompile() and semiCompileNode(); commented out struct Node since it doesn't seem to be used * freeNet2.cc (allocateNode): added (fillOutNode): added (addRemainderList): added (translateSlots): added (buildRemainders): added * freeNet2Exec.cc (applyReplace2): symmetric change (applyReplaceNoOwise2): symmetric change (applyReplaceFast2): symmetric change * freeNet2Exec.hh (findRemainderListIndex): can't do relative addressing for net node, since we may need to move backwards 2013-10-08 Steven Eker * freeDagNode.hh (DagNode): FreeeNet2 becomes a friend * freeNet2Exec.cc: created * freeNet2.cc: created * freeNet2Exec.hh: created * freeTheory.hh: added class FreeNet2 * freeNet2.hh (F): created 2013-10-03 Steven Eker * freeTerm.hh (Term): adde decl for computeMatchIndices * freeTerm.cc (computeMatchIndices): added 2013-10-02 Steven Eker * freeUnaryFastExtorFinal.cc (execute): rewrote ctor part; fix minor bug that we were using an array of size 2 * freeTernaryFastExtorFinal.cc (execute): rewrote ctor part * freeBinaryFastExtorFinal.cc (execute): rewrote ctor part * freeUnaryFastExtor.cc (execute): rewrote ctor part * freeTernaryFastExtor.cc (execute): rewrote ctor part * freeBinaryFastExtor.cc (execute): rewrote ctor part * freeNullaryCtorFinal.cc (execute): rewritten using new scheme * freeNullaryCtor.cc (execute): rewritten using new scheme * freeDagNode.hh (FreeDagNode): (nullary, unary and ternary versions) fill out sort information * freeUnaryCtor.cc (execute): rewritten using new scheme * freeUnaryCtorFinal.cc (execute): rewritten using new scheme * freeTernaryCtorFinal.cc (execute): rewritten using new scheme * freeTernaryCtor.cc (execute): rewritten using new scheme * freeBinaryCtor.cc (execute): clean up * freeBinaryCtorFinal.cc (execute): clean up * freeBinaryCtor.cc (execute): use new(NONE) to call reduced flag setting version of new() * freeBinaryCtorFinal.cc (execute): use new(NONE) to call reduced flag setting version of new() 2013-10-01 Steven Eker * freeDagNode.hh (FreeDagNode): try moving setReduced() to first statement to see if flag optimization can be recovered * freeBinaryCtor.cc (execute): try passing expressions rather than using local variables * freeBinaryCtorFinal.cc (execute): rely on FreeDagNode ctor to set reduced flag (execute): try passing expressions rather than using local variables * freeBinaryCtor.cc (execute): rely on FreeDagNode ctor to set reduced flag * freeDagNode.hh (FreeDagNode): (2 arg version) do sort computation here (FreeDagNode): (2 arg version) set reduced flag here * freeBinaryCtor.cc (execute): rely on sort index being computed in FreeDagNode ctor * freeBinaryCtorFinal.cc (execute): try passing sort index through FreeDagNode ctor (execute): rely on sort index being computed in FreeDagNode ctor 2013-09-26 Steven Eker * freeBinaryCtor.cc (execute): try passing sortIndex to FreeDagNode * freeDagNode.hh (FreeDagNode): (2 arg version) take and pass sortIndex * freeBinaryCtor.cc (execute): temporary hack avoiding the use of saveResultAndContinue() because of worse register usage 2013-09-25 Steven Eker * freeTernaryCtorFinal.cc (execute): rewritten using returnResultAndContinue() * freeNullaryCtorFinal.cc (execute): rewritten using returnResultAndContinue() * freeUnaryCtorFinal.cc (execute): rewritten using returnResultAndContinue() * freeBinaryCtorFinal.cc (execute): rewritten using returnResultAndContinue() 2013-09-24 Steven Eker * freeNullaryCtor.hh (NonFinalCtor): derive from NonFinalCtor; deleted data member destIndex * freeNullaryCtor.cc (FreeNullaryCtor): use new ctor convention (execute): rewritten using saveResultAndContinue() (dump): use getDestinationIndex() * freeUnaryCtor.hh (NonFinalCtor): derive from NonFinalCtor; deleted data member destIndex * freeUnaryCtor.cc (FreeUnaryCtor): use new ctor convention (execute): rewritten using saveResultAndContinue() (dump): use getDestinationIndex() * freeBinaryCtor.hh (NonFinalCtor): derive from NonFinalCtor; deleted data member destIndex * freeBinaryCtor.cc (FreeBinaryCtor): use new ctor convention (execute): rewritten using saveResultAndContinue() (dump): use getDestinationIndex() * freeTernaryCtor.cc (FreeTernaryCtor): use new ctor convention (dump): use getDestinationIndex() (execute): rewritten using saveResultAndContinue() * freeTernaryCtor.hh (NonFinalCtor): derive from NonFinalCtor (NonFinalCtor): remove data member destIndex * freeTheory.hh: remove all contig instruction classes ===================================Maude98=========================================== 2013-09-18 Steven Eker * freeBinaryFastExtor.cc (execute): fix oversized localArgList 2013-09-13 Steven Eker * freeTernaryFastExtorFinal.hh: rewritten to use non-contig convention * freeTernaryFastExtorFinal.cc: rewritten to use non-contig convention * freeBinaryFastExtorFinal.cc: rewritten to use non-contig convention * freeBinaryFastExtor.cc: rewritten to use non-contig convention * freeBinaryFastExtor.hh: rewritten to use non-contig convention * freeTernaryFastExtor.cc: rewritten to use non-contig convention * freeTernaryFastExtor.hh: rewritten to use non-contig convention * freeTernaryCtorFinal.hh: rewritten to use non-contig convention * freeTernaryCtorFinal.cc: rewritten to use non-contig convention * freeTernaryCtor.cc: rewritten to use non-contig convention * freeTernaryCtor.hh: rewritten to use non-contig convention * freeBinaryCtorFinal.cc: rewritten to use non-contig convention * freeBinaryCtorFinal.hh: rewritten to use non-contig convention * freeBinaryCtor.cc: rewritten to use non-contig convention * freeBinaryCtor.hh: rewritten to use non-contig convention * freeSymbol.cc (generateFinalInstruction): use new ctor conventions (generateInstruction): use new ctor conventions * freeNet.hh: added friend declarations for classes FreeBinaryFastExtorContig, FreeBinaryFastExtorContigFinal, FreeTernaryFastExtorContig and FreeTernaryFastExtorContigFinal * freeTheory.hh: added classes FreeBinaryFastExtorContig, FreeBinaryFastExtorContigFinal, FreeTernaryFastExtorContig and FreeTernaryFastExtorContigFinal * freeTernaryFastExtorContigFinal.cc: created * freeTernaryFastExtorContigFinal.hh: created * freeTernaryFastExtorContig.cc: created * freeTernaryFastExtorContig.hh: created * freeBinaryFastExtorContigFinal.cc: created * freeBinaryFastExtorContigFinal.hh: created * freeBinaryFastExtorContig.cc: created * freeBinaryFastExtorContig.hh: created * freeTheory.hh: added classes FreeBinaryCtorContig, FreeBinaryCtorContigFinal, FreeTernaryCtorContig, FreeTernaryCtorContigFinal * freeTernaryCtorContigFinal.cc: created * freeTernaryCtorContigFinal.hh: cteaed * freeTernaryCtorContig.cc: created * freeTernaryCtorContig.hh: created * freeBinaryCtorContigFinal.hh: created * freeBinaryCtorContigFinal.cc: created * freeBinaryCtorContig.cc: created * freeBinaryCtorContig.hh: created 2013-08-22 Steven Eker * freeNullaryCtorFinal.cc (execute): use finishUp() * freeUnaryCtorFinal.cc (execute): use finishUp() * freeTernaryCtorFinal.cc (execute): use finishUp() * freeBinaryCtorFinal.cc (execute): use finishUp() 2013-08-21 Steven Eker * freeNetExec.hh (findRemainderListIndex): try unrolling loop 2013-08-20 Steven Eker * freeTernaryCtor.cc (execute): use handleNextInstruction() * freeNullaryCtor.cc (execute): use handleNextInstruction() * freeUnaryCtor.cc (execute): use handleNextInstruction() * freeBinaryCtor.cc (execute): use handleNextInstruction() * freeNullaryCtor.cc (execute): removed hack 2013-08-16 Steven Eker * freeNullaryCtor.cc (execute): tried execute() hack 2013-08-15 Steven Eker * freeNullaryFastExtor.cc (FreeNullaryFastExtor): pass destIndex to NonFinalExtor (execute, dump): use getDestinationIndex() * freeTernaryFastExtor.cc (FreeTernaryFastExtor): pass destIndex to NonFinalExtor (execute, dump): use getDestinationIndex() * freeUnaryFastExtor.cc (FreeUnaryFastExtor): pass destIndex to NonFinalExtor (execute, dump): use getDestinationIndex() * freeBinaryFastExtor.cc (FreeBinaryFastExtor): pass destIndex to NonFinalExtor (execute, dump): use getDestinationIndex() * freeNullaryFastExtor.hh (NonFinalExtor): deleted data member destIndex * freeTernaryFastExtor.hh (NonFinalExtor): deleted data member destIndex * freeUnaryFastExtor.hh (NonFinalExtor): deleted data member destIndex * freeBinaryFastExtor.hh (NonFinalExtor): deleted data member destIndex * freeNullaryFastExtor.cc (FreeNullaryFastExtor): pass nextInstruction to NonFinalExtor (execute): use pushFrame() rather than newFrame() * freeUnaryFastExtor.cc (FreeUnaryFastExtor): pass nextInstruction to NonFinalExtor (execute): use pushFrame() rather than newFrame() * freeTernaryFastExtor.cc (FreeTernaryFastExtor): pass nextInstruction to NonFinalExtor (execute): use pushFrame() rather than newFrame() * freeTernaryFastExtor.hh (NonFinalExtor): derive from Nonfinal Extor * freeNullaryFastExtor.hh (NonFinalExtor): derive from Nonfinal Extor * freeUnaryFastExtor.hh (NonFinalExtor): derive from Nonfinal Extor * freeBinaryFastExtor.cc (FreeBinaryFastExtor): pass nextInstruction to NonFinalExtor (execute): use pushFrame() rather than newFrame() * freeBinaryFastExtor.hh (NonFinalExtor): derive from Nonfinal Extor 2013-08-14 Steven Eker * freeUnaryFastExtorFinal.cc (execute): fix symmetric bug * freeTernaryFastExtorFinal.cc (execute): fix bug where we passing old arg list rather than copy * freeNullaryFastExtorFinal.cc (execute): symmetric changes * freeTernaryFastExtorFinal.cc (execute): symmetric changes * freeUnaryFastExtorFinal.cc (execute): symmetric changes * freeBinaryFastExtorFinal.cc (execute): implement local argument list copy and stack frame reuse * freeTernaryFastExtorFinal.hh (FinalInstruction): derive from FinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeNullaryFastExtorFinal.hh (FinalInstruction): derive from FinalInstruction * freeUnaryFastExtorFinal.hh (FinalInstruction): derive from FinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeBinaryFastExtorFinal.hh (FinalInstruction): derive from FinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeTernaryFastExtor.cc (FreeTernaryFastExtor): pass nextInstruction to base class ctor (execute): use getNextInstruction(); use SlotIndex type (dump): use getNextInstruction() * freeUnaryFastExtor.cc (FreeUnaryFastExtor): pass nextInstruction to base class ctor (execute): use getNextInstruction(); use SlotIndex type (dump): use getNextInstruction() * freeNullaryFastExtor.cc (FreeNullaryFastExtor): pass nextInstruction to base class ctor (execute): use getNextInstruction() (dump): use getNextInstruction() * freeNullaryFastExtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member * freeTernaryFastExtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeUnaryFastExtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeBinaryFastExtor.cc (execute): use getNextInstruction(); use SlotIndex type (FreeBinaryFastExtor): pass nextInstruction to base class ctor (dump): use getNextInstruction() * freeBinaryFastExtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeTernaryCtorFinal.hh (FinalInstruction): derive from FinalInstruction; use SlotIndex type * freeNullaryCtorFinal.hh (FinalInstruction): derive from FinalInstruction * freeUnaryCtorFinal.hh (FinalInstruction): derive from FinalInstruction; use SlotIndex type * freeBinaryCtorFinal.hh (FinalInstruction): derive from FinalInstruction; use SlotIndex type * freeNullaryCtor.cc (FreeNullaryCtor): pass nextInstruction to base class ctor (execute): use getNextInstruction(); use SlotIndex type * freeUnaryCtor.cc (FreeUnaryCtor): pass nextInstruction to base class ctor (execute): use getNextInstruction(); use SlotIndex type * freeTernaryCtor.cc (FreeTernaryCtor): pass nextInstruction to base class ctor (execute): use getNextInstruction(); use SlotIndex type (dump): use getNextInstruction() * freeTernaryCtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeNullaryCtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member; use SlotIndex type * freeUnaryCtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member; use SlotIndex type 2013-08-13 Steven Eker * freeBinaryCtor.cc (execute): use SlotIndex type * freeBinaryCtor.hh (NonFinalInstruction): use SlotIndex type * freeBinaryCtor.cc (execute): use getNextInstruction() (FreeBinaryCtor): pass nextInstruction to base class ctor (dump): use getNextInstruction() * freeBinaryCtor.hh (NonFinalInstruction): derive from NonFinalInstruction; deleted nextInstruction data member 2013-08-09 Steven Eker * freeBinaryFastExtorFinal.cc (execute): use newUnderFrame() 2013-08-01 Steven Eker * freeTernaryFastExtorFinal.cc (execute): use newUnderFrame()p 2013-07-30 Steven Eker * freeRemainder.hh (FreeLhsStructs): commented out firstInstruction data member for the moment (getFirstInstruction): use getInstructionSequence() for the moment * freeNullaryCtorFinal.cc (dump): fix * freeNullaryCtor.cc (dump): fix * freeTernaryFastExtorFinal.cc (dump): fix * freeTernaryFastExtor.cc (dump): fix * freeTernaryCtorFinal.cc (dump): fix * freeTernaryCtor.cc (dump): fix * freeBinaryFastExtorFinal.cc (dump): fix * freeBinaryFastExtor.cc (dump): fix * freeBinaryCtorFinal.cc (dump): fix * freeBinaryCtor.cc (dump): fix * freeUnaryFastExtorFinal.cc (dump): fix * freeUnaryFastExtor.cc (dump): fix * freeUnaryCtor.cc (dump): fix * freeUnaryCtorFinal.cc (dump): fix * freeSymbol.cc (generateInstruction): use FreeNullaryCtor/FreeNullaryExtor intructions 2013-07-12 Steven Eker * freeTheory.hh: added classes FreeNullaryCtor, FreeNullaryCtorFinal, FreeNullaryFastExtor, FreeNullaryFastExtorFinal * freeNullaryFastExtorFinal.cc: created * freeNullaryFastExtorFinal.hh: created * freeNet.hh (F): added classes FreeNullaryFastExtor and FreeNullaryFastExtorFinal as friends * freeNullaryFastExtor.cc: created * freeNullaryCtorFinal.cc: created * freeNullaryCtorFinal.hh: created * freeNullaryFastExtor.hh: created * freeDagNode.hh (FreeDagNode): added 0 argument version with dummy int argument to distinguish it from general case. * freeNullaryCtor.hh: created * freeNullaryCtor.cc: created * freeNet.hh (F): made classes FreeUnaryFastExtor, FreeUnaryFastExtorFinal, FreeTernaryFastExtor, FreeTernaryFastExtorFinal friends * freeTheory.hh: added classes FreeUnaryCtor, FreeUnaryCtorFinal, FreeUnaryFastExtor, FreeUnaryFastExtorFinal, FreeTernaryCtor, FreeTernaryCtorFinal, FreeTernaryFastExtor, FreeTernaryFastExtorFinal * freeTernaryFastExtorFinal.cc: created * freeTernaryFastExtorFinal.hh: created * freeTernaryFastExtor.cc: created * freeTernaryFastExtor.hh: created * freeTernaryCtorFinal.hh: created * freeTernaryCtorFinal.cc: created * freeTernaryCtor.cc: created * freeTernaryCtor.hh: created 2013-07-11 Steven Eker * freeUnaryFastExtorFinal.cc: created * freeUnaryFastExtorFinal.hh: created * freeDagNode.hh (FreeDagNode): added 1 and 3 argument versions * freeUnaryFastExtor.cc: created * freeUnaryFastExtor.hh: created * freeUnaryCtorFinal.hh: created * freeUnaryCtorFinal.cc: created * freeUnaryCtor.hh: created * freeUnaryCtor.cc: created * freeBinaryFastExtorFinal.cc (execute): use getNet() * freeBinaryFastExtorFinal.hh (Instruction): added decl for ctor; deleted data member net; made data const * freeBinaryFastExtorFinal.cc (FreeBinaryFastExtorFinal): added * freeBinaryCtorFinal.hh (Instruction): added decl for ctor; made data const * freeBinaryCtorFinal.cc (FreeBinaryCtorFinal): added * freeBinaryFastExtor.hh (Instruction): added decl for ctor; made data const * freeBinaryFastExtor.cc (FreeBinaryFastExtor): added * freeBinaryFastExtor.hh (Instruction): deleted data member net * freeBinaryFastExtor.cc (execute): use getNet() * freeSymbol.hh (getNet): added * freeBinaryCtor.hh (Instruction): added decl for ctor; made data const to allow compiler optimization possibilities * freeBinaryCtor.cc (FreeBinaryCtor): added * freeSymbol.hh (Symbol): added decls for generateFinalInstruction() and generateInstruction() * freeSymbol.cc (generateFinalInstruction): added (generateInstruction): added 2013-07-10 Steven Eker * freeBinaryFastExtorFinal.cc (dump): added * freeBinaryFastExtor.cc (dump): added * freeBinaryCtorFinal.cc (dump): added * freeBinaryCtor.cc (dump): added * freeBinaryFastExtorFinal.hh (Instruction): added decl for dump() * freeBinaryFastExtor.hh (Instruction): added decl for dump() * freeBinaryCtorFinal.hh (Instruction): added decl for dump() * freeBinaryCtor.hh (Instruction): added decl for dump() 2013-06-28 Steven Eker * freeRhsAutomaton.hh (RhsAutomaton): added decl for recordInfo() * freeRhsAutomaton.cc (recordInfo): added 2013-06-07 Steven Eker * freeNet.hh (F): made class FreeBinaryFastExtorFinal a friend * freeTheory.hh: added class FreeBinaryFastExtorFinal * freeBinaryFastExtorFinal.hh: created * freeBinaryFastExtorFinal.cc: created 2013-05-11 Steven Eker * freeNet.hh (F): quick hack to check for position and slot in TestNode overflowing the 16-bit ints ===================================Maude97=========================================== 2013-03-07 Steven Eker * freeSymbol.cc (compileEquations): call resetSlotIndices(), and then call setSlotIndex() to avoid using bad slot indices if the lhs gets compiled for variant equation reducibility purposes * freeTerm.hh (Term): added decl for resetSlotIndices() * freeTerm.cc (resetSlotIndices): added * freePreNet.hh (F): added call to NO_COPYING() macro 2013-01-18 Steven Eker * freeRemainder.hh (fastCheckAndBind, getFirstInstruction): added (FreeLhsStructs): added data member firstInstruction * freeNet.hh (F): added decl for findRemainderListIndex() * freeNetExec.hh: created * freeBinaryCtor.cc (execute): code cleaning * freeBinaryCtor.hh (Instruction): FreeBinarySymbol* becomes FreeSymbol * freeBinaryCtorFinal.cc (execute): code cleaning * freeBinaryCtorFinal.hh (Instruction): FreeBinarySymbol* becomes FreeSymbol since we will eventually obsolete these subclasses 2013-01-09 Steven Eker * freeBinaryCtorFinal.cc: created * freeBinaryCtorFinal.hh: created * freeTheory.hh: added forward decl for freeBinaryCtorFinal 2013-01-08 Steven Eker * freeBinaryCtor.cc (execute): use traverse() instead of sortTable * freeBinaryCtor.hh (Instruction): deleted data member sortTable 2013-01-07 Steven Eker * freeDagNode.hh (FreeDagNode): added binary ctor * freeBinaryCtor.cc: created * freeBinaryCtor.hh: created ===================================Maude96c=========================================== 2012-04-13 Steven Eker * freeDagNode.hh (DagNode): updated decl for instantiateWithReplacement(); added decl for instantiateWithCopies2() * freeDagNode.cc (instantiateWithCopies2): added (instantiateWithReplacement): rewritten to handle eager positions correctly 2012-03-30 Steven Eker * freeSymbol.cc (termify): code cleaning 2012-03-29 Steven Eker * freeSymbol.hh (Symbol): added decl for termify() * freeSymbol.cc (termify): added ===================================Maude96=========================================== 2010-10-19 Steven Eker * freeSymbol.hh (class FreeSymbol): makeCanonicalCopyEagerUptoReduced() -> makeCanonicalCopy() * freeSymbol.cc (FreeSymbol::makeCanonicalCopyEagerUptoReduced): becomes makeCanonicalCopy(); semantics change ===================================Maude95a=========================================== 2010-09-29 Steven Eker * freeSymbol.cc (FreeSymbol::makeCanonicalCopyEagerUptoReduced): code cleaning (FreeSymbol::makeCanonicalCopyEagerUptoReduced): simplified now that we are only passed unreduced originals; use getCanonicalCopyEagerUptoReduced() 2010-09-28 Steven Eker * freeSymbol.hh (class FreeSymbol): added decl for makeCanonicalCopyEagerUptoReduced() * freeSymbol.cc (FreeSymbol::makeCanonicalCopyEagerUptoReduced): added 2010-08-18 Steven Eker * freeDagNode.hh (class FreeDagNode): deleted decl for * freeDagNode.cc (FreeDagNode::nonVariableSize): deleted ===================================Maude95=========================================== 2010-08-12 Steven Eker * freeDagNode.hh (class FreeDagNode): updated decl for purifyAndOccurCheck() * freeDagNode.cc (FreeDagNode::purifyAndOccurCheck): take pending argument; use computeSolvedForm() rather than bind() to avoid binding the abstraction variable to an impure term that might cause nontermination (FreeDagNode::computeSolvedForm2): pass pending to purifyAndOccurCheck() 2010-08-11 Steven Eker * freeDagNode.cc (FreeDagNode::computeSolvedForm2): call computeSolvedForm() rather than computeSolvedForm2() since we may get constant vs constant by looking at variables binding 2010-08-10 Steven Eker * freeDagNode.cc (FreeDagNode::computeSolvedForm2): code cleaning 2010-08-03 Steven Eker * freeDagNode.hh (class FreeDagNode): added enum PurificationStatus; added decl for purifyAndOccurCheck() * freeDagNode.cc (FreeDagNode::purifyAndOccurCheck): added (FreeDagNode::computeSolvedForm2): rewritten using purifyAndOccurCheck() ===================================Maude94a=========================================== 2010-06-30 Steven Eker * freeDagNode.cc (FreeDagNode::computeSolvedForm2): use resolveTheoryClash() 2010-06-04 Steven Eker * freeSymbol.cc (FreeSymbol::isStable): added * freeSymbol.hh (class FreeSymbol): added decl for isStable() ===================================Maude94=========================================== 2010-04-16 Steven Eker * freeLhsCompiler.cc (FreeTerm::findConstraintPropagationSequence): remove const (both versions) * freeTerm.hh (class FreeTerm): make both versions of findConstraintPropagationSequence() static * freeLhsCompiler.cc (FreeTerm::findConstraintPropagationSequence): rewritten to save results of first pass, and avoid searching once we detect we can propagate any more bound uniquely variables 2010-04-15 Steven Eker * freeTerm.hh (class FreeTerm): added decl for remainingAliensContain() * freeLhsCompiler.cc (FreeTerm::findConstraintPropagationSequence): rewritten to reduce likelihood of exponential blow up (FreeTerm::remainingAliensContain): added (FreeTerm::findConstraintPropagationSequence): simplified using remainingAliensContain() ===================================Maude93a=========================================== 2010-03-18 Steven Eker * freeRemainder.cc (FreeRemainder::FreeRemainder): don't set nrFreeVariables * freeRemainder.hh (FreeRemainder::fastMatchReplace): retrench to original version (FreeRemainder::fastMatchReplace): code cleaning (class FreeRemainder): delete data member nrFreeVariables * freeRemainder.cc (FreeRemainder::slowMatchReplace2): code cleaning 2010-03-12 Steven Eker * freeTerm.cc (FreeTerm::compileRhs3): clean up code 2010-03-11 Steven Eker * freeRhsAutomaton.cc (FreeRhsAutomaton::fillOutArgs): tried turning loop into a count down to 0 loop (FreeRhsAutomaton::construct, FreeRhsAutomaton::replace): use count down to 0 loops; eliminate temporary (FreeRhsAutomaton::construct, FreeRhsAutomaton::replace): code cleaning 2010-03-10 Steven Eker * freeRemainder.hh (FreeRemainder::fastMatchReplace): rewritten after looking at asm output * freeRemainder.cc (FreeRemainder::FreeRemainder): don't store nrFreeVariables until we have processed pseudo variables which might change the value * freeNet.cc (FreeNet::buildRemainders): fix critical bug where we were resize rems twice * freeRemainder.cc (FreeRemainder::FreeRemainder): init foreign, nrFreeVariables, equation * freeRemainder.hh (class FreeRemainder): added data member nrFreeVariables; made foreign const * freeLhsStructs.hh (class FreeLhsStructs): made position and argIndex short in all structs ===================================Maude93=========================================== 2010-03-05 Steven Eker * freeNet.cc (FreeNet::buildRemainders): try not zero terminating * freeTerm.cc (FreeTerm::compareArguments): (DagNode* version) use iterator to access Term args (FreeTerm::compareArguments): fix bug in optimized version (FreeTerm::compareArguments): try early loop termination optimization (FreeTerm::compareArguments): revert early loop termination (FreeTerm::compareArguments): try getting nrArgs from other->symbol() (FreeTerm::compareArguments): do early loop termination properly this time (FreeTerm::compareArguments): use nrArgs to count down - saves a register copy * freeDagNode.cc (FreeDagNode::compareArguments): load symbol into temporary; check symbols for equality before doing a symbol comparison 2010-03-04 Steven Eker * freeDagNode.cc (FreeDagNode::compareArguments): rewrite using tail recursion (FreeDagNode::compareArguments): fix bug where we were comparing the wrong nodes for equality (they were never equal so we failed safe) (FreeDagNode::compareArguments): fix bug where we were checking the symbols of the wrong nodes * freeRhsAutomaton.cc (FreeRhsAutomaton::fillOutArgs): delete nrArgs arg (FreeRhsAutomaton::replace): simplify (FreeRhsAutomaton::construct): simplify 2010-03-02 Steven Eker * freeNetExec.cc (FreeNet::applyReplaceNoOwise2): fix bug where we were checking p for equality rather than < 0 as it should be de-pointerized code; make i long; load n->slot into long before testing to get free sign extension (FreeNet::applyReplace2): make i long; load n->slot into long before testing to get free sign extension 2010-02-26 Steven Eker * freeNet.cc (FreeNet::addRemainderList): remove "too cute" calculation of 1's complement in favor of explicit code since is non-time critical 2010-02-10 Steven Eker * freeNetExec.cc (applyReplace2, applyReplaceFast2) (applyReplaceNoOwise2): made p long to avoid extension on 64 bit machines (applyReplace2): use ~i (applyReplaceNoOwise2): use ~i (applyReplaceFast2): use ~i (applyReplace2, applyReplaceFast2, applyReplaceNoOwise2): pull common i = ~i to end of loop - compiler already does this opimization but it makes the code eaiser to read * freeNet.hh (class FreeNet): reorganized struct TestNode to avoid 32bit->64bit extension for position on 64bit machines, and to put field in likely order of use for cache friendliness 2010-02-09 Steven Eker * freeNet.hh (class FreeNet): rework TestNode to avoid pointers into stack data structure * freeNetExec.cc (applyReplaceNoOwise2): fix missing symbolIndex update bug (applyReplace2, applyReplaceFast2, applyReplaceNoOwise2): depointerize stack acccess and use stackBase instead * freeNet.cc (translateSlots): removed pointerization * freeNet.hh (class FreeNet): fix longstanding TestNode optimization bug on 64-bit machines * freeNetExec.cc (applyReplaceFast2, applyReplace2) (applyReplaceNoOwise2): use diff < 0 rather than getSignBit(diff) to let g++ do the logical shift trick 2010-01-28 Steven Eker * freeTernarySymbol.hh (class FreeTernarySymbol): added NO_COPYING() in the hope of cutting down the amount of ctor code gcc generates in the assembler file 2010-01-22 Steven Eker * freeTernarySymbol.cc (eqRewrite): use applyReplaceFast() * freeBinarySymbol.cc (eqRewrite): use applyReplaceFast() * freeUnarySymbol.cc (eqRewrite): use applyReplaceFast() * freeNet.hh (applyReplaceFast): added (class FreeNet): added decls for applyReplaceFast(), applyReplaceFast2() * freeNetExec.cc (applyReplaceFast2): added 2010-01-07 Steven Eker * freeNetExec.cc: rewritten using symbolIndex optimization * freeNet.cc: rewritten to store symbolIndex rather than symbol within TestNodes; added comments * freeNet.hh (class FreeNet): replaced symbol field with symbolIndex field in struct TestNode ===================================Maude92c=========================================== 2009-12-01 Steven Eker * freeTerm.cc (normalize): revert hash function * freeDagNode.cc (getHashValue): revert hash function 2009-11-30 Steven Eker * freeTerm.cc (normalize): modify hash function * freeDagNode.cc (getHashValue): modify hash function 2009-11-24 Steven Eker * freeSymbol.cc (makeCanonical): added * freeSymbol.hh (class FreeSymbol): added decl for makeCanonical() ===================================Maude92b=========================================== 2009-11-06 Steven Eker * freeTerm.hh (class FreeTerm): made both findConstraintPropagationSequence() const * freeLhsCompiler.cc (findConstraintPropagationSequence): made const (both versions) * freeTerm.hh (class FreeTerm): deleted decl for insertGroundOutAliens(); made both findConstraintPropagationSequence() decls non-static (class FreeTerm): currentSequence no longer const in findConstraintPropagationSequence() decl * freeLhsCompiler.cc (analyseConstraintPropagation): code cleaning (compileRemainder): code cleaning (findConstraintPropagationSequence): (top level version) don't call insertGroundOutAliens() (findConstraintPropagationSequence): (lower level version) rewritten to do insertGroundOutAliens() stuff internally; avoid making copies of currentSequence where possible (insertGroundOutAliens): deleted (scanFreeSkeleton): code cleaing 2009-11-04 Steven Eker * freeLhsCompiler.cc (findConstraintPropagationSequence): added early terminate once we find a branch that binds uniquely all variables occuring below us. 2009-11-02 Steven Eker * freeLhsCompiler.cc (analyseConstraintPropagation): added DebugAdvisory() to investigate performance problem 2009-09-23 Steven Eker * freeSymbol.cc (computeGeneralizedSort): fix nasty bug that we were getting the sort function until after we've generated the argMap we want to compose it with - but the generation of the sort function may increase the number of bdd variables, and we need those to make the argMap ===================================Maude92a=========================================== 2008-12-22 Steven Eker * freeSymbol.cc (computeGeneralizedSort): new getSortFunction() convention ===================================Maude92=========================================== 2008-09-11 Steven Eker * freeDagNode.cc (computeBaseSortForGroundSubterms): added default case to avoid compiler warning * freePreNet.cc (buildNet): fix bug where we were not updating potentialSubsumers * freePreNetSubsumption.cc (subsumesWrtReducedFringe): pull assignment out of if statement of avoid compiler warning about unused variable ===================================Maude91a=========================================== 2008-03-23 Steven Eker * freeDagNode.hh (class FreeDagNode): removed commented out declaration for old version of computeSolvedForm2() * freePreNetFullCompiler.cc (allocateVariables, slotMapUnion) (generateNode): use NetMap (generateCode): use net.empty() * freePreNetSemiCompiler.cc (semiCompile, semiCompileNode): use NetMap * freePreNet.cc (dump): updated * freePreNet.hh (class FreePreNet): updated decl for findBestPosition(); added data member netVec * freePreNet.cc (findBestPosition): updated (makeNode): use NodeMap * freePreNet.hh (operator<): added (class FreePreNet): added structs NodeIndex and NodeBody; added typedef NodeMap 2008-03-21 Steven Eker * freePreNet.cc (makeNode): make use of sets return by partitionLiveSet() to speed up generation of new live sets (buildNet): added potentialSubsumers optimization * freePreNet.hh (class FreePreNet): findLiveSets() -> partitionLiveSet() * freePreNet.cc (partitionLiveSet): converted from findLiveSets() * freePreNetSubsumption.cc (subsumesWrtReducedFringe): added comments to both versions 2008-03-19 Steven Eker * freePreNet.cc (findLiveSets): added 2008-03-14 Steven Eker * freeNet.cc (addRemainderList, buildRemainders): update with new PatternSet data structure (dump): update with new PatternSet data structure * freeNet.hh (class FreeNet): added typedef PatternSet; updated decls * freePreNet.hh (class FreePreNet): pattternsUsed becomes a LiveSet * freePreNetSemiCompiler.cc (semiCompileNode, setVisitedFlags) (allocateSlot): update with new LiveSet data structure * freePreNet.cc (buildNet, makeNode, reduceFringe, findLiveSet) (partiallySubsumed, findBestPosition): update with new LiveSet data structure (dumpLiveSet): added * freePreNet.hh (class FreePreNet): addeded typedef LiveSet; updated other decls 2008-03-12 Steven Eker * freeTerm.cc (compileRhs3): compile subterms in the order largest first ===================================Maude90a=========================================== 2008-02-08 Steven Eker * freeDagNode.cc (computeSolvedForm2): Substitution -> UnificationContext * freeDagNode.hh (class FreeDagNode): updated decl for computeSolvedForm2() 2008-02-05 Steven Eker * freeDagNode.cc (computeSolvedForm2): rewritten * freeDagNode.hh (class FreeDagNode): updated decl for computeSolvedForm2() 2008-01-14 Steven Eker * freeDagNode.cc (instantiateWithReplacement): code cleaning ===================================Maude90=========================================== 2007-11-01 Steven Eker * freeDagNode.cc (instantiateWithReplacement): handle the case where instantiate() return 0 because dag is unchanged under substitution * freeTerm.cc (findAvailableTerms, compileRhsAliens, compileRhs3): cast cleaning * freeDagNode.cc (instantiate2, instantiateWithReplacement): updated * freeDagNode.hh (class FreeDagNode): updated decls for instantiate2() and instantiateWithReplacement() 2007-10-26 Steven Eker * freeDagNode.cc (copyEagerUptoReduced2, copyWithReplacement) (instantiateWithReplacement): remove casts to FreeSymbol* * freeDagNode.hh (symbol): added * freeDagNode.cc (computeBaseSortForGroundSubterms): call setGround() on ground terms (instantiate2): removed temporary hack to handle ground terms * freeDagNode.hh (class FreeDagNode): decl for indexVariables() becomes indexVariables2() * freeDagNode.cc (indexVariables): handle testing and setting of ground flags (indexVariables): becomes indexVariables2(); return bool 2007-10-25 Steven Eker * freeDagNode.cc (instantiateWithReplacement): added (instantiate2): temporary hack to allow it to work on constants (instantiate2): use isGround()/setGround() * freeDagNode.hh (class FreeDagNode): added decl for instantiateWithReplacement() 2007-10-15 Steven Eker * freeDagNode.hh (class FreeDagNode): adde decl for indexVariables() (class FreeDagNode): added decl for indexVariables() * freeDagNode.cc (indexVariables): added ===================================Maude89h=========================================== 2007-08-24 Steven Eker * freeDagNode.cc (computeBaseSortForGroundSubterms): rewritten * freeDagNode.hh (class FreeDagNode): updated decl for computeBaseSortForGroundSubterms() 2007-08-23 Steven Eker * freeDagNode.cc (computeSolvedForm): becomes computeSolvedForm2() (computeSolvedForm2): simplified now that we should be called on ground terms, e.g. constants * freeDagNode.hh (class FreeDagNode): computeSolvedForm() -> computeSolvedForm2() ===================================Maude89g=========================================== 2007-06-28 Steven Eker * freeDagNode.hh (class FreeDagNode): updated decl for computeSolvedForm() * freeDagNode.cc (computeSolvedForm): added extensionInfo arg ===================================Maude89c=========================================== 2007-03-16 Steven Eker * freeDagNode.cc (unify, occurs2): deleted * freeDagNode.hh (class FreeDagNode): deleted decls for unify() and occurs2() 2007-03-15 Steven Eker * freeSymbol.cc (computeGeneralizedSort): pass realToBdd by ref * freeSymbol.hh (class FreeSymbol): fix decl for computeGeneralizedSort() ===================================Maude89a=========================================== 2007-03-05 Steven Eker * freeDagNode.cc (nonVariableSize): return mpz_class * freeDagNode.hh (class FreeDagNode): nonVariableSize() now returns mpz_class 2007-02-27 Steven Eker * freeDagNode.cc (insertVariables2): added * freeDagNode.hh (class FreeDagNode): added decl for insertVariables2() 2007-02-26 Steven Eker * freeDagNode.cc (nonVariableSize): added * freeDagNode.hh (class FreeDagNode): added decl for computeSolvedForm() (class FreeDagNode): added decl for nonVariableSize(); * freeDagNode.cc (computeSolvedForm): added ===================================Maude89=========================================== 2007-02-09 Steven Eker * freeDagNode.cc (instantiate2): fixed bug where we were using wrong index to copy already looked at arguments 2007-01-31 Steven Eker * freeDagNode.cc (unify): clean up (unify): handle subproblems; zero extensionInfo on recursive calls 2007-01-30 Steven Eker * freeSymbol.cc (computeGeneralizedSort): use DagNode version of computeGeneralizedSort() * freeDagNode.hh (class FreeDagNode): instantiate() -> instantiate2(); occurs() -> occurs2() * freeDagNode.cc (computeBaseSortForGroundSubterms): added (instantiate): becomes instantiate2() (instantiate2): handle the computation of the base sort of a newly dagnode if it turns out to be ground (occurs): becomes occurs2() * freeDagNode.hh (class FreeDagNode): added decl for computeBaseSortForGroundSubterms() ===================================Maude88e=========================================== 2007-01-05 Steven Eker * freeSymbol.cc (computeGeneralizedSort): added * freeSymbol.hh (class FreeSymbol): added decl for computeGeneralizedSort() 2006-12-11 Steven Eker * freeDagNode.hh (class FreeDagNode): added decls for instantiate() and occurs() * freeDagNode.cc (instantiate): added (occurs): added 2006-12-08 Steven Eker * freeDagNode.cc (unify): added * freeDagNode.hh (class FreeDagNode): added decl for unify() ===================================Maude88d=========================================== 2006-10-18 Steven Eker * freeRemainder.cc (dump): dump equation 2006-10-10 Steven Eker * freeNet.hh (class FreeNet): removed extraneous quantifier to appease gcc 4.1 ===================================Maude88b=========================================== 2005-07-28 Steven Eker * freeTerm.cc (findEagerVariables, markEagerArguments): removed unnecessay static_cast * freeTerm.hh (class FreeTerm): updated decls for SymbolMap* version of ctor (symbol): added * freeTerm.cc (FreeTerm): SymbolMap* version: insist that symbol is a FreeSymbol (deepCopy2): handle translation to non-FreeSymbol 2005-06-24 Steven Eker * freeTerm.hh (class FreeTerm): updated decls for SymbolMap* version of ctor and deepCopy2() * freeTerm.cc (FreeTerm): rewrote SymbolMap* version (deepCopy2): rewritten ===================================Maude86b=========================================== 2004-10-07 Steven Eker * freeDagNode.hh (FreeDagNode): removed parens from DagNode* to appease g++ 2.4.2 2003-09-02 Steven Eker * freeSymbol.cc (complexStrategy): use applyReplaceNoOwise() (memoStrategy): use applyReplaceNoOwise() * freeRemainder.hh (isOwise): added * freeNetExec.cc (applyReplaceNoOwise2): added * freeNet.hh (applyReplaceNoOwise): added * freeNetExec.cc (applyReplace2): removed non-SPEED_HACKS version * freeNet.cc (translateSlots): removed SPEED_HACKS #ifndef and the non-SPEED_HACKS code (buildRemainders): removed SPEED_HACKS #ifdef (dump): removed SPEED_HACKS #ifndefs and the non-SPEED_HACKS code * freeNet.hh (class FreeNet): removed SPEED_HACKS #ifdef ===================================Maude82=========================================== 2003-07-14 Steven Eker * freeNet.hh (class FreeNet): test SIZEOF_VOID_P and SIZEOF_SHORT when deciding on layout ===================================Maude81=========================================== 2003-05-28 Steven Eker * freeRemainder.hh (fastMatchReplace): use MemoryCell::okToCollectGarbage() * freeRemainder.cc (slowMatchReplace): use MemoryCell::okToCollectGarbage() ===================================Maude80b=========================================== 2003-05-06 Steven Eker * freeTerm.cc (partialCompareArguments): use FOR_EACH_CONST() (partialCompareArguments): use safeCast() 2003-05-01 Steven Eker * freeDagNode.cc (overwriteWithClone): use copySetRewritingFlags() (makeClone): use copySetRewritingFlags() ===================================Maude79=========================================== 2003-03-03 Steven Eker * freeNet.cc (buildTernaryTree): use notEqual[] in place of less and greater (dump): use notEqual[] in place of less and greater (tripleLt): removed pointer comparison SPEED_HACK * freeNetExec.cc (applyReplace2): use notEqual[] and getSignBit() to do branch-free choice in discrimination net * freeNet.hh (class FreeNet): notEqual array replaces less and greater in struct TestNode (class FreeNet): added enum SpecialValues 2003-02-25 Steven Eker * freePreNetSubsumption.cc (subsumesWrtReducedFringe): removed unused variable sf * freeUnarySymbol.cc: removed #pragma * freeUnarySymbol.hh: removed #pragma * freeTheory.cc: deleted * freeTernarySymbol.cc: removed #pragma * freeTernarySymbol.hh: removed #pragma * freeTerm.cc: removed #pragma (FreeTerm): updated Assert() (compareArguments): updated Assert() (both versions) (partialCompareArguments): updated Assert() (findActiveSlots): updated Assert() * freeTerm.hh: removed #pragma * freeSymbol.cc: removed #pragma (eqRewrite): updated Assert() (computeBaseSort): updated Assert()s (normalizeAndComputeTrueSort): updated Assert() * freeSymbol.hh: removed #pragma * freeSubterm.hh: removed #pragma * freeRhsAutomaton.cc: removed #pragma * freeRhsAutomaton.hh: removed #pragma * freeRemainder.hh (fastMatchReplace): updated Assert()s * freeRemainder.cc: removed #pragma (FreeRemainder): updated Assert()s (slowMatchReplace2): updated Assert() * freeRemainder.hh: removed #pragma * freePreNetSubsumption.cc (subsumesWrtReducedFringe): updated Assert() * freePreNetSemiCompiler.cc (semiCompileNode): updated Assert()s (allocateSlot): updated Assert() (buildSlotTranslation): updated Assert()s * freePreNetFullCompiler.cc (allocateVariables): updated Assert() * freePreNet.cc: removed #pragma (buildNet): DebugAdvisoryCheck() -> DebugAdvisory() (makeNode): updated Assert() (partiallySubsumed): updated Assert() * freePreNet.hh: removed #pragma * freePositionTable.cc: removed #pragma * freePositionTable.hh: removed #pragma * freeOccurrence.hh: removed #pragma * freeNet.cc: removed #pragma (fillOutNode): updated Assert() * freeNet.hh: removed #pragma * freeLhsStructs.hh: removed #pragma * freeLhsCompiler.cc (compileRemainder): updated Assert() (compileLhs2): updated Assert() (findConstraintPropagationSequence): updated Assert() * freeLhsAutomaton.cc: removed #pragma (match): updated Assert()s * freeLhsAutomaton.hh: removed #pragma * freeDagNode.cc: removed #pragma (compareArguments): updated Assert() (copyWithReplacement): updated Assert() (copyWithReplacement): updated Assert()s * freeDagNode.hh: removed #pragma (getArgument): updated Assert()s * freeDagArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * freeDagArgumentIterator.hh: removed #pragma * freeBinarySymbol.cc: removed #pragma * freeBinarySymbol.hh: removed #pragma * freeArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * freeArgumentIterator.hh: removed #pragma ===================================Maude79=========================================== 2003-01-07 Steven Eker * freeTerm.hh (class FreeTerm): added decl for partialCompareArguments() * freeTerm.cc (partialCompareArguments): added ===================================Maude78================================================== 2002-11-25 Steven Eker * freeDagNode.hh (class FreeDagNode): added hack to get around the invisibility of MemoryCell::Word 2002-11-20 Steven Eker * freeNet.cc (dump): use &(stack[0]) in place of stack.rawBasePointer() * freeNetExec.cc: replaced rawBasePointer() call with const_iterators (applyReplace2): reordering the initial assignments restored performance accounding to quantify ===================================Maude77================================================== 2002-11-13 Steven Eker * freeSymbol.cc (compileEquations): pass false to FreePreNet ctor (generateCode): pass true to FreePreNet ctor * freePreNet.cc (FreePreNet): added (dump): only dump patternIndex and nextPattern for remainder nodes if expandRemainderNodes is true; in the false case these fields won't be set (makeNode): only expand remainder nodes if expandRemainderNodes == true * freePreNet.hh (class FreePreNet): added data member expandRemainderNodes (class FreePreNet): added decl for FreePreNet() 2002-10-07 Steven Eker * freeDagNode.cc (copyWithReplacement): simple version: added Assert(), removed test for nrArgs != 0 (copyWithReplacement): complex version: added Assert()s, removed test for nrArgs != 0 2002-10-04 Steven Eker * freeDagNode.hh (class FreeDagNode): updated decl for complex version of copyWithReplacement() * freeDagNode.cc (copyWithReplacement): complex version: rewritten to handle case where not all arguments have been stacked * freeSymbol.cc (stackArguments): rewritten to stack only those args that are not frozen and not unstackable 2002-10-03 Steven Eker * freeDagNode.hh (class FreeDagNode): updated decl for stackArguments() * freeDagNode.cc (stackArguments): take and handle respectFrozen flag ===================================Maude76================================================== 2002-08-02 Steven Eker * freeTerm.cc (compileRhs3): call useIndex() on source obtained by recursive call; this fixes a bug with new constrcution index coloring scheme; may also fix a potential bug with fragments (compileRhs3): fix bug properly this time - we need to flag last use of each source after all the sources have been compiled * freePreNetSubsumption.cc (subsumesWrtReducedFringe): fixed bug where we weren't calling subsumerArgs.next() and were running of the end of domainSorts[] 2002-07-26 Steven Eker * freeDagNode.hh (class FreeDagNode): added class FreeTernarySymbol to friends * freeSymbol.cc (newFreeSymbol): use FreeTernarySymbol * freeTernarySymbol.cc: created * freeTernarySymbol.hh: created * freeNetExec.cc (applyReplace2): added pointer comparison trick for SPEED_HACKS case * freeNet.cc (buildRemainders): fixed bug in SPEED_HACKS version (tripleLt): added pointer comparison trick for SPEED_HACKS case 2002-07-25 Steven Eker * freeNet.hh (class FreeNet): added decl for moreImportant() * freeNet.cc: moved all the freeNetAlt.cc stuff here since is now the only way rather than an alternative way to build FreeNets (moreImportant): added (buildTernaryTree): use moreImportant() to bias selection of test symbols * freePreNetSemiCompiler.cc (buildSlotTranslation): use new conflicts structure * freePreNet.hh (class FreePreNet): conflicts becomes Vector * freeTerm.hh (class FreeTerm): updated decl for findActiveSlots() * freeTerm.cc (findActiveSlots): changed arg to NatSet& * freeNet.cc (dump): handle new applicable strcuture * freeNetExec.cc (applyReplace2): simplified slow case * freeNetAlt.cc (addRemainderList): simplified (buildRemainders): rewritten * freeNet.hh (class FreeNet): reorganized struct TestNode (class FreeNet): applicable changed to Vector from Vector > 2002-07-24 Steven Eker * freeNet.hh (class FreeNet): deleted struct Position * freeSymbol.cc (compileEquations): deleted commented out call to discriminationNet.compileEquations() * freeNet.hh (class FreeNet): deleted decls for conservativePartialSubsumptionApproximation(), buildSlotTranslation(), findBestPosition(), setVisitedFlags(), allocateSlot(), buildPatternVector(), buildFringe(), buildNet(), buildApplicable(), isSubsumed(), compileEquations(), generateCode() * freeNet.cc (compileEquations): deleted (buildSlotTranslation): deleted (findBestPosition): deleted (buildNet): deleted (buildApplicable): deleted (setVisitedFlags): deleted (allocateSlot): deleted (buildPatternVector): deleted (buildFringe): deleted * freePreNetSubsumption.cc (subsumesWrtReducedFringe): same as below * freePreNet.cc (buildNet): pass sameVariableSet = false to subsumes() since patterns are from different universally quantified equations * freeTerm.cc (subsumes): handle sameVariableSet arg * freeTerm.hh (class FreeTerm): updated decl for subsumes() * freePreNetSubsumption.cc: updated comments to make them less obscure 2002-07-22 Steven Eker * freePreNetSemiCompiler.cc (semiCompile): don't do precompilation stuff here because it is too late * freeSymbol.cc (compileEquations): need to do precompilation stuff here before we create the FreePreNet so that Term::contextSet is set up correctly in each subterm and subsumption can take account of nonlinear variables * freePreNet.cc (buildNet): added DebugAdvisoryCheck() for subsumption * freePreNetSubsumption.cc (subsumesWrtReducedFringe): fix bug where we weren't dealing with the possibility that subsumes() could return UNDECIDED * freeNet.cc (dump): handle null remainder pointers * freeNet.hh (class FreeNet): updated decl for buildRemainders() * freeNetAlt.cc (buildRemainders): handle patternsUsed arg * freePreNetSemiCompiler.cc (semiCompile): pass patternsUsed to buildRemainders() * freePreNet.hh (class FreePreNet): added data member patternsUsed * freePreNetSemiCompiler.cc (semiCompileNode): update patternsUsed * freeRemainder.cc (dump): fixed bug where we were calling index2Variable() on indices of pseudo variables (FreeRemainder): added Assert() for parent slots (FreeRemainder): static_cast<>() -> safeCast() * freePreNetSemiCompiler.cc (semiCompileNode): fixed bug where we passing NONE (-1) rather than 0 to fillOutNode() for the fail case 2002-07-19 Steven Eker * freePreNetSemiCompiler.cc (semiCompile): need to compile equations and set term root slots * freeTerm.cc (findActiveSlots): adde Assert() to check for missing slot index in active FreeTerm * freePreNetSemiCompiler.cc (semiCompile): handle empty net case (semiCompileNode): fig bug where we weren't filling out symbols[] (semiCompileNode): on both branches! (semiCompileNode): passing wrong live set to allocateSlot() resulting in NULLs in conflicts * freeSymbol.cc (compileEquations): use FreePreNet * freePreNetSemiCompiler.cc (semiCompile): call buildRemainders() * freeNetAlt.cc: created * freeNet.hh (class FreeNet): added decl for buildRemainders() 2002-07-18 Steven Eker * freePreNetSemiCompiler.cc (semiCompileNode): created * freeNet.hh (class FreeNet): added decls for allocateNode(), fillOutNode(), addRemainderList() (class FreeNet): added decl for translateSlots() * freePreNet.hh (class FreePreNet): added freeNetIndex to struct Node (class FreePreNet): added data member conflicts (class FreePreNet): added typedef for SlotMap 2002-07-16 Steven Eker * freePreNetFullCompiler.cc (generateNode): use generatePointer() rather than generatePointer2() in the testing of bound variables part so we take advantage of the case where the pointer to the dagnode matching the nonlinear occurrence is already in an 'r' variables as a result of previous test nodes (generated for the benefit of other patterns) 2002-07-12 Steven Eker * freePreNetFullCompiler.cc (generateCode): move call to allocateVariables here from FreePreNet::buildNet() * freePreNet.cc (findBestPosition): modify heuristic to prefer positions that are stable in early subsumers so they get to discard later patterns by partial subsumption more quickly 2002-07-11 Steven Eker * freePreNet.cc (partiallySubsumed): fixed bug where we we iterating off the end of liveSet ===================================Maude74================================================== 2002-05-03 Steven Eker * freeBinarySymbol.cc (FreeBinarySymbol): don't pass eagerStrategy to FreeSymbol * freeBinarySymbol.hh (class FreeBinarySymbol): deleted static data member eagerStrategy * freeUnarySymbol.cc (FreeUnarySymbol): don't pass eagerStrategy to FreeSymbol * freeUnarySymbol.hh (class FreeUnarySymbol): deleted static data member eagerStrategy ===================================Maude72================================================== 2002-03-21 Steven Eker * freePreNet.cc (makeNode): fixed potential bug where calling makeNode() could invalidate the reference net[nrNodes].sons[i].target (findLiveSet): fix potential bug where psition reference could be evaluated by a call to partiallySubsumed() since whis in turn calls subsumesWrtReducedFringe() which adds new positions to table 2002-03-19 Steven Eker * freePreNet.cc (partiallySubsumed): fixed bug where we weren't handling empty liveSet (makeNode): fixed subtle bug: now that reallocation of a vector causes vectors contents to be copied, pointers and references into vectors within vectors become invalid when the outer vector is resized since the inner vectors are copied. We were storing an Arc& ref across a call to makeNode() which resizes the outer vector * freePreNet.hh (class FreePreNet): updated decls for makeNode(), reduceFringe(), findLiveSet(); delete decl for FreeTerm* version of partiallySubsumed() * freePreNet.cc (buildNet): removed all mention of difficult sets (makeNode): removed all mention of difficult sets (reduceFringe): removed all mention of difficult sets (findLiveSet): removed all mention of difficult sets (partiallySubsumed): deleted FreeTerm* version * freePreNet.hh (class FreePreNet): added data member topPositionIndex * freePreNet.cc (partiallySubsumed): rewritten * freePreNet.hh (class FreePreNet): updated decls for subsumesWrtReducedFringe() (both versions) * freePreNetSubsumption.cc (subsumesWrtReducedFringe): moved here (both versions) (subsumesWrtReducedFringe): rewritten to avoid calling locateSubterm() (both versions) 2002-03-15 Steven Eker * freePreNet.hh (class FreePreNet): added decls for subsumesWrtReducedFringe() (both versions) * freePreNet.cc (subsumesWrtReducedFringe): added FreeTerm* version (subsumesWrtReducedFringe): added const NatSet& version 2002-03-14 Steven Eker * freePreNet.hh (class FreePreNet): deleted decl for isDomainMaximalLinearVariable() * freePreNet.cc (isDomainMaximalLinearVariable): delete; it was based on domainSortAlwaysLeqThan() which is now unsound since mbs can drag a term out of the kind (error sort) into a regular sort. (reduceFringe): don't call isDomainMaximalLinearVariable() - assume false (findLiveSet): don't call isDomainMaximalLinearVariable() - assume false; NatSet::const_iter clean up (partiallySubsumed): (FreeTerm* version) don't call isDomainMaximalLinearVariable() - assume false; NatSet::const_iter clean up 2002-03-12 Steven Eker * freePreNet.hh (class FreePreNet): updated decl for isDomainMaximalLinearVariable() * freePreNet.cc (findBestPosition): simplified using NatSet::const_iterators and PointerSet::swap() (reduceFringe): simplified using NatSet::const_iterators (isDomainMaximalLinearVariable): take FreeTerm*; Assert() that subterm exists since it is an error to try and dynamic_cast a null pointer (this was an almost bug in previous version) (reduceFringe): added safeCast to FreeTerm* * freePositionTable.cc: added comments to explain not so obvious digital search tree implementation 2002-03-11 Steven Eker * freeLhsAutomaton.cc: deleted explicit template instantiations * freeNet.cc: deleted explicit template instantiations * freePositionTable.cc: deleted explicit template instantiation * freePreNet.cc: deleted explicit template instantiations * freeRhsAutomaton.cc: deleted explicit template instantiation * freeTheory.cc: deleted explicit template instantiations ===================================Maude71================================================== 2002-03-08 Steven Eker * freeRemainder.cc (slowMatchReplace2): turn for loops into do-while loops for speed * freeLhsAutomaton.cc (match): turn for loops into do-while loops for speed 2002-03-07 Steven Eker * freeLhsAutomaton.cc (match): use iterators for stack access (match): use const_iterators for loops * freeRhsAutomaton.cc (fillOutArgs): rewritten using const_iterators in place of CONST_VECTOR_HACKs (construct): rewritten using const_iterators in place of CONST_VECTOR_HACKs (replace): rewritten using const_iterators in place of CONST_VECTOR_HACKs * freeRemainder.hh (fastMatchReplace): fixed stupid begin()/end() wrong-way-around bug * freeRemainder.cc (slowMatchReplace2): rewrote using const_iterators for loops * freeTheory.cc: provide implementation for FreeLhsStructs * freeTheory.hh: added fwd decl for FreeLhsStructs * freeRemainder.cc (slowMatchReplace2): remove FreeLhsAutomaton::'s * freeRemainder.hh (class FreeRemainder): derive from FreeLhsStructs (fastMatchReplace): remove FreeLhsAutomaton::'s * freeLhsAutomaton.hh (class FreeLhsAutomaton): derive from FreeLhsStructs * freeLhsStructs.hh: created * freeRemainder.hh (fastMatchReplace): rewritten using const_iterators in place of CONST_VECTOR_HACKs (fastMatchReplace): use const_cast<> to add constness and get the correct iterator 2002-02-05 Steven Eker * freeSymbol.hh (class FreeSymbol): added strategy = standard default argument to both ctor and newFreeSymbol() ===================================Maude70================================================== 2001-12-10 Steven Eker * freeSymbol.cc (newFreeSymbol): replaced ?: with if-then-else to avoid g++ 3.0 complaints abount distinct pointer types ===================================Maude69================================================== 2001-04-03 Steven Eker * freeDagNode.hh (class FreeDagNode): added dec for Vector verison of copyWithReplacement() * freeDagNode.cc (copyWithReplacement): added (Vector verison) ===================================Engine66================================================== 2001-03-16 Steven Eker * freeRemainder.cc (slowMatchReplace2): incrementCount() -> incrementEqCount() * freeRemainder.hh (fastMatchReplace): incrementCount() -> incrementEqCount() 2001-03-07 Steven Eker * freeSymbol.cc (stackArguments): added * freeSymbol.hh (class FreeSymbol): added decl for stackArguments() ===================================Engine65================================================== 2001-01-26 Steven Eker * freeDagNode.hh (class FreeDagNode): updated decl for markArguments and made it private * freeDagNode.cc (markArguments): code cleaning (markArguments): rewritten with new semantics 2001-01-24 Steven Eker * freeRemainder.hh (class FreeRemainder): deleted decl for generateRemainder() * freeRemainder.cc (generateRemainder): deleted * freeNet.hh (class FreeNet): deleted decls for calculateLivePatterns(), generateNode(), generateBranch(), gatherAlternatives(), gatherAlternatives2() * freeNet.cc (calculateLivePatterns): deleted (generateCode): deleted (generateNode): deleted (gatherAlternatives): deleted (gatherAlternatives2): deleted (generateBranch): deleted ===================================Engine64================================================== 2000-10-20 Steven Eker * freeTerm.cc (compileRhsAliens): fixed bug where we were using eagerContext rather than argEager in call to findTerm() (compileRhs3): fixed bug where we were using eagerContext rather than argEager in calls to findTerm() and insertBuiltTerm() 2000-10-11 Steven Eker * freeTerm.cc (compileRhs2): call compileRhsAliens(); the idea is that we need a completely seperate pass over the free skeleton to comple all the aliens first otherwise we can end up with common subexpressions being used by an alien subterm before they are built by the FreeRhsAutomaton; we still need to clean up compileRhs3() now that some of the work is done in this seperate pass * freeTerm.hh (class FreeTerm): added decl for compileRhsAliens() * freeTerm.cc (compileRhsAliens): added ===================================Engine63================================================== 2000-08-02 Steven Eker * freeRemainder.cc (slowMatchReplace): no longer call inErrorSort() when pattern is in the error sort (FreeRemainder): no care if pattern is in error sort when deciding if we're suitable for "fast" treatment * freeSymbol.cc (complexStrategy): removed special handling for last 0 of a user defined strategy (memoStrategy): ditto 2000-07-31 Steven Eker * freeSymbol.cc (computeBaseSort): don't handle union sorts ===================================Engine61================================================== 2000-07-28 Steven Eker * freeRhsAutomaton.cc (remapIndices): added * freeRhsAutomaton.hh (class FreeRhsAutomaton): added decl for remapIndices() 2000-07-26 Steven Eker * freeRemainder.cc (slowMatchReplace): use getNrProtectedVariables() instead of nrVariables() * freePreNetFullCompiler.cc (generateNode): use getNrRealVariables() instead of nrVariables() * freeTerm.cc (compileRhs3): use makeConstructionIndex() instead of allocateIndex() 2000-07-25 Steven Eker * freeTerm.cc (findAvailableTerms): don't insert ground terms into availableTerms since we can't do left->right sharing on them * freeRhsAutomaton.cc (construct): don't call buildAliens() (replace): don't call buildAliens() (dump): don't call RhsAutomaton::dump() * freeTerm.hh (class FreeTerm): deleted decl for compileRhs() * freeTerm.cc (compileRhs): deleted ===================================Engine60================================================== 2000-07-19 Steven Eker * freeTerm.cc (compileRhsAliens): deleted (compileRhsFree): deleted 2000-07-18 Steven Eker * freeTerm.hh (class FreeTerm): deleted decl for compileRhs() (class FreeTerm): deleted decls for compileRhsAliens() and compileRhsFree() * freeTerm.cc (compileRhs3): call self on subterm, not on own object (compileRhs3): need to check if free subterm in availableTerms and insert free subterm into availableTerms after we compile it - not self (compileRhs): deleted * freeRemainder.cc (FreeRemainder): use freeSymbols not freeVars when adding pseudo variables * freeNet.hh (class FreeNet): removed extraneous dump() decl 2000-07-12 Steven Eker * freeRemainder.cc (FreeRemainder): use getLhs() instead of lhs() (slowMatchReplace): use getLhs() instead of lhs() (generateRemainder): use getRhs() instead of rhs() (FreeRemainder): don't check for problem variables (slowMatchReplace2): don't call copyProblemBindings() (slowMatchReplace2): use getLhsAutomaton() instead of lhsAutomaton() * freePreNet.cc (buildNet): use getConditionVariables() instead of condLhs() and condRhs() (buildNet): use getRhs() instead of rhs() (buildNet): use getLhs() instead of lhs() * freePreNetFullCompiler.cc (generateNode): use getRhs() instead of rhs() * freeNet.cc (compileEquations): use getLhs() instead of lhs() * freeRemainder.cc (slowMatchReplace2): use getRhsBuilder() instead of rhsAutomaton() * freeRemainder.hh (fastMatchReplace): use getRhsBuilder() instead of rhsAutomaton() * freeTerm.cc (compileRhs2): need to call addRhsAutomaton() 2000-07-11 Steven Eker * freeTerm.hh (class FreeTerm): added decl for compileRhs3() * freeTerm.cc (findAvailableTerms): added (compileRhs2): added (compileRhs3): added * freeTerm.hh (class FreeTerm): added decls for findAvailableTerms() and compileRhs2() * freeRemainder.cc (dump): dump pseudo variables correctly * freeLhsAutomaton.cc (dump): dump saveIndex for free subterms * freeTerm.cc (findActiveSlots): the slots of free terms which have a free term arg that is needed for left -> right sharing are now added to active slots * freeRemainder.cc: added code to create extra free variables for left -> right sharing * freeNet.cc: removed old commented out conservative partial suubsumption code ===================================Engine58================================================== 2000-07-05 Steven Eker * freeLhsAutomaton.cc (match): bind pseudo-variable for FreeSubterms with saveIndex != NONE (freeSubterms): set freeSubterms[].saveIndex * freeLhsAutomaton.hh (class FreeLhsAutomaton): added saveIndex data member to struct FreeSubterm * freeLhsCompiler.cc (compileLhs): becomes compileLhs2() * freeTerm.hh (class FreeTerm): compileLhs() -> compileLhs2() 2000-06-23 Steven Eker * freeRemainder.cc (FreeRemainder): lookupSort() -> getSort() (FreeRemainder): index() -> getIndex() * freePreNet.cc (isDomainMaximalLinearVariable): lookupSort() -> getSort() * freePreNetFullCompiler.cc (generateNode): index() -> getIndex() (generateNode): lookupSort() -> getSort() * freePreNet.cc (isDomainMaximalLinearVariable): index() -> getIndex() * freeLhsAutomaton.cc (freeSubterms): lookupSort() -> getSort(); index() -> getIndex() * freeTermFullCompiler.cc (scanFreeSkeleton): lookupSort() -> getSort() * freeTerm.cc (compileRhsFree): modifiedIndex() -> getModifiedIndex() * freeTermFullCompiler.cc (scanFreeSkeleton): index() -> getIndex() * freeLhsCompiler.cc (analyseConstraintPropagation): index() -> getIndex() (compileRemainder): index() -> getIndex() (compileLhs): index() -> getIndex() * freeRemainder.cc (FreeRemainder): use safeCast() macro in place of VariableTerm::downCast() (2 places) * freeLhsAutomaton.cc (freeSubterms): use safeCast() macro in place of VariableTerm::downCast() (2 places) ===================================Engine58================================================== 2000-03-30 Steven Eker * freeNet.cc (isSubsumed): commented out (conservativePartialSubsumptionApproximation): commented out (calculateLivePatterns): commented out * freeTheory.cc: ifdef'd #pragma implementation "freeSubterm.hh" 2000-03-29 Steven Eker * freeLhsAutomaton.cc (match): made Assert() message more detailed 2000-03-17 Steven Eker * freeLhsAutomaton.cc (dump): ifdef'd * freeRhsAutomaton.cc (dump): ifdef'd * freeLhsAutomaton.hh (class FreeLhsAutomaton): used NO_COPYING() macro; ifdef'd dump() decl * freeRhsAutomaton.hh (class FreeRhsAutomaton): ifdef'd dump() decl * freeRemainder.hh (class FreeRemainder): used NO_COPYING() macro; ifdef'd dump() decl * freeRemainder.cc (dump): ifdef'd * freeSymbol.hh (class FreeSymbol): used NO_COPYING() macro; ifdef'd dump() decl * freeSymbol.cc (dump): ifdef'd * freePreNet.cc (dump): ifdef'd (dumpSlotMap): ifdef'd (dumpPath): ifdef'd (dumpPositionSet): ifdef'd (dumpNatSet): ifdef'd * freePreNet.hh (class FreePreNet): ifdef'd dump routine decls * freeNet.cc (dump): ifdef'd * freeNet.hh (class FreeNet): ifdef'd dump() decl * freeSymbol.cc (complexStrategy): standardized IssueAdvisory() (memoStrategy): standardized IssueAdvisory() 2000-03-15 Steven Eker * freeNet.hh (class FreeNet): added version of struct TestNode optimized for 64bit pts and #ifdef'd on ALPHA 2000-02-25 Steven Eker * freeNet.hh (class FreeNet): updated decls for isSubsumed() and calculateLivePatterns() * freeNet.cc (isSubsumed): fixed bug where we weren't passing Vector arg by ref (calculateLivePatterns): fixed bug where we weren't passing Vector arg by ref ===================================Engine56================================================== 2000-02-15 Steven Eker * freeDagNode.cc (FreeDagNode): delete Assert() since we are now forbidden to access symbol and hence cannot find our arity ===================================Engine55================================================== 2000-01-31 Steven Eker * freeSymbol.cc (generateCons): generate code to fill out all flags including sort index in one step * freePreNetFullCompiler.cc (generateNode): use struct Flags ===================================Engine54================================================== 2000-01-28 Steven Eker * freePreNetFullCompiler.cc (allocateVariables): use flags field instead of unfailing (generateNode): use flags field instead of unfailing * freePreNet.cc (partiallySubsumed): use flags field instead of subsumers (dump): use flags field instead of subsumers; print unfailing flag as well * freePreNet.hh (class FreePreNet): added enum Flags; replaced unflailing field with flags field in struct Pattern; deleted subsumers data member * freePreNetFullCompiler.cc (generateNode): call usedSort() 2000-01-27 Steven Eker * freeTermFullCompiler.cc (scanFreeSkeleton): must insert index if free variables into boundVariables! * freePreNetFullCompiler.cc (generateNode): added special handling for next remainder; need to avoid generating goto in shared case and force generation of label in last parent case (generateCode): new calling convention for generateNode() (generateNode): generate code for comparing binding to nonlinear variables 2000-01-26 Steven Eker * freePreNetFullCompiler.cc (allocateVariables): increment nrFailParents for nextPattern arcs where there is no next pattern and the cirrent pattern is not unfailing (generateNode): now generate code to test sort of a node bound to a variable * freePreNet.hh (class FreePreNet): added unfailing flag to struct pattern * freeTerm.hh (class FreeTerm): updated decl for scanFreeSkeleton() * freeTermFullCompiler.cc (scanFreeSkeleton): added unfailing calculation and result; a pattern is unfailing iff it is guarenteed to matching any instance of its free skeleton: all variables must be linear and have sorts at the top of error-free components. No aliens are allowed. 2000-01-24 Steven Eker * freeSymbol.cc (generateCode): only generate call generateSortDiagram() if we are not single sorted (generateCons): generate full sort look up if we can produce error sort 2000-01-19 Steven Eker * freeSymbol.cc (generateCons): rewritten to simplify code in normal case (generateCode): call generateSortDiagram() (generateCons): generate code to do sort calculation in naive case (generateCons): handle single non-error sort case 1999-12-21 Steven Eker * freePreNet.cc (partiallySubsumed): in the case that a fringe position exists in subsumer but not in victim, don't automatically return false; instead see if the subterm in the subsumer is domain maximal linear variable (findLiveSet): use f rather than patterns[i].term in call to isDomainMaximalLinearVariable() 1999-12-17 Steven Eker * freePreNet.cc (generateNode): call generateRhs() (generateNode): 'p' -> 'r' for generated variables (generatePointer): 'p' -> 'r' for generated variables (generateCode): 'p' -> 'r' for generated variables * freeSymbol.hh (class FreeSymbol): updated decl for generateCode() * freeSymbol.cc (generateCode): updated for new calling conventions 1999-12-16 Steven Eker * freeSymbol.cc (generateCons): added * freePreNet.cc (buildNet): clear nrFailParents and nrFailVisits (allocateVariables): increment nrFailParents * freePreNet.hh (class FreePreNet): added data member topSymbol (class FreePreNet): added data members nrFailParents and nrFailVisits * freePreNet.cc (generateNode): added (generatePointer2): added (generatePointer): added (generateCode): added (makeNode): clear nrParents and nrVisits (allocateVariables): increment and test nrParents (buildNet): set topSymbol * freePreNet.hh (class FreePreNet): added data members nrParents and nrVisits to struct Node; deleted data member pass2 1999-12-15 Steven Eker * freePreNet.hh (class FreePreNet): added data member slotTranslation * freePreNet.cc (buildNet): call allocateVariables() * freePreNet.hh (class FreePreNet): aded decl for dumpSlotMap() * freePreNet.cc (dumpSlotMap): added (dump): call dumpSlotMap() ===================================Engine54================================================== 1999-12-03 Steven Eker * freePreNet.cc2 (makeNode): clear pass2 flag (allocateVariables): set pass2 flag 1999-12-02 Steven Eker * freeTermFullCompiler.cc (scanFreeSkeleton): rewritten * freeSubterm.hh: created * freePreNet.hh (class FreePreNet): deleted saveSlot from struct Node; deleted decl for deleteSlot(); updated decl for slotMapUnion() * freePreNet.cc (slotMapUnion): added avoidIndex arg (allocateVariables): don't delete testPositionIndex from local slot map, instead we rely on not passing it up; this way we avoid having to keep a copy in saveSlot (slotMapUnion): rewritten, now take fromNodeNr 1999-12-01 Steven Eker * freePreNet.hh (class FreePreNet): added decl for deleteSlot() * freePreNet.cc (findSlot): added (slotMapInsert): added (slotMapUnion): added (allocateVariables): added * freePreNet.hh (class FreePreNet): added struct Pair; add slotMap and pass2 members to struct Node; added decls for allocateVariables(), slotMapUnion(), slotMapInsert(), findSlot() * freePositionTable.cc (parentIndex): added * freePositionTable.hh (class FreePositionTable): added decl for parentIndex() * freePreNet.hh (class FreePreNet): updated decl for makeNode() (class FreePreNet): added positionsTested member to struct Node (class FreePreNet): added slots data member * freePreNet.cc (makeNode): fill out nextPattern and patternIndex if reducedFringe empty (dump): dump nextPattern and patternIndex (makeNode): keep track of positions tested (dump): dump positionsTested * freePreNet.hh (class FreePreNet): added nextPattern and patternIndex members to struct Node * freeTheory.hh: added forward decl for class FreePositionTable * freeTerm.hh (class FreeTerm): added decl for full compiler version of scanFreeSkeleton() * freeRemainder.cc (FreeRemainder): use errorFreeMaximal 1999-11-30 Steven Eker * freePreNet.cc (findBestPosition): must increment nrLive for each live pattern 1999-11-29 Steven Eker * freePreNet.cc (makeNode): set testPositionIndex (dump): dump testPositionIndex (dumpPositionSet): added (dumpNatSet): added (dump): use dumpPositionSet() and dumpNatSet() (makeNode): fixed nasty stale ref bug on n.sons; set n.neqTarget = UNBOUNDED in the not test position case to distinguish it from fail case (makeNode): inserted temporary to force evaluation of makeNode(newLiveSet, newFringe, newDifficultSets) before net[nrNodes].neqTarget (but should this be necessary?) (buildNet): need to eliminate patterns via subsumption at very top because our future elimination through partial subsumption is incremental * freePreNet.hh (class FreePreNet): added decls for dump() and dumpPath() (class FreePreNet): added testPositionIndex to struct Node * freePreNet.cc (dump): added (dumpPath): added 1999-11-24 Steven Eker * freePreNet.hh (class FreePreNet): added decls for expandFringe(), reduceFringe(), findLiveSet(), partiallySubsumed() (both versions) * freePreNet.cc (expandFringe): added (reduceFringe): added (findLiveSet): added (partiallySubsumed): added (2 versions) * freePreNet.hh (class FreePreNet): added decl for isDomainMaximalLinearVariable() * freePreNet.cc (isDomainMaximalLinearVariable): added * freeTerm.cc (locateSubterm): handle backup arg * freeTerm.hh (class FreeTerm): added backup arg to locateSubterm() 1999-11-22 Steven Eker * freePreNet.cc (addPosition): deleted (buildNet): use FreePositionTable (findBestPosition): use FreePositionTable * freePreNet.hh (class FreePreNet): use FreePositionTable * freePositionTable.cc (position2Int): code cleaning 1999-11-19 Steven Eker * freePositionTable.cc: created * freePositionTable.hh: created 1999-11-17 Steven Eker * freeNet.hh (class FreeNet): added decls for isSubsumed() and calculateLivePatterns() 1999-11-15 Steven Eker * freeNet.cc (isSubsumed): added (calculateLivePatterns): added 1999-11-12 Steven Eker * freeTerm.hh (class FreeTerm): added decl for locateSubterm2() * freeTerm.cc (locateSubterm2): added * freeNet.hh (class FreeNet): added decl for conservativePartialSubsumptionApproximation() * freeNet.cc (conservativePartialSubsumptionApproximation): added 1999-11-10 Steven Eker * freeNet.cc: Reverted; partial subsumption is much more subtle than expected * freeNet.hh (class FreeNet): updated decl for buildNet() Reverted * freeNet.cc (compileEquations): compute subsuming; pass extra args to buildNet() (buildNet): build a new unknownPositions where and pass it on default arc and on arcs labelled with alien symbols 1999-11-09 Steven Eker * freeRemainder.cc (generateRemainder): updated 1999-11-08 Steven Eker * freeNet.hh (class FreeNet): decl for generateBody() replaced by decl for generateCode(); updated decls for generateNode() and generateBranch() * freeRemainder.hh (class FreeRemainder): updated decl for generateRemainder() * freeNet.cc (generateCode): added; replaces generateBody() (generateNode): updated to use CompilationContext (generateBranch): updated to use CompilationContext * freeSymbol.hh (class FreeSymbol): decl for generateCode() replaces that for generateBody() * freeSymbol.cc (generateCode): added; replaces generateBody() 1999-11-03 Steven Eker * freeSymbol.hh (class FreeSymbol): updated decl for memoStrategy() * freeSymbol.cc (complexStrategy): simplified using revised MemoTable (memoStrategy): simplified using revised MemoTable 1999-11-02 Steven Eker * freeSymbol.cc (complexStrategy): no longer try the memo table before reducing arguments; this departs from the OBJ3 practice but avoids difficulties regarding whether to normalize before trying the memo table (memoStrategy): try memo table before each rewrite at top attempt rather than after each argument reduction 1999-10-29 Steven Eker * freeSymbol.cc (FreeSymbol): init Symbol * freeSymbol.hh (class FreeSymbol): revert to base Symbol * freeSymbol.cc (FreeSymbol): init StandardSymbol rather than Symbol * freeSymbol.hh (class FreeSymbol): derive from StandardSymbol rather than Symbol and Strategy 1999-10-27 Steven Eker * freeTerm.cc (markEagerArguments): added static_cast() * freeSymbol.cc (FreeSymbol): don't pass theory arg, pass memoFlag arg to Symbol deleted freeTheoryString * freeSymbol.hh (class FreeSymbol): derive from Strategy (now that this is no longer a base of Symbol) (class FreeSymbol): deleted decl for static data member freeTheoryString ===================================Engine53================================================== 1999-10-26 Steven Eker * freeLhsCompiler.cc (analyseConstraintPropagation): VariableTerm::dynamicCast() -> dynamic_cast() (compileRemainder): VariableTerm::dynamicCast() -> dynamic_cast() (compileLhs): VariableTerm::dynamicCast() -> dynamic_cast() (scanFreeSkeleton): FreeTerm::dynamicCast() -> dynamic_cast() * freeNet.cc (compileEquations): FreeTerm::dynamicCast() -> dynamic_cast() (*2) (findBestPosition): FreeTerm::dynamicCast() -> dynamic_cast() (buildNet): FreeSymbol::dynamicCast() -> dynamic_cast() (setVisitedFlags): FreeTerm::dynamicCast() -> dynamic_cast() (*2) (allocateSlot): FreeTerm::dynamicCast() -> dynamic_cast() (buildPatternVector): FreeTerm::dynamicCast() -> dynamic_cast() * freeTerm.cc (locateSubterm): FreeTerm::dynamicCast() -> dynamic_cast() (findActiveSlots): FreeTerm::dynamicCast() -> dynamic_cast() (compileRhsAliens): FreeTerm::dynamicCast() -> dynamic_cast() (compileRhsAliens): VariableTerm::dynamicCast() -> dynamic_cast() (compileRhsFree): FreeTerm::dynamicCast() -> dynamic_cast() (compileRhsFree): VariableTerm::dynamicCast() -> dynamic_cast() * freeTerm.hh (dynamicCast): deleted (class FreeTerm): deleted decl for dynamicCast() * freeSymbol.hh (dynamicCast): deleted (class FreeSymbol): deleted decl for dynamicCast() * freeSymbol.cc (complexStrategy): AdvisoryCheck() -> IssueAdvisory() (memoStrategy): AdvisoryCheck() -> IssueAdvisory() 1999-10-25 Steven Eker * freeRemainder.cc (slowMatchReplace2): updated call to tracePreEqRewrite() * freeSymbol.hh (class FreeSymbol): added decl for memoStrategy() * freeSymbol.cc (complexStrategy): no longer do memo stuff here (memoStrategy): added 1999-10-22 Steven Eker * freeSymbol.cc (FreeSymbol): take memoFlag arg (complexStrategy): handle memoization (newFreeSymbol): have to take memoFlag onto account when deciding when to check for non-standard strategy * freeSymbol.hh (class FreeSymbol): updated decls for FreeSymbol() and newFreeSymbol() * freeSymbol.cc (newFreeSymbol): take memoFlag arg 1999-10-19 Steven Eker * freeDagNode.cc (getHashValue): 1999-10-18 Steven Eker * freeDagNode.hh (class FreeDagNode): added hashCache array to data member union ===================================Engine52================================================== 1999-08-26 Steven Eker * freeDagNode.cc (markArguments): try using typeid() as dynamic_cast is painfully slow (markArguments): unmade change as typeid() causes more reg window traps 1999-08-02 Steven Eker * freeNet.hh (class FreeNet): tripleLeq() -> tripleLt() * freeNet.cc (buildNet): tripleLeq() -> tripleLt() (tripleLeq): -> tripleLt() 1999-07-30 Steven Eker * freeNet.hh (class FreeNet): replaced decl for tripleCompare() with decl for tripleLeq() * freeNet.cc (buildNet): use STL sort function (tripleCompare): becomes tripleLeq() 1999-07-28 Steven Eker * freeDagNode.cc (markArguments): use dynamic_cast rather than comparison of pointers to member functions to figure out if we can tail recurse * freeDagNode.hh (class FreeDagNode): made FreeUnarySymbol and FreeBinarySymbol friends ===================================Engine51================================================== 1999-07-19 Steven Eker * freeNet.cc (generateBody): handle the case where we have an empty net but nonzero applicables - eg k = f(a) or f(X) = k 1999-07-15 Steven Eker * freeSymbol.cc (generateBody): void* -> char* in generated code (generateBody): added needed casts in generated code 1999-06-29 Steven Eker * freeNet.hh (class FreeNet): upadted decl for generateBody() * freeRemainder.hh (class FreeRemainder): updated decl for generateRemainder() * freeRemainder.cc (generateRemainder): return number of safe slots needed * freeNet.cc (generateBody): return maxSafe * freeSymbol.hh (class FreeSymbol): updates decl for generateBody() * freeSymbol.cc (generateBody): print maxSafe define to hfile 1999-06-28 Steven Eker * freeRemainder.hh (class FreeRemainder): updated decl for generateRemainder() * freeRemainder.cc (generateRemainder): take useArgList arg * freeNet.hh (class FreeNet): upaded decls of generateNode() and generateBranch() * freeNet.cc (generateBranch): keep track of which ap lists use arg list and which consider slot 0 to have been reused (generateNode): carry aps arg arround (generateBody): pass useArgList flag to generateRemainder() * freeSymbol.cc (generateBody): reorganized fail case to to handle GC case properly 1999-06-25 Steven Eker * freeRemainder.cc (generateRemainder): pass lhs top symbol to generateRhs() to enable tail recursion elimination * freeSymbol.cc (generateBody): use g.memNext and g.memEnd 1999-06-24 Steven Eker * freeSymbol.cc (generateBody): generate code to allocate new dag node 1999-06-22 Steven Eker * freeRemainder.cc (generateRemainder): call generateRhs(); 1999-06-18 Steven Eker * freeNet.cc (buildApplicable): rewritten to check existing applicable lists and avoid generating duplicates * freeRemainder.cc (generateRemainder): added * freeNet.cc (generateBody): use generateRemainder() * freeRemainder.hh (class FreeRemainder): added decl for generateRemainder() 1999-06-15 Steven Eker * freeNet.hh (class FreeNet): added decls for gatherAlternatives() and gatherAlternatives2(); deleted decl for isSimple() * freeNet.cc (isSimple): deleted (generateNode): rewriting to generate switch statements (gatherAlternatives): added (gatherAlternatives2): added 1999-06-14 Steven Eker * freeNet.cc (generateNode): optimize case where both fail branches are simple (isSimple): allow fail branches in simple node to be a remainder rather than just a fail * freeNet.hh (class FreeNet): added decl for isSimple() * freeNet.cc (generateNode): optimize code in fail vs simple equality branch case using isSimple() (isSimple): added 1999-06-11 Steven Eker * freeNet.cc (generateNode): added (generateBranch): added (generateBody): added * freeSymbol.hh (class FreeSymbol): added decl for generateBody() * freeSymbol.cc (generateBody): added ===================================Maude 1.0.3 released======================================= 1999-06-01 Steven Eker * freeRhsAutomaton.hh (class FreeRhsAutomaton): updated decl for fillOutArgs() * freeRhsAutomaton.cc (fillOutArgs): replaced SPEED_HACK with CONST_VECTOR_HACK (construct): replaced SPEED_HACK with CONST_VECTOR_HACK (fillOutArgs): made 2nd arg const (replace): replaced SPEED_HACK with CONST_VECTOR_HACK * freeRemainder.hh (fastMatchReplace): replaced SPEED_HACKs with CONST_VECTOR_HACKs 1999-05-12 Steven Eker * freeSymbol.hh (class FreeSymbol): computeTrueSort() -> normalizeAndComputeTrueSort() * freeSymbol.cc (computeTrueSort): becomes normalizeAndComputeTrueSort() (normalizeAndComputeTrueSort): use fastComputeTrueSort() 1999-05-11 Steven Eker * freeNetExec.cc (applyReplace2): try reversing symbol test if-then-else (applyReplace2): unmade change; test was the best way around originally * freeSymbol.hh (class FreeSymbol): added decl for newFreeSymbol() 1999-05-10 Steven Eker * freeBinarySymbol.cc: created * freeBinarySymbol.hh: created * freeUnarySymbol.cc: created * freeUnarySymbol.hh: created * freeSymbol.cc (eqRewrite): added test for nrArgs > 0 and replaced for loop with do-while loop (eqRewrite): unmade change as it appeas to lose (newFreeSymbol): added ===================================Engine48================================================== 1999-05-07 Steven Eker * freeNet.hh (applyReplace): reverse test; this apparently has an impact on performance; put most important branch first for ?: and if-then-else * freeSymbol.cc (eqRewrite): use normal applyReplace() which is (once again) an inlined wrapper for an outlined version * freeNet.cc: revert * freeNet.hh: revert * freeNet.cc (outlineApplyReplace): added * freeSymbol.cc (complexStrategy): deleted (eqRewrite): reverted (eqRewrite): use outlineApplyReplace() in complex strat case * freeNet2.hh: resurected * freeNet.cc: implement freeNet2.hh again * freeNet.hh (class FreeNet): deleted applyReplace() wrapper and decl; inserted decl for outlineApplyReplace() 1999-05-06 Steven Eker * freeSymbol.cc (complexStrategy): created to outline complex strategy case and reduce eqRewrite stack frame size for non-reg window machines (eqRewrite): use complexStrategy() * freeNet.cc: no longer implement freeNet2.hh * freeNet.hh (applyReplace): moved here; now jsut a wrapper for applyReplace2() * freeNet2.hh: deleted * freeNetExec.cc: created to contain outlined applyReplace2() * freeSymbol.cc (eqRewrite): try outlining call to applyReplace() since this makes stackframe big (144bytes vs 112bytes on sparc) on what can be a higly recursive function 1999-05-05 Steven Eker * freeRemainder.cc (FreeRemainder): check to see if variables sort component is error-free and revoke superfast treatment if not * freeRemainder.hh (fastMatchReplace): remove check for arg in error sort in superfast case; we now assume component is error-free 1999-04-28 Steven Eker * freeDagNode.cc (markArguments): try new tail recursion elimination scheme that does highly dubious comparison on pointers to virtual functions (markArguments): use markArgument() rather than mark() on last arg in != case inorder to share cose with == case. 1999-04-27 Steven Eker * freeDagNode.cc (markArguments): added tail recursion eliminiation hack for 1 and 2 arg cases * freeNet2.hh (applyReplace): (SPEED_HACKS version) experimentally merged the "no patterns have free symbols" with the start of the "at least one pattern has free symbols" to simplify control flow (applyReplace): unmade change as quantify shows that it loses ever so slightly ===================================Engine48================================================== ===================================Maude 1.0.2 released======================================= ===================================Maude 1.0.1 released======================================= 1999-02-25 Steven Eker * freeNet.hh: removed extreme pointerization SPEED_HACK due to slowness * freeNet2.hh: removed extreme pointerization SPEED_HACK due to slowness * freeNet.cc: removed extreme pointerization SPEED_HACK due to slowness * freeNet2.hh (applyReplace): optimized using extreme pointerization SPEED_HACK for TestNode arcs * freeNet.hh (class FreeNet): deleted dummy field from TestNode * freeNet.cc (compileEquations): extreme pointerization SPEED_HACK for TestNode arcs * freeRemainder.cc (slowMatchReplace2): made const (slowMatchReplace): made const * freeRemainder.hh (fastMatchReplace): added consts (class FreeRemainder): added consts decl * freeNet.cc (compileEquations): fill out fastApplicable in SPEED_HACKS case * freeNet2.hh (applyReplace): use fastApplicable in SPEED_HACKS case and revert to old code in debug case * freeNet.hh (class FreeNet): have fastApplicable for SPEED_HACKS case but keep applicable for net construction 1999-02-23 Steven Eker * freeNet2.hh (applyReplace): rewrote both versions to use new applicable vector * freeNet.hh (class FreeNet): applicable becomes a Vector > 1999-02-19 Steven Eker * freeNet2.hh (applyReplace): unmade previous change as quantify shows no change in # of cycles 1999-02-18 Steven Eker * freeNet2.hh (applyReplace): added eqIndices SPEED_HACK to share lookup on eqIndicespyt between length() and operator [] * freeLhsAutomaton.cc (match): use isNull() (5 places) * freeRemainder.cc (slowMatchReplace2): use isNull() (4 places) ===================================VectorExperiment========================================== 1999-01-16 Steven Eker * freeTerm.hh (class FreeTerm): made slotIndex a short and visitedFlag a Bool to save memory ===========================Engine46=========================================================== Wed Nov 25 10:59:26 1998 Steven Eker * freeRemainder.cc (slowMatchReplace2): first attempt at using traceAbort(); we have introduced a suble bug that we will worry about later (slowMatchReplace2): do tracePreEqRewrite() before traceAbort() and copyProblemBindings() after tracing stuff (slowMatchReplace2): reorg of control structures using gotos (ugly but effective) (slowMatchReplace2): fix afore-mentioned bug in brute force way - always restore the stack after a checkCondition() because we may end up aborting (slowMatchReplace2): removed gotos and put back deletes Tue Nov 24 18:09:00 1998 Steven Eker * freeRemainder.cc (slowMatchReplace2): fix longstanding and very nasty re-entrancy bug by saving stack before evaluating a condition and restoring it if we fail Mon Nov 16 10:00:50 1998 Steven Eker * freeRemainder.cc (slowMatchReplace2): use getTraceStatus() in place of traceStatus() * freeRemainder.hh (fastMatchReplace): use getTraceStatus() in place of traceStatus() Fri Nov 6 15:13:05 1998 Steven Eker * freeTerm.hh (class FreeTerm): deepCopy() decl -> deepCopy2() * freeTerm.cc (deepCopy): -> deepCopy2() ===========================Engine43=========================================================== Thu Oct 8 11:08:18 1998 Steven Eker * freeLhsCompiler.cc (analyseConstraintPropagation): static_cast -> const_cast * freeTerm.cc (compareArguments): inserted const_cast (subsumes): inserted const_cast (earlyMatchFailOnInstanceOf): inserted const_cast * freeDagNode.hh (argArray): replaced static_cast with const_cast * freeSymbol.hh (class FreeSymbol): deleted static data member sortIndexBuffer * freeSymbol.cc: deleted sortIndexBuffer (FreeSymbol): don't expand sortIndexBuffer ===========================Engine41=========================================================== Fri Sep 25 10:30:44 1998 Steven Eker * freeNet2.hh (applyReplace): don't check context.traceStatus() here (applyReplace): Reason for counter-intuitive speed up when moving test into loop is that loop (almost) always executes exactly 1 iteration. Make use of the fast that loop never executes 0 iterations by turning it into do-while loop * freeRemainder.hh (fastMatchReplace): try checking context.traceStatus() here * freeNet2.hh (applyReplace): highly speculative reorganization aimed at improving performance in non-constant case (applyReplace): Slower! - proabably extra branch around else case; Try hoisting code after branch and specializing - since after suceessfully matching a symbol we never go strait to failure. (applyReplace): Faster! - try horrible goto hack to simplify main loop (applyReplace): Slower; try simplified goto trick (applyReplace): Much slower; reverted to hoisted code version (applyReplace): Try rearrange the 6 assignments at the top of main loop to maximize paralleism on superscalars (and make use of load delay stots on processors that have them) (applyReplace): Slower! assume that the write in to memory via a pointer messes up the compilers data flow analysis; revert (applyReplace): Try hack to avoid checking net.length() * freeRemainder.hh (fastMatchReplace): reversed previous hack because it makes things every so slightly slower; try combining rather than duplicating code. (fastMatchReplace): even slower! revert to Wednesdays version (fastMatchReplace): try reversing then and else parts inside loop Thu Sep 24 20:47:48 1998 Steven Eker * freeRemainder.hh (fastMatchReplace): very experimental speed hack duplicating code in the hope of reducing branching Wed Sep 23 10:16:56 1998 Steven Eker * freeRemainder.hh (fastMatchReplace): made slowMatchReplace() public so that we can call in from FreeNet::applyReplace() * freeRemainder.cc (FreeRemainder): added test for super-fast status (slowMatchReplace2): reorganized sort test (dump): dump fast and foreign flags * freeNet2.hh (applyReplace): (both versions) split equations loop into slowMatchReplace() and fastMatchReplace() versions * freeRemainder.hh (fastMatchReplace): implemented "super-fast: mode; no longer check context.traceStatus(); fast flag now an int Mon Sep 21 10:09:44 1998 Steven Eker * freeSymbol.cc (computeBaseSort): remember to return after nrArgs == 0 hack! Fri Sep 18 16:53:25 1998 Steven Eker * freeSymbol.cc (computeBaseSort): hack for nrArgs == 0 case; eventually this should be dealt with by uniqueSort mechanism and we will just have an Assert that nrArgs > 0 Thu Sep 17 17:41:51 1998 Steven Eker * freeDagNode.cc (overwriteWithClone): setSortInfo() -> setSortIndex() (makeClone): setSortInfo() -> setSortIndex() * freeSymbol.cc (computeBaseSort): rewritten using traverse(), setSortIndex() and lookupSortIndex() * freeLhsAutomaton.cc (match): use DagNode::leq() * freeRemainder.cc (slowMatchReplace2): use DagNode::leq() * freeRemainder.hh (fastMatchReplace): use DagNode::leq() Fri Sep 11 16:35:41 1998 Steven Eker * freeLhsAutomaton.cc (freeSubterms): set sort rather than sortCode (match): use <= on (DagNode*, Sort&) instead of sortCode (dump): sort rather than sortCode * freeRemainder.cc (FreeRemainder): set sort rather than sortCode (slowMatchReplace2): use <= on (DagNode*, Sort&) instead of sortCode (dump): sort rather than sortCode * freeRemainder.hh (fastMatchReplace): use <= on (DagNode*, Sort&) instead of sortCode * freeLhsAutomaton.hh (class FreeLhsAutomaton): FreeVariable::sortCode becomes FreeVariable::sort ===========================Engine40=========================================================== Mon Jul 20 19:16:50 1998 Steven Eker * freeTerm.cc (FreeTerm): added new ctor (deepCopy): added * freeTerm.hh (class FreeTerm): added decl for deepCopy() (class FreeTerm): delete bad initializer from arguments arg of FreeTerm() (g++ should not have accepted this!) ===========================Engine39=========================================================== Wed Jun 10 11:24:06 1998 Steven Eker * freeTerm.hh (class FreeTerm): updated normalize() decl * freeTerm.cc: IntSet -> NatSet (normalize): compute changed flag * freeLhsCompiler.cc: IntSet -> NatSet * freeDagNode.cc: deleted #include "intSet.hh" * freeTerm.hh: IntSet -> NatSet ===========================Engine38=========================================================== Fri Feb 20 16:18:38 1998 Steven Eker * freeDagNode.cc (stackArguments): only stack arguments that have not been flagged as unstackable (stackArguments): simplified & optimized ===========================Engine36=========================================================== Wed Feb 18 10:23:12 1998 Steven Eker * freeNet.cc (compileEquations): added code to pointerize slots and positions in SPEED_HACKS case (dump): dump pointerized slots and positions correctly * freeNet2.hh (applyReplace): revert to reorganized loop; although this is very slightly slower on dec example in wins in fibo example; the partially optimized loop is the same as the reorganized loop but uglier (applyReplace): split into two versions; a super-fast, super-hairy, partly pointerized version for optimized builds and a more or less straight-forward version for debugging Sat Feb 14 19:56:53 1998 Steven Eker * freeNet2.hh (applyReplace): reorganized loop using new variables ds to store d->symbol() and p to store n->position in the hope of avoiding reloading d->symbol() after the d->symbol() != n->symbol case (applyReplace): partly reversed previous change since things got slower - maybe due to messing up branch delay slots Fri Feb 13 09:50:45 1998 Steven Eker * freeRemainder.cc (~FreeRemainder): added * freeRemainder.hh (class FreeRemainder): added decl for ~FreeRemainder() * freeNet.hh (class FreeNet): delete ctor decl as default will do (class FreeNet): added anon unions to struct TestNode for future position/slot pointerization * freeNet.cc (~FreeNet): implemented Thu Feb 12 18:24:52 1998 Steven Eker * freeLhsAutomaton.cc (~FreeLhsAutomaton): implemented Wed Feb 11 17:07:55 1998 Steven Eker * freeRemainder.cc (slowMatchReplace2): compare() != 0 replaced by !equal() (2 places) * freeLhsAutomaton.cc (match): compare() != 0 replaced by !equal() (3 places) * freeRemainder.cc (slowMatchReplace2): use delete rather than calling deepSelfDestruct() (4 places) ===========================Engine35=========================================================== Thu Dec 4 12:50:37 1997 Steven Eker * freeSymbol.cc (FreeSymbol): deleted inert arg * freeSymbol.hh (class FreeSymbol): deleted inert arg from ctor decl Tue Dec 2 16:35:13 1997 Steven Eker * freeSymbol.cc (eqRewrite): use copyAndReduce() (eqRewrite): call repudiateSortInfo() after copying and reducing in the case where we abandon the users strategy Wed Nov 26 17:59:06 1997 Steven Eker * freeDagNode.cc (copyEagerUptoReduced2): use class Strategy stuff * freeTerm.cc (findEagerVariables): use class Strategy stuff (markEagerArguments): use class Strategy stuff * freeSymbol.cc: (eqRewrite): rewritten to use class Strategy stuff * freeSymbol.hh (class FreeSymbol): deleted decl for ~FreeSymbol() * freeSymbol.cc (FreeSymbol): use Strategy::setStrategy(); this eliminates most of the code. (~FreeSymbol): deleted * freeSymbol.hh (class FreeSymbol): delete decls for eagerSet(), evaluatedSet() and data members strat, eager, evaluated. (eagerSet): deleted (evaluatedSet): deleted Mon Nov 24 19:51:34 1997 Steven Eker * freeRhsAutomaton.cc (construct): use rhsAutomaton::buildAliens() (replace): use rhsAutomaton::buildAliens() (dump): use RhsAutomaton::dump() * freeRhsAutomaton.hh (addAlien): deleted (class FreeRhsAutomaton): deleted aliens data member and addAlien() decl Sun Nov 23 16:47:42 1997 Steven Eker * freeRemainder.cc (dump): use new LhsAutomaton::dump() convention * freeLhsAutomaton.cc (dump): rewritten * freeRhsAutomaton.cc (dump): rewritten * freeRhsAutomaton.hh (class FreeRhsAutomaton): updated dump() decl * freeLhsAutomaton.hh (class FreeLhsAutomaton): updated dump() decl ===========================Engine33=========================================================== Tue Oct 21 11:56:14 1997 Steven Eker * freeTerm.cc (dagify2): switch to new convention * freeTerm.hh (class FreeTerm): witch dagify2() decl to new convention Thu Oct 16 12:19:41 1997 Steven Eker * freeSymbol.hh (class FreeSymbol): freeTheoryString changed from array to pointer * freeSymbol.cc: freeTheoryString changed from array to pointer Wed Oct 15 10:03:24 1997 Steven Eker * freeNet.hh (class FreeNet): deleted decl for isFreeTerm() * freeNet.cc (isFreeTerm): use FreeTerm::dynamicCast() (buildNet): use FreeSymbol::dynamicCast() (compileEquations): use FreeTerm::dynamicCast() (2 places) (findBestPosition): use FreeTerm::dynamicCast() (setVisitedFlags): use FreeTerm::dynamicCast() (2 places) (allocateSlot): use FreeTerm::dynamicCast() (buildPatternVector): use FreeTerm::dynamicCast() (isFreeTerm): deleted * freeLhsCompiler.cc (analyseConstraintPropagation): use VariableTerm::dynamicCast() (compileRemainder): use VariableTerm::dynamicCast() (compileLhs): use VariableTerm::dynamicCast() (scanFreeSkeleton): use VariableTerm::dynamicCast() * freeTerm.cc (compileRhsFree): rewritten using VariableTerm::dynamicCast() and FreeTerm::dynamicCast() (compileRhsAliens): rewritten using VariableTerm::dynamicCast() and FreeTerm::dynamicCast() * freeTerm.hh (class FreeTerm): added decl for dynamicCast() (dynamicCast): added * freeSymbol.hh (class FreeSymbol): added decl for dynamicCast() (dynamicCast): added * freeTerm.cc (locateSubterm): use FreeTerm::dynamicCast() (findActiveSlots): simplified using FreeTerm::dynamicCast() * freeSymbol.cc (computeTrueSort): replaced old style cast (eqRewrite): replaced old style cast (computeBaseSort): replaced old style cast * freeDagNode.hh (argArray): replaced old style cast * freeSymbol.cc (FreeSymbol): use new Symbol ctor; expand static sortIndexBuffer if too small for current arity * freeSymbol.hh (class FreeSymbol): added static data member freeTheoryString (class FreeSymbol): drop constructor flag from ctor arg list (class FreeSymbol): make sortIndexBuffer static Fri Oct 10 18:22:39 1997 Steven Eker * freeRemainder.cc (dump): index2Symbol -> index2Variable (slowMatchReplace2): symbolCount() -> nrVariables() * freeLhsAutomaton.cc (dump): VariableIndex -> VariableInfo (dump): index2Symbol -> index2Variable * freeLhsAutomaton.hh (class FreeLhsAutomaton): VariableIndex -> VariableInfo ===========================Engine30=========================================================== Thu Oct 9 11:48:31 1997 Steven Eker * freeRhsAutomaton.cc (fillOutArgs): optimized the nrArgs = 0 case (construct): use fillOutArgs() * freeRhsAutomaton.hh (class FreeRhsAutomaton): added decl for fillOutArgs() * freeRhsAutomaton.cc (replace): for some strange reason splitting off final iteration made things much slower! try rearranging loop (replace): revert to original version: original loop is eather careful to utilize branch slots I think! (replace): Added more SPEED_HACKS (fillOutArgs): added (replace): use fillOutArgs() * freeDagNode.cc (FreeDagNode): elminated test since destructor should only be called on free dag nodes with external storage; added Assert to check this. * freeRhsAutomaton.cc (replace): split off final iteration for efficiency * freeDagNode.hh (class FreeDagNode): external changed to ArgVec (FreeDagNode): call initialize() on external (class FreeDagNode): unmade change; Because free matcher keeps stack of pointers to raw argument arrays we can't safely use ArgVec as the position of the raw argument array will move during a garbage collect; (FreeDagNode): unmade change Tue Oct 7 15:20:02 1997 Steven Eker * freeSymbol.cc (makeDagNode): added * freeSymbol.hh (class FreeSymbol): added decl for makeDagNode() Fri Oct 3 19:13:01 1997 Steven Eker * freeTerm.cc (compileRhs): DataSet -> TermSet (compileRhsAliens): DataSet -> TermSet (compileRhsFree): DataSet -> TermSet (dagify2): DataSet -> TermSet * freeTerm.hh (class FreeTerm): DataSet -> TermSet ===========================Engine29=========================================================== Thu Oct 2 17:02:57 1997 Steven Eker * freeTerm.hh (class FreeTerm): updated compileRhsAliens() decl (class FreeTerm): updated compileRhsFree() decl * freeTerm.cc (compileRhs): modified to use DataSet& (compileRhsAliens): modified to use DataSet& (compileRhsFree): modified to use DataSet&; const removed; cast removed * freeTerm.hh (class FreeTerm): updated compileRhs() decl Tue Sep 30 11:03:03 1997 Steven Eker * freeTerm.cc (dagify2): adapted from dagify() * freeTerm.hh (class FreeTerm): dagify() decl changed to dagify2() * freeTerm.cc (normalize): now compute hash value Thu Sep 25 16:29:56 1997 Steven Eker * freeNet.cc (compileEquations): use getEquations() ===========================Engine28=========================================================== Sat Aug 30 15:10:32 1997 Steven Eker * freeSymbol.cc (computeBaseSort): rewrote union case to use Vector version of lookupUnionSort() ===========================Engine27=========================================================== Tue Aug 5 14:06:08 1997 Steven Eker * freeDagNode.cc (copyWithReplacement): removed extraneous "eager" variable left over from previous changes * freeDagNode.hh (getArgument): added; this provides fast access to arguments without exposing raw pointer to arg vector (internal or external). It is intended for use by classes that treat free theory as special; e.g. classes that are derived from FreeDagNode or FreeSymbol. (class FreeDagNode): changed argArray() back to private; added public decl for getArgument() Thu Jul 31 16:23:49 1997 Steven Eker * freeDagNode.hh (class FreeDagNode): changed argArray() from private to protected (class FreeDagNode): changed argArray() to public. this is a gross hack to get machine integers working; we want to provide a safe hook into FreeDagNode a.s.a.p. Wed Jul 23 11:39:51 1997 Steven Eker * freeTerm.cc (normalize): added full flag * freeTerm.hh (class FreeTerm): added full flag to normalize() Mon Jul 21 19:15:27 1997 Steven Eker * freeDagNode.hh (class FreeDagNode): deleted normalizeEagerUptoReduced2() decl * freeDagNode.cc (normalizeEagerUptoReduced2): deleted (copyWithReplacement): don't call normalizeEagerUptoReduced() ===========================Engine26b=========================================================== Fri Jul 18 15:59:29 1997 Steven Eker * freeDagNode.cc (normalizeEagerUpToReduced2): added (copyWithReplacement): normalize replacement if it is to be put in an eager position * freeDagNode.hh (class FreeDagNode): added decl for normalizeEagerUpToReduced2() Tue Jul 15 14:53:04 1997 Steven Eker * freeSymbol.cc (FreeSymbol): added inert arg * freeSymbol.hh (class FreeSymbol): added inert arg to ctor * freeDagNode.cc (markArguments): optimized (compareArguments): optimized ===============================Engine26======================================================== Mon Jun 30 11:18:25 1997 Steven Eker * freeTerm.cc (FreeTerm): print symbol name in assert message Fri Jun 27 16:18:03 1997 Steven Eker * freeDagNode.hh (class FreeDagNode): clearCopyPointers2() and DagNode* copyEagerUptoReduced2() made private * freeSymbol.cc (eqRewrite): copyEagerUptoReduced() and clearCopyPointers() replaced by copyReducible() (twice) Wed Jun 25 15:12:55 1997 Steven Eker * freeNet.cc: added #include "variable.hh" * freeSymbol.cc: added #include "variable.hh" Tue Jun 24 14:57:38 1997 Steven Eker * freeRemainder.cc: changed #include "variable.hh" to #include "variableTerm.hh" (slowMatchReplace2): need to find first solution to subproblem if it exists in "foreign" case * freeLhsAutomaton.cc: added #include "variable.hh" * freeLhsCompiler.cc (compileRemainder): use VariableTerm::downCast() (compileLhs): se VariableTerm::downCast() * freeTerm.cc: added #include "variable.hh" * freeRemainder.cc (FreeRemainder): use VariableTerm::downCast() * freeTerm.cc (compileRhsFree): use VariableTerm::downCast() changed #include "variable.hh" to #include "variableTerm.hh" * freeLhsAutomaton.cc (freeSubterms): use VariableTerm::downCast() changed #include "variable.hh" to #include "variableTerm.hh" Tue Jun 17 16:36:42 1997 Steven Eker * freeSymbol.cc (eqRewrite): deleted call to foreignApplyReplace() (eqRewrite): changed comment; a call to discriminationNet.applyReplace() can now compute a top sort if we match a foreign remainder against the whole subject and the foreign matcher decides to compute the sort of its subjects (e.g. for a variable pattern or a collapse to a variable). * freeNet.cc (compileEquations): use new Equation::compile conventions Thu Jun 12 11:36:04 1997 Steven Eker * freeNet.cc (isFreeTerm): moved here and made local_inline to avoid header file problems * freeSymbol.cc (eqRewrite): don't call foreignApplyReplace() * freeRemainder.cc (slowMatchReplace2): local_inline it (slowMatchReplace2): handle foreign case * freeRemainder.hh (class FreeRemainder): added foreign flag; removed fast flag from main ctor decl; added "foreign" ctor decl * freeRemainder.cc (FreeRemainder): move decision on whether "fast" or not inside ctor (FreeRemainder): added ctor for "foreign" case Wed Jun 11 10:31:24 1997 Steven Eker * freeNet.hh (isFreeTerm): added * freeNet.cc (buildSlotTranslation): take reference rather than make copy of conflicts vector; this was a long standing bug that caused loss of compilation speed replaced -1 with NONE throughout (compileEquations): We are now going to allow patterns that don't have our symbol on top but that could match a subject headed by our term anyway: (1) We only setSlotIndex(0) for patterns that have a FreeTerm at their root; since free symbols don't ever collapse ths implicitly menas it is our symbol. (2) We only use compileRemainder() for patterns that have a FreeTerm at their root; for other patterns we use a special FreeRemainder ctor (findBestPosition): only try to locateSubterm() in those patterns that have a FreeTerm at their root. (setVisitedFlags): only try to locateSubterm() in those patterns that have a FreeTerm at their root. (allocateSlot): only try to locateSubterm() and findActiveSlots() in those patterns that have a FreeTerm at their root. (buildPatternVector): only try to locateSubterm() in those patterns that have a FreeTerm at their root. * freeTerm.hh (class FreeTerm): delete findBestSequence() decl * freeLhsCompiler.cc (insertGroundOutAliens): use willGroundOutMatch() (findBestSequence): deleted (analyseConstraintPropagation): use findConstraintPropagationSequence() rather than findBestSequence() (compileRemainder): use findConstraintPropagationSequence() rather than findBestSequence() (compileLhs): use findConstraintPropagationSequence() rather than findBestSequence() Tue Jun 10 10:50:03 1997 Steven Eker * freeLhsCompiler.cc (findConstraintPropagationSequence): added (insertGroundOutAliens): added Thu Jun 5 11:34:41 1997 Steven Eker * freeDagNode.hh (class FreeDagNode): decls for clearCopyPointers() and copyEagerUptoReduced() changed * freeDagNode.cc (clearCopyPointers2): adapted from old clearCopyPointers() (copyEagerUptoReduced2): adapted from old copyEagerUptoReduced() * freeSymbol.cc (FreeSymbol): don't pass stable arg to Symbol ==============================Engine24==================================== Fri May 16 10:58:25 1997 Steven Eker * freeTerm.cc (earlyMatchFailOnInstanceOf): use Term::stable() rather than testing for collapseSymbols and checking for variable * freeNet.cc (findBestPosition): use Term::stable() rather than testing for collapseSymbols and checking for variable (buildPatternVector): use Term::stable() rather than testing for collapseSymbols and checking for variable Thu May 15 16:25:46 1997 Steven Eker * freeNet.cc (buildPatternVector): change condition for pattern to survive; instead of "subterm !Symbol::stable()" we use "subterm is a variable or subterm could collapse at its top". We could have a much more sophisticated test: We could check to see if subterm could collapse to a variable or the required symbol. But this would be dangerous since the subterm could also collapse to some other symbol that does not have a branch and would miss being on the default branch. We could build the branches differently but this would be complicated and we would run in to problems extending the unexplored fringe if this other symbol that now got its own branch happened to be free. So we adopt a suboptimal solution that will occassionally try a remainder (which will contain at least one collapsing alien) that is bound to fail. (findBestPosition): now consider a subterm to be stable if it is not a variable and cannot collapse at its top. We use collapseSymbols() rather than stable() (findBestPosition): corrected sizeSum formula; this is a longstanding bug that doesn't manifest any symptoms except for occasional tiny performance deficit. (findBestPosition): use PointerSet rather that Vector for simpler code * freeTerm.cc (earlyMatchFailOnInstanceOf): use collapseSymbols() rather than stable() Mon Apr 7 19:27:23 1997 Steven Eker * freeRemainder.cc (slowMatchReplace2): call to checkCondition() now takes subject Fri Apr 4 17:48:20 1997 Steven Eker * freeRemainder.cc (slowMatchReplace2): use tracePreEqRewrite() and tracePostEqRewrite() * freeRemainder.hh (fastMatchReplace): check for traceStatus() Wed Feb 12 19:15:10 1997 Steven Eker * freeNet.cc (compileEquations): zero lhsAutomaton for equation to make sure dump works correctly Thu Jan 9 15:47:32 1997 Steven Eker * freeDagNode.cc (overwriteWithClone): fixed serious bug where we were copying sort of overwritten node rather than overwriting node Tue Jan 7 11:52:25 1997 Steven Eker * freeRemainder.cc (slowMatchReplace): replaced call to computeBaseSort() call to inErrorSort() * freeSymbol.cc (eqRewrite): semiEager -> seenZero (eqRewrite): use inErrorSort() rather than computeBaseSort() (eqRewrite): remove now redundant repudiateSortInfo() call Thu Jan 2 17:36:24 1997 Steven Eker * freeSymbol.cc (eqRewrite): fixed bug where when processing final 0, if it was the only 0 then arguments that have not been evaluated will not have a valid sort when we call computeBaseSort(subject) Tue Dec 24 14:10:34 1996 Steven Eker * freeRemainder.cc (slowMatchReplace): modified to use computeBaseSort() * freeSymbol.cc (eqRewrite): adapted from rewrite(); computeSort() call replaced by computeTrueSort() call (eqRewrite): final 0 case computeSort() call replaced by computeBaseSort() call (computeBaseSort): adapted from computeSort() (computeTrueSort): added * freeSymbol.hh (class FreeSymbol): rewrite() -> eqRewrite(); computeSort() replaced by computeBaseSort() and computeTrueSort() Thu Dec 19 13:21:57 1996 Steven Eker * freeDagNode.cc (overwriteWithClone): simplified by not treating 0 args as special case (makeClone): simplified by not treating 0 args as special case; copy sort information Thu Dec 12 17:39:47 1996 Steven Eker * freeDagNode.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 Mon Dec 9 15:22:45 1996 Steven Eker * freeSymbol.cc (computeSort): modified to use new constrainToSmallerSort() calling convention Mon Nov 25 19:04:25 1996 Steven Eker * freeSymbol.cc (Symbol): added constructor arg Thu Nov 14 17:51:18 1996 Steven Eker * freeDagNode.cc (makeClone): added Wed Oct 30 12:07:15 1996 Steven Eker * freeSymbol.cc (rewrite): hacked to use Symbol::foreignApplyReplace() * freeNet2.hh (applyReplace): minor rewrite Thu Oct 17 16:03:50 1996 Steven Eker * freeNet2.hh (applyReplace): stack argArray only when slot >= 0 * freeNet.cc (findBestPosition): stability used rather than freeness to determine if a symbol can be tested during match of free skeleton (buildPatternVector): treat stable aliens as constants (buildNet): treat stable aliens as constants * freeTerm.cc (FreeTerm): set visitedFlag = false * freeNet.cc (buildNet): use setVisitedFlags() (setVisitedFlags): used to be setUtilityFlags() * freeTerm.hh (class FreeTerm): visitedFlag added (setVisitedFlag): added * freeTerm.cc (findActiveSlots): rewritten to use visited flag Wed Oct 16 11:21:54 1996 Steven Eker * freeNet.cc (dump): hacked to do indentation Tue Oct 15 18:27:45 1996 Steven Eker * freeRemainder.cc (dump): rewritten to do indentation * freeRhsAutomaton.cc (dump): indentLevel arg added but not yet used * freeLhsAutomaton.cc (dump): rewritten to do indentation Fri Aug 30 13:50:50 1996 Steven Eker * freeTerm.cc (subsumes): much simplified not that subsumtion on variables handles non-linearities correctly Fri Aug 9 15:53:39 1996 Steven Eker * freeDagNode.cc (stackArguments): added (copyWithReplacement): added * freeSymbol.cc: ruleRewrite() stripped * freeSymbol.hh (class FreeSymbol): ruleRewrite() stripped Thu Aug 8 16:29:21 1996 Steven Eker * freeSymbol.cc (ruleRewrite): added Tue Aug 6 14:45:37 1996 Steven Eker * freeLhsAutomaton.cc (freeSubterms): freeVars parameter and code to fill out freeVariables vector deleted (match): code to bind free variables removed (dump): code to dump free variables removed * freeLhsAutomaton.hh (class FreeLhsAutomaton): freeVars rag removed from constructor (class FreeLhsAutomaton): freeVariables vector removed * freeLhsCompiler.cc: created by extraacting compiler code from freeTerm.cc (analyseConstraintPropagation): matchAtTop arg removed (compileRemainder): no longer pass boundAbove (compileLhs): boundAbove arg removed, no longer update and pass this set * freeTerm.hh (class FreeTerm): boundAbove arg removed from compileLhs(); matchAtTop arg removed from analyseConstraintPropagation() Fri Aug 2 17:21:28 1996 Steven Eker * freeSymbol.cc (Symbol): take strategy has a reference rather than a pointer to a constant Vector for consistancy with other theories Thu Aug 1 17:10:13 1996 Steven Eker * freeSymbol.cc (FreeSymbol): hacked to handle empty strategy list correctly Wed Jul 31 17:17:47 1996 Steven Eker * freeSymbol.cc (makeTerm): added Fri Jun 28 17:34:01 1996 Steven Eker * freeTerm.cc (earlyMatchFailOnInstanceOf): added Fri Jun 21 18:53:39 1996 Steven Eker * freeTerm.cc (compileLhs): new arg list; handle subproblem likely flag (compileRemainder): use new compileLhs() * freeTerm.hh (class FreeTerm): changed compileLhs() args Thu Jun 13 16:26:44 1996 Steven Eker * freeLhsAutomaton.cc (match): use SubproblemAccumulator * freeRemainder.cc (slowMatchReplace2): use SubproblemAccumulator Wed Jun 12 10:49:40 1996 Steven Eker * freeTerm.cc (compileLhs): added nrVariables arg (compileRemainder): pass nrVariables Fri Jun 7 16:51:41 1996 Steven Eker * freeRemainder.cc (slowMatchReplace2): use new SubproblemSequence constructor and semantics * freeLhsAutomaton.cc: use new SubproblemSequence constructor and semantics * freeTheory.cc: Sequence's removed throughout module Wed May 29 16:36:53 1996 Steven Eker * freeRemainder.cc (dump): multi-character character constant removed Tue May 28 17:03:58 1996 Steven Eker * freeTerm.cc (findBestSequence): top level version: modified to use Term::findBestSequence() (findBestSequence): recursive version: deleted Thu May 23 11:38:51 1996 Steven Eker * freeNet.cc (dump): now dump remainders (dump): fixed bug where we assumed net to be empty if there were no test nodes * freeRemainder.cc (dump): added Sun May 19 18:29:36 1996 Steven Eker * freeRemainder.cc (slowMatchReplace2): added (slowMatchReplace): call slowMatchReplace2() to actually do the work; we acll finished() to unprotect DAG nodes in the substitution and call DagNode::okToCollectGarbage() even if match failed as matching can created garbage (eg in assoc or AC theories) Sat May 18 15:55:30 1996 Steven Eker * freeSymbol.cc (rewrite): print Advisory if users strategy is abandoned Fri May 17 16:20:38 1996 Steven Eker * freeDagNode.cc: deleted #include "dumpContext.hh" * freeNet.cc (dump): use streams * freeLhsAutomaton.cc (dump): use streams * freeRhsAutomaton.cc (dump): use streams * freeSymbol.cc (dump): use streams Sat May 11 16:31:39 1996 Steven Eker * freeSymbol.cc (FreeSymbol): pass stable = true Fri Apr 12 17:22:59 1996 Steven Eker * freeTerm.cc (analyseConstraintPropagation): added atTop parameter (findBestSequence): call analyseConstraintPropagation() with atTop = false * freeTerm.hh: added atTop parameter to analyseConstraintPropagation() Wed Apr 10 12:04:46 1996 Steven Eker * freeDagNode.cc (markArguments): Asserts removed (placed in DagNode::mark() instead) * freeTerm.cc (markEagerArguments): use argArray.length() in place of sym->arity() (markEagerArguments): replaced old style cast with static_cast and removed local variable that was only used once (findEagerVariables): replaced old style cast with static_cast Wed Mar 27 11:28:10 1996 Steven Eker * freeTheory.cc: template class Sequence removed * freeTerm.cc (compileRhs): rewritten to use revised FreeRhsAutomaton class (compileRhsAliens): rewritten to use revised FreeRhsAutomaton class (compileRhsFree): rewritten to use revised FreeRhsAutomaton class * freeRhsAutomaton.hh (addAlien): added * freeRhsAutomaton.cc (construct): rewritten (replace): rewritten (dump): rewritten (addFree): added * freeTheory.cc: template instantiation for Vector moved here * freeNet.hh: data members slots and conflicts removed; function declarations updated; many functions that don't need to access class data members declared static * freeNet.cc (buildPatternVector): greatly simplified by removing slot handling code (allocateSlot): created (buildPatternVector): further simplified by not counting and returning number of live patterns (buildPatternVector): previous simplification reversed - we need count after all for default case (buildNet): simplified by moving slot code into allocateSlot() (compileEquations): slots and conflicts are now local data structure rather than being data members of class (buildSlotTranslation): take slots and conflicts as arguments; obscure variable names changed Tue Mar 26 13:56:39 1996 Steven Eker * freeNet.cc (buildNet): call findActiveSlots on each live pattern to find conflicts with newly created slot (setUtilityFlags): created, to mark and unmark those terms that have been matched during construction of the discrimination net (compileEquations): expand conflict vector to keep it in sync with slots data structure (compileEquations): code to use graph coloring added to slotTranslation code (buildSlotTranslation): created (compileEquations): rearranged to use buildSlotTranslation() (buildNet): don't allocate slots for symbols with zero arity (buildPatternVector): don't try to union slot where non has been allocated * freeTerm.cc (findActiveSlots): infinite recursion bug fixed Mon Mar 25 09:56:49 1996 Steven Eker * freeTerm.cc (findActiveSlots): added * freeNet.cc (findBestPosition): return symbols via Vector (buildNet): modified to use new findBestPosition() (findBestPosition): now check that bestSymbols exists before taking it length; don't bother treating length 0 as a special case as Vector::expandTo(0) now works OK Sat Mar 23 14:12:33 1996 Steven Eker * freeNet.cc (findBestPosition): ExtSequence removed because of instatiation problems (compileEquations): long standing bug wherein position were not translated to match slots fixed (compileEquations): bug introduced by previous bugfix fixed; don't try to translate -1 as a slot or position member (buildApplicable): added * freeNet.hh: UnionFind data member added * freeNet.cc: routines changed to use UnionFind class Thu Mar 21 10:12:05 1996 Steven Eker * freeSymbol.cc (computeSort): rewritten to treat uniform sort case as special case (computeSort): hacked uniform case to try to improve performance (computeSort): fancy uniform sort sort code stripped * freeRemainder.hh (fastMatchReplace): #ifdef'd raw access to Vector<> arrays added * freeNet2.hh (applyReplace): #ifdef'd raw access to Vector<> arrays Fri Mar 15 14:00:46 1996 Steven Eker * freeNet2.hh (applyReplace): more loop reorganization (applyReplace): gross hacks involving raw access of Vector<> arrays (applyReplace): more hacking: netBase moved inwards, if statement reversed * freeNet.cc (buildTernaryTree): continuation subtree now propogate -1 for position and argIndex to enable detection of case where subject node does note change make sure implementation of freeNet2.hh included * freeNet2.hh (applyReplace): loop reorganized to avoid reloaded pointer to dag node in case when we know it won't change Thu Mar 14 11:01:27 1996 Steven Eker * freeNet.cc (buildFringe): now take slot arg; all routines updated to use Position rather than Sequence (dump): added * freeNet.hh: added struct Position to carry slot index for parent node along with path ec Wed Mar 13 15:38:42 1996 Steven Eker * freeNet.cc (buildPatternVector): now return number of live patterns (tripleCompare): args changed from refs to pointers * freeDagNode.hh: FreeNet is now a friend * freeNet.cc: Pair->Triple throughout (buildNet): allocateSlot for each symbol at chosen position (buildPatternVector): set slot index for each pattern with appropriate symbol at chosen position (findSlot): added (unionSlots): addded (allocateSlot): added (compileEquations): added crude slot resolution code * freeNet.hh (applyReplace): check for no equations; check for top symbol being a constant (0 size stack); use static_casts; check d->symbol()-arity() rather than n.symbol.arity() to let gcc do common subexpression elimination with inlined argArray() body. Pair -> Triple Tue Mar 12 17:03:36 1996 Steven Eker * freeTerm.cc (compileRemainder): variable set parameters removed (compileRemainder): removed fast arg; fast determination now done completely inside this function * freeSymbol.cc: old applyReplace removed template instatiations removed (compileEquations): added (but commented out until freeNet ready) * freeSymbol.hh: old discrimination net struct and data members removed strategy() removed * freeNet.hh (applyReplace): equation arg dropped from call to fastMatchReplace(); code changed for new applicable data structure (applyReplace): code changed back; we need to avoid a chicken and egg situation with applicable and net * freeTerm.cc (compileRemainder): now take equation arg * freeRemainder.hh (fastMatchReplace): no longer take equation arg pointer to the equation that we're the remainder of is now stored as a data member * freeRemainder.cc (slowMatchReplace): no longer take equation arg (freeVariables): take and store equation arg Mon Mar 11 09:56:04 1996 Steven Eker * freeRemainder.cc (slowMatchReplace): Sequence accesses changed to Vector accesses * freeRemainder.hh: construct decl added, Sequence<>s changed to Vector<>s, local structs chendd to FreeLhsAutomaton structs * freeTerm.cc (compileRemainder): added * freeTerm.hh: public version of findBestSequence() privatized compileRemainder() added * freeSymbol.cc (rewrite): make sure we compute sorts of subterms before applying at top with user strategy - subtle bug removed, Assert() added * freeLhsAutomaton.cc (match): Assert()s added to check for missing sort info Sun Mar 10 14:58:39 1996 Steven Eker * freeLhsAutomaton.hh: build() -> match() * freeLhsAutomaton.cc (match): build() -> match() * freeRemainder.cc (slowMatchReplace): build() -> match() * freeLhsAutomaton.cc: completely rewritten, using Vector<>s Sat Mar 9 16:20:28 1996 Steven Eker * freeTerm.cc (analyseConstraintPropagation): nrPos removed from call to scanFreeSkeleton() (compileLhs): nrPos removed from call to scanFreeSkeleton(); (compileLhs): much simplification (scanFreeSkeleton): heavily rewritten; semantics have changed: top free term now gets placed in freeSymbols; also positions stored in FreeOccurrence now refer to freeSymbols index of parent rather than stack position under compilation; this make this function more generally useful but means that extra works has to be done else where to compute stack positions for compilation * freeTerm.hh: removed "position" parameter from scanFreeSkeleton() * freeTerm.cc (compileLhs): "simple" argument removed Fri Mar 8 10:37:33 1996 Steven Eker * freeTerm.cc (Term): set slotIndex to -1 (findBestSequence): split into two functions, a private recursive function that does most of the work and a public wrapper that initializes the search variables. Callers changed to call wrapper * freeArgumentIterator.cc (valid): changed to Vector<> representation (argument): changed to Vector<> representation (next): changed to Vector<> representation * freeArgumentIterator.hh: changed to Vector<> representation * freeTerm.cc (Term): now take reference to arg list; code considerably simplified (arguments): recoded using Vector<>s (FreeTerm): now empty function (deepSelfDestruct): recoded using Vector<>s (normalize): recoded using Vector<>s (compareArguments): recoded using Vector<>s (compareArguments): recoded using Vector<>s, still treat 0 args as special case and walk pointer over dagNode args * freeTerm.hh: slotIndex added. argument put in Vector Thu Mar 7 17:09:14 1996 Steven Eker * freeLhsAutomaton.cc (FreeLhsAutomaton): args changed to use Vector<>s * freeLhsAutomaton.hh: ctor args changed to use Vector<>s * freeTerm.cc (compileLhs): use Vector for subAutomata * freeTerm.hh: findBestSequence() params changed * freeTerm.cc (findBestSequence): IntSet::copy() -> IntSet::operator= (findBestSequence): changed to use Vector to hold current sequence; callers changed; "Best" struct changed Wed Mar 6 17:53:27 1996 Steven Eker * freeNet.cc (buildFringe): expand() -> expandTo() (buildNet): expand() -> expandBy() Mon Mar 4 09:59:56 1996 Steven Eker * freeNet.hh (applyReplace): created from idea.cc and code moved out of freeSymbol.* Fri Mar 1 10:09:40 1996 Steven Eker * freeTerm.hh: added locateSubterm() * freeTerm.cc (locateSubterm): added Thu Feb 22 11:38:28 1996 Steven Eker * freeRemainder.cc: template instantiations added * freeSymbol.cc (applyReplace): rewritten to use fastMatchReplace() * freeRemainder.cc (slowMatchReplace): added (made from old slowMatchRemainder()) * freeRemainder.hh (fastMatchReplace): added (made from old fastMatchRemainder()) * freeSymbol.cc (applyReplace): added Thu Feb 15 10:50:16 1996 Steven Eker * freeTerm.cc (findEagerVariables): simplified, making use of the fact that Variable::findEagerVariables() is now usable Wed Feb 14 11:39:29 1996 Steven Eker * freeSymbol.cc (rewrite): rewritten yet again! Now we trust user strategy upto but not including final zero. Just before final zero we check to see if the top operator is in the error sort and if so copy and evaluate all unevaluated arguments in an attempt to bring it down. (rewrite): evaluated set has arg positions that start from 1 rather than 0 Tue Feb 13 14:55:02 1996 Steven Eker * freeSymbol.cc (rewrite): rewritten so than when when current symbol has a custom strategy we find the sort and if it is a error sort we use default strategy, making copies of any non-eager subterms. (rewrite): need to invalidate stale sort info (rewrite): rewritten again; for custom strategy: (1) evaluate eager args (2) each time we hit 0 in strategy, force top sort to be computed; if error sort, copy and evaluate all non-eager subterms and invalidate the sort we just computed. Then rewrite at top if possible and exit (3) otherwise rewrite at top if possible (4) otherwise continue with custom strategy, copying and evaluating semi-eager arguments until we hit 0; in that case goto (2) Since all strategies end in 0 we know that the last sort that we computed in (2) will be valid if we finish strategy without having been able to rewrite at top Thu Feb 8 17:26:08 1996 Steven Eker * freeSymbol.cc (computeSort): removed test for UNKNOWN_SORT (this is now done in dagNode::computeSort() (rewrite): use dagNode::computeSort() Tue Feb 6 16:59:29 1996 Steven Eker * freeSymbol.cc (computeSort): use constrainToSmallerSort() Thu Feb 1 14:06:10 1996 Steven Eker * freeSymbol.cc: parse() deleted * freeSymbol.hh: parse() deleted * freeTerm.hh: FreeSymbol friendship revoked * freeSymbol.cc (parse): added * freeTerm.hh: FreeSymbol is now a friend * freeSymbol.hh: parse() added Wed Jan 31 10:21:36 1996 Steven Eker * freeSymbol.cc (rewrite): use new applyReplace() * freeFastLhsAutomaton.cc (FreeFastLhsAutomaton): call to Symbol::lookupSort() replaced by Variable::lookupSort() * freeLhsAutomaton.cc (makeVariableOccurVector): call to Symbol::lookupSort() replaced by Variable::lookupSort() Fri Jan 12 11:21:55 1996 Steven Eker * freeDagNode.hh: tests show that gcc is capable of reusing results of inlined symbol() and arity() calls, so passing arity to argArray() to avoid multiple such calls is unnecessarily ugly. Thus the arity parameter is removed throughout freeTheory code. Thu Jan 11 18:09:02 1996 Steven Eker * freeSymbol.cc (computeSort): DagNode::SORT_UNKOWN -> Sort::SORT_UNKOWN, DagNode::MULTISORT -> Sort UNION_SORT Wed Jan 10 16:53:36 1996 Steven Eker * freeFastLhsAutomaton.cc (FreeFastLhsAutomaton): added dummy vector so we can get the sort of a variable * freeLhsAutomaton.cc (makeVariableOccurVector): added dummy vector so we can get the sort of a variable * freeSymbol.cc (Symbol): deleted sharable, initialize sortIndexBuffer (computeSort): use Vectors * freeSymbol.hh: don't have sharable arg for constructor; use Vector for sortIndexBuffer Thu Dec 21 17:12:23 1995 Steven Eker * freeFastLhsAutomaton.cc (build): fixed subtle bug where we were modifying automatons nrArgs field! Fri Dec 15 11:43:51 1995 Steven Eker * freeSymbol.cc (computeSort): added code to deal with union sorts (computeSort): commented out the delete in case this is the cause of heap corruption (computeSort): changed delete to delete[] * freeLhsAutomaton.cc (build): added code to check sorts (makeVariableOccurVector): added code to store sort codes * freeFastLhsAutomaton.cc (FreeFastLhsAutomaton): added code to store sort code in unboundVariableOccur[] (build) added code to check sorts Tue Dec 12 11:05:55 1995 Steven Eker * freeSymbol.cc (computeSort): fixed bug where we were making a (possibly) recursive virtual call based on the current symbol rather than the subjects subterm symbol * freeSymbol.hh: addded sortIndexBuffer * freeSymbol.cc (rewrite): added code to determine sorts for non-eager arguments before matching at top, and to reduce any arguments that wind up in error sort. (FreeSymbol): addded sortIndexBuffer initialization (computeSort): added * freeSymbol.hh: added computeSort() Fri Dec 8 18:05:26 1995 Steven Eker * freeDagNode.cc: deleted normalize() and rewrite() * freeDagNode.hh: deleted normalize() and rewrite() Thu Dec 7 18:00:16 1995 Steven Eker * freeDagNode.cc: commented out normalize() and rewrite() * freeDagNode.hh: commented out normalize() and rewrite() * freeSymbol.cc (rewrite): added * freeSymbol.hh: added bool rewrite() commented out strategy() Tue Nov 7 11:18:02 1995 Steven Eker * freeTerm.cc (compileLhs): added "simple" argument * freeDagNode.cc (rewrite): rule->equation names changed Thu Oct 26 11:23:34 1995 Steven Eker * freeTheory.hh: added FreeFastLhsAutomaton * freeDagNode.hh: made FreeFastLhsAutomaton a friend * freeTerm.cc (compileLhs): added code to use FreeFastLhsAutomaton * freeFastLhsAutomaton.hh: created * freeFastLhsAutomaton.cc: created * freeLhsAutomaton.cc (build): fix bug where we failed to set returnedSubproblem = 0 when matching a constant Mon Oct 23 18:01:26 1995 Steven Eker * freeRhsAutomaton.cc (dump): removed symbol2String() usage * freeLhsAutomaton.cc (dump): removed symbol2String() usage Tue Oct 17 11:24:58 1995 Steven Eker * freeRhsAutomaton.cc (dump): updated to use dump context * freeRhsAutomaton.hh: updated to use dump context * freeLhsAutomaton.cc (dump): updated to use dump context * freeLhsAutomaton.hh: updated to use dump context * freeDagNode.cc (rewrite): modified reduction loop in default strategy case to see if it speeds this up (rewrite): now use reduce() member function to reduce arguments; don't call setReduced(); * freeRhsAutomaton.cc (replace): treat replacement node as a special case Fri Oct 13 17:45:10 1995 Steven Eker * freeRhsAutomaton.cc (dump): removed CHECK_SHARABILITY * freeTerm.cc (compileLhs): removed getVariable() (analyseConstraintPropagation): removed getVariable() replaced all (Variable*)s with downCast()s Maude-2.7/src/FreeTheory/freeGeneralExtorFinal.cc0000744000147300135640000000643012255201263016735 00000000000000/* This file is part of the Maude 2 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 FreeGeneralExtorFinal. // // 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" // free theory class definitions #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeNetExec.hh" #include "freeRemainder.hh" #include "freeGeneralExtorFinal.hh" FreeGeneralExtorFinal::FreeGeneralExtorFinal(FreeSymbol* symbol, const Vector& argumentSlots) : symbol(symbol), args(argumentSlots.size()) { int nrArgs = argumentSlots.size(); for (int i = 0; i < nrArgs; ++i) args[i] = argumentSlots[i]; } void FreeGeneralExtorFinal::execute(StackMachine* machine) const { // // Get the stack frame containing the pointer to us. // Frame* frame = machine->getTopFrame(); // // Assemble arguments from stack into temporary storage. // int nrArgs = args.size(); DagNode** savedArgs = machine->getProtectedScratchpad(); for (int i = 0; i < nrArgs; ++i) savedArgs[i] = frame->getSlot(args[i]); // // Run the discrimination net. // FREE_NET& net = symbol->GET_NET(); long index = net.findRemainderListIndex(savedArgs); // // If we found a list of applicable equations, try to complete each one until we succeed. // if (index >= 0) { DagNode** binding = frame->getArgumentListPtr(); // reuse current frame Vector::const_iterator p = net.fastApplicable[index].begin(); const FreeRemainder* r = *p; do { if (r->generalCheckAndBind(binding, net.stack)) { frame->setNextInstruction(r->getFirstInstruction()); machine->incrementEqCount(); return; // more agressive thing would be to attempt a tail call and not store the instruction } } while ((r = *(++p)) != 0); } // // Use the special new(NONE) allocator that sets the reduced flag at creation. // FreeDagNode* d = new(NONE) FreeDagNode(symbol); // // Fill out arguments and sort. // DagNode** argArray = d->argArray(); int state = 0; for (int i = 0; i < nrArgs; ++i) { DagNode* a = savedArgs[i]; int t = a->getSortIndex(); state = symbol->traverse(state, t); argArray[i] = a; } d->setSortIndex(state); // // Finish up using parent class code. // returnResultAndContinue(machine, frame, d); } Maude-2.7/src/FreeTheory/freeRhsAutomaton.cc0000744000147300135640000001025512277277316016030 00000000000000/* This file is part of the Maude 2 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 FreeRhsAutomaton. // // 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 "substitution.hh" #include "variableInfo.hh" #include "stackMachineRhsCompiler.hh" // free theory class definitions #include "freeDagNode.hh" #include "freeRhsAutomaton.hh" void FreeRhsAutomaton::addFree(Symbol* symbol, int destination, const Vector& sources) { int i = instructions.length(); instructions.expandBy(1); instructions[i].symbol = symbol; instructions[i].destination = destination; instructions[i].sources = sources; // deep copy } bool FreeRhsAutomaton::recordInfo(StackMachineRhsCompiler& compiler) { FOR_EACH_CONST(i, Vector, instructions) compiler.recordFunctionEval(i->symbol, i->destination, i->sources); return true; } void FreeRhsAutomaton::remapIndices(VariableInfo& variableInfo) { int nrInstructions = instructions.length(); for (int i = 0; i < nrInstructions; i++) { Instruction& instr = instructions[i]; instr.destination = variableInfo.remapIndex(instr.destination); int nrArgs = instr.sources.length(); for (int j = 0; j < nrArgs; j++) instr.sources[j] = variableInfo.remapIndex(instr.sources[j]); } } local_inline void FreeRhsAutomaton::fillOutArgs(const Instruction& instr, Substitution& matcher, FreeDagNode* d) { int nrArgs = d->symbol()->arity(); if (nrArgs != 0) { DagNode** args = d->argArray(); for (Vector::const_iterator j = instr.sources.begin();; ++args, ++j) { *args = matcher.value(*j); if (--nrArgs == 0) break; } } } DagNode* FreeRhsAutomaton::construct(Substitution& matcher) { FreeDagNode* d; Vector::const_iterator i = instructions.begin(); for (int nrInstructions = instructions.size();; ++i) { d = new FreeDagNode(i->symbol); fillOutArgs(*i, matcher, d); matcher.bind(i->destination, d); if (--nrInstructions == 0) break; } return d; } void FreeRhsAutomaton::replace(DagNode* old, Substitution& matcher) { Vector::const_iterator i = instructions.begin(); for (int nrInstructions = instructions.size(); --nrInstructions != 0; ++i) { FreeDagNode* d = new FreeDagNode(i->symbol); fillOutArgs(*i, matcher, d); matcher.bind(i->destination, d); } FreeDagNode* d = new(old) FreeDagNode(i->symbol); fillOutArgs(*i, matcher, d); } #ifdef DUMP void FreeRhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{FreeRhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "Instructions:\n"; ++indentLevel; int nrInstructions = instructions.length(); for (int i = 0; i < nrInstructions; i++) { s << Indent(indentLevel) << "[" << instructions[i].destination << "] <= " << instructions[i].symbol << '('; int nrArgs = instructions[i].symbol->arity(); for (int j = 0; j < nrArgs; j++) { s << '[' << instructions[i].sources[j] << ']'; if (j + 1 < nrArgs) s << ", "; } s << ")\n"; } s << Indent(indentLevel - 2) << "End{FreeRhsAutomaton}\n"; } #endif Maude-2.7/src/FreeTheory/freeDagArgumentIterator.cc0000644000147300135640000000271007666302714017305 00000000000000/* This file is part of the Maude 2 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 FreeDagArgumentIterator // #include "macros.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" // interface class definitions #include "rawDagArgumentIterator.hh" // free theory class definitions #include "freeDagArgumentIterator.hh" bool FreeDagArgumentIterator::valid() const { return nrRemaining > 0; } DagNode* FreeDagArgumentIterator::argument() const { Assert(nrRemaining > 0, "no args left"); return *position; } void FreeDagArgumentIterator::next() { Assert(nrRemaining > 0, "no args left"); ++position; --nrRemaining; } Maude-2.7/src/FreeTheory/freeTernarySymbol.hh0000644000147300135640000000246511330370010016201 00000000000000/* This file is part of the Maude 2 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 ternary symbols belonging to the free theory. // Sole purpose of this class is to provide a optimized eqRewrite() for ternary // free function symbols that have the standard strategy. // #ifndef _freeTernarySymbol_hh_ #define _freeTernarySymbol_hh_ #include "freeSymbol.hh" class FreeTernarySymbol : public FreeSymbol { NO_COPYING(FreeTernarySymbol); public: FreeTernarySymbol(int id); bool eqRewrite(DagNode* subject, RewritingContext& context); }; #endif Maude-2.7/src/FreeTheory/freeFastInstruction.cc0000744000147300135640000000560612232607561016535 00000000000000/* This file is part of the Maude 2 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 FreeFastInstruction // // 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" // free theory class definitions #include "freeSymbol.hh" #include "freeFastInstruction.hh" FreeFastInstruction::FreeFastInstruction(FreeSymbol* symbol, int destinationIndex, Instruction* nextInstruction) : FreeInstruction(symbol, destinationIndex, nextInstruction), argIndex0(0), argIndex1(0), argIndex2(0) { setOpCode(4 * (symbol->equationFree() == false) + 8 * (nextInstruction == 0)); } FreeFastInstruction::FreeFastInstruction(FreeSymbol* symbol, int argIndex0, int destinationIndex, Instruction* nextInstruction) : FreeInstruction(symbol, destinationIndex, nextInstruction), argIndex0(argIndex0), argIndex1(0), argIndex2(0) { int opCode = 1 + 4 * (symbol->equationFree() == false) + 8 * (nextInstruction == 0); // if (symbol->equationFree() && symbol->getUniqueSortIndex() > 0) // opCode += 16; setOpCode(opCode); } FreeFastInstruction::FreeFastInstruction(FreeSymbol* symbol, int argIndex0, int argIndex1, int destinationIndex, Instruction* nextInstruction) : FreeInstruction(symbol, destinationIndex, nextInstruction), argIndex0(argIndex0), argIndex1(argIndex1), argIndex2(0) { int opCode = 2 + 4 * (symbol->equationFree() == false) + 8 * (nextInstruction == 0); // if (symbol->equationFree() && symbol->getUniqueSortIndex() > 0) // opCode += 16; setOpCode(opCode); } FreeFastInstruction::FreeFastInstruction(FreeSymbol* symbol, int argIndex0, int argIndex1, int argIndex2, int destinationIndex, Instruction* nextInstruction) : FreeInstruction(symbol, destinationIndex, nextInstruction), argIndex0(argIndex0), argIndex1(argIndex1), argIndex2(argIndex2) { int opCode = 3 + 4 * (symbol->equationFree() == false) + 8 * (nextInstruction == 0); // if (symbol->equationFree() && symbol->getUniqueSortIndex() > 0) // opCode += 16; setOpCode(opCode); } Maude-2.7/src/FreeTheory/freeSymbol.cc0000744000147300135640000003751312273074234014645 00000000000000/* This file is part of the Maude 2 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 FreeSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" #include "unionFind.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "fullCompiler.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" // core class definitions #include "rewritingContext.hh" #include "equation.hh" #include "sortBdds.hh" #include "hashConsSet.hh" // full compiler class definitions #include "compilationContext.hh" // free theory class definitions #include "freePreNet.hh" #include "freeNet.hh" #include "freeSymbol.hh" #include "freeNullarySymbol.hh" #include "freeUnarySymbol.hh" #include "freeBinarySymbol.hh" #include "freeTernarySymbol.hh" #include "freeDagNode.hh" #include "freeOccurrence.hh" #include "freeTerm.hh" #include "freeLhsAutomaton.hh" #include "freeRemainder.hh" #include "freeFastInstruction.hh" #include "freeGeneralCtor.hh" #include "freeGeneralCtorFinal.hh" #include "freeGeneralExtor.hh" #include "freeGeneralExtorFinal.hh" FreeSymbol* FreeSymbol::newFreeSymbol(int id, int arity, const Vector& strategy, bool memoFlag) { if (arity <= 3) { if (memoFlag || strategy.length() != 0) { FreeSymbol* t = new FreeSymbol(id, arity, strategy, memoFlag); if (!(t->standardStrategy())) return t; delete t; } if (arity == 0) return new FreeNullarySymbol(id); else if (arity == 1) return new FreeUnarySymbol(id); else if (arity == 2) return new FreeBinarySymbol(id); else return new FreeTernarySymbol(id); } return new FreeSymbol(id, arity, strategy, memoFlag); } FreeSymbol::FreeSymbol(int id, int arity, const Vector& strategy, bool memoFlag) : Symbol(id, arity, memoFlag) { setStrategy(strategy, arity, memoFlag); } void FreeSymbol::compileEquations() { const Vector& equations = getEquations(); int nrEquations = equations.length(); for (int i = 0; i < nrEquations; i++) { Equation* e = equations[i]; Term* p = e->getLhs(); if (FreeTerm* f = dynamic_cast(p)) { e->compile(false); // // Even though we pass compileLhs as false, if the equation has the variant property it will // get compiled anyway and we need to reset the slot indices to make it safe to use them // in constructing a discrimination net. // f->resetSlotIndices(); f->setSlotIndex(0); } else e->compile(true); // foreign equation so compile lhs } FreePreNet n(false); n.buildNet(this); n.semiCompile(discriminationNet); } Term* FreeSymbol::makeTerm(const Vector& args) { return new FreeTerm(this, args); } DagNode* FreeSymbol::makeDagNode(const Vector& args) { FreeDagNode* f = new FreeDagNode(this); DagNode** args2 = f->argArray(); for (int i = arity() - 1; i >= 0; i--) args2[i] = args[i]; return f; } bool FreeSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { // cout << "attempting " << this << "\n"; Assert(this == subject->symbol(), "bad symbol"); if (standardStrategy()) { int nrArgs = arity(); DagNode** args = static_cast(subject)->argArray(); for (int i = nrArgs; i > 0; i--, args++) (*args)->reduce(context); return DISC_NET.applyReplace(subject, context); } return complexStrategy(subject, context); } bool FreeSymbol::complexStrategy(DagNode* subject, RewritingContext& context) { if (isMemoized()) { MemoTable::SourceSet from; memoStrategy(from, subject, context); memoEnter(from, subject); return false; } int nrArgs = arity(); DagNode** args = static_cast(subject)->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) { for (int j = 0; j < nrArgs; j++) args[j]->computeTrueSort(context); seenZero = true; } if ((i + 1 == stratLen) ? DISC_NET.applyReplace(subject, context) : DISC_NET.applyReplaceNoOwise(subject, context)) return true; } else { --a; // real arguments start at 0 not 1 if (seenZero) { args[a] = args[a]->copyReducible(); // // A previous call to discriminationNet.applyReplace() may have // computed a true sort for our subject which will be // invalidated by the reduce we are about to do. // subject->repudiateSortInfo(); } args[a]->reduce(context); } } return false; } void FreeSymbol::memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context) { int nrArgs = arity(); DagNode** args = static_cast(subject)->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) { for (int j = 0; j < nrArgs; j++) args[j]->computeTrueSort(context); seenZero = true; } if (memoRewrite(from, subject, context)) return; if ((i + 1 == stratLen) ? DISC_NET.applyReplace(subject, context) : DISC_NET.applyReplaceNoOwise(subject, context)) { subject->reduce(context); return; } } else { --a; // real arguments start at 0 not 1 if (seenZero) { args[a] = args[a]->copyReducible(); // // A previous call to discriminationNet.applyReplace() may have // computed a true sort for our subject which will be // invalidated by the reduce we are about to do. // subject->repudiateSortInfo(); } args[a]->reduce(context); } } } void FreeSymbol::computeBaseSort(DagNode* subject) { Assert(this == subject->symbol(), "bad symbol"); int nrArgs = arity(); if (nrArgs == 0) { subject->setSortIndex(traverse(0, 0)); // HACK return; } DagNode** args = static_cast(subject)->argArray(); int state = 0; for (int i = 0; i < nrArgs; i++) { int t = args[i]->getSortIndex(); #if 0 DebugAdvisory("FreeSymbol::computeBaseSort() arg " << i << " is " << args[i] << " at " << ((void*) args[i]) << " with sort index " << t); #endif Assert(t != Sort::SORT_UNKNOWN, "unknown sort encounter for arg " << i << " subject = " << subject); state = traverse(state, t); } subject->setSortIndex(state); } void FreeSymbol::normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); int nrArgs = arity(); DagNode** args = static_cast(subject)->argArray(); // // First make sure each of our subterms has a sort. // for (int i = 0; i < nrArgs; i++) args[i]->computeTrueSort(context); // // Now compute subjects true sort. // fastComputeTrueSort(subject, context); } void FreeSymbol::stackArguments(DagNode* subject, Vector& stack, int parentIndex) { int nrArgs = arity(); if (nrArgs != 0) { const NatSet& frozen = getFrozen(); DagNode** args = static_cast(subject)->argArray(); for (int i = 0; i < nrArgs; i++) { DagNode* d = args[i]; if (!(frozen.contains(i)) && !(d->isUnstackable())) stack.append(RedexPosition(args[i], parentIndex, i, eagerArgument(i))); } } } Term* FreeSymbol::termify(DagNode* dagNode) { int nrArgs = arity(); Vector args(nrArgs); DagNode** dagNodeArgs = safeCast(FreeDagNode*, dagNode)->argArray(); for (int i = 0; i < nrArgs; i++) { DagNode* d = dagNodeArgs[i]; args[i] = d->symbol()->termify(d); } return new FreeTerm(this, args); } // // Unification code. // void FreeSymbol::computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort) { DebugAdvisory("computeGeneralizedSort() called on symbol " << this << " for dag " << subject); int nrArgs = arity(); Assert(nrArgs > 0, "we shouldn't be called on constants: " << subject); // // We need to do this early since it may increase the number of bdd variables and we // will need those variables for our argMap. // DebugAdvisory("getting sort function for " << this << " " << subject); const Vector& sortFunction = sortBdds.getSortFunction(this); DagNode** args = safeCast(FreeDagNode*, subject)->argArray(); int varCounter = 0; bddPair* argMap = bdd_newpair(); for (int i = 0; i < nrArgs; 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]); } int nrBdds = sortFunction.size(); generalizedSort.resize(nrBdds); for (int i = 0; i < nrBdds; ++i) generalizedSort[i] = bdd_veccompose(sortFunction[i], argMap); bdd_freepair(argMap); } bool FreeSymbol::isStable() const { return true; } // // Hash cons code. // DagNode* FreeSymbol::makeCanonical(DagNode* original, HashConsSet* hcs) { int nrArgs = arity(); DagNode** p = safeCast(FreeDagNode*, original)->argArray(); for (int i = 0; i < nrArgs; i++) { DagNode* d = p[i]; DagNode* c = hcs->getCanonical(hcs->insert(d)); if (c != d) { // // Detected a non-canonical argument so need to make a new node. // FreeDagNode* n = new FreeDagNode(this); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); DagNode** q = n->argArray(); for (int j = 0; j < i; ++j, ++p, ++q) *q = *p; *q = c; ++p; ++q; for (int j = i + 1; j < nrArgs; ++j, ++p, ++q) *q = hcs->getCanonical(hcs->insert(*p)); return n; } } return original; // can use the original dag node as the canonical version } DagNode* FreeSymbol::makeCanonicalCopy(DagNode* original, HashConsSet* hcs) { // // We have a unreduced node - copy forced. // FreeDagNode* n = new FreeDagNode(this); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); DagNode** q = n->argArray(); int nrArgs = arity(); DagNode** p = safeCast(FreeDagNode*, original)->argArray(); for (int i = 0; i < nrArgs; ++i, ++p, ++q) *q = hcs->getCanonical(hcs->insert(*p)); return n; } Instruction* FreeSymbol::generateFinalInstruction(const Vector& argumentSlots) { if (!(discriminationNet.fastHandling())) return new FreeGeneralExtorFinal(this, argumentSlots); int nrArgs = arity(); if (nrArgs > 3) { if (equationFree()) return new FreeGeneralCtorFinal(this, argumentSlots); else return new FreeGeneralExtorFinal(this, argumentSlots); } switch (nrArgs) { case 0: return new FreeFastInstruction(this, 0, 0); case 1: return new FreeFastInstruction(this, argumentSlots[0], 0, 0); case 2: return new FreeFastInstruction(this, argumentSlots[0], argumentSlots[1], 0, 0); case 3: return new FreeFastInstruction(this, argumentSlots[0], argumentSlots[1], argumentSlots[2], 0, 0); } return 0; } Instruction* FreeSymbol::generateInstruction(int destination, const Vector& argumentSlots, Instruction* nextInstruction) { if (!(discriminationNet.fastHandling())) return new FreeGeneralExtor(this, argumentSlots, destination, nextInstruction); int nrArgs = arity(); if (nrArgs > 3) { if (equationFree()) return new FreeGeneralCtor(this, argumentSlots, destination, nextInstruction); else return new FreeGeneralExtor(this, argumentSlots, destination, nextInstruction); } switch (nrArgs) { case 0: return new FreeFastInstruction(this, destination, nextInstruction); case 1: return new FreeFastInstruction(this, argumentSlots[0], destination, nextInstruction); case 2: return new FreeFastInstruction(this, argumentSlots[0], argumentSlots[1], destination, nextInstruction); case 3: return new FreeFastInstruction(this, argumentSlots[0], argumentSlots[1], argumentSlots[2], destination, nextInstruction); } return 0; } #ifdef COMPILER void FreeSymbol::generateCons(CompilationContext& context, int indentLevel) const { int nrArgs = arity(); // // Generate code to create new node with our function symbol in it. // context.body() << Indent(indentLevel) << "Node* r = reinterpret_cast(g.memNext);\n"; context.body() << Indent(indentLevel) << "char* n = g.memNext + sizeof(Node)"; if (nrArgs > 0) context.body() << " + " << nrArgs << " * sizeof(Node*)"; context.body() << ";\n"; context.body() << Indent(indentLevel) << "if (n > g.memEnd)\n"; // // Out of ephemeral space case. // context.body() << Indent(indentLevel + 1) << "{\n"; context.body() << Indent(indentLevel + 2) << "g.nrArgs = " << nrArgs << ";\n"; for (int i = 0; i < nrArgs; i++) context.body() << Indent(indentLevel + 2) << "g.args[" << i << "] = a" << i << ";\n"; context.body() << Indent(indentLevel + 2) << "collectGarbage();\n"; context.body() << Indent(indentLevel + 2) << "r = reinterpret_cast(g.memNext);\n"; context.body() << Indent(indentLevel + 2) << "n = g.memNext + sizeof(Node)"; if (nrArgs > 0) context.body() << " + " << nrArgs << " * sizeof(Node*)"; context.body() << ";\n"; for (int i = 0; i < nrArgs; i++) context.body() << Indent(indentLevel + 2) << 'a' << i << " = g.args[" << i << "];\n"; context.body() << Indent(indentLevel + 1) << "}\n"; // // Normal case. // context.body() << Indent(indentLevel) << "g.memNext = n;\n"; for (int i = 0; i < nrArgs; i++) context.body() << Indent(indentLevel) << "r->args[" << i << "] = a" << i << ";\n"; // // Generate code to fill in symbol and flags and return node. // int index = getIndexWithinModule(); context.body() << Indent(indentLevel) << "r->symbol = " << index << ";\n"; Sort *s = getSingleNonErrorSort(); if (s != 0 && !(canProduceErrorSort())) { context.body() << Indent(indentLevel) << "const Flags c = {" << s->index() << "};\n"; context.body() << Indent(indentLevel) << "r->flags = c;\n"; } else { context.body() << Indent(indentLevel) << "r->flags = f" << index << "_0"; for (int i = 0; i < nrArgs; i++) context.body() << "[a" << i << "->flags.sortIndex]"; context.body() << ";\n"; } context.body() << Indent(indentLevel) << "return r;\n"; } void FreeSymbol::generateCode(CompilationContext& context) const { if (!(getSingleNonErrorSort()) || canProduceErrorSort()) generateSortDiagram(context); FreePreNet n(true); n.buildNet(const_cast(this)); n.generateCode(context); // n.dump(cerr); } #endif #ifdef DUMP void FreeSymbol::dump(ostream& s, int indentLevel) { Symbol::dump(s, indentLevel); discriminationNet.dump(s, indentLevel); } #endif Maude-2.7/src/FreeTheory/freeDagNode.cc0000744000147300135640000003740212225401000014654 00000000000000/* This file is part of the Maude 2 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 FreeDagNode. // #include // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "rawDagArgumentIterator.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "subproblem.hh" // core class definitions #include "rewritingContext.hh" #include "subproblemAccumulator.hh" #include "pendingUnificationStack.hh" #include "unificationContext.hh" // variable class definitions #include "variableDagNode.hh" // free theory class definitions //#include "freeNet.hh" #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeDagArgumentIterator.hh" FreeDagNode::~FreeDagNode() { // // Accessing our symbol is forbidden since it may already have been deleted. // delete [] external; } RawDagArgumentIterator* FreeDagNode::arguments() { int nrArgs = symbol()->arity(); if (nrArgs == 0) return 0; return new FreeDagArgumentIterator(argArray(), nrArgs); } size_t FreeDagNode::getHashValue() { if (isHashValid()) return hashCache[nrWords - 1].size; size_t hashValue = symbol()->getHashValue(); int nrArgs = symbol()->arity(); DagNode** p = argArray(); for (int i = 0; i < nrArgs; i++) hashValue = hash(hashValue, (*p++)->getHashValue()); if (nrArgs != nrWords) { hashCache[nrWords - 1].size = hashValue; setHashValid(); } return hashValue; } int FreeDagNode::compareArguments(const DagNode* other) const { Assert(symbol() == other->symbol(), "symbols differ"); Symbol* s = symbol(); int nrArgs = s->arity(); if (nrArgs != 0) { const FreeDagNode* pd = this; // last use of this pointer const FreeDagNode* qd = static_cast(other); for (;;) { DagNode** p = pd->argArray(); DagNode** q = qd->argArray(); for (int i = nrArgs - 1; i > 0; --i, ++p, ++q) { int r = (*p)->compare(*q); if (r != 0) return r; } // // Rightmost argument. // DagNode* pd2 = *p; DagNode* qd2 = *q; if (pd2 == qd2) return 0; // same node Symbol* ps = pd2->symbol(); Symbol* qs = qd2->symbol(); if (ps != qs) return ps->compare(qs); // different symbols if (ps != s) return pd2->compareArguments(qd2); // same symbol, not ours // // Next iteration will compare argument lists using tail recursion elimination. // pd = static_cast(pd2); qd = static_cast(qd2); } } return 0; } DagNode* FreeDagNode::markArguments() { int nrArgs = symbol()->arity(); if (nrArgs != 0) { DagNode** p = argArray(); while (--nrArgs > 0) (*p++)->mark(); return *p; } return 0; } DagNode* FreeDagNode::copyEagerUptoReduced2() { FreeSymbol* s = symbol(); FreeDagNode* n = new FreeDagNode(s); int nrArgs = s->arity(); if (nrArgs != 0) { DagNode** p = argArray(); DagNode** q = n->argArray(); if (s->standardStrategy()) // everything is eager { for (int i = nrArgs; i > 0; i--, p++, q++) *q = (*p)->copyEagerUptoReduced(); } else { for (int i = 0; i < nrArgs; i++, p++, q++) *q = s->eagerArgument(i) ? (*p)->copyEagerUptoReduced() : *p; } } return n; } void FreeDagNode::clearCopyPointers2() { int nrArgs = symbol()->arity(); DagNode** p = argArray(); for (int i = nrArgs; i > 0; i--, p++) (*p)->clearCopyPointers(); } void FreeDagNode::overwriteWithClone(DagNode* old) { Symbol* s = symbol(); FreeDagNode* d = new(old) FreeDagNode(s); int nrArgs = s->arity(); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); DagNode** p = argArray(); DagNode** q = d->argArray(); for (int i = nrArgs; i > 0; i--, p++, q++) *q = *p; } DagNode* FreeDagNode::makeClone() { Symbol* s = symbol(); FreeDagNode* d = new FreeDagNode(s); int nrArgs = s->arity(); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); DagNode** p = argArray(); DagNode** q = d->argArray(); for (int i = nrArgs; i > 0; i--, p++, q++) *q = *p; return d; } DagNode* FreeDagNode::copyWithReplacement(int argIndex, DagNode* replacement) { FreeSymbol* s = symbol(); FreeDagNode* d = new FreeDagNode(s); int nrArgs = s->arity(); Assert(argIndex >= 0 && argIndex < nrArgs, "bad argIndex"); DagNode** p = argArray(); DagNode** q = d->argArray(); for (int i = 0; i < nrArgs; i++, p++, q++) *q = (i == argIndex) ? replacement : *p; return d; } DagNode* FreeDagNode::copyWithReplacement(Vector& redexStack, int first, int last) { Assert(first >= 0 && first <= last && last < redexStack.length(), "bad replacement range"); FreeSymbol* s = symbol(); int nrArgs = s->arity(); Assert(redexStack[first].argIndex() >= 0 && redexStack[first].argIndex() < nrArgs && redexStack[last].argIndex() >= 0 && redexStack[last].argIndex() < nrArgs, "bad replacement arg index"); FreeDagNode* d = new FreeDagNode(s); DagNode** p = argArray(); DagNode** q = d->argArray(); int nextReplacementIndex = redexStack[first].argIndex(); for (int i = 0; i < nrArgs; i++, p++, q++) { if (i == nextReplacementIndex) { *q = redexStack[first].node(); ++first; nextReplacementIndex = (first <= last) ? redexStack[first].argIndex() : NONE; } else *q = *p; } return d; } void FreeDagNode::stackArguments(Vector& stack, int parentIndex, bool respectFrozen) { int nrArgs = symbol()->arity(); if (nrArgs != 0) { const NatSet& frozen = symbol()->getFrozen(); DagNode** args = argArray(); for (int i = 0; i < nrArgs; i++) { DagNode* d = args[i]; if (!(respectFrozen && frozen.contains(i)) && !(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, i)); } } } // // Unification code. // DagNode::ReturnResult FreeDagNode::computeBaseSortForGroundSubterms() { bool ground = true; Symbol* s = symbol(); int nrArgs = s->arity(); DagNode** args = argArray(); for (int i = 0; i < nrArgs; ++i) { switch (args[i]->computeBaseSortForGroundSubterms()) { case NONGROUND: { ground = false; break; } case UNIMPLEMENTED: return UNIMPLEMENTED; default: ; // to avoid compiler warning } } if (ground) { s->computeBaseSort(this); setGround(); return GROUND; } return NONGROUND; } bool FreeDagNode::computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending) { Symbol* s = symbol(); if (s == rhs->symbol()) { int nrArgs = s->arity(); Assert(nrArgs > 0, "we shouldn't be called on constants " << this); DagNode** args = argArray(); DagNode** rhsArgs = safeCast(FreeDagNode*, rhs)->argArray(); for (int i = 0; i < nrArgs; ++i) { if (!(args[i]->computeSolvedForm(rhsArgs[i], solution, pending))) return false; } return true; } if (VariableDagNode* v = dynamic_cast(rhs)) { // // Get representative variable. // VariableDagNode* r = v->lastVariableInChain(solution); if (DagNode* value = solution.value(r->getIndex())) return computeSolvedForm(value, solution, pending); FreeDagNode* purified; switch (purifyAndOccurCheck(r, solution, pending, purified)) { case OCCURS_CHECK_FAIL: return false; case PURE_AS_IS: purified = this; break; case PURIFIED: break; } solution.unificationBind(r, purified); return true; } return pending.resolveTheoryClash(this, rhs); } FreeDagNode::PurificationStatus FreeDagNode::purifyAndOccurCheck(DagNode* repVar, UnificationContext& solution, PendingUnificationStack& pending, FreeDagNode*& purified) { // // For the moment we allow ground terms to be impure since they can't take part in cycles. // if (isGround()) return PURE_AS_IS; FreeSymbol* s = symbol(); int nrArgs = s->arity(); DagNode** args = argArray(); for (int i = 0; i < nrArgs; ++i) { DagNode* arg = args[i]; if (VariableDagNode* v = dynamic_cast(arg)) { // // Variable - do an occur check. // if (v->lastVariableInChain(solution)->equal(repVar)) return OCCURS_CHECK_FAIL; continue; } if (FreeDagNode* f = dynamic_cast(arg)) { // // Free subterm - recursive call. // switch (f->purifyAndOccurCheck(repVar, solution, pending, purified)) { case OCCURS_CHECK_FAIL: return OCCURS_CHECK_FAIL; case PURE_AS_IS: continue; case PURIFIED: { arg = purified; break; } } } else { // // Alien subterm - purify it by variable abstraction. // VariableDagNode* abstractionVariable = solution.makeFreshVariable(s->domainComponent(i)); // // We can't do solution.unificationBind(abstractionVariable, arg) here because // arg may not be pure and this can lead to nontermination. // arg->computeSolvedForm(abstractionVariable, solution, pending); arg = abstractionVariable; } { // // If we get here, either we purified an alien or purification happen below us. // Either way we need to rebuild. // FreeDagNode* d = new FreeDagNode(s); DagNode** args2 = d->argArray(); // // Copy the arguments we already looked at. // for (int j = 0; j < i; ++j) args2[j] = args[j]; // // Handle current argument. // args2[i] = arg; // // Handle remaining arguments. // for (++i; i < nrArgs; ++i) { DagNode* arg = args[i]; if (VariableDagNode* v = dynamic_cast(arg)) { // // Variable - do an occur check. // if (v->lastVariableInChain(solution)->equal(repVar)) return OCCURS_CHECK_FAIL; } else if (FreeDagNode* f = dynamic_cast(arg)) { // // Free subterm - recursive call. // switch (f->purifyAndOccurCheck(repVar, solution, pending, purified)) { case OCCURS_CHECK_FAIL: return OCCURS_CHECK_FAIL; case PURE_AS_IS: break; case PURIFIED: { arg = purified; break; } } } else { // // Alien subterm - purify it by variable abstraction. // VariableDagNode* abstractionVariable = solution.makeFreshVariable(s->domainComponent(i)); solution.unificationBind(abstractionVariable, arg); arg = abstractionVariable; } args2[i] = arg; } purified = d; return PURIFIED; } } return PURE_AS_IS; } void FreeDagNode::insertVariables2(NatSet& occurs) { int i = symbol()->arity(); if (i > 0) { for (DagNode** p = argArray(); i > 0; i--, p++) (*p)->insertVariables(occurs); } } DagNode* FreeDagNode::instantiate2(const Substitution& substitution) { // cout << "FreeDagNode::instantiate2 enter " << this << endl; Symbol* s = symbol(); int nrArgs = s->arity(); Assert(nrArgs > 0, "we shouldn't be called on constants: " << this); DagNode** args = argArray(); for (int i = 0; i < nrArgs; ++i) { if (DagNode* n = args[i]->instantiate(substitution)) { // // Argument changed under instantiation - need to make a new // dagnode. // bool ground = true; FreeDagNode* d = new FreeDagNode(s); DagNode** args2 = d->argArray(); // // Copy the arguments we already looked at. // for (int j = 0; j < i; ++j) { DagNode* a = args[j]; if (!(a->isGround())) ground = false; args2[j] = a; } // // Handle current argument. // args2[i] = n; if (!(n->isGround())) ground = false; // // Handle remaining arguments. // for (++i; i < nrArgs; ++i) { DagNode* a = args[i]; if (DagNode* n = a->instantiate(substitution)) a = n; if (!(a->isGround())) ground = false; args2[i] = a; } // // Now if all the arguments of the new dagnode are ground // we compute its base sort. // if (ground) { s->computeBaseSort(d); d->setGround(); } // cout << "FreeDagNode::instantiate2 exit " << d << endl; return d; } } // cout << "FreeDagNode::instantiate2 exit null" << endl; return 0; // unchanged } // // Narrowing code. // bool FreeDagNode::indexVariables2(NarrowingVariableInfo& indices, int baseIndex) { int nrArgs = symbol()->arity(); DagNode** args = argArray(); bool ground = true; for (int i = 0; i < nrArgs; ++i) { if (!(args[i]->indexVariables(indices, baseIndex))) ground = false; } return ground; } DagNode* FreeDagNode::instantiateWithReplacement(const Substitution& substitution, const Vector& eagerCopies, int argIndex, DagNode* newDag) { FreeSymbol* s = symbol(); FreeDagNode* d = new FreeDagNode(s); int nrArgs = s->arity(); Assert(argIndex >= 0 && argIndex < nrArgs, "bad argIndex"); DagNode** p = argArray(); DagNode** q = d->argArray(); for (int i = 0; i < nrArgs; i++) { DagNode* n; if (i == argIndex) n = newDag; else { n = p[i]; DagNode* c = s->eagerArgument(i) ? n->instantiateWithCopies(substitution, eagerCopies) : n->instantiate(substitution); // lazy case - ok to use original unifier bindings since we won't evaluate them if (c != 0) // changed under substitutition n = c; } q[i] = n; } return d; } DagNode* FreeDagNode::instantiateWithCopies2(const Substitution& substitution, const Vector& eagerCopies) { Symbol* s = symbol(); int nrArgs = s->arity(); Assert(nrArgs > 0, "we shouldn't be called on constants"); DagNode** args = argArray(); for (int i = 0; i < nrArgs; ++i) { DagNode* a = args[i]; DagNode* n = s->eagerArgument(i) ? a->instantiateWithCopies(substitution, eagerCopies) : a->instantiate(substitution); // lazy case - ok to use original unifier bindings since we won't evaluate them if (n != 0) { // // Argument changed under instantiation - need to make a new // dagnode. // bool ground = true; FreeDagNode* d = new FreeDagNode(s); DagNode** args2 = d->argArray(); // // Copy the arguments we already looked at. // for (int j = 0; j < i; ++j) { DagNode* a = args[j]; if (!(a->isGround())) ground = false; args2[j] = a; } // // Handle current argument. // args2[i] = n; if (!(n->isGround())) ground = false; // // Handle remaining arguments. // for (++i; i < nrArgs; ++i) { DagNode* a = args[i]; DagNode* n = s->eagerArgument(i) ? a->instantiateWithCopies(substitution, eagerCopies) : a->instantiate(substitution); // lazy case - ok to use original unifier bindings since we won't evaluate them if (n != 0) a = n; if (!(a->isGround())) ground = false; args2[i] = a; } // // Now if all the arguments of the new dagnode are ground // we compute its base sort. // if (ground) { s->computeBaseSort(d); d->setGround(); } return d; } } return 0; // unchanged } Maude-2.7/src/FreeTheory/freeDagArgumentIterator.hh0000644000147300135640000000254307666302714017323 00000000000000/* This file is part of the Maude 2 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 argument iterators in the free theory // #ifndef _freeDagArgumentIterator_hh_ #define _freeDagArgumentIteraror_hh_ class FreeDagArgumentIterator : public RawDagArgumentIterator { public: FreeDagArgumentIterator(DagNode** first, int nrArgs); bool valid() const; DagNode* argument() const; void next(); private: DagNode** position; int nrRemaining; }; inline FreeDagArgumentIterator::FreeDagArgumentIterator(DagNode** first, int nrArgs) { position = first; nrRemaining = nrArgs; } #endif Maude-2.7/src/FreeTheory/freeGeneralCtorFinal.hh0000744000147300135640000000255712232626766016601 00000000000000/* This file is part of the Maude 2 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 free symbols having > 3 arguments. // #ifndef _freeGeneralCtorFinal_hh_ #define _freeGeneralCtorFinal_hh_ #include "finalInstruction.hh" class FreeGeneralCtorFinal : public FinalInstruction { NO_COPYING(FreeGeneralCtorFinal); public: FreeGeneralCtorFinal(FreeSymbol* symbol, const Vector& argumentSlots); void execute(StackMachine* machine) const; #ifdef DUMP //void dump(ostream& s, int indentLevel); #endif private: FreeSymbol* const symbol; Vector args; }; #endif Maude-2.7/src/FreeTheory/freePreNet.cc0000744000147300135640000004445112232342065014567 00000000000000/* This file is part of the Maude 2 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 FreeNet. // // utility stuff #include "macros.hh" #include "vector.hh" #include "pointerSet.hh" #include "natSet.hh" #include "indent.hh" #include "graph.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "fullCompiler.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" // core class definitions #include "argumentIterator.hh" #include "rewritingContext.hh" #include "equation.hh" // full compiler class definitions #include "compilationContext.hh" #include "variableName.hh" // variable class definitions #include "variableTerm.hh" // free theory class definitions #include "freePreNet.hh" #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeOccurrence.hh" #include "freeLhsAutomaton.hh" #include "freeRhsAutomaton.hh" #include "freeTerm.hh" #include "freeRemainder.hh" #include "freePreNetSubsumption.cc" #include "freePreNetSemiCompiler.cc" #ifdef COMPILER #include "freePreNetFullCompiler.cc" #endif FreePreNet::FreePreNet(bool expandRemainderNodes) : expandRemainderNodes(expandRemainderNodes) { } void FreePreNet::buildNet(FreeSymbol* symbol) { //cout << "buildNet for " << symbol << endl; topSymbol = symbol; nrFailParents = 0; nrFailVisits = 0; const Vector& equations = symbol->getEquations(); int nrEquations = equations.length(); if (nrEquations == 0) return; //cout << "nrEquations = " << nrEquations << endl; patterns.expandTo(nrEquations); LiveSet liveSet; LiveSet potentialSubsumers; for (int i = 0; i < nrEquations; i++) { int flags = 0; Equation* e = equations[i]; Term* p = e->getLhs(); patterns[i].term = p; FOR_EACH_CONST(j, LiveSet, potentialSubsumers) { if (patterns[*j].term->subsumes(p, false)) { DebugAdvisory(e << " subsumed"); goto subsumedAtTop; } } if (FreeTerm* f = dynamic_cast(p)) { NatSet usedVariables(e->getRhs()->occursBelow()); if (e->hasCondition()) usedVariables.insert(e->getConditionVariables()); else flags = SUBSUMER; Vector path; NatSet boundVariables; bool unfailing = f->scanFreeSkeleton(usedVariables, path, positions, boundVariables, patterns[i].subterms); if (unfailing && (flags & SUBSUMER)) flags |= UNFAILING; } liveSet.insert(i); if ((flags & SUBSUMER) && !(p->ground())) potentialSubsumers.insert(i); // to avoid trivial quadratic blow-up we keep track of potential subsumers subsumedAtTop: patterns[i].flags = flags; } Vector topPosition; topPositionIndex = positions.position2Index(topPosition); NatSet fringe; expandFringe(topPositionIndex, symbol, fringe); reduceFringe(liveSet, fringe); NatSet positionsTested; (void) makeNode(liveSet, fringe, positionsTested); // dump(cerr, 0); //cout << "buildNet for " << symbol << " done; nodes = " << net.size() << endl; } int FreePreNet::makeNode(const LiveSet& liveSet, const NatSet& reducedFringe, const NatSet& positionsTested) { //cerr << "liveSet has " << liveSet.size() << " patterns" << endl; // // First check to see if there is already a node with the same set // of live patterns and the same reduced fringe that we can share. // NodeIndex key; key.liveSet = liveSet; key.reducedFringe = reducedFringe; { NodeMap::iterator i = net.find(key); if (i != net.end()) { // // We can share this node but the positionsTested must be reduced // to those positions tested on all routes to this node. // i->second.positionsTested.intersect(positionsTested); return i->second.nodeNr; } } // // Need to make a brand new node. // NodeMap::iterator i = (net.insert(NodeMap::value_type(key, NodeBody()))).first; NodeBody& n = i->second; n.nodeNr = netVec.size(); netVec.append(i); n.positionsTested = positionsTested; // deep copy n.nrParents = 0; n.nrVisits = 0; if (reducedFringe.empty()) { // // Remainder node case; everything matched. // if (expandRemainderNodes) { // // We expand remainder node by removing first pattern // and building a remainder node with the remaining // patterns. The idea is to share the tail ends of // the remainder lists. This is required for full compilation // since the code to handle the remainders is generated // inline and will become excessively bulky without sharing. // In the semi-compilation case, FreeNets have a layer // of indirection that gives us perfect sharing of // remainders and we don't use the expansion of remainder // nodes. // LiveSet::const_iterator start = liveSet.begin(); n.patternIndex = *start; ++start; LiveSet newLiveSet(start, liveSet.end()); int nextNode = newLiveSet.empty() ? NONE : makeNode(newLiveSet, reducedFringe, positionsTested); n.nextPattern = nextNode; } } else { // // Match node case; choose a test position. // int positionIndex = findBestPosition(key, n); NatSet newPositionsTested(positionsTested); newPositionsTested.insert(positionIndex); n.testPositionIndex = positionIndex; // // Partition live set. This isn't strictly necessary but it // prevents a quadratic blow up on certain examples with // huge pattern set. // int totalSymbols = topSymbol->getModule()->getSymbols().size(); Vector liveSets(totalSymbols); LiveSet defaultLiveSet; partitionLiveSet(liveSet, positionIndex, n.sons, liveSets, defaultLiveSet); // // Make an arc for each symbol we must check for. // int nrSymbols = n.sons.length(); for (int i = 0; i < nrSymbols; i++) { Symbol* symbol = n.sons[i].label; // // Make a new fringe: // (1) Remove tested position from old fringe. // (2) Add in all positions directly beneath tested position assuming // this position contains our current symbol. // (3) Compute the set of live patterns, taking subsumption into account. // (4) Reduce the fringe by discarding positions that are not stable // in any live pattern. // NatSet newFringe(reducedFringe); newFringe.subtract(positionIndex); expandFringe(positionIndex, symbol, newFringe); LiveSet newLiveSet; findLiveSet(liveSets[symbol->getIndexWithinModule()], positionIndex, symbol, newFringe, newLiveSet); reduceFringe(newLiveSet, newFringe); Assert(!(newLiveSet.empty()), "empty live set on arc labeled with symbol"); int t = makeNode(newLiveSet, newFringe, newPositionsTested); n.sons[i].target = t; } // // Make an arc for the default case. // NatSet newFringe(reducedFringe); newFringe.subtract(positionIndex); LiveSet newLiveSet; findLiveSet(defaultLiveSet, positionIndex, 0, newFringe, newLiveSet); if (newLiveSet.empty()) n.neqTarget = NONE; else { reduceFringe(newLiveSet, newFringe); int t = makeNode(newLiveSet, newFringe, newPositionsTested); n.neqTarget = t; } } return n.nodeNr; } void FreePreNet::expandFringe(int positionIndex, Symbol* symbol, NatSet& fringe) { if (dynamic_cast(symbol)) { int nrArgs = symbol->arity(); if (nrArgs > 0) { Vector newPath(positions.index2Position(positionIndex)); int length = newPath.length(); newPath.expandBy(1); for (int i = 0; i < nrArgs; i++) { newPath[length] = i; fringe.insert(positions.position2Index(newPath)); } } } } void FreePreNet::reduceFringe(const LiveSet& liveSet, NatSet& fringe) const { // // For each position in the fringe. // const NatSet::const_iterator ei = fringe.end(); for (NatSet::const_iterator i = fringe.begin(); i != ei; ++i) { const Vector& position = positions.index2Position(*i); // // See if at least one live pattern has a stable symbol at this position. // FOR_EACH_CONST(j, LiveSet, liveSet) { if (FreeTerm* f = dynamic_cast(patterns[*j].term)) { if (Term* t = f->locateSubterm(position)) { if (t->stable()) goto survive; } } } fringe.subtract(*i); // eliminate useless pattern from fringe survive: ; } } void FreePreNet::findLiveSet(const LiveSet& original, int positionIndex, Symbol* symbol, const NatSet& fringe, LiveSet& liveSet) { const Vector position(positions.index2Position(positionIndex)); // deep copy - because ref become stale FOR_EACH_CONST(i, LiveSet, original) { int patternIndex = *i; if (FreeTerm* f = dynamic_cast(patterns[patternIndex].term)) { if (Term* t = f->locateSubterm(position)) { if (t->stable()) { if (symbol == t->symbol()) liveSet.insert(patternIndex); // else dead by not matching } else // not stable { if (symbol == 0 || symbol->mightMatchPattern(t)) { if (!partiallySubsumed(liveSet, patternIndex, fringe)) liveSet.insert(patternIndex); // else dead by subsumption } // else dead by not matching } } else // does not exist { if (!partiallySubsumed(liveSet, patternIndex, fringe)) liveSet.insert(patternIndex); // else dead by subsumption } } else // pattern not headed by a free function symbol liveSet.insert(patternIndex); } } void FreePreNet::partitionLiveSet(const LiveSet& original, int positionIndex, const Vector& arcs, Vector& liveSets, LiveSet& defaultLiveSet) { const Vector& position = positions.index2Position(positionIndex); // safe because we won't add new positions FOR_EACH_CONST(i, LiveSet, original) { int patternIndex = *i; if (FreeTerm* f = dynamic_cast(patterns[patternIndex].term)) { if (Term* t = f->locateSubterm(position)) { if (t->stable()) liveSets[t->symbol()->getIndexWithinModule()].insert(patternIndex); else { // // Pattern has an unstable symbol at this position. Pattern goes into // live set for the default arc. // defaultLiveSet.insert(patternIndex); // // Need to consider pattern for the live set of each active // symbol that could match our unstable subpattern. // FOR_EACH_CONST(j, Vector, arcs) { Symbol* symbol = j->label; if (symbol->mightMatchPattern(t)) liveSets[symbol->getIndexWithinModule()].insert(patternIndex); } } continue; } } // // Pattern not headed by a free symbol or the tested position does not exist. // Either way we add it to all live sets. // defaultLiveSet.insert(patternIndex); FOR_EACH_CONST(j, Vector, arcs) liveSets[j->label->getIndexWithinModule()].insert(patternIndex); } } bool FreePreNet::partiallySubsumed(const LiveSet& liveSet, int victim, const NatSet& fringe) { if (liveSet.empty()) return false; Term* vp = patterns[victim].term; FOR_EACH_CONST(i, LiveSet, liveSet) { Assert(*i < victim, "current liveSet contains pattern >= victim"); if ((patterns[*i].flags & SUBSUMER) && subsumesWrtReducedFringe(patterns[*i].term, vp, topPositionIndex, fringe)) return true; } return false; } int FreePreNet::findBestPosition(const NodeIndex& ni, NodeBody& n) const { // // We chose a "best" position to test from node n's reduced fringe. // We also fill out n.sons with the set of symbols we need to test // at this position. // PointerSet bestSymbols; int bestPosition = NONE; int smallestScore = INT_MAX; // // Consider each position in the reduced fringe. // const NatSet::const_iterator ei = ni.reducedFringe.end(); for (NatSet::const_iterator i = ni.reducedFringe.begin(); i != ei; ++i) { const Vector& path = positions.index2Position(*i); PointerSet symbols; int nrLive = 0; int nrStable = 0; int nrUnstableSubsumersAbove = 0; // // Gather the set of symbols that occur at this position // in a live pattern. // FOR_EACH_CONST(j, LiveSet, ni.liveSet) { if (FreeTerm* f = dynamic_cast(patterns[*j].term)) { Term* t = f->locateSubterm(path); if (t != 0 && t->stable()) { ++nrStable; symbols.insert(t->symbol()); } else if (nrStable == 0 && patterns[*j].flags & SUBSUMER) ++nrUnstableSubsumersAbove; } ++nrLive; } int nrSymbols = symbols.cardinality(); // // We estimate how bad a position is by summing the number of live // patterns on each branch. There are "nrSymbols" + 1 branches // (including the default branch) and the "nrLive" - "nrStable" // unstable patterns must be included on each branch while the // "nrStable" stable patterns will each appear on just one branch. // This gives a total of // nrStable + (nrSymbols + 1) * (nrLive - nrStable) // = nrLive + nrSymbols * (nrLive - nrStable) // // However we now bias this result towards selecting positions // that are stable in earlier subsumers by adding in the number // of subsumer patterns before the first pattern that is stable // at this position. // int badnessScore = nrUnstableSubsumersAbove + nrLive + nrSymbols * (nrLive - nrStable); if (badnessScore < smallestScore) { smallestScore = badnessScore; bestPosition = *i; bestSymbols.swap(symbols); } } int nrSymbols = bestSymbols.cardinality(); n.sons.expandTo(nrSymbols); for (int i = 0; i < nrSymbols; i++) n.sons[i].label = static_cast(bestSymbols.index2Pointer(i)); return bestPosition; } #ifdef DUMP void FreePreNet::dump(ostream& s, int indentLevel) const { s << Indent(indentLevel) << "begin{FreePreNet}\n"; ++indentLevel; s << Indent(indentLevel) <<"Patterns:\n"; ++indentLevel; int nrPatterns = patterns.length(); for (int i = 0; i < nrPatterns; i++) { s << Indent(indentLevel) << i << '\t' << patterns[i].term; if (patterns[i].flags & SUBSUMER) s << " (subsumer)"; if (patterns[i].flags & UNFAILING) s << " (unfailing)"; s << '\n'; } int nrNodes = netVec.length(); for (int i = 0; i < nrNodes; i++) { NodeMap::iterator j = netVec[i]; const NodeIndex& ni = j->first; const NodeBody& n = j->second; Assert(i == n.nodeNr, "node index clash"); s << Indent(indentLevel - 1) << "Node " << i << '\n'; s << Indent(indentLevel) << "Live set: "; dumpLiveSet(s, ni.liveSet); s << '\n' << Indent(indentLevel) << "Reduced fringe: "; dumpPositionSet(s, ni.reducedFringe); s << '\n' << Indent(indentLevel) << "Positions tested: "; dumpPositionSet(s, n.positionsTested); s << '\n' << Indent(indentLevel) << "Slot map: "; dumpSlotMap(s, n.slotMap); s << '\n'; if (ni.reducedFringe.empty()) { if (expandRemainderNodes) { // // These fields are set in the !expandRemainderNodes case. // s << Indent(indentLevel) << "Pattern index: " << n.patternIndex << '\n'; s << Indent(indentLevel) << "Next pattern: " << n.nextPattern << '\n'; } } else { s << Indent(indentLevel) << "Test position: "; if (n.testPositionIndex == NONE) s << "NONE"; else dumpPath(s, positions.index2Position(n.testPositionIndex)); s << '\n' << Indent(indentLevel) << "Sons:\n"; int nrSons = n.sons.length(); for (int j = 0; j < nrSons; j++) { const Arc& a = n.sons[j]; s << Indent(indentLevel + 1) << a.label << " -> " << a.target << '\n'; } s << Indent(indentLevel) << "=/= arc: " << n.neqTarget << '\n'; } } s << Indent(indentLevel - 2) << "end{FreePreNet}\n"; } void FreePreNet::dumpSlotMap(ostream& s, const Vector& slotMap) const { int nrPositions = slotMap.length(); if (nrPositions == 0) s << "*empty*"; else { for (int i = 0; i < nrPositions; i++) { if (i != 0) s << ", "; s << '('; dumpPath(s, positions.index2Position(slotMap[i].positionIndex)); s << " -> " << slots.findRep(slotMap[i].slot) << ')'; } } } void FreePreNet::dumpPath(ostream& s, const Vector& path) { int length = path.length(); if (length == 0) s << '^'; else { for (int i = 0; i < length; i++) { if (i != 0) s << '.'; s << path[i]; } } } void FreePreNet::dumpPositionSet(ostream& s, const NatSet& positionSet) const { if (positionSet.empty()) s << "*empty*"; else { bool first = true; int max = positionSet.max(); for (int j = 0; j <= max; j++) { if (positionSet.contains(j)) { if (first) first = false; else s << ", "; dumpPath(s, positions.index2Position(j)); } } } } void FreePreNet::dumpNatSet(ostream& s, const NatSet& natSet) { if (natSet.empty()) s << "*empty*"; else { bool first = true; int max = natSet.max(); for (int j = 0; j <= max; j++) { if (natSet.contains(j)) { if (first) first = false; else s << ", "; s << j; } } } } void FreePreNet::dumpLiveSet(ostream& s, const LiveSet& liveSet) { if (liveSet.empty()) s << "*empty*"; else { bool first = true; FOR_EACH_CONST(j, LiveSet, liveSet) { if (first) first = false; else s << ", "; s << *j; } } } #endif Maude-2.7/src/FreeTheory/freeGeneralExtor.cc0000744000147300135640000001002412255201165015756 00000000000000/* This file is part of the Maude 2 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 FreeGeneralExtor. // // 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" // free theory class definitions #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeNetExec.hh" #include "freeRemainder.hh" #include "freeGeneralExtor.hh" FreeGeneralExtor::FreeGeneralExtor(FreeSymbol* symbol, const Vector& argumentSlots, int destinationIndex, Instruction* nextInstruction) : NonFinalExtor(destinationIndex, nextInstruction), symbol(symbol), args(argumentSlots.size()) { int nrArgs = argumentSlots.size(); for (int i = 0; i < nrArgs; ++i) args[i] = argumentSlots[i]; } void FreeGeneralExtor::execute(StackMachine* machine) const { // // Get the stack frame containing the pointer to us. // Frame* frame = machine->getTopFrame(); // // Assemble arguments from stack into temporary storage. // int nrArgs = args.size(); DagNode** savedArgs = machine->getProtectedScratchpad(); for (int i = 0; i < nrArgs; ++i) savedArgs[i] = frame->getSlot(args[i]); // // Run the discrimination net. // FREE_NET& net = symbol->GET_NET(); long index = net.findRemainderListIndex(savedArgs); // // If we found a list of applicable equations, try to complete each one until we succeed. // if (index >= 0) { Frame* nextFrame = fastPushFrame(frame); DagNode** binding = nextFrame->getArgumentListPtr(); Vector::const_iterator p = net.fastApplicable[index].begin(); const FreeRemainder* r = *p; do { if (r->generalCheckAndBind(binding, net.stack)) { frame->setNextInstruction(getNextInstruction()); nextFrame->setAncestorWithValidNextInstruction(frame); nextFrame->setReturnAddress(frame, getDestinationIndex()); nextFrame->setNextInstruction(r->getFirstInstruction()); machine->setTopFrame(nextFrame); machine->incrementEqCount(); return; // more agressive thing would be to attempt a tail call and not store the instruction } } while ((r = *(++p)) != 0); } // // Use the special new(NONE) allocator that sets the reduced flag at creation. // FreeDagNode* d = new(NONE) FreeDagNode(symbol); // // Fill out arguments and sort. // DagNode** argArray = d->argArray(); int state = 0; for (int i = 0; i < nrArgs; ++i) { DagNode* a = savedArgs[i]; int t = a->getSortIndex(); state = symbol->traverse(state, t); argArray[i] = a; } d->setSortIndex(state); // // Save new result in frame. // frame->setSlot(getDestinationIndex(), d); // // Execute next instruction. // This should be subject to tail call optimization in the calling execute() function, after we // are inlined, so the callers stack frame will disappear, avoiding accumulation of stack frames. // We don't bother storing a pointer to the next instruction in the our frame, relying on the // instruction we execute to do this (or pass on the obligation). // getNextInstruction()->execute(machine); } Maude-2.7/src/FreeTheory/freeInstruction.hh0000744000147300135640000000371512273050046015723 00000000000000/* This file is part of the Maude 2 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 instruction for a free symbol with only "fast" equations. // It can be final or non-final, extor or ctor but we inherit from NonFinalExtor to get // the extra non-final and extor stuff in case we need it. // #ifndef _freeInstruction_hh_ #define _freeInstruction_hh_ #include "nonFinalExtor.hh" class FreeInstruction : public NonFinalExtor { NO_COPYING(FreeInstruction); public: enum FreeOpCodes { FREE_NULLARY_CTOR, FREE_UNARY_CTOR, FREE_BINARY_CTOR, FREE_TERNARY_CTOR, FREE_NULLARY_EXTOR, FREE_UNARY_EXTOR, FREE_BINARY_EXTOR, FREE_TERNARY_EXTOR, FREE_NULLARY_CTOR_FINAL, FREE_UNARY_CTOR_FINAL, FREE_BINARY_CTOR_FINAL, FREE_TERNARY_CTOR_FINAL, FREE_NULLARY_EXTOR_FINAL, FREE_UNARY_EXTOR_FINAL, FREE_BINARY_EXTOR_FINAL, FREE_TERNARY_EXTOR_FINAL, }; FreeInstruction(FreeSymbol* symbol, int destIndex = 0, Instruction* nextInstruction = 0); void execute(StackMachine* machine) const; #ifdef DUMP void dump(ostream& s, int indentLevel); #endif private: FreeSymbol* const symbol; // our symbol }; #endif Maude-2.7/src/FreeTheory/freeTernarySymbol.cc0000744000147300135640000000324412225623354016204 00000000000000/* This file is part of the Maude 2 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 FreeUnarySymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" // core class definitions #include "rewritingContext.hh" // free theory class definitions #include "freeTernarySymbol.hh" #include "freeDagNode.hh" FreeTernarySymbol::FreeTernarySymbol(int id) : FreeSymbol(id, 3) { } bool FreeTernarySymbol::eqRewrite(DagNode* subject, RewritingContext& context) { static_cast(subject)->internal[0]->reduce(context); static_cast(subject)->internal[1]->reduce(context); static_cast(subject)->internal[2]->reduce(context); return DISC_NET.applyReplaceFast(subject, context); } Maude-2.7/src/FreeTheory/freeArgumentIterator.cc0000644000147300135640000000275207666302714016677 00000000000000/* This file is part of the Maude 2 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 FreeArgumentIterator // #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" // interface class definitions #include "rawArgumentIterator.hh" // free theory class definitions #include "freeArgumentIterator.hh" bool FreeArgumentIterator::valid() const { return position < argArray->length(); } Term* FreeArgumentIterator::argument() const { Assert(position < argArray->length(), "no args left"); return (*argArray)[position]; } void FreeArgumentIterator::next() { Assert(position < argArray->length(), "no args left"); ++position; } Maude-2.7/src/FreeTheory/freeBinarySymbol.hh0000644000147300135640000000241507666302714016023 00000000000000/* This file is part of the Maude 2 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 binary symbols belonging to the free theory. // Sole purpose of this class is to provide a optimized eqRewrite() for binary // free function symbols that have the standard strategy. // #ifndef _freeBinarySymbol_hh_ #define _freeBinarySymbol_hh_ #include "freeSymbol.hh" class FreeBinarySymbol : public FreeSymbol { public: FreeBinarySymbol(int id); bool eqRewrite(DagNode* subject, RewritingContext& context); }; #endif Maude-2.7/src/FreeTheory/freeNetExec.hh0000744000147300135640000001074312233316116014733 00000000000000/* This file is part of the Maude 2 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 execution of free theory discrimination net from an explicit stack machine. // // Since we don't make recursive calls, it's OK to have to inline this code and have big // C++ stack frames. // #ifndef _freeNetExec_hh_ #define _freeNetExec_hh_ #if 1 inline long FreeNet::findRemainderListIndex(DagNode** argumentList) { long i; stack[0] = argumentList; if (!(net.isNull())) // at least one pattern has free symbols { Vector::const_iterator netBase = net.begin(); Vector::const_iterator n = netBase; Vector::iterator stackBase = stack.begin(); DagNode* d = argumentList[n->argIndex]; int symbolIndex = d->symbol()->getIndexWithinModule(); for (;;) { // // The sole reason for unrolling this loop is to generate copies of branch instructions // in the hope of better branch prediction. // one: { long p; long diff = symbolIndex - n->symbolIndex; if (diff != 0) { i = n->notEqual[diff < 0]; if (i <= 0) { // // If i == 0 we want to return NONE. But since NONE = -1 = ~i we // cheat, by skipping the test and letting the main return statement // negate 0 into -1. // break; } n = netBase + i; p = n->position; if (p < 0) goto two; } else { long s = n->slot; if (s >= 0) stackBase[s] = static_cast(d)->argArray(); i = n->equal; if (i <= 0) break; n = netBase + i; p = n->position; } d = stackBase[p][n->argIndex]; symbolIndex = d->symbol()->getIndexWithinModule(); } two: { long p; long diff = symbolIndex - n->symbolIndex; if (diff != 0) { i = n->notEqual[diff < 0]; if (i <= 0) { // // If i == 0 we want to return NONE. But since NONE = -1 = ~i we // cheat, by skipping the test and letting the main return statement // negate 0 into -1. // break; } n = netBase + i; p = n->position; if (p < 0) goto one; } else { long s = n->slot; if (s >= 0) stackBase[s] = static_cast(d)->argArray(); i = n->equal; if (i <= 0) break; n = netBase + i; p = n->position; } d = stackBase[p][n->argIndex]; symbolIndex = d->symbol()->getIndexWithinModule(); } } return ~i; } return 0; // single list of remainders } #else inline long FreeNet::findRemainderListIndex(DagNode** argumentList) { long i; stack[0] = argumentList; if (!(net.isNull())) // at least one pattern has free symbols { Vector::const_iterator netBase = net.begin(); Vector::const_iterator n = netBase; Vector::iterator stackBase = stack.begin(); DagNode* d = argumentList[n->argIndex]; int symbolIndex = d->symbol()->getIndexWithinModule(); for (;;) { long p; int diff = symbolIndex - n->symbolIndex; if (diff != 0) { i = n->notEqual[diff < 0]; if (i <= 0) { // // If i == 0 we want to return NONE. But since NONE = -1 = ~i we // cheat, by skipping the test and letting the main return statement // negate 0 into -1. // break; } n = netBase + i; p = n->position; if (p < 0) continue; } else { long s = n->slot; if (s >= 0) stackBase[s] = static_cast(d)->argArray(); i = n->equal; if (i <= 0) break; n = netBase + i; p = n->position; } d = stackBase[p][n->argIndex]; symbolIndex = d->symbol()->getIndexWithinModule(); } return ~i; } return 0; // single list of remainders } #endif #endif Maude-2.7/src/FreeTheory/freeInstruction.cc0000744000147300135640000002636112243542415015716 00000000000000/* This file is part of the Maude 2 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 FreeInstruction. // // 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" // interface class definitions #include "symbol.hh" // core class definitions #include "frame.hh" #include "stackMachine.hh" #include "returnInstruction.hh" // free theory class definitions #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeNet.hh" #include "freeNetExec.hh" #include "freeRemainder.hh" #include "freeNullarySymbol.hh" #include "freeInstruction.hh" #include "freeFastInstruction.hh" FreeInstruction::FreeInstruction(FreeSymbol* symbol, int destinationIndex, Instruction* nextInstruction) : NonFinalExtor(destinationIndex, nextInstruction), symbol(symbol) { } // // Turn repeated blocks of code into macros to allow for easy modification // // // Need to place next instruction in frame, and frame in stack machine before // we can safely do a garbage collect. // #define OK_TO_COLLECT_GARBAGE() \ { \ if (MemoryCell::wantToCollectGarbage()) \ { \ frame->setNextInstruction(n); \ machine->setTopFrame(frame); \ MemoryCell::collectGarbage(); \ } \ } // // Next instruction is already in frame; need to palce frame in stack machine before // we can safely do a garbage collect. // #define OK_TO_COLLECT_GARBAGE2() \ { \ if (MemoryCell::wantToCollectGarbage()) \ { \ machine->setTopFrame(frame); \ MemoryCell::collectGarbage(); \ } \ } #define WIN() \ { \ frame->setNextInstruction(i->getNextInstruction()); \ nextFrame->setReturnAddress(frame, i->getDestinationIndex()); \ n = r->getFirstInstruction(); \ nextFrame->setAncestorWithValidNextInstruction(frame); \ frame = nextFrame; \ machine->incrementEqCount(); \ JUMP(); \ } #define NEXT() \ { \ frame->setSlot(i->getDestinationIndex(), d); \ n = i->getNextInstruction(); \ OK_TO_COLLECT_GARBAGE(); \ JUMP(); \ } #define NEXT_NO_GC() \ { \ frame->setSlot(i->getDestinationIndex(), d); \ n = i->getNextInstruction(); \ JUMP(); \ } #define TRY_REMAINDERS(argAddress) \ { \ FREE_NET& net = i->symbol->GET_NET(); \ long index = net.findRemainderListIndex(argAddress); \ if (index >= 0) \ { \ Frame* nextFrame = i->fastPushFrame(frame); \ DagNode** binding = nextFrame->getArgumentListPtr(); \ Vector::const_iterator p = net.fastApplicable[index].begin(); \ const FreeRemainder* r = *p; \ do \ { \ if (r->fastCheckAndBind(binding, net.stack)) \ WIN(); \ } \ while ((r = *(++p)) != 0); \ } \ } #define END_FRAME() \ { \ frame->returnValue(d); \ frame = frame->fastPop(); \ n = frame->getNextInstruction(); \ OK_TO_COLLECT_GARBAGE2(); \ JUMP(); \ } #define END_FRAME_NO_GC() \ { \ frame->returnValue(d); \ frame = frame->fastPop(); \ n = frame->getNextInstruction(); \ JUMP(); \ } #define TRY_REMAINDERS_FINAL() \ { \ FREE_NET& net = i->symbol->GET_NET(); \ long index = net.findRemainderListIndex(localArgList); \ if (index >= 0) \ { \ DagNode** binding = frame->getArgumentListPtr(); \ Vector::const_iterator p = net.fastApplicable[index].begin(); \ const FreeRemainder* r = *p; \ do \ { \ if (r->fastCheckAndBind(binding, net.stack)) \ { \ n = r->getFirstInstruction(); \ machine->incrementEqCount(); \ JUMP(); \ } \ } \ while ((r = *(++p)) != 0); \ } \ } #define JUMP() \ goto *(jumpTable[n->getOpCode()]); #define NULLARY_CTOR() \ const FreeInstruction* i = static_cast(n); \ FreeNullarySymbol* s = static_cast(i->symbol); \ DagNode* d = s->getNode(); \ if (d == 0) \ { \ d = new(NONE) FreeDagNode(s, NONE /* HACK */); \ s->setNode(d); \ } #define UNARY_CTOR() \ const FreeFastInstruction* i = static_cast(n); \ FreeSymbol* s = i->symbol; \ DagNode* d = new(NONE) FreeDagNode(s, \ frame->getSlot(i->argIndex0)); #define BINARY_CTOR() \ const FreeFastInstruction* i = static_cast(n); \ FreeSymbol* s = i->symbol; \ DagNode* d = new(NONE) FreeDagNode(s, \ frame->getSlot(i->argIndex0), \ frame->getSlot(i->argIndex1)); #define TERNARY_CTOR() \ const FreeFastInstruction* i = static_cast(n); \ FreeSymbol* s = i->symbol; \ DagNode* d = new(NONE) FreeDagNode(s, \ frame->getSlot(i->argIndex0), \ frame->getSlot(i->argIndex1), \ frame->getSlot(i->argIndex2)); void FreeInstruction::execute(StackMachine* machine) const { static void* jumpTable[] = { &&nullaryCtor, &&unaryCtor, &&binaryCtor, &&ternaryCtor, &&nullaryExtor, &&unaryExtor, &&binaryExtor, &&ternaryExtor, &&nullaryCtorFinal, &&unaryCtorFinal, &&binaryCtorFinal, &&ternaryCtorFinal, &&nullaryExtorFinal, &&unaryExtorFinal, &&binaryExtorFinal, &&ternaryExtorFinal, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&returnInstruction, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, &&other, }; DagNode* localArgList[3]; Frame* frame = machine->getTopFrame(); const Instruction* n = this; JUMP(); nullaryCtor: { NULLARY_CTOR(); NEXT_NO_GC(); } unaryCtor: { UNARY_CTOR(); NEXT(); } binaryCtor: { BINARY_CTOR(); NEXT(); } ternaryCtor: { TERNARY_CTOR(); NEXT(); } nullaryExtor: { const FreeInstruction* i = static_cast(n); FREE_NET& net = i->symbol->GET_NET(); Frame* nextFrame = i->fastPushFrame(frame); const FreeRemainder* r = net.fastApplicable[0][0]; WIN(); } unaryExtor: { const FreeFastInstruction* i = static_cast(n); TRY_REMAINDERS(frame->getArgumentListPtr() + i->argIndex0); DagNode* d = new(NONE) FreeDagNode(i->symbol, frame->getSlot(i->argIndex0)); NEXT(); } binaryExtor: { const FreeFastInstruction* i = static_cast(n); localArgList[0] = frame->getSlot(i->argIndex0); localArgList[1] = frame->getSlot(i->argIndex1); TRY_REMAINDERS(localArgList); DagNode* d = new(NONE) FreeDagNode(i->symbol, localArgList[0], localArgList[1]); NEXT(); } ternaryExtor: { const FreeFastInstruction* i = static_cast(n); localArgList[0] = frame->getSlot(i->argIndex0); localArgList[1] = frame->getSlot(i->argIndex1); localArgList[2] = frame->getSlot(i->argIndex2); TRY_REMAINDERS(localArgList); DagNode* d = new(NONE) FreeDagNode(i->symbol, localArgList[0], localArgList[1], localArgList[2]); NEXT(); } nullaryCtorFinal: { NULLARY_CTOR(); END_FRAME_NO_GC(); } unaryCtorFinal: { UNARY_CTOR(); END_FRAME(); } binaryCtorFinal: { BINARY_CTOR(); END_FRAME(); } ternaryCtorFinal: { TERNARY_CTOR(); END_FRAME(); } nullaryExtorFinal: { const FreeInstruction* i = static_cast(n); FREE_NET& net = i->symbol->GET_NET(); const FreeRemainder* r = net.fastApplicable[0][0]; n = r->getFirstInstruction(); machine->incrementEqCount(); JUMP(); } unaryExtorFinal: { const FreeFastInstruction* i = static_cast(n); localArgList[0] = frame->getSlot(i->argIndex0); TRY_REMAINDERS_FINAL(); DagNode* d = new(NONE) FreeDagNode(i->symbol, localArgList[0]); END_FRAME(); } binaryExtorFinal: { const FreeFastInstruction* i = static_cast(n); localArgList[0] = frame->getSlot(i->argIndex0); localArgList[1] = frame->getSlot(i->argIndex1); TRY_REMAINDERS_FINAL(); DagNode* d = new(NONE) FreeDagNode(i->symbol, localArgList[0], localArgList[1]); END_FRAME(); } ternaryExtorFinal: { const FreeFastInstruction* i = static_cast(n); localArgList[0] = frame->getSlot(i->argIndex0); localArgList[1] = frame->getSlot(i->argIndex1); localArgList[2] = frame->getSlot(i->argIndex2); TRY_REMAINDERS_FINAL(); DagNode* d = new(NONE) FreeDagNode(i->symbol, localArgList[0], localArgList[1], localArgList[2]); END_FRAME(); } returnInstruction: { const ReturnInstruction* i = static_cast(n); DagNode* d = frame->getSlot(i->getReturnSlot()); END_FRAME_NO_GC(); } other: { // // Save next instruction in current frame. // frame->setNextInstruction(n); // // Update stack machine with current frame. // machine->setTopFrame(frame); return; } } #ifdef DUMP void FreeInstruction::dump(ostream& s, int indentLevel) { s << Indent(indentLevel) << "FreeInstruction " << getOpCode() << " : "<< symbol; int nrArgs = symbol->arity(); if (nrArgs > 0) { s << "("; /* for (int i = 0; i < nrArgs; ++i) s << argIndex[i] << ((i == nrArgs - 1) ? ")" : ", "); */ } if (getNextInstruction() != 0) s << " -> " << getDestinationIndex(); s << endl; } #endif Maude-2.7/src/FreeTheory/freeGeneralCtorFinal.cc0000744000147300135640000000443312232626717016556 00000000000000/* This file is part of the Maude 2 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 FreeGeneralCtorFinal. // // 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" // free theory class definitions #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeGeneralCtorFinal.hh" FreeGeneralCtorFinal::FreeGeneralCtorFinal(FreeSymbol* symbol, const Vector& argumentSlots) : symbol(symbol), args(argumentSlots.size()) { int nrArgs = argumentSlots.size(); for (int i = 0; i < nrArgs; ++i) args[i] = argumentSlots[i]; } void FreeGeneralCtorFinal::execute(StackMachine* machine) const { // // Get the stack frame containing the pointer to us. // Frame* frame = machine->getTopFrame(); // // Use the special new(NONE) allocator that sets the reduced flag at creation. // FreeDagNode* d = new(NONE) FreeDagNode(symbol); // // Fill out arguments and sort. // int nrArgs = d->symbol()->arity(); DagNode** argArray = d->argArray(); int state = 0; for (int i = 0; i < nrArgs; ++i) { DagNode* a = frame->getSlot(args[i]); int t = a->getSortIndex(); state = symbol->traverse(state, t); argArray[i] = a; } d->setSortIndex(state); // // Finish up using parent class code. // returnResultAndContinue(machine, frame, d); } Maude-2.7/src/FreeTheory/freeGeneralExtorFinal.hh0000744000147300135640000000260712233330333016746 00000000000000/* This file is part of the Maude 2 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 extor for free symbols having > 3 arguments, or complex behavior. // #ifndef _freeGeneralExtorFinal_hh_ #define _freeGeneralExtorFinal_hh_ #include "finalInstruction.hh" class FreeGeneralExtorFinal : public FinalInstruction { NO_COPYING(FreeGeneralExtorFinal); public: FreeGeneralExtorFinal(FreeSymbol* symbol, const Vector& argumentSlots); void execute(StackMachine* machine) const; #ifdef DUMP //void dump(ostream& s, int indentLevel); #endif private: FreeSymbol* const symbol; Vector args; }; #endif Maude-2.7/src/FreeTheory/Makefile.in0000644000147300135640000017150412305230425014262 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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/FreeTheory DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 libfreeTheory_a_AR = $(AR) $(ARFLAGS) libfreeTheory_a_LIBADD = am_libfreeTheory_a_OBJECTS = libfreeTheory_a-freeSymbol.$(OBJEXT) \ libfreeTheory_a-freeUnarySymbol.$(OBJEXT) \ libfreeTheory_a-freeNullarySymbol.$(OBJEXT) \ libfreeTheory_a-freeBinarySymbol.$(OBJEXT) \ libfreeTheory_a-freeTernarySymbol.$(OBJEXT) \ libfreeTheory_a-freeTerm.$(OBJEXT) \ libfreeTheory_a-freeArgumentIterator.$(OBJEXT) \ libfreeTheory_a-freeDagNode.$(OBJEXT) \ libfreeTheory_a-freeDagArgumentIterator.$(OBJEXT) \ libfreeTheory_a-freeLhsAutomaton.$(OBJEXT) \ libfreeTheory_a-freeRhsAutomaton.$(OBJEXT) \ libfreeTheory_a-freeNet.$(OBJEXT) \ libfreeTheory_a-freePreNet.$(OBJEXT) \ libfreeTheory_a-freeRemainder.$(OBJEXT) \ libfreeTheory_a-freePositionTable.$(OBJEXT) \ libfreeTheory_a-freeInstruction.$(OBJEXT) \ libfreeTheory_a-freeFastInstruction.$(OBJEXT) \ libfreeTheory_a-freeGeneralCtor.$(OBJEXT) \ libfreeTheory_a-freeGeneralCtorFinal.$(OBJEXT) \ libfreeTheory_a-freeGeneralExtor.$(OBJEXT) \ libfreeTheory_a-freeGeneralExtorFinal.$(OBJEXT) libfreeTheory_a_OBJECTS = $(am_libfreeTheory_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libfreeTheory_a_SOURCES) DIST_SOURCES = $(libfreeTheory_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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 = libfreeTheory.a libfreeTheory_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 libfreeTheory_a_SOURCES = \ freeSymbol.cc \ freeUnarySymbol.cc \ freeNullarySymbol.cc \ freeBinarySymbol.cc \ freeTernarySymbol.cc \ freeTerm.cc \ freeArgumentIterator.cc \ freeDagNode.cc \ freeDagArgumentIterator.cc \ freeLhsAutomaton.cc \ freeRhsAutomaton.cc \ freeNet.cc \ freePreNet.cc \ freeRemainder.cc \ freePositionTable.cc \ freeInstruction.cc \ freeFastInstruction.cc \ freeGeneralCtor.cc \ freeGeneralCtorFinal.cc \ freeGeneralExtor.cc \ freeGeneralExtorFinal.cc EXTRA_DIST = \ freeNetExec.cc \ freeTermFullCompiler.cc \ freeLhsCompiler.cc \ freePreNetSubsumption.cc \ freePreNetSemiCompiler.cc \ freePreNetFullCompiler.cc noinst_HEADERS = \ freeArgumentIterator.hh \ freeNullarySymbol.hh \ freeUnarySymbol.hh \ freeBinarySymbol.hh \ freeTernarySymbol.hh \ freeDagArgumentIterator.hh \ freeDagNode.hh \ freeLhsAutomaton.hh \ freeLhsStructs.hh \ freeNet.hh \ freeNetExec.hh \ freeOccurrence.hh \ freePositionTable.hh \ freePreNet.hh \ freeRemainder.hh \ freeRhsAutomaton.hh \ freeSubterm.hh \ freeSymbol.hh \ freeTerm.hh \ freeTheory.hh \ freeInstruction.hh \ freeFastInstruction.hh \ freeGeneralCtor.hh \ freeGeneralCtorFinal.hh \ freeGeneralExtor.hh \ freeGeneralExtorFinal.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/FreeTheory/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/FreeTheory/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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) libfreeTheory.a: $(libfreeTheory_a_OBJECTS) $(libfreeTheory_a_DEPENDENCIES) $(EXTRA_libfreeTheory_a_DEPENDENCIES) -rm -f libfreeTheory.a $(libfreeTheory_a_AR) libfreeTheory.a $(libfreeTheory_a_OBJECTS) $(libfreeTheory_a_LIBADD) $(RANLIB) libfreeTheory.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeArgumentIterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeBinarySymbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeDagArgumentIterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeDagNode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeFastInstruction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeGeneralCtor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeGeneralCtorFinal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeGeneralExtor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeGeneralExtorFinal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeInstruction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeLhsAutomaton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeNet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeNullarySymbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freePositionTable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freePreNet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeRemainder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeRhsAutomaton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeSymbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeTerm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeTernarySymbol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfreeTheory_a-freeUnarySymbol.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libfreeTheory_a-freeSymbol.o: freeSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeSymbol.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeSymbol.Tpo -c -o libfreeTheory_a-freeSymbol.o `test -f 'freeSymbol.cc' || echo '$(srcdir)/'`freeSymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeSymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeSymbol.cc' object='libfreeTheory_a-freeSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeSymbol.o `test -f 'freeSymbol.cc' || echo '$(srcdir)/'`freeSymbol.cc libfreeTheory_a-freeSymbol.obj: freeSymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeSymbol.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeSymbol.Tpo -c -o libfreeTheory_a-freeSymbol.obj `if test -f 'freeSymbol.cc'; then $(CYGPATH_W) 'freeSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeSymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeSymbol.cc' object='libfreeTheory_a-freeSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeSymbol.obj `if test -f 'freeSymbol.cc'; then $(CYGPATH_W) 'freeSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeSymbol.cc'; fi` libfreeTheory_a-freeUnarySymbol.o: freeUnarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeUnarySymbol.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeUnarySymbol.Tpo -c -o libfreeTheory_a-freeUnarySymbol.o `test -f 'freeUnarySymbol.cc' || echo '$(srcdir)/'`freeUnarySymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeUnarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeUnarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeUnarySymbol.cc' object='libfreeTheory_a-freeUnarySymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeUnarySymbol.o `test -f 'freeUnarySymbol.cc' || echo '$(srcdir)/'`freeUnarySymbol.cc libfreeTheory_a-freeUnarySymbol.obj: freeUnarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeUnarySymbol.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeUnarySymbol.Tpo -c -o libfreeTheory_a-freeUnarySymbol.obj `if test -f 'freeUnarySymbol.cc'; then $(CYGPATH_W) 'freeUnarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeUnarySymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeUnarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeUnarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeUnarySymbol.cc' object='libfreeTheory_a-freeUnarySymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeUnarySymbol.obj `if test -f 'freeUnarySymbol.cc'; then $(CYGPATH_W) 'freeUnarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeUnarySymbol.cc'; fi` libfreeTheory_a-freeNullarySymbol.o: freeNullarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeNullarySymbol.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeNullarySymbol.Tpo -c -o libfreeTheory_a-freeNullarySymbol.o `test -f 'freeNullarySymbol.cc' || echo '$(srcdir)/'`freeNullarySymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeNullarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeNullarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeNullarySymbol.cc' object='libfreeTheory_a-freeNullarySymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeNullarySymbol.o `test -f 'freeNullarySymbol.cc' || echo '$(srcdir)/'`freeNullarySymbol.cc libfreeTheory_a-freeNullarySymbol.obj: freeNullarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeNullarySymbol.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeNullarySymbol.Tpo -c -o libfreeTheory_a-freeNullarySymbol.obj `if test -f 'freeNullarySymbol.cc'; then $(CYGPATH_W) 'freeNullarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeNullarySymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeNullarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeNullarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeNullarySymbol.cc' object='libfreeTheory_a-freeNullarySymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeNullarySymbol.obj `if test -f 'freeNullarySymbol.cc'; then $(CYGPATH_W) 'freeNullarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeNullarySymbol.cc'; fi` libfreeTheory_a-freeBinarySymbol.o: freeBinarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeBinarySymbol.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeBinarySymbol.Tpo -c -o libfreeTheory_a-freeBinarySymbol.o `test -f 'freeBinarySymbol.cc' || echo '$(srcdir)/'`freeBinarySymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeBinarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeBinarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeBinarySymbol.cc' object='libfreeTheory_a-freeBinarySymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeBinarySymbol.o `test -f 'freeBinarySymbol.cc' || echo '$(srcdir)/'`freeBinarySymbol.cc libfreeTheory_a-freeBinarySymbol.obj: freeBinarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeBinarySymbol.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeBinarySymbol.Tpo -c -o libfreeTheory_a-freeBinarySymbol.obj `if test -f 'freeBinarySymbol.cc'; then $(CYGPATH_W) 'freeBinarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeBinarySymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeBinarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeBinarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeBinarySymbol.cc' object='libfreeTheory_a-freeBinarySymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeBinarySymbol.obj `if test -f 'freeBinarySymbol.cc'; then $(CYGPATH_W) 'freeBinarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeBinarySymbol.cc'; fi` libfreeTheory_a-freeTernarySymbol.o: freeTernarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeTernarySymbol.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeTernarySymbol.Tpo -c -o libfreeTheory_a-freeTernarySymbol.o `test -f 'freeTernarySymbol.cc' || echo '$(srcdir)/'`freeTernarySymbol.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeTernarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeTernarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeTernarySymbol.cc' object='libfreeTheory_a-freeTernarySymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeTernarySymbol.o `test -f 'freeTernarySymbol.cc' || echo '$(srcdir)/'`freeTernarySymbol.cc libfreeTheory_a-freeTernarySymbol.obj: freeTernarySymbol.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeTernarySymbol.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeTernarySymbol.Tpo -c -o libfreeTheory_a-freeTernarySymbol.obj `if test -f 'freeTernarySymbol.cc'; then $(CYGPATH_W) 'freeTernarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeTernarySymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeTernarySymbol.Tpo $(DEPDIR)/libfreeTheory_a-freeTernarySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeTernarySymbol.cc' object='libfreeTheory_a-freeTernarySymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeTernarySymbol.obj `if test -f 'freeTernarySymbol.cc'; then $(CYGPATH_W) 'freeTernarySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/freeTernarySymbol.cc'; fi` libfreeTheory_a-freeTerm.o: freeTerm.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeTerm.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeTerm.Tpo -c -o libfreeTheory_a-freeTerm.o `test -f 'freeTerm.cc' || echo '$(srcdir)/'`freeTerm.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeTerm.Tpo $(DEPDIR)/libfreeTheory_a-freeTerm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeTerm.cc' object='libfreeTheory_a-freeTerm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeTerm.o `test -f 'freeTerm.cc' || echo '$(srcdir)/'`freeTerm.cc libfreeTheory_a-freeTerm.obj: freeTerm.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeTerm.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeTerm.Tpo -c -o libfreeTheory_a-freeTerm.obj `if test -f 'freeTerm.cc'; then $(CYGPATH_W) 'freeTerm.cc'; else $(CYGPATH_W) '$(srcdir)/freeTerm.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeTerm.Tpo $(DEPDIR)/libfreeTheory_a-freeTerm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeTerm.cc' object='libfreeTheory_a-freeTerm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeTerm.obj `if test -f 'freeTerm.cc'; then $(CYGPATH_W) 'freeTerm.cc'; else $(CYGPATH_W) '$(srcdir)/freeTerm.cc'; fi` libfreeTheory_a-freeArgumentIterator.o: freeArgumentIterator.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeArgumentIterator.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeArgumentIterator.Tpo -c -o libfreeTheory_a-freeArgumentIterator.o `test -f 'freeArgumentIterator.cc' || echo '$(srcdir)/'`freeArgumentIterator.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeArgumentIterator.Tpo $(DEPDIR)/libfreeTheory_a-freeArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeArgumentIterator.cc' object='libfreeTheory_a-freeArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeArgumentIterator.o `test -f 'freeArgumentIterator.cc' || echo '$(srcdir)/'`freeArgumentIterator.cc libfreeTheory_a-freeArgumentIterator.obj: freeArgumentIterator.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeArgumentIterator.Tpo -c -o libfreeTheory_a-freeArgumentIterator.obj `if test -f 'freeArgumentIterator.cc'; then $(CYGPATH_W) 'freeArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/freeArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeArgumentIterator.Tpo $(DEPDIR)/libfreeTheory_a-freeArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeArgumentIterator.cc' object='libfreeTheory_a-freeArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeArgumentIterator.obj `if test -f 'freeArgumentIterator.cc'; then $(CYGPATH_W) 'freeArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/freeArgumentIterator.cc'; fi` libfreeTheory_a-freeDagNode.o: freeDagNode.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeDagNode.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeDagNode.Tpo -c -o libfreeTheory_a-freeDagNode.o `test -f 'freeDagNode.cc' || echo '$(srcdir)/'`freeDagNode.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeDagNode.Tpo $(DEPDIR)/libfreeTheory_a-freeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeDagNode.cc' object='libfreeTheory_a-freeDagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeDagNode.o `test -f 'freeDagNode.cc' || echo '$(srcdir)/'`freeDagNode.cc libfreeTheory_a-freeDagNode.obj: freeDagNode.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeDagNode.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeDagNode.Tpo -c -o libfreeTheory_a-freeDagNode.obj `if test -f 'freeDagNode.cc'; then $(CYGPATH_W) 'freeDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/freeDagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeDagNode.Tpo $(DEPDIR)/libfreeTheory_a-freeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeDagNode.cc' object='libfreeTheory_a-freeDagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeDagNode.obj `if test -f 'freeDagNode.cc'; then $(CYGPATH_W) 'freeDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/freeDagNode.cc'; fi` libfreeTheory_a-freeDagArgumentIterator.o: freeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeDagArgumentIterator.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeDagArgumentIterator.Tpo -c -o libfreeTheory_a-freeDagArgumentIterator.o `test -f 'freeDagArgumentIterator.cc' || echo '$(srcdir)/'`freeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeDagArgumentIterator.Tpo $(DEPDIR)/libfreeTheory_a-freeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeDagArgumentIterator.cc' object='libfreeTheory_a-freeDagArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeDagArgumentIterator.o `test -f 'freeDagArgumentIterator.cc' || echo '$(srcdir)/'`freeDagArgumentIterator.cc libfreeTheory_a-freeDagArgumentIterator.obj: freeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeDagArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeDagArgumentIterator.Tpo -c -o libfreeTheory_a-freeDagArgumentIterator.obj `if test -f 'freeDagArgumentIterator.cc'; then $(CYGPATH_W) 'freeDagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/freeDagArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeDagArgumentIterator.Tpo $(DEPDIR)/libfreeTheory_a-freeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeDagArgumentIterator.cc' object='libfreeTheory_a-freeDagArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeDagArgumentIterator.obj `if test -f 'freeDagArgumentIterator.cc'; then $(CYGPATH_W) 'freeDagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/freeDagArgumentIterator.cc'; fi` libfreeTheory_a-freeLhsAutomaton.o: freeLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeLhsAutomaton.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeLhsAutomaton.Tpo -c -o libfreeTheory_a-freeLhsAutomaton.o `test -f 'freeLhsAutomaton.cc' || echo '$(srcdir)/'`freeLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeLhsAutomaton.Tpo $(DEPDIR)/libfreeTheory_a-freeLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeLhsAutomaton.cc' object='libfreeTheory_a-freeLhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeLhsAutomaton.o `test -f 'freeLhsAutomaton.cc' || echo '$(srcdir)/'`freeLhsAutomaton.cc libfreeTheory_a-freeLhsAutomaton.obj: freeLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeLhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeLhsAutomaton.Tpo -c -o libfreeTheory_a-freeLhsAutomaton.obj `if test -f 'freeLhsAutomaton.cc'; then $(CYGPATH_W) 'freeLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/freeLhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeLhsAutomaton.Tpo $(DEPDIR)/libfreeTheory_a-freeLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeLhsAutomaton.cc' object='libfreeTheory_a-freeLhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeLhsAutomaton.obj `if test -f 'freeLhsAutomaton.cc'; then $(CYGPATH_W) 'freeLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/freeLhsAutomaton.cc'; fi` libfreeTheory_a-freeRhsAutomaton.o: freeRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeRhsAutomaton.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeRhsAutomaton.Tpo -c -o libfreeTheory_a-freeRhsAutomaton.o `test -f 'freeRhsAutomaton.cc' || echo '$(srcdir)/'`freeRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeRhsAutomaton.Tpo $(DEPDIR)/libfreeTheory_a-freeRhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeRhsAutomaton.cc' object='libfreeTheory_a-freeRhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeRhsAutomaton.o `test -f 'freeRhsAutomaton.cc' || echo '$(srcdir)/'`freeRhsAutomaton.cc libfreeTheory_a-freeRhsAutomaton.obj: freeRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeRhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeRhsAutomaton.Tpo -c -o libfreeTheory_a-freeRhsAutomaton.obj `if test -f 'freeRhsAutomaton.cc'; then $(CYGPATH_W) 'freeRhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/freeRhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeRhsAutomaton.Tpo $(DEPDIR)/libfreeTheory_a-freeRhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeRhsAutomaton.cc' object='libfreeTheory_a-freeRhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeRhsAutomaton.obj `if test -f 'freeRhsAutomaton.cc'; then $(CYGPATH_W) 'freeRhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/freeRhsAutomaton.cc'; fi` libfreeTheory_a-freeNet.o: freeNet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeNet.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeNet.Tpo -c -o libfreeTheory_a-freeNet.o `test -f 'freeNet.cc' || echo '$(srcdir)/'`freeNet.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeNet.Tpo $(DEPDIR)/libfreeTheory_a-freeNet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeNet.cc' object='libfreeTheory_a-freeNet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeNet.o `test -f 'freeNet.cc' || echo '$(srcdir)/'`freeNet.cc libfreeTheory_a-freeNet.obj: freeNet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeNet.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeNet.Tpo -c -o libfreeTheory_a-freeNet.obj `if test -f 'freeNet.cc'; then $(CYGPATH_W) 'freeNet.cc'; else $(CYGPATH_W) '$(srcdir)/freeNet.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeNet.Tpo $(DEPDIR)/libfreeTheory_a-freeNet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeNet.cc' object='libfreeTheory_a-freeNet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeNet.obj `if test -f 'freeNet.cc'; then $(CYGPATH_W) 'freeNet.cc'; else $(CYGPATH_W) '$(srcdir)/freeNet.cc'; fi` libfreeTheory_a-freePreNet.o: freePreNet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freePreNet.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freePreNet.Tpo -c -o libfreeTheory_a-freePreNet.o `test -f 'freePreNet.cc' || echo '$(srcdir)/'`freePreNet.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freePreNet.Tpo $(DEPDIR)/libfreeTheory_a-freePreNet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freePreNet.cc' object='libfreeTheory_a-freePreNet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freePreNet.o `test -f 'freePreNet.cc' || echo '$(srcdir)/'`freePreNet.cc libfreeTheory_a-freePreNet.obj: freePreNet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freePreNet.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freePreNet.Tpo -c -o libfreeTheory_a-freePreNet.obj `if test -f 'freePreNet.cc'; then $(CYGPATH_W) 'freePreNet.cc'; else $(CYGPATH_W) '$(srcdir)/freePreNet.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freePreNet.Tpo $(DEPDIR)/libfreeTheory_a-freePreNet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freePreNet.cc' object='libfreeTheory_a-freePreNet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freePreNet.obj `if test -f 'freePreNet.cc'; then $(CYGPATH_W) 'freePreNet.cc'; else $(CYGPATH_W) '$(srcdir)/freePreNet.cc'; fi` libfreeTheory_a-freeRemainder.o: freeRemainder.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeRemainder.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeRemainder.Tpo -c -o libfreeTheory_a-freeRemainder.o `test -f 'freeRemainder.cc' || echo '$(srcdir)/'`freeRemainder.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeRemainder.Tpo $(DEPDIR)/libfreeTheory_a-freeRemainder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeRemainder.cc' object='libfreeTheory_a-freeRemainder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeRemainder.o `test -f 'freeRemainder.cc' || echo '$(srcdir)/'`freeRemainder.cc libfreeTheory_a-freeRemainder.obj: freeRemainder.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeRemainder.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeRemainder.Tpo -c -o libfreeTheory_a-freeRemainder.obj `if test -f 'freeRemainder.cc'; then $(CYGPATH_W) 'freeRemainder.cc'; else $(CYGPATH_W) '$(srcdir)/freeRemainder.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeRemainder.Tpo $(DEPDIR)/libfreeTheory_a-freeRemainder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeRemainder.cc' object='libfreeTheory_a-freeRemainder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeRemainder.obj `if test -f 'freeRemainder.cc'; then $(CYGPATH_W) 'freeRemainder.cc'; else $(CYGPATH_W) '$(srcdir)/freeRemainder.cc'; fi` libfreeTheory_a-freePositionTable.o: freePositionTable.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freePositionTable.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freePositionTable.Tpo -c -o libfreeTheory_a-freePositionTable.o `test -f 'freePositionTable.cc' || echo '$(srcdir)/'`freePositionTable.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freePositionTable.Tpo $(DEPDIR)/libfreeTheory_a-freePositionTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freePositionTable.cc' object='libfreeTheory_a-freePositionTable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freePositionTable.o `test -f 'freePositionTable.cc' || echo '$(srcdir)/'`freePositionTable.cc libfreeTheory_a-freePositionTable.obj: freePositionTable.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freePositionTable.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freePositionTable.Tpo -c -o libfreeTheory_a-freePositionTable.obj `if test -f 'freePositionTable.cc'; then $(CYGPATH_W) 'freePositionTable.cc'; else $(CYGPATH_W) '$(srcdir)/freePositionTable.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freePositionTable.Tpo $(DEPDIR)/libfreeTheory_a-freePositionTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freePositionTable.cc' object='libfreeTheory_a-freePositionTable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freePositionTable.obj `if test -f 'freePositionTable.cc'; then $(CYGPATH_W) 'freePositionTable.cc'; else $(CYGPATH_W) '$(srcdir)/freePositionTable.cc'; fi` libfreeTheory_a-freeInstruction.o: freeInstruction.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeInstruction.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeInstruction.Tpo -c -o libfreeTheory_a-freeInstruction.o `test -f 'freeInstruction.cc' || echo '$(srcdir)/'`freeInstruction.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeInstruction.Tpo $(DEPDIR)/libfreeTheory_a-freeInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeInstruction.cc' object='libfreeTheory_a-freeInstruction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeInstruction.o `test -f 'freeInstruction.cc' || echo '$(srcdir)/'`freeInstruction.cc libfreeTheory_a-freeInstruction.obj: freeInstruction.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeInstruction.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeInstruction.Tpo -c -o libfreeTheory_a-freeInstruction.obj `if test -f 'freeInstruction.cc'; then $(CYGPATH_W) 'freeInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/freeInstruction.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeInstruction.Tpo $(DEPDIR)/libfreeTheory_a-freeInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeInstruction.cc' object='libfreeTheory_a-freeInstruction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeInstruction.obj `if test -f 'freeInstruction.cc'; then $(CYGPATH_W) 'freeInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/freeInstruction.cc'; fi` libfreeTheory_a-freeFastInstruction.o: freeFastInstruction.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeFastInstruction.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeFastInstruction.Tpo -c -o libfreeTheory_a-freeFastInstruction.o `test -f 'freeFastInstruction.cc' || echo '$(srcdir)/'`freeFastInstruction.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeFastInstruction.Tpo $(DEPDIR)/libfreeTheory_a-freeFastInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeFastInstruction.cc' object='libfreeTheory_a-freeFastInstruction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeFastInstruction.o `test -f 'freeFastInstruction.cc' || echo '$(srcdir)/'`freeFastInstruction.cc libfreeTheory_a-freeFastInstruction.obj: freeFastInstruction.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeFastInstruction.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeFastInstruction.Tpo -c -o libfreeTheory_a-freeFastInstruction.obj `if test -f 'freeFastInstruction.cc'; then $(CYGPATH_W) 'freeFastInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/freeFastInstruction.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeFastInstruction.Tpo $(DEPDIR)/libfreeTheory_a-freeFastInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeFastInstruction.cc' object='libfreeTheory_a-freeFastInstruction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeFastInstruction.obj `if test -f 'freeFastInstruction.cc'; then $(CYGPATH_W) 'freeFastInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/freeFastInstruction.cc'; fi` libfreeTheory_a-freeGeneralCtor.o: freeGeneralCtor.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralCtor.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralCtor.Tpo -c -o libfreeTheory_a-freeGeneralCtor.o `test -f 'freeGeneralCtor.cc' || echo '$(srcdir)/'`freeGeneralCtor.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralCtor.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralCtor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralCtor.cc' object='libfreeTheory_a-freeGeneralCtor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralCtor.o `test -f 'freeGeneralCtor.cc' || echo '$(srcdir)/'`freeGeneralCtor.cc libfreeTheory_a-freeGeneralCtor.obj: freeGeneralCtor.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralCtor.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralCtor.Tpo -c -o libfreeTheory_a-freeGeneralCtor.obj `if test -f 'freeGeneralCtor.cc'; then $(CYGPATH_W) 'freeGeneralCtor.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralCtor.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralCtor.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralCtor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralCtor.cc' object='libfreeTheory_a-freeGeneralCtor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralCtor.obj `if test -f 'freeGeneralCtor.cc'; then $(CYGPATH_W) 'freeGeneralCtor.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralCtor.cc'; fi` libfreeTheory_a-freeGeneralCtorFinal.o: freeGeneralCtorFinal.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralCtorFinal.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralCtorFinal.Tpo -c -o libfreeTheory_a-freeGeneralCtorFinal.o `test -f 'freeGeneralCtorFinal.cc' || echo '$(srcdir)/'`freeGeneralCtorFinal.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralCtorFinal.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralCtorFinal.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralCtorFinal.cc' object='libfreeTheory_a-freeGeneralCtorFinal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralCtorFinal.o `test -f 'freeGeneralCtorFinal.cc' || echo '$(srcdir)/'`freeGeneralCtorFinal.cc libfreeTheory_a-freeGeneralCtorFinal.obj: freeGeneralCtorFinal.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralCtorFinal.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralCtorFinal.Tpo -c -o libfreeTheory_a-freeGeneralCtorFinal.obj `if test -f 'freeGeneralCtorFinal.cc'; then $(CYGPATH_W) 'freeGeneralCtorFinal.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralCtorFinal.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralCtorFinal.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralCtorFinal.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralCtorFinal.cc' object='libfreeTheory_a-freeGeneralCtorFinal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralCtorFinal.obj `if test -f 'freeGeneralCtorFinal.cc'; then $(CYGPATH_W) 'freeGeneralCtorFinal.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralCtorFinal.cc'; fi` libfreeTheory_a-freeGeneralExtor.o: freeGeneralExtor.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralExtor.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralExtor.Tpo -c -o libfreeTheory_a-freeGeneralExtor.o `test -f 'freeGeneralExtor.cc' || echo '$(srcdir)/'`freeGeneralExtor.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralExtor.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralExtor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralExtor.cc' object='libfreeTheory_a-freeGeneralExtor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralExtor.o `test -f 'freeGeneralExtor.cc' || echo '$(srcdir)/'`freeGeneralExtor.cc libfreeTheory_a-freeGeneralExtor.obj: freeGeneralExtor.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralExtor.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralExtor.Tpo -c -o libfreeTheory_a-freeGeneralExtor.obj `if test -f 'freeGeneralExtor.cc'; then $(CYGPATH_W) 'freeGeneralExtor.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralExtor.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralExtor.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralExtor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralExtor.cc' object='libfreeTheory_a-freeGeneralExtor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralExtor.obj `if test -f 'freeGeneralExtor.cc'; then $(CYGPATH_W) 'freeGeneralExtor.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralExtor.cc'; fi` libfreeTheory_a-freeGeneralExtorFinal.o: freeGeneralExtorFinal.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralExtorFinal.o -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralExtorFinal.Tpo -c -o libfreeTheory_a-freeGeneralExtorFinal.o `test -f 'freeGeneralExtorFinal.cc' || echo '$(srcdir)/'`freeGeneralExtorFinal.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralExtorFinal.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralExtorFinal.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralExtorFinal.cc' object='libfreeTheory_a-freeGeneralExtorFinal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralExtorFinal.o `test -f 'freeGeneralExtorFinal.cc' || echo '$(srcdir)/'`freeGeneralExtorFinal.cc libfreeTheory_a-freeGeneralExtorFinal.obj: freeGeneralExtorFinal.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libfreeTheory_a-freeGeneralExtorFinal.obj -MD -MP -MF $(DEPDIR)/libfreeTheory_a-freeGeneralExtorFinal.Tpo -c -o libfreeTheory_a-freeGeneralExtorFinal.obj `if test -f 'freeGeneralExtorFinal.cc'; then $(CYGPATH_W) 'freeGeneralExtorFinal.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralExtorFinal.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libfreeTheory_a-freeGeneralExtorFinal.Tpo $(DEPDIR)/libfreeTheory_a-freeGeneralExtorFinal.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='freeGeneralExtorFinal.cc' object='libfreeTheory_a-freeGeneralExtorFinal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeTheory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libfreeTheory_a-freeGeneralExtorFinal.obj `if test -f 'freeGeneralExtorFinal.cc'; then $(CYGPATH_W) 'freeGeneralExtorFinal.cc'; else $(CYGPATH_W) '$(srcdir)/freeGeneralExtorFinal.cc'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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 -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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 all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags 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 uninstall \ uninstall-am # 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-2.7/src/FreeTheory/freeNet.cc0000744000147300135640000002033412273073400014111 00000000000000/* This file is part of the Maude 2 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 FreeNet. // // utility stuff #include "macros.hh" #include "vector.hh" #include "graph.hh" #include "pointerSet.hh" #include "natSet.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "fullCompiler.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" // core class definitions #include "rewritingContext.hh" #include "equation.hh" // full compiler class definitions #include "compilationContext.hh" // variable class definitions #include "variableTerm.hh" // free theory class definitions #include "freeNet.hh" #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeOccurrence.hh" #include "freeLhsAutomaton.hh" #include "freeRhsAutomaton.hh" #include "freeTerm.hh" #include "freeRemainder.hh" #include "freeNetExec.hh" #include "freeNetExec.cc" FreeNet::FreeNet() { fast = true; // until we know otherwise } FreeNet::~FreeNet() { int nrRemainders = remainders.length(); for (int i = 0; i < nrRemainders; i++) delete remainders[i]; } int FreeNet::allocateNode(int nrMatchArcs) { // // We will need a real node for each exiting arc from the virtual node that is labeled with a symbol. // int len = net.length(); net.resize(len + nrMatchArcs); return len; } void FreeNet::fillOutNode(int nodeNr, int position, int argIndex, const Vector& symbols, const Vector& targets, const Vector& slots, int neqTarget) { int nrSymbols = symbols.length(); Vector triples(nrSymbols); for (int i = 0; i < nrSymbols; i++) { Assert(symbols[i] != 0, "null symbol"); triples[i].symbol = symbols[i]; triples[i].slot = slots[i]; triples[i].subtree = targets[i]; } sort(triples.begin(), triples.end(), tripleLt); buildTernaryTree(nodeNr, triples, 0, nrSymbols - 1, neqTarget, position, argIndex); } int FreeNet::addRemainderList(const PatternSet& liveSet) { int index = applicable.size(); applicable.append(liveSet); return ~index; } void FreeNet::translateSlots(int nrRealSlots, const Vector& slotTranslation) { stack.expandTo(nrRealSlots); int nrNodes = net.length(); for (int i = 0; i < nrNodes; i++) { net[i].slot = (net[i].slot == NONE) ? NONE : slotTranslation[net[i].slot]; net[i].position = (net[i].position == NONE) ? NONE : slotTranslation[net[i].position]; } } void FreeNet::buildRemainders(const Vector& equations, const PatternSet& patternsUsed, const Vector& slotTranslation) { int nrEquations = equations.length(); remainders.expandTo(nrEquations); for (int i = 0; i < nrEquations; i++) remainders[i] = 0; FOR_EACH_CONST(i, PatternSet, patternsUsed) { Equation* e = equations[*i]; if (FreeTerm* f = dynamic_cast(e->getLhs())) { FreeRemainder* r = f->compileRemainder(e, slotTranslation); remainders[*i] = r; // // If a remainder doesn't have fast handling, neither can the discrimination net. // if (!(r->fastHandling())) fast = false; } else { remainders[*i] = new FreeRemainder(e); // remainder for "foreign" equation fast = false; // a foreign equation always disables fast handling for the net } } // // Build null terminated pointer version of applicable for added speed. // int nrApplicables = applicable.length(); fastApplicable.resize(nrApplicables); for (int i = 0; i < nrApplicables; i++) { PatternSet& liveSet = applicable[i]; Vector& rems = fastApplicable[i]; rems.resize(liveSet.size() + 1); Vector::iterator r = rems.begin(); FOR_EACH_CONST(j, PatternSet, liveSet) *r++ = remainders[*j]; *r = 0; } } local_inline bool FreeNet::tripleLt(const Triple& p1, const Triple& p2) { return p1.symbol->getIndexWithinModule() < p2.symbol->getIndexWithinModule(); } void FreeNet::buildTernaryTree(int& nodeIndex, Vector& triples, int first, int last, int defaultSubtree, int position, int argIndex) { // // Pick a middle element as the test symbol. // If the sum of the first and last eligible indices is odd we have a choice // of middle elements and we try to break the tie in a smart way. // int sum = first + last; int testSymbol = sum / 2; if ((sum & 1) && moreImportant(triples[testSymbol + 1].symbol, triples[testSymbol].symbol)) ++testSymbol; // // Fill out a new node. // int i = nodeIndex++; net[i].position = position; net[i].argIndex = argIndex; net[i].symbolIndex = triples[testSymbol].symbol->getIndexWithinModule(); net[i].slot = triples[testSymbol].slot; net[i].equal = triples[testSymbol].subtree; // // If the are any symbols remaining to the left of the test symbol, build a subtree for them. // if (first < testSymbol) { net[i].notEqual[LESS] = nodeIndex; buildTernaryTree(nodeIndex, triples, first, testSymbol - 1, defaultSubtree, NONE, NONE); } else net[i].notEqual[LESS] = defaultSubtree; // // If the are any symbols remaining to the right of the test symbol, build a subtree for them. // if (last > testSymbol) { net[i].notEqual[GREATER] = nodeIndex; buildTernaryTree(nodeIndex, triples, testSymbol + 1, last, defaultSubtree, NONE, NONE); } else net[i].notEqual[GREATER] = defaultSubtree; } bool FreeNet::moreImportant(Symbol* first, Symbol* second) { // // Heuristic to decide which symbol is more important and thus // should have the fastest matching. // The current heuristic favors free symbols over non-free symbols and // high arity symbols over low arity symbols. // // Returns true if first symbol is considered more important. // FreeSymbol* f = dynamic_cast(first); FreeSymbol* s = dynamic_cast(second); if (f != 0 && s == 0) return true; if (f == 0 && s != 0) return false; return first->arity() > second->arity(); } #ifdef DUMP void FreeNet::dump(ostream& s, int indentLevel) { if (applicable.length() == 0) { s << Indent(indentLevel) << "Empty FreeNet\n"; return; } s << Indent(indentLevel) << "Begin{FreeNet}\n"; ++indentLevel; s << Indent(indentLevel) << "testNodes:\n"; ++indentLevel; for (int i = 0; i < net.length(); i++) { s << Indent(indentLevel) << "Node " << i << ": position " << net[i].position << ", argIndex " << net[i].argIndex << ", symbolIndex " << net[i].symbolIndex << ", slot " << net[i].slot << ", equal " << net[i].equal << ", notEqual[LESS] " << net[i].notEqual[LESS] << ", notEqual[GREATER] " << net[i].notEqual[GREATER] << '\n'; } s << Indent(indentLevel - 1) << "applicable:\n"; for (int i = 0; i < applicable.length(); i++) { s << Indent(indentLevel) << "Applicable sequence " << -1 - i << ':'; FOR_EACH_CONST(j, PatternSet, applicable[i]) s << ' ' << *j; s << '\n'; } s << Indent(indentLevel - 1) << "remainders:\n"; for (int i = 0; i < remainders.length(); i++) { s << Indent(indentLevel) << "Remainder " << i << '\n'; if (remainders[i] != 0) remainders[i]->dump(s, indentLevel); else s << Indent(indentLevel) << "(not generated due to subsumption)\n"; } s << Indent(indentLevel - 2) << "End{FreeNet}\n"; } #endif Maude-2.7/src/FreeTheory/freeNullarySymbol.hh0000744000147300135640000000250412225653036016216 00000000000000/* This file is part of the Maude 2 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. */ // // Class for standard strategy nullary symbols belonging to the free theory. // Sole purpose of this class is to provide a DagRoot for caching a dagified version. // #ifndef _freeNullarySymbol_hh_ #define _freeNullarySymbol_hh_ #include "freeSymbol.hh" #include "dagRoot.hh" class FreeNullarySymbol : public FreeSymbol, public DagRoot { public: FreeNullarySymbol(int id); bool eqRewrite(DagNode* subject, RewritingContext& context); void reset(); private: DagRoot cached; }; #endif Maude-2.7/src/FreeTheory/freeNetExec.cc0000744000147300135640000001463212233322164014722 00000000000000/* This file is part of the Maude 2 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 execution of free theory discrimination net. // // We no longer inline this because it would make for large stack frames // in eqRewrite() which is highly recursive. // bool FreeNet::applyReplace2(DagNode* subject, RewritingContext& context) { // // First traverse discrimination net to find the sequence of equations // (actually remainder pointers) which match the free symbol skeleton in the // subject. // long i; if (!(net.isNull())) // at least one pattern has free symbols { DagNode** topArgArray = static_cast(subject)->argArray(); Vector::const_iterator netBase = net.begin(); Vector::const_iterator n = netBase; Vector::iterator stackBase = stack.begin(); DagNode* d = topArgArray[n->argIndex]; int symbolIndex = d->symbol()->getIndexWithinModule(); stack[0] = topArgArray; for (;;) { long p; long diff = symbolIndex - n->symbolIndex; if (diff != 0) { i = n->notEqual[diff < 0]; if (i <= 0) { if (i == 0) return false; break; } n = netBase + i; p = n->position; if (p < 0) continue; } else { long s = n->slot; if (s >= 0) stackBase[s] = static_cast(d)->argArray(); i = n->equal; if (i <= 0) break; n = netBase + i; p = n->position; } d = stackBase[p][n->argIndex]; symbolIndex = d->symbol()->getIndexWithinModule(); } i = ~i; } else { if (subject->symbol()->arity() != 0) // top symbol is not a constant stack[0] = static_cast(subject)->argArray(); i = 0; } // // Now go through the sequence of remainders, trying to finish the // matching process for each one in turn. // Vector::const_iterator p = fastApplicable[i].begin(); const FreeRemainder* r = *p; do { if (r->fastMatchReplace(subject, context, stack)) return true; } while ((r = *(++p)) != 0); return false; } bool FreeNet::applyReplaceFast2(DagNode* subject, RewritingContext& context) { // // Optimized version of the the above that only works for unary, // binary and ternary top symbols. // long i; DagNode** topArgArray = static_cast(subject)->internal; stack[0] = topArgArray; if (!(net.isNull())) // at least one pattern has free symbols { Vector::const_iterator netBase = net.begin(); Vector::const_iterator n = netBase; Vector::iterator stackBase = stack.begin(); DagNode* d = topArgArray[n->argIndex]; int symbolIndex = d->symbol()->getIndexWithinModule(); for (;;) { long p; long diff = symbolIndex - n->symbolIndex; if (diff != 0) { i = n->notEqual[diff < 0]; if (i <= 0) { if (i == 0) return false; break; } n = netBase + i; p = n->position; if (p < 0) continue; } else { long s = n->slot; if (s >= 0) stackBase[s] = static_cast(d)->argArray(); i = n->equal; if (i <= 0) break; n = netBase + i; p = n->position; } d = stackBase[p][n->argIndex]; symbolIndex = d->symbol()->getIndexWithinModule(); } i = ~i; } else i = 0; // // Now go through the sequence of remainders, trying to finish the // matching process for each one in turn. // Vector::const_iterator p = fastApplicable[i].begin(); const FreeRemainder* r = *p; do { if (r->fastMatchReplace(subject, context, stack)) return true; } while ((r = *(++p)) != 0); return false; } bool FreeNet::applyReplaceNoOwise2(DagNode* subject, RewritingContext& context) { // // First traverse discrimination net to find the sequence of equations // (actually remainder pointers) which match the free symbol skeleton in the // subject. // long i; if (!(net.isNull())) // at least one pattern has free symbols { DagNode** topArgArray = static_cast(subject)->argArray(); Vector::const_iterator netBase = net.begin(); Vector::const_iterator n = netBase; Vector::iterator stackBase = stack.begin(); DagNode* d = topArgArray[n->argIndex]; int symbolIndex = d->symbol()->getIndexWithinModule(); stack[0] = topArgArray; for (;;) { long p; long diff = symbolIndex - n->symbolIndex; if (diff != 0) { i = n->notEqual[diff < 0]; if (i <= 0) { if (i == 0) return false; break; } n = netBase + i; p = n->position; if (p < 0) continue; } else { long s = n->slot; if (s >= 0) stackBase[s] = static_cast(d)->argArray(); i = n->equal; if (i <= 0) break; n = netBase + i; p = n->position; } d = stackBase[p][n->argIndex]; symbolIndex = d->symbol()->getIndexWithinModule(); } i = ~i; } else { if (subject->symbol()->arity() != 0) // top symbol is not a constant stack[0] = static_cast(subject)->argArray(); i = 0; } // // Now go through the sequence of remainders, trying to finish the // matching process for each one in turn; if we encounter a remainder // belonging to an owise equation we quit. // Vector::const_iterator p = fastApplicable[i].begin(); const FreeRemainder* r = *p; do { if (r->isOwise()) break; if (r->fastMatchReplace(subject, context, stack)) return true; } while ((r = *(++p)) != 0); return false; } Maude-2.7/src/FreeTheory/freeNet.hh0000744000147300135640000001212012273074410014117 00000000000000/* This file is part of the Maude 2 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 discrimination net for the free theory. // #ifndef _freeNet_hh_ #define _freeNet_hh_ #include #include "unionFind.hh" class FreeNet { public: typedef set PatternSet; FreeNet(); ~FreeNet(); // // Functions to construct a FreeNet. // int allocateNode(int nrMatchArcs); void fillOutNode(int nodeNr, int position, int argIndex, const Vector& symbols, const Vector& targets, const Vector& slots, int neqTarget); int addRemainderList(const PatternSet& liveSet); void translateSlots(int nrRealSlots, const Vector& slotTranslation); void buildRemainders(const Vector& equations, const PatternSet& patternsUsed, const Vector& slotTranslation); // // Functions to use a FreeNet. // bool applyReplace(DagNode* subject, RewritingContext& context); bool applyReplaceFast(DagNode* subject, RewritingContext& context); bool applyReplaceNoOwise(DagNode* subject, RewritingContext& context); // // For stack machine execution. // long findRemainderListIndex(DagNode** argumentList); bool fastHandling() const; #ifdef DUMP void dump(ostream& s, int indentLevel = 0); #endif private: enum SpecialValues { LESS = 1, GREATER = 0 }; struct TestNode { int notEqual[2]; // index of next test node to take for > and < cases (-ve encodes index of applicable list, 0 encodes failure) int position; // stack slot to get free dagnode argument list from (-1 indicates use old argument) int argIndex; // index of argument to test long symbolIndex; // index within module of symbol we test against int slot; // index of stack slot to store free dagnode argument list in (-1 indicates do not store) int equal; // index of next test node to take for == case (-ve encode index of applicable list) #if SIZEOF_LONG == 4 // 32-bit machines int pad_struct_to_32_bytes_on_32_bit_machines; #endif }; /* struct TestNode { int symbolIndex; // index within module of symbol we test against // //QUICK HACK //int position; // stack slot to get free dagnode argument list from (-1 indicates use old argument) //int slot; // index of stack slot to store free dagnode argument list in (-1 indicates do not store) short position; // stack slot to get free dagnode argument list from (-1 indicates use old argument) short slot; // index of stack slot to store free dagnode argument list in (-1 indicates do not store) int argIndex; // index of argument to test int equal; // index of next test node to take for == case (-ve encode index of applicable list) long notEqual[2]; // index of next test node to take for > and < cases (-ve encodes index of applicable list, 0 encodes failure) #if SIZEOF_LONG == 4 // 32-bit machines int pad_struct_to_32_bytes; int on_32_bit_machines; #endif }; */ struct Triple { Symbol* symbol; int slot; int subtree; }; static bool tripleLt(const Triple& p1, const Triple& p2); void buildTernaryTree(int& nodeIndex, Vector& triples, int first, int last, int defaultSubtree, int position, int argIndex); bool moreImportant(Symbol* first, Symbol* second); bool applyReplace2(DagNode* subject, RewritingContext& context); bool applyReplaceFast2(DagNode* subject, RewritingContext& context); bool applyReplaceNoOwise2(DagNode* subject, RewritingContext& context); Vector stack; Vector net; Vector > fastApplicable; Vector remainders; Vector applicable; bool fast; friend class FreeInstruction; friend class FreeGeneralExtor; friend class FreeGeneralExtorFinal; }; inline bool FreeNet::applyReplace(DagNode* subject, RewritingContext& context) { return !applicable.isNull() ? applyReplace2(subject, context) : false; } inline bool FreeNet::applyReplaceFast(DagNode* subject, RewritingContext& context) { return !applicable.isNull() ? applyReplaceFast2(subject, context) : false; } inline bool FreeNet::applyReplaceNoOwise(DagNode* subject, RewritingContext& context) { return !applicable.isNull() ? applyReplaceNoOwise2(subject, context) : false; } inline bool FreeNet::fastHandling() const { return fast; } #endif Maude-2.7/src/FreeTheory/freePositionTable.hh0000644000147300135640000000305007666302714016161 00000000000000/* This file is part of the Maude 2 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 table of positions in free skeletons. // // It is maintained as a digital search tree with each node containing // the full path to nodes as a Vector for fast index to path conversion. // #ifndef _freePositionTable_hh_ #define _freePositionTable_hh_ class FreePositionTable { public: const Vector& index2Position(int index) const; int position2Index(const Vector& position); int parentIndex(int index) const; private: struct Pair { Vector position; Vector arcs; }; int build(const Vector& position, int start); Vector table; }; inline const Vector& FreePositionTable::index2Position(int index) const { return table[index].position; } #endif Maude-2.7/src/FreeTheory/freeOccurrence.hh0000644000147300135640000000304107666302714015475 00000000000000/* This file is part of the Maude 2 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 occurrence of subterm in/under free skeleton. // #ifndef _freeOccurrence_hh_ #define _freeOccurrence_hh_ class FreeOccurrence { public: FreeOccurrence() {} // needed for Vector FreeOccurrence(int position, int argIndex, Term* term); int position() const; int argIndex() const; Term* term() const; private: int pos; int arg; Term* trm; }; inline FreeOccurrence::FreeOccurrence(int position, int argIndex, Term* term) { pos = position; arg = argIndex; trm = term; } inline int FreeOccurrence::position() const { return pos; } inline int FreeOccurrence::argIndex() const { return arg; } inline Term* FreeOccurrence::term() const { return trm; } #endif Maude-2.7/src/FreeTheory/freeRemainder.cc0000744000147300135640000003334712273044216015304 00000000000000/* This file is part of the Maude 2 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 FreeRemainder. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "fullCompiler.hh" #include "freeTheory.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 "variableSymbol.hh" #include "variableTerm.hh" #include "rewritingContext.hh" #include "equation.hh" #include "subproblemSequence.hh" #include "subproblemAccumulator.hh" // full compiler class definitions #include "compilationContext.hh" // free theory class definitions #include "freeNet.hh" #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeOccurrence.hh" #include "freeLhsAutomaton.hh" #include "freeRhsAutomaton.hh" #include "freeTerm.hh" #include "freeRemainder.hh" FreeRemainder::FreeRemainder(Equation* eqn, const Vector& freeSymbols, const Vector& freeVars, const Vector& boundVars, const Vector& gndAliens, const Vector& nonGndAliens, const Vector& bestSequence, const Vector& subAutomata, const Vector& slotTranslation) : foreign(false), freeVariables(freeVars.size()), equation(eqn), boundVariables(boundVars.size()), groundAliens(gndAliens.size()), nonGroundAliens(nonGndAliens.size()) { // // Preliminary determination of whether remainder will qualify // for "fast" or "super-fast" runtime treatment // fast = !(eqn->hasCondition()); { // // Variables that will be unbound. // int nrFreeVariables = freeVars.length(); for (int i = 0; i < nrFreeVariables; i++) { const FreeOccurrence& oc = freeVars[i]; FreeTerm* parent = safeCast(FreeTerm*, freeSymbols[oc.position()].term()); Assert(parent->getSlotIndex() != NONE, "bad slot for " << parent << " in " << eqn); VariableTerm* v = safeCast(VariableTerm*, oc.term()); freeVariables[i].position = slotTranslation[parent->getSlotIndex()]; freeVariables[i].argIndex = oc.argIndex(); freeVariables[i].varIndex = v->getIndex(); Sort* sort = v->getSort(); if (!(sort->fastGeqSufficient())) fast = false; // need slow handling for full sort check else { if (fast > 0) // currently super-fast { if (!(sort->errorFreeMaximal())) fast = -1; // downgrade super-fast to fast } } freeVariables[i].sort = sort; } } { // // Pseudo variables for left to right sharing. // int nrFreeSymbols = freeSymbols.length(); for (int i = 0; i < nrFreeSymbols; i++) { const FreeOccurrence& oc = freeSymbols[i]; FreeTerm* f = safeCast(FreeTerm*, oc.term()); int index = f->getSaveIndex(); if (index != NONE) { FreeTerm* parent = safeCast(FreeTerm*, freeSymbols[oc.position()].term()); Assert(parent->getSlotIndex() != NONE, "bad slot for " << parent << " in " << eqn); int j = freeVariables.length(); freeVariables.expandTo(j + 1); freeVariables[j].position = slotTranslation[parent->getSlotIndex()]; freeVariables[j].argIndex = oc.argIndex(); freeVariables[j].varIndex = index; freeVariables[j].sort = f->getComponent()->sort(0); // use ERROR sort } } } { // // Variables that will be bound // int nrBoundVariables = boundVars.length(); for (int i = 0; i < nrBoundVariables; i++) { const FreeOccurrence& oc = boundVars[i]; FreeTerm* parent = safeCast(FreeTerm*, freeSymbols[oc.position()].term()); Assert(parent->getSlotIndex() != NONE, "bad slot for " << parent << " in " << eqn); VariableTerm* v = safeCast(VariableTerm*, oc.term()); boundVariables[i].position = slotTranslation[parent->getSlotIndex()]; boundVariables[i].argIndex = oc.argIndex(); boundVariables[i].varIndex = v->getIndex(); fast = false; // need slow handling if there are nonlinear variables } } { // // Ground alien subterms // int nrGroundAliens = gndAliens.length(); for (int i = 0; i < nrGroundAliens; i++) { const FreeOccurrence& oc = gndAliens[i]; FreeTerm* parent = safeCast(FreeTerm*, freeSymbols[oc.position()].term()); Assert(parent->getSlotIndex() != NONE, "bad slot for " << parent << " in " << eqn); groundAliens[i].position = slotTranslation[parent->getSlotIndex()]; groundAliens[i].argIndex = oc.argIndex(); groundAliens[i].alien = oc.term(); fast = false; // need slow handling if there are alien subterms } } { // // Non-ground alien subterms // int nrNonGroundAliens = nonGndAliens.length(); for (int i = 0; i < nrNonGroundAliens; i++) { const FreeOccurrence& oc = nonGndAliens[bestSequence[i]]; FreeTerm* parent = safeCast(FreeTerm*, freeSymbols[oc.position()].term()); Assert(parent->getSlotIndex() != NONE, "bad slot for " << parent << " in " << eqn); nonGroundAliens[i].position = slotTranslation[parent->getSlotIndex()]; nonGroundAliens[i].argIndex = oc.argIndex(); nonGroundAliens[i].automaton = subAutomata[i]; fast = false; // need slow handling if there are alien subterms } } } FreeRemainder::FreeRemainder(Equation* eqn) : foreign(true), equation(eqn) { fast = false; } FreeRemainder::~FreeRemainder() { int nrNonGroundAliens = nonGroundAliens.length(); for (int i = 0; i < nrNonGroundAliens; i++) delete nonGroundAliens[i].automaton; } local_inline bool FreeRemainder::slowMatchReplace2(DagNode* subject, RewritingContext& context, Vector& stack) const { Subproblem* subproblem = 0; // need to zero subproblem here since later code may not initialize it if (foreign) { if(!(equation->getLhsAutomaton()->match(subject, context, subproblem))) return false; if (subproblem != 0 && subproblem->solve(true, context) == false) { delete subproblem; return false; } } else { Vector::const_iterator stackBase = stack.begin(); // // Bind free variables // if (!freeVariables.isNull()) { Vector::const_iterator i = freeVariables.begin(); Vector::const_iterator e = freeVariables.end(); do { DagNode* d = stackBase[i->position][i->argIndex]; if (!(d->leq(i->sort))) return false; context.bind(i->varIndex, d); } while (++i != e); } // // Check bound variables // if (!boundVariables.isNull()) { Vector::const_iterator i = boundVariables.begin(); Vector::const_iterator e = boundVariables.end(); do { if (!(stackBase[i->position][i->argIndex]->equal(context.value(i->varIndex)))) return false; } while (++i != e); } // // Match ground aliens // if (!groundAliens.isNull()) { Vector::const_iterator i = groundAliens.begin(); Vector::const_iterator e = groundAliens.end(); do { if (!(i->alien->equal(stackBase[i->position][i->argIndex]))) return false; } while (++i != e); } // // Match non-ground aliens // if (!nonGroundAliens.isNull()) { Assert(nonGroundAliens.size() > 0, "no nonGroundAliens"); SubproblemAccumulator subproblems; Vector::const_iterator i = nonGroundAliens.begin(); Vector::const_iterator e = nonGroundAliens.end(); do { if (i->automaton->match(stackBase[i->position][i->argIndex], context, subproblem)) subproblems.add(subproblem); else return false; } while (++i != e); // // find a first solution to subproblem // subproblem = subproblems.extractSubproblem(); if (subproblem != 0 && subproblem->solve(true, context) == false) { delete subproblem; return false; } } } // // Check condition // if (equation->hasCondition()) { // // The rewriting we do to evaluate our condition may well overwrite // the stack; but the stack must be preserved to allow us to handle // the next remainder if the condition fails or rewriting is aborted. // Vector savedStack(stack.size()); savedStack.swap(stack); // save by swapping is safe since we no longer keep pointer to stack elements bool r = equation->checkCondition(subject, context, subproblem); savedStack.swap(stack); if (!r) { delete subproblem; return false; } } // // Do replacement // { bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, equation, RewritingContext::NORMAL); if (context.traceAbort()) { delete subproblem; return false; } } equation->getRhsBuilder().replace(subject, context); context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); } delete subproblem; return true; } bool FreeRemainder::slowMatchReplace(DagNode* subject, RewritingContext& context, Vector& stack) const { context.clear(equation->getNrProtectedVariables()); bool r = slowMatchReplace2(subject, context, stack); context.finished(); MemoryCell::okToCollectGarbage(); return r; } bool FreeRemainder::slowCheckAndBind(DagNode** binding, Vector& stack) const { // // Eventually we want to add a condition stack to the stack machine and take the stack // machine reference as an arguement. For the moment we only handle simple stuff. // Vector::const_iterator stackBase = stack.begin(); // // Bind free variables // if (!freeVariables.isNull()) { Vector::const_iterator i = freeVariables.begin(); Vector::const_iterator e = freeVariables.end(); do { DagNode* d = stackBase[i->position][i->argIndex]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information"); if (!(d->leq(i->sort))) return false; binding[i->varIndex] = d; } while (++i != e); } // // Check bound variables // if (!boundVariables.isNull()) { Vector::const_iterator i = boundVariables.begin(); Vector::const_iterator e = boundVariables.end(); do { if (!(stackBase[i->position][i->argIndex]->equal(binding[i->varIndex]))) return false; } while (++i != e); } // // Match ground aliens // if (!groundAliens.isNull()) { Vector::const_iterator i = groundAliens.begin(); Vector::const_iterator e = groundAliens.end(); do { if (!(i->alien->equal(stackBase[i->position][i->argIndex]))) return false; } while (++i != e); } // // Don't known how to do nonground aliens and conditions. // return true; } #ifdef DUMP void FreeRemainder::dump(ostream& s, int indentLevel) { s << Indent(indentLevel) << "Begin{FreeRemainder}\n"; ++indentLevel; equation->dump(s, indentLevel); s << Indent(indentLevel) << "fast = " << static_cast(fast) << "\tforeign = " << foreign << '\n'; s << Indent(indentLevel) << "freeVariables:\n"; ++indentLevel; int nrRealVariables = equation->getNrRealVariables(); for (int i = 0; i < freeVariables.length(); i++) { int index = freeVariables[i].varIndex; s << Indent(indentLevel) << "position = " << freeVariables[i].position << "\targIndex = " << freeVariables[i].argIndex << "\tvarIndex = " << index; if (index < nrRealVariables) // might be pseudo-variable s << " \"" << equation->index2Variable(index) << '"'; else s << " (pseudo)"; s << "\tsort = " << freeVariables[i].sort << '\n'; } s << Indent(indentLevel - 1) << "boundVariables:\n"; for (int i = 0; i < boundVariables.length(); i++) { s << Indent(indentLevel) << "position = " << boundVariables[i].position << "\targIndex = " << boundVariables[i].argIndex << "\tvarIndex = " << boundVariables[i].varIndex << " \"" << equation->index2Variable(boundVariables[i].varIndex) << "\"\n"; } s << Indent(indentLevel - 1) << "groundAliens:\n"; for (int i = 0; i < groundAliens.length(); i++) { s << Indent(indentLevel) << "position = " << groundAliens[i].position << "\targIndex = " << groundAliens[i].argIndex << "\talien = " << groundAliens[i].alien << '\n'; } s << Indent(indentLevel - 1) << "nonGroundAliens:\n"; for (int i = 0; i < nonGroundAliens.length(); i++) { s << Indent(indentLevel) << "position = " << nonGroundAliens[i].position << "\targIndex = " << nonGroundAliens[i].argIndex << "\tautomaton =\n"; nonGroundAliens[i].automaton->dump(s, *equation, indentLevel + 1); } s << Indent(indentLevel - 2) << "End{FreeRemainder}\n"; } #endif Maude-2.7/src/FreeTheory/freeDagNode.hh0000744000147300135640000001426012233330054014674 00000000000000/* This file is part of the Maude 2 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 in the free theory. // #ifndef _freeDagNode_hh_ #define _freeDagNode_hh_ #include "dagNode.hh" #include "freeSymbol.hh" class FreeDagNode : public DagNode { public: FreeDagNode(Symbol* symbol); // // For stack based execution. // FreeDagNode(Symbol* symbol, int dummy); FreeDagNode(Symbol* symbol, DagNode* a0); FreeDagNode(Symbol* symbol, DagNode* a0, DagNode* a1); FreeDagNode(Symbol* symbol, DagNode* a0, DagNode* a1, DagNode* a2); /* FreeDagNode(Symbol* symbol, int dummy, DagNode* a0); FreeDagNode(Symbol* symbol, int dummy, DagNode* a1, DagNode* a2); FreeDagNode(Symbol* symbol, int dummy, DagNode* a0, DagNode* a1, DagNode* a2); */ ~FreeDagNode(); RawDagArgumentIterator* arguments(); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); DagNode* copyWithReplacement(Vector& redexStack, int first, int last); DagNode* copyWithReplacement(int argIndex, DagNode* replacement); void stackArguments(Vector& stack, int parentIndex, bool respectFrozen); // // Unification member functions. // ReturnResult computeBaseSortForGroundSubterms(); bool computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending); void insertVariables2(NatSet& occurs); DagNode* instantiate2(const Substitution& substitution); // // Narrowing member functions. // 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 free dag nodes. // FreeSymbol* symbol() const; // // // Fast theory specific access to argument list. // DagNode* getArgument(int i) const; private: union Word // HACK - should make MemoryCell::Word visible { void* pointer; int integer; size_t size; }; union { DagNode* internal[nrWords]; DagNode** external; Word hashCache[nrWords]; }; DagNode** argArray() const; DagNode* markArguments(); DagNode* copyEagerUptoReduced2(); void clearCopyPointers2(); // // Unification stuff // enum PurificationStatus { OCCURS_CHECK_FAIL, PURE_AS_IS, PURIFIED }; PurificationStatus purifyAndOccurCheck(DagNode* repVar, UnificationContext& solution, PendingUnificationStack& pending, FreeDagNode*& purified); friend class FreeSymbol; // to reduce subterms prior to rewrite friend class FreeUnarySymbol; // to reduce subterms prior to rewrite friend class FreeBinarySymbol; // to reduce subterms prior to rewrite friend class FreeTernarySymbol; // to reduce subterms prior to rewrite friend class FreeTerm; // for term->DAG conversion & comparison friend class FreeLhsAutomaton; // for matching DAG subject friend class FreeNet; // for matching DAG subject friend class FreeRhsAutomaton; // for constructing replacement DAG friend class FreeGeneralCtor; friend class FreeGeneralCtorFinal; friend class FreeGeneralExtor; friend class FreeGeneralExtorFinal; }; inline FreeSymbol* FreeDagNode::symbol() const { return safeCast(FreeSymbol*, DagNode::symbol()); } inline FreeDagNode::FreeDagNode(Symbol* symbol) : DagNode(symbol) { int nrArgs = symbol->arity(); if (nrArgs > nrWords) { setCallDtor(); // need our dtor called when garbage collected so we can free arg array external = new DagNode*[nrArgs]; } } inline FreeDagNode::FreeDagNode(Symbol* symbol, int /* dummy */) : DagNode(symbol, symbol->traverse(0, 0)) { } inline FreeDagNode::FreeDagNode(Symbol* symbol, DagNode* a0) : DagNode(symbol, symbol->traverse(0, a0->getSortIndex())) { internal[0] = a0; } inline FreeDagNode::FreeDagNode(Symbol* symbol, DagNode* a0, DagNode* a1) : DagNode(symbol, symbol->traverse(symbol->traverse(0, a0->getSortIndex()), a1->getSortIndex())) { internal[0] = a0; internal[1] = a1; } inline FreeDagNode::FreeDagNode(Symbol* symbol, DagNode* a0, DagNode* a1, DagNode* a2) : DagNode(symbol, symbol->traverse(symbol->traverse(symbol->traverse(0, a0->getSortIndex()), a1->getSortIndex()), a2->getSortIndex())) { internal[0] = a0; internal[1] = a1; internal[2] = a2; } #if 0 inline FreeDagNode::FreeDagNode(Symbol* symbol, int /* dummy */, DagNode* a0) : DagNode(symbol, symbol->getUniqueSortIndex()) { internal[0] = a0; } inline FreeDagNode::FreeDagNode(Symbol* symbol, int /* dummy */, DagNode* a0, DagNode* a1) : DagNode(symbol, symbol->getUniqueSortIndex()) { internal[0] = a0; internal[1] = a1; } inline FreeDagNode::FreeDagNode(Symbol* symbol, int /* dummy */, DagNode* a0, DagNode* a1, DagNode* a2) : DagNode(symbol, symbol->getUniqueSortIndex()) { internal[0] = a0; internal[1] = a1; internal[2] = a2; } #endif inline DagNode* FreeDagNode::getArgument(int i) const { Assert(i >= 0, "-ve arg number"); int nrArgs = symbol()->arity(); Assert(i < nrArgs, "arg number too big"); return (nrArgs > nrWords) ? external[i] : internal[i]; } inline DagNode** FreeDagNode::argArray() const { return (symbol()->arity() > nrWords) ? external : const_cast(&(internal[0])); } #endif Maude-2.7/src/FreeTheory/freeNullarySymbol.cc0000744000147300135640000000301512225653073016203 00000000000000/* This file is part of the Maude 2 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 FreeNullarySymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" // core class definitions #include "rewritingContext.hh" // free theory class definitions #include "freeNullarySymbol.hh" #include "freeDagNode.hh" FreeNullarySymbol::FreeNullarySymbol(int id) : FreeSymbol(id, 0) { } bool FreeNullarySymbol::eqRewrite(DagNode* subject, RewritingContext& context) { return DISC_NET.applyReplaceFast(subject, context); } void FreeNullarySymbol::reset() { setNode(0); } Maude-2.7/src/FreeTheory/freeSymbol.hh0000744000147300135640000000565312232341346014653 00000000000000/* This file is part of the Maude 2 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 free theory. // #ifndef _freeSymbol_hh_ #define _freeSymbol_hh_ #include "symbol.hh" #include "freeNet.hh" #define GET_NET getNet #define DISC_NET discriminationNet #define FREE_NET FreeNet class FreeSymbol : public Symbol { NO_COPYING(FreeSymbol); public: FreeSymbol(int id, int arity, const Vector& strategy = standard, bool memoFlag = false); static FreeSymbol* newFreeSymbol(int id, int arity, const Vector& strategy = standard, bool memoFlag = false); Term* makeTerm(const Vector& args); DagNode* makeDagNode(const Vector& args); void compileEquations(); bool eqRewrite(DagNode* subject, RewritingContext& context); void computeBaseSort(DagNode* subject); void normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context); void stackArguments(DagNode* subject, Vector& stack, int parentIndex); Term* termify(DagNode* dagNode); // // Unification stuff. // void computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort); bool isStable() const; // // Hash cons stuff. // DagNode* makeCanonical(DagNode* original, HashConsSet* hcs); DagNode* makeCanonicalCopy(DagNode* original, HashConsSet* hcs); // // Stack machine stuff. // Instruction* generateFinalInstruction(const Vector& argumentSlots); Instruction* generateInstruction(int destination, const Vector& argumentSlots, Instruction* nextInstruction); FreeNet& getNet(); #ifdef COMPILER void generateCode(CompilationContext& context) const; void generateCons(CompilationContext& context, int indentLevel) const; #endif #ifdef DUMP void dump(ostream& s, int indentLevel = 0); #endif private: bool complexStrategy(DagNode* subject, RewritingContext& context); void memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context); protected: FreeNet discriminationNet; }; inline FreeNet& FreeSymbol::getNet() { return discriminationNet; } #endif Maude-2.7/src/FreeTheory/freeArgumentIterator.hh0000644000147300135640000000250307666302714016703 00000000000000/* This file is part of the Maude 2 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 iterators in the free theory. // #ifndef _freeArgumentIterator_hh_ #define _freeArgumentIteraror_hh_ class FreeArgumentIterator : public RawArgumentIterator { public: FreeArgumentIterator(const Vector* args); bool valid() const; Term* argument() const; void next(); private: const Vector* argArray; int position; }; inline FreeArgumentIterator::FreeArgumentIterator(const Vector* args) { argArray = args; position = 0; } #endif Maude-2.7/src/FreeTheory/freeUnarySymbol.hh0000644000147300135640000000241007666302714015670 00000000000000/* This file is part of the Maude 2 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 unary symbols belonging to the free theory. // Sole purpose of this class is to provide a optimized eqRewrite() for unary // free function symbols that have the standard strategy. // #ifndef _freeUnarySymbol_hh_ #define _freeUnarySymbol_hh_ #include "freeSymbol.hh" class FreeUnarySymbol : public FreeSymbol { public: FreeUnarySymbol(int id); bool eqRewrite(DagNode* subject, RewritingContext& context); }; #endif Maude-2.7/src/FreeTheory/freeRhsAutomaton.hh0000744000147300135640000000326412163445172016033 00000000000000/* This file is part of the Maude 2 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 free theory. // #ifndef _freeRhsAutomaton_hh_ #define _freeRhsAutomaton_hh_ #include "rhsAutomaton.hh" class FreeRhsAutomaton : public RhsAutomaton { public: void addFree(Symbol* symbol, int destination, const Vector& sources); 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); #endif private: struct Instruction { Symbol* symbol; int destination; Vector sources; }; static void fillOutArgs(const Instruction& instr, Substitution& matcher, FreeDagNode* d); Vector instructions; }; #endif Maude-2.7/src/FreeTheory/freePositionTable.cc0000644000147300135640000000544407666302714016160 00000000000000/* This file is part of the Maude 2 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 FreePositionTable. // // utility stuff #include "macros.hh" #include "vector.hh" // free theory class definitions #include "freePositionTable.hh" int FreePositionTable::position2Index(const Vector& position) { int nrPositions = table.length(); if (nrPositions == 0) return build(position, 0); int length = position.length(); int t = 0; for (int i = 0; i < length; i++) { Vector& arcs = table[t].arcs; int nrArgs = arcs.length(); int argNr = position[i]; if (argNr >= nrArgs) { arcs.expandTo(argNr + 1); for (int j = nrArgs; j < argNr; j++) arcs[j] = NONE; arcs[argNr] = nrPositions; // this is where build will start return build(position, i + 1); } else { t = arcs[argNr]; if (t == NONE) { arcs[argNr] = nrPositions; // this is where build will start return build(position, i + 1); } } } return t; } int FreePositionTable::build(const Vector& position, int start) { int next = table.length(); int length = position.length(); table.expandBy(length - start + 1); for (int i = start; i < length; i++) { // // Create a new node by filling out its Vector as a prefix of // position and creating its arcs. // Pair& p = table[next]; p.position.expandTo(i); for (int j = 0; j < i; j++) p.position[j] = position[j]; int argNr = position[i]; p.arcs.expandTo(argNr + 1); for (int j = 0; j < argNr; j++) p.arcs[j] = NONE; p.arcs[argNr] = ++next; } // // Last node contains full position and no arcs. // table[next].position = position; // deep copy; return next; } int FreePositionTable::parentIndex(int index) const { const Vector& position = table[index].position; int pathLength = position.length() - 1; if (pathLength < 0) return NONE; int t = 0; for (int i = 0; i < pathLength; i++) t = table[t].arcs[position[i]]; return t; } Maude-2.7/src/FreeTheory/freeTheory.hh0000744000147300135640000000271612233332246014655 00000000000000/* This file is part of the Maude 2 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 free theory classes. // #ifndef _freeTheory_hh_ #define _freeTheory_hh_ class FreeSymbol; class FreeNullarySymbol; class FreeUnarySymbol; class FreeBinarySymbol; class FreeTernarySymbol; class FreeTerm; class FreeArgumentIterator; class FreeDagNode; class FreeDagArgumentIterator; class FreeLhsAutomaton; class FreeRhsAutomaton; class FreeOccurrence; class FreeNet; class FreeRemainder; class FreePositionTable; class FreeLhsStructs; class FreeInstruction; class FreeFastInstruction; class FreeGeneralCtor; class FreeGeneralCtorFinal; class FreeGeneralExtor; class FreeGeneralExtorFinal; #endif Maude-2.7/src/FreeTheory/freeLhsCompiler.cc0000644000147300135640000002737412116243774015627 00000000000000/* This file is part of the Maude 2 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 of match compilation for free theory. // struct FreeTerm::CP_Sequence { Vector sequence; NatSet bound; int cardinality; }; void FreeTerm::analyseConstraintPropagation(NatSet& boundUniquely) const { // // First gather all symbols lying in or directly under free skeleton. // Vector freeSymbols; Vector otherSymbols; const_cast(this)->scanFreeSkeleton(freeSymbols, otherSymbols); // cast way const // // Now extract the non-ground aliens and update BoundUniquely with variables // that lie directly under the free skeleton and thus will receive an unique binding. // Vector nonGroundAliens; FOR_EACH_CONST(i, Vector, otherSymbols) { Term* t = i->term(); if (VariableTerm* v = dynamic_cast(t)) boundUniquely.insert(v->getIndex()); else { if (!(t->ground())) nonGroundAliens.append(*i); } } if (!(nonGroundAliens.empty())) { DebugAdvisory("FreeTerm::analyseConstraintPropagation() : looking at " << this << " and saw " << nonGroundAliens.length() << " nonground aliens"); // // Now we have to find a best sequence in which to match the non-ground alien // subterms. Sequences that pin down unique values for variables allow those // values to be propagated. // CP_Sequence bestSequence; findConstraintPropagationSequence(nonGroundAliens, boundUniquely, bestSequence); boundUniquely.insert(bestSequence.bound); } } FreeRemainder* FreeTerm::compileRemainder(Equation* equation, const Vector& slotTranslation) { // // Gather all symbols lying in or directly under free skeleton // Vector freeSymbols; Vector otherSymbols; scanFreeSkeleton(freeSymbols, otherSymbols); // // Now classify occurrences of non Free-Theory symbols into 4 types // Vector boundVariables; // guaranteed bound when matched against Vector freeVariables; // guaranteed unbound when matched against Vector groundAliens; // ground alien subterms Vector nonGroundAliens; // non-ground alien subterms NatSet boundUniquely; FOR_EACH_CONST(i, Vector, otherSymbols) { Term* t = i->term(); if (VariableTerm* v = dynamic_cast(t)) { int index = v->getIndex(); if (boundUniquely.contains(index)) boundVariables.append(*i); else { boundUniquely.insert(index); freeVariables.append(*i); } } else { if (t->ground()) groundAliens.append(*i); else nonGroundAliens.append(*i); } } CP_Sequence bestSequence; int nrAliens = nonGroundAliens.length(); Vector subAutomata(nrAliens); if (nrAliens > 0) { // // Now we have to find a best sequence in which to match the // non-ground alien subterms and generate subautomata for them // findConstraintPropagationSequence(nonGroundAliens, boundUniquely, bestSequence); for (int i = 0; i < nrAliens; i++) { bool spl; subAutomata[i] = nonGroundAliens[bestSequence.sequence[i]].term()-> compileLhs(false, *equation, boundUniquely, spl); } Assert(boundUniquely == bestSequence.bound, "bound clash"); } return new FreeRemainder(equation, freeSymbols, freeVariables, boundVariables, groundAliens, nonGroundAliens, bestSequence.sequence, subAutomata, slotTranslation); } LhsAutomaton* FreeTerm::compileLhs2(bool /* matchAtTop */, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely) { // // First gather all symbols lying in or directly under free skeleton // Vector freeSymbols; Vector otherSymbols; scanFreeSkeleton(freeSymbols, otherSymbols); // // Now classify occurrences of non Free-Theory symbols into 4 types // Vector boundVariables; // guaranteed bound when matched against Vector uncertainVariables; // status when matched against uncertain Vector groundAliens; // ground alien subterms Vector nonGroundAliens; // non-ground alien subterms FOR_EACH_CONST(i, Vector, otherSymbols) { Term* t = i->term(); if (VariableTerm* v = dynamic_cast(t)) { int index = v->getIndex(); if (boundUniquely.contains(index)) boundVariables.append(*i); else { boundUniquely.insert(index); uncertainVariables.append(*i); } } else { if (t->ground()) groundAliens.append(*i); else nonGroundAliens.append(*i); } } CP_Sequence bestSequence; int nrAliens = nonGroundAliens.length(); Vector subAutomata(nrAliens); subproblemLikely = false; if (nrAliens > 0) { // // Now we have to find a best sequence in which to match the // non-ground alien subterms and generate subautomata for them // findConstraintPropagationSequence(nonGroundAliens, boundUniquely, bestSequence); for (int i = 0; i < nrAliens; i++) { bool spl; subAutomata[i] = nonGroundAliens[bestSequence.sequence[i]].term()-> compileLhs(false, variableInfo, boundUniquely, spl); subproblemLikely = subproblemLikely || spl; } Assert(boundUniquely == bestSequence.bound, "bound clash"); } return new FreeLhsAutomaton(freeSymbols, uncertainVariables, boundVariables, groundAliens, nonGroundAliens, bestSequence.sequence, subAutomata); } void FreeTerm::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, "didn't find a sequence"); } bool FreeTerm::remainingAliensContain(const Vector& aliens, Vector& currentSequence, int step, int us, const NatSet& interestingVariables) { if (interestingVariables.empty()) return false; int nrAliens = aliens.size(); for (int i = step; i < nrAliens; i++) { if (i != us && !(interestingVariables.disjoint(aliens[currentSequence[i]].term()->occursBelow()))) return true; } return false; } void FreeTerm::findConstraintPropagationSequence(const Vector& aliens, Vector& currentSequence, const NatSet& boundUniquely, int step, CP_Sequence& bestSequence) { // // Add any alien that will "ground out match" to current sequence. // By matching these early we maximize the chance of early match failure, // and avoid wasted work at match time. // int nrAliens = aliens.size(); for (int i = step; i < nrAliens; i++) { if (aliens[currentSequence[i]].term()->willGroundOutMatch(boundUniquely)) { swap(currentSequence[step], currentSequence[i]); ++step; } } if (step < nrAliens) { Vector newBounds(nrAliens); // // Now we search over possible ordering of remaining NGAs. // DebugAdvisory("FreeTerm::findConstraintPropagationSequence(): phase 1 step = " << step); for (int i = step; i < nrAliens; i++) { newBounds[i] = boundUniquely; Term * t = aliens[currentSequence[i]].term(); t->analyseConstraintPropagation(newBounds[i]); // // We now check if t has the potential could benefit from delayed matching. // NatSet unbound(t->occursBelow()); unbound.subtract(newBounds[i]); if (!remainingAliensContain(aliens, currentSequence, step, i, unbound)) { // // No, so commit to matching it here. // DebugAdvisory("FreeTerm::findConstraintPropagationSequence(): step = " << step << " committed to " << t); swap(currentSequence[step], currentSequence[i]); findConstraintPropagationSequence(aliens, currentSequence, newBounds[i], step + 1, bestSequence); return; } } // // We didn't find a NGA that we could commit to matching without possibly missing a better sequence. // Now go over the NGAs again. This time we need to consider expanding multiple branches in the // search tree. // DebugAdvisory("FreeTerm::findConstraintPropagationSequence(): phase 2 step = " << step); bool expandedAtLeastOneBranch = false; for (int i = step; i < nrAliens; i++) { // // We expand this branch if it binds something that could help another NGA. // NatSet newlyBoundUniquely(newBounds[i]); newlyBoundUniquely.subtract(boundUniquely); if (remainingAliensContain(aliens, currentSequence, step, i, newlyBoundUniquely)) { // // Explore this path. // DebugAdvisory("FreeTerm::findConstraintPropagationSequence(): step = " << step << " exploring " << aliens[currentSequence[i]].term()); swap(currentSequence[step], currentSequence[i]); findConstraintPropagationSequence(aliens, currentSequence, newBounds[i], step + 1, bestSequence); swap(currentSequence[step], currentSequence[i]); expandedAtLeastOneBranch = true; } } if (expandedAtLeastOneBranch) return; // // If we get here, none of the remaining NGAs can bind a variable that could affect // the ability of other NGAs to bind variables, so there is no point persuing further // exploration. But we still need to union any other variable they may bind and score // the result, by making a recursive call to our leaf case. // DebugAdvisory("FreeTerm::findConstraintPropagationSequence(): phase 3 step = " << step); NatSet newBoundUnion; for (int i = step; i < nrAliens; i++) newBoundUnion.insert(newBounds[i]); findConstraintPropagationSequence(aliens, currentSequence, newBoundUnion, nrAliens, bestSequence); return; } // // Leaf of search tree. // int n = boundUniquely.cardinality(); if (n > bestSequence.cardinality) { bestSequence.sequence = currentSequence; // deep copy bestSequence.bound = boundUniquely; // deep copy bestSequence.cardinality = n; } } void FreeTerm::scanFreeSkeleton(Vector& freeSymbols, Vector& otherSymbols, int parent, int argIndex) { int ourPosition = freeSymbols.length(); FreeOccurrence oc(parent, argIndex, this); freeSymbols.append(oc); int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { Term* t = argArray[i]; if (FreeTerm* f = dynamic_cast(t)) f->scanFreeSkeleton(freeSymbols, otherSymbols, ourPosition, i); else { FreeOccurrence oc2(ourPosition, i, t); otherSymbols.append(oc2); } } } Maude-2.7/src/FreeTheory/freePreNetSemiCompiler.cc0000644000147300135640000001522212116205253017067 00000000000000/* This file is part of the Maude 2 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 construct a FreeNet from a FreePreNet. // int FreePreNet::semiCompileNode(FreeNet& freeNet, int nodeNr, const SlotMap& slotMap) { NodeMap::iterator nmi = netVec[nodeNr]; const NodeIndex& ni = nmi->first; NodeBody& n = nmi->second; if (n.freeNetIndex != UNBOUNDED) return n.freeNetIndex; if (ni.reducedFringe.empty()) { // // Remainder node. // patternsUsed.insert(ni.liveSet.begin(), ni.liveSet.end()); n.freeNetIndex = freeNet.addRemainderList(ni.liveSet); return n.freeNetIndex; } else { // // Test node. // const Vector& testPosition = positions.index2Position(n.testPositionIndex); setVisitedFlags(ni.liveSet, testPosition, true); int nrMatchArcs = n.sons.length(); n.freeNetIndex = freeNet.allocateNode(nrMatchArcs); Vector symbols(nrMatchArcs); Vector targets(nrMatchArcs); Vector saveSlots(nrMatchArcs); for (int i = 0; i < nrMatchArcs; i++) { Symbol* symbol = n.sons[i].label; int target = n.sons[i].target; Assert(symbol != 0, "null symbol"); symbols[i] = symbol; if (dynamic_cast(symbol) != 0 && symbol->arity() > 0) { int slot = allocateSlot(netVec[target]->first.liveSet, testPosition, symbol); SlotMap newMap(slotMap); newMap[n.testPositionIndex] = slot; targets[i] = semiCompileNode(freeNet, target, newMap); saveSlots[i] = slot; } else { targets[i] = semiCompileNode(freeNet, target, slotMap); saveSlots[i] = NONE; } } int neqTarget = (n.neqTarget == NONE) ? 0 : semiCompileNode(freeNet, n.neqTarget, slotMap); int parentIndex = positions.parentIndex(n.testPositionIndex); SlotMap::const_iterator i = slotMap.find(parentIndex); Assert(i != slotMap.end(), "missing slot"); freeNet.fillOutNode(n.freeNetIndex, (*i).second, testPosition[testPosition.length() - 1], symbols, targets, saveSlots, neqTarget); setVisitedFlags(ni.liveSet, testPosition, false); return n.freeNetIndex; } } void FreePreNet::semiCompile(FreeNet& freeNet) { int nrNodes = netVec.size(); if (nrNodes == 0) return; for (int i = 0; i < nrNodes; i++) netVec[i]->second.freeNetIndex = UNBOUNDED; // can't use NONE because of negatives SlotMap init; init[topPositionIndex] = slots.makeElement(); // allocate slot 0 to start everything off MEMORY ALLOCATED HERE conflicts.resize(1); // slot 0 has no conflicts semiCompileNode(freeNet, 0, init); Vector slotTranslation; int nrRealSlots = buildSlotTranslation(slotTranslation); freeNet.translateSlots(nrRealSlots, slotTranslation); freeNet.buildRemainders(topSymbol->getEquations(), patternsUsed, slotTranslation); } void FreePreNet::setVisitedFlags(const LiveSet& liveSet, const Vector& position, bool state) { FOR_EACH_CONST(i, LiveSet, liveSet) { if (FreeTerm* f = dynamic_cast(patterns[*i].term)) { Term* t = f->locateSubterm(position); if (t != 0 && (f = dynamic_cast(t)) != 0) f->setVisitedFlag(state); } } } int FreePreNet::allocateSlot(const LiveSet& liveSet, const Vector& position, Symbol* symbol) { int slot = slots.makeElement(); conflicts.expandBy(1); Assert(slot == conflicts.length() - 1, "slot/conflict data structures out of sync"); // cerr << symbol << endl; FOR_EACH_CONST(i, LiveSet, liveSet) { // cerr << patterns[*i].term << endl; int patternIndex = *i; Term* pattern = patterns[patternIndex].term; if (FreeTerm* f = dynamic_cast(pattern)) { Term* t = f->locateSubterm(position); if (t != 0 && t->symbol() == symbol) { FreeTerm* ft = safeCast(FreeTerm*, t); int originalSlot = ft->getSlotIndex(); if (originalSlot == NONE) ft->setSlotIndex(slot); else { Assert(originalSlot < slot, "for term " << t << " of pattern " << pattern << "\n which is " << patternIndex << " of " << patterns.size() << " equations belonging to " << topSymbol << "\n original slot = " << originalSlot << " while new slot is = " << slot << " ; this will break union-find"); slots.formUnion(slot, originalSlot); // PROBLEM: originalSlot is 2 but slot is 1 } } f->findActiveSlots(conflicts[slot]); } } return slot; } int FreePreNet::buildSlotTranslation(Vector& slotTranslation) { int nrSlots = slots.elementCount(); slotTranslation.expandTo(nrSlots); for (int i = 0; i < nrSlots; i++) slotTranslation[i] = NONE; // // Build initial slot translation by collapsing slots that must be // equivalent and numbering them 0...nrUnique-1 // int nrUnique = 0; for (int i = 0; i < nrSlots; i++) { if (slotTranslation[i] == NONE) { int rep = slots.findRep(i); int repTrans = slotTranslation[rep]; if (repTrans == NONE) slotTranslation[rep] = repTrans = nrUnique++; slotTranslation[i] = repTrans; } } Assert(slotTranslation[0] == 0, "initial translation failed to preserve slot 0"); // // Now build final slot translation by using graph coloring to collapse // non-conflicting slots and numbering them 0...nrColors-1 // Graph graph(nrUnique); Vector coloring(nrUnique); for (int i = 0; i < nrSlots; i++) { int iTrans = slotTranslation[i]; const NatSet::const_iterator e = conflicts[i].end(); for (NatSet::const_iterator j = conflicts[i].begin(); j != e; ++j) { int cTrans = slotTranslation[*j]; if (iTrans != cTrans) graph.insertEdge(iTrans, cTrans); } } int nrColors = graph.color(coloring); for (int i = 0; i < nrSlots; i++) slotTranslation[i] = coloring[slotTranslation[i]]; Assert(slotTranslation[0] == 0, "final translation failed to preserve slot 0"); return nrColors; } Maude-2.7/src/FreeTheory/freeUnarySymbol.cc0000744000147300135640000000302412225623453015652 00000000000000/* This file is part of the Maude 2 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 FreeUnarySymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" // core class definitions #include "rewritingContext.hh" // free theory class definitions #include "freeUnarySymbol.hh" #include "freeDagNode.hh" FreeUnarySymbol::FreeUnarySymbol(int id) : FreeSymbol(id, 1) { } bool FreeUnarySymbol::eqRewrite(DagNode* subject, RewritingContext& context) { static_cast(subject)->internal[0]->reduce(context); return DISC_NET.applyReplaceFast(subject, context); } Maude-2.7/src/FreeTheory/Makefile.am0000744000147300135640000000267412234064315014257 00000000000000noinst_LIBRARIES = libfreeTheory.a libfreeTheory_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 libfreeTheory_a_SOURCES = \ freeSymbol.cc \ freeUnarySymbol.cc \ freeNullarySymbol.cc \ freeBinarySymbol.cc \ freeTernarySymbol.cc \ freeTerm.cc \ freeArgumentIterator.cc \ freeDagNode.cc \ freeDagArgumentIterator.cc \ freeLhsAutomaton.cc \ freeRhsAutomaton.cc \ freeNet.cc \ freePreNet.cc \ freeRemainder.cc \ freePositionTable.cc \ freeInstruction.cc \ freeFastInstruction.cc \ freeGeneralCtor.cc \ freeGeneralCtorFinal.cc \ freeGeneralExtor.cc \ freeGeneralExtorFinal.cc EXTRA_DIST = \ freeNetExec.cc \ freeTermFullCompiler.cc \ freeLhsCompiler.cc \ freePreNetSubsumption.cc \ freePreNetSemiCompiler.cc \ freePreNetFullCompiler.cc noinst_HEADERS = \ freeArgumentIterator.hh \ freeNullarySymbol.hh \ freeUnarySymbol.hh \ freeBinarySymbol.hh \ freeTernarySymbol.hh \ freeDagArgumentIterator.hh \ freeDagNode.hh \ freeLhsAutomaton.hh \ freeLhsStructs.hh \ freeNet.hh \ freeNetExec.hh \ freeOccurrence.hh \ freePositionTable.hh \ freePreNet.hh \ freeRemainder.hh \ freeRhsAutomaton.hh \ freeSubterm.hh \ freeSymbol.hh \ freeTerm.hh \ freeTheory.hh \ freeInstruction.hh \ freeFastInstruction.hh \ freeGeneralCtor.hh \ freeGeneralCtorFinal.hh \ freeGeneralExtor.hh \ freeGeneralExtorFinal.hh Maude-2.7/src/FreeTheory/freePreNetFullCompiler.cc0000644000147300135640000003164310771610134017104 00000000000000/* This file is part of the Maude 2 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. */ // // Routines to generate C++ code from a FreePreNet // void FreePreNet::allocateVariables(int nodeNr) { NodeMap::iterator nmi = netVec[nodeNr]; const NodeIndex& ni = nmi->first; NodeBody& n = nmi->second; // // Allocated slots (which will become temporary pointer variables // r0, r1, r2,... in the final code) for this node and its decendents. // ++n.nrParents; if (n.nrParents > 1) // already done in on different path return; if (ni.reducedFringe.empty()) { // // Remainder node; first make recursive call on child node. // int sonNr = n.nextPattern; if (sonNr == NONE) { if (!(patterns[n.patternIndex].flags & UNFAILING)) ++nrFailParents; } else { allocateVariables(sonNr); slotMapUnion(n.slotMap, sonNr); } // // For each nonfree subterm (exception: variables that are linear, // unused in condition or rhs and are have the maximal sort in an // error free component are ignored) under the skeleton we know that // we tested it's parent and we may have tested the subterm itself. // We now allocate slots so these nonfree subterm are accessable // for matching/sort checking/assignment etc. // Vector& subterms = patterns[n.patternIndex].subterms; int nrSubterms = subterms.length(); for (int i = 0; i < nrSubterms; i++) { int neededPositionIndex = subterms[i].positionIndex(); // // If we already tested the position then we need a slot // for it to avoid reloading the pointer. If we didn't test // it we must have tested its parent and we need a slot to // hold that the parent pointer so we can access the // the dagnode at the position when handling the remainder. // if (!(n.positionsTested.contains(neededPositionIndex))) neededPositionIndex = positions.parentIndex(neededPositionIndex); if (positions.index2Position(neededPositionIndex).length() > 1) { if (findSlot(n.slotMap, neededPositionIndex) == NONE) slotMapInsert(n.slotMap, neededPositionIndex, slots.makeElement()); } } } else { // // Test node; first make recursive calls on all child nodes. // int nrSons = n.sons.length(); for (int i = 0; i < nrSons; i++) { int sonNr = n.sons[i].target; allocateVariables(sonNr); slotMapUnion(n.slotMap, sonNr); } int sonNr = n.neqTarget; if (sonNr != NONE) { allocateVariables(sonNr); slotMapUnion(n.slotMap, sonNr); } else ++nrFailParents; int testParentIndex = positions.parentIndex(n.testPositionIndex); if (positions.index2Position(testParentIndex).length() > 1) { // // In order to access the test position, we need a pointer // to the test positions parent; and since this parent isn't // the root or a top level argument, we need a slot to store // this pointer in. // Assert(n.positionsTested.contains(testParentIndex), "missing parent index"); if (findSlot(n.slotMap, testParentIndex) == NONE) slotMapInsert(n.slotMap, testParentIndex, slots.makeElement()); } } } void FreePreNet::slotMapUnion(Vector& to, int fromNodeNr) { NodeMap::iterator nmi = netVec[fromNodeNr]; const NodeIndex& ni = nmi->first; NodeBody& n = nmi->second; // // Test nodes don't pass upwards a slot mapping for their test position // since they are responsible for filling that slot. // int avoidIndex = ni.reducedFringe.empty() ? NONE : n.testPositionIndex; const Vector& from = n.slotMap; int nrSlots = from.length(); for (int i = 0; i < nrSlots; i++) { int positionIndex = from[i].positionIndex; if (positionIndex != avoidIndex) slotMapInsert(to, positionIndex, from[i].slot); } } void FreePreNet::slotMapInsert(Vector& to, int positionIndex, int slot) { int slot2 = findSlot(to, positionIndex); if (slot2 == NONE) { int nrSlots = to.length(); to.expandBy(1); to[nrSlots].positionIndex = positionIndex; to[nrSlots].slot = slot; } else { if (slot != slot2) slots.formUnion(slot, slot2); // bash conflicting slots for position together } } int FreePreNet::findSlot(const Vector& slotMap, int positionIndex) { int nrSlots = slotMap.length(); for (int i = 0; i < nrSlots; i++) { if (slotMap[i].positionIndex == positionIndex) return slotMap[i].slot; } return NONE; } void FreePreNet::generateCode(CompilationContext& context) { if (net.empty()) { topSymbol->generateCons(context, 1); return; } allocateVariables(0); int nrSlots = slots.elementCount(); slotTranslation.expandTo(nrSlots); for (int i = 0; i < nrSlots; i++) slotTranslation[i] = NONE; int nrDistinctSlots = 0; for (int i = 0; i < nrSlots; i++) { if (slotTranslation[i] == NONE) { int rep = slots.findRep(i); int t = slotTranslation[rep]; if (t == NONE) { t = nrDistinctSlots; ++nrDistinctSlots; slotTranslation[rep] = t; } slotTranslation[i] = t; } } for (int i = 0; i < nrDistinctSlots; i++) context.body() << " Node* r" << i << ";\n"; generateNode(context, 1, 0, false); } void FreePreNet::generatePointer(CompilationContext& context, const Vector& slotMap, int positionIndex) { const Vector& position = positions.index2Position(positionIndex); if (position.length() == 1) context.body() << 'a' << position[0]; else { int slot = findSlot(slotMap, positionIndex); if (slot == NONE) { generatePointer(context, slotMap, positions.parentIndex(positionIndex)); context.body() << "->args[" << position[position.length() - 1] << ']'; } else context.body() << 'r' << slotTranslation[findSlot(slotMap, positionIndex)]; } } void FreePreNet::generatePointer2(CompilationContext& context, const Vector& slotMap, int positionIndex) { // // This function exists because we almost always want to // generate an expression that looks like r1->args[2] rather // than r2; perhaps to assign to r2. // const Vector& position = positions.index2Position(positionIndex); if (position.length() == 1) context.body() << 'a' << position[0]; else { generatePointer(context, slotMap, positions.parentIndex(positionIndex)); context.body() << "->args[" << position[position.length() - 1] << ']'; } } void FreePreNet::generateNode(CompilationContext& context, int indentLevel, int nodeNr, bool nextRemainder) { if (nodeNr == NONE) { ++nrFailVisits; if (nrFailVisits < nrFailParents) { // // Not the last failure for this function so generate a goto. // if (!nextRemainder) context.body() << Indent(indentLevel) << "goto fail;\n"; } else { // // Last failure for this function so generate cons code. // if (nextRemainder || nrFailParents > 1) context.body() << Indent(indentLevel - 1) << "fail:\n"; #ifdef ANNOTATE context.body() << Indent(indentLevel) << "// failure\n"; #endif context.body() << Indent(indentLevel) << "{\n"; topSymbol->generateCons(context, indentLevel + 1); context.body() << Indent(indentLevel) << "}\n"; } } else { NodeMap::iterator nmi = netVec[nodeNr]; const NodeIndex& ni = nmi->first; NodeBody& n = nmi->second; ++n.nrVisits; if (n.nrVisits < n.nrParents) { if (!nextRemainder) context.body() << Indent(indentLevel) << "goto j" << nodeNr << ";\n"; } else { // if (nextRemainder || n.nrParents > 1) HACK context.body() << Indent(indentLevel - 1) << 'j' << nodeNr << ":\n"; if (ni.reducedFringe.empty()) { // // Remainder node. // const Pattern& p = patterns[n.patternIndex]; const Equation* e = topSymbol->getEquations()[n.patternIndex]; #ifdef ANNOTATE context.body() << Indent(indentLevel) << "// " << e << '\n'; #endif context.body() << Indent(indentLevel) << "{\n"; Term* lhs = p.term; Vector varNames(e->getNrRealVariables()); int nrSubterms = p.subterms.length(); // // Generate code to bind free variables. // for (int i = 0; i < nrSubterms; i++) { const FreeSubterm& s = p.subterms[i]; if (s.type() == FreeSubterm::FREE_VARIABLE) { int positionIndex = s.positionIndex(); const Vector& position = positions.index2Position(positionIndex); VariableTerm* vt = static_cast (static_cast(lhs)->locateSubterm(position)); int varIndex = vt->getIndex(); int len = position.length(); if (len == 1) varNames[varIndex] = VariableName('a', position[len - 1]); else { int slot = findSlot(n.slotMap, positionIndex); if (slot == NONE) { context.body() << Indent(indentLevel + 1) << "Node* v" << varIndex << " = "; generatePointer2(context, n.slotMap, positionIndex); context.body() << ";\n"; varNames[varIndex] = VariableName('v', varIndex); } else varNames[varIndex] = VariableName('r', slotTranslation[slot]); } // // Generate code to test sort of node bound to variable // if needed. // Sort* varSort = vt->getSort(); if (!(varSort->errorFreeMaximal())) { context.usedSort(varSort); context.body() << Indent(indentLevel + 1) << "if (!(s" << varSort->getIndexWithinModule() << '[' << varNames[varIndex] << "->flags.sortIndex]))\n"; context.body() << Indent(indentLevel + 2) << "goto "; if (n.nextPattern == NONE) context.body() << "fail;\n"; else context.body() << 'j' << n.nextPattern << ";\n"; } } } // // Generate code to test bound variables. // for (int i = 0; i < nrSubterms; i++) { const FreeSubterm& s = p.subterms[i]; if (s.type() == FreeSubterm::BOUND_VARIABLE) { int positionIndex = s.positionIndex(); const Vector& position = positions.index2Position(positionIndex); VariableTerm* vt = static_cast (static_cast(lhs)->locateSubterm(position)); int varIndex = vt->getIndex(); context.body() << Indent(indentLevel + 1) << "if (compare(" << varNames[varIndex] << ", "; generatePointer(context, n.slotMap, positionIndex); context.body() << ") != 0)\n"; context.body() << Indent(indentLevel + 2) << "goto "; if (n.nextPattern == NONE) context.body() << "fail;\n"; else context.body() << 'j' << n.nextPattern << ";\n"; } } // // Generate code for rhs. // e->getRhs()->generateRhs(context, indentLevel, varNames, topSymbol); context.body() << Indent(indentLevel) << "}\n"; // // Generate code for next remainder. // if (!(patterns[n.patternIndex].flags & UNFAILING)) generateNode(context, indentLevel, n.nextPattern, true); } else { // // Test node. // int slot = findSlot(n.slotMap, n.testPositionIndex); if (slot == NONE) { context.body() << Indent(indentLevel) << "switch ("; generatePointer2(context, n.slotMap, n.testPositionIndex); } else { int trans = slotTranslation[slot]; context.body() << Indent(indentLevel) << 'r' << trans << " = "; generatePointer2(context, n.slotMap, n.testPositionIndex); context.body() << ";\n"; context.body() << Indent(indentLevel) << "switch (r" << trans; } context.body() << "->symbol)\n"; context.body() << Indent(indentLevel + 1) << "{\n"; int nrArcs = n.sons.length(); for (int i = 0; i < nrArcs; i++) { Arc& a = n.sons[i]; context.body() << Indent(indentLevel + 1) << "case " << a.label->getIndexWithinModule() << ':'; #ifdef ANNOTATE context.body() << " // " << a.label; #endif context.body() <<'\n'; generateNode(context, indentLevel + 2, a.target, false); } context.body() << Indent(indentLevel + 1) << "default:\n"; generateNode(context, indentLevel + 2, n.neqTarget, false); context.body() << Indent(indentLevel + 1) << "}\n"; } } } } Maude-2.7/src/FreeTheory/freeLhsAutomaton.hh0000644000147300135640000000415407666302714016031 00000000000000/* This file is part of the Maude 2 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 free theory. // #ifndef _freeLhsAutomaton_hh_ #define _freeLhsAutomaton_hh_ #include "lhsAutomaton.hh" #include "freeLhsStructs.hh" class FreeLhsAutomaton : public LhsAutomaton, private FreeLhsStructs { NO_COPYING(FreeLhsAutomaton); public: FreeLhsAutomaton(const Vector& freeSymbols, const Vector& uncertainVars, const Vector& boundVars, const Vector& gndAliens, const Vector& nonGndAliens, const Vector& bestSequence, const Vector& subAutomata); ~FreeLhsAutomaton(); bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: struct FreeSubterm { int position; int argIndex; Symbol* symbol; int saveIndex; // for left->right sharing }; Symbol* topSymbol; Vector stack; Vector freeSubterms; Vector uncertainVariables; Vector boundVariables; Vector groundAliens; Vector nonGroundAliens; }; #endif Maude-2.7/src/FreeTheory/freePreNetSubsumption.cc0000644000147300135640000001144411062327473017041 00000000000000/* This file is part of the Maude 2 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 deciding subsumption of one pattern by another when // both patterns have free symbols on top, and all free symbols in // either pattern that are not at or below the reduced fringe have // been seen in the subject. // // The notion of subsumption used here is that the subsumer subsumes // the victim if every subject containing the seen free symbols that // matches the victim also matches the subsumer. // bool FreePreNet::subsumesWrtReducedFringe(Term* subsumer, Term* victim, int currentPositionIndex, const NatSet& reducedFringe) { if (!(reducedFringe.contains(currentPositionIndex))) { // // We haven't reached the fringe so we must be in part of the term that // has been matched on our current arc. // if (FreeTerm* sf = dynamic_cast(subsumer)) { // // Current position is not at or below reduced fringe and subsumer // subterm has a free symbol on top. // Therefore this free symbol will have been matched in // the subject and we may be able to do better than naive subsumption. // FreeTerm* vf = dynamic_cast(victim); if (vf != 0) { Assert(sf->symbol() == vf->symbol(), "free symbol clash"); // // victim subterm has the same free symbol on top; check if // subsumers arguments subsume victims arguments. // Vector argPosition(positions.index2Position(currentPositionIndex)); int newComponent = argPosition.length(); argPosition.expandBy(1); ArgumentIterator subsumerArgs(*subsumer); ArgumentIterator victimArgs(*victim); for (int i = 0; subsumerArgs.valid(); i++) { argPosition[newComponent] = i; if (!(subsumesWrtReducedFringe(subsumerArgs.argument(), victimArgs.argument(), positions.position2Index(argPosition), reducedFringe))) return false; subsumerArgs.next(); victimArgs.next(); } return true; } else { // // We treat the victims subterm as being a variable // of the victims subterms sort, and try to subsume it. // return subsumesWrtReducedFringe(sf, victim->getSort()->getLeqSorts(), currentPositionIndex, reducedFringe); } } } return subsumer->subsumes(victim, false); // can't do any better naive subsumption } // // Try to subsume a (generalized) variable (represented by a set // of sorts) with free subterm. This situation occurs in // at least one base case for all subsumptions wrt a reduced fringe // that are not naive subsumptions. // bool FreePreNet::subsumesWrtReducedFringe(Term* subsumer, const NatSet& rangeSorts, int currentPositionIndex, const NatSet& reducedFringe) { if (!(reducedFringe.contains(currentPositionIndex))) { // // We haven't reached the fringe so we must be in part of the term that // has been matched on our current arc. // if (dynamic_cast(subsumer) != 0) { Symbol* symbol = subsumer->symbol(); int nrArgs = symbol->arity(); Vector domainSorts(nrArgs); symbol->computePossibleDomainSorts(rangeSorts, domainSorts); Vector argPosition(positions.index2Position(currentPositionIndex)); int newComponent = argPosition.length(); argPosition.expandBy(1); ArgumentIterator subsumerArgs(*subsumer); for (int i = 0; subsumerArgs.valid(); i++) { argPosition[newComponent] = i; if (!(subsumesWrtReducedFringe(subsumerArgs.argument(), domainSorts[i], positions.position2Index(argPosition), reducedFringe))) return false; subsumerArgs.next(); } return true; } else if (VariableTerm* v = dynamic_cast(subsumer)) { // // Must be linear and be able to cover all the range sorts. // return (!(v->occursInContext().contains(v->getIndex())) && v->getSort()->getLeqSorts().contains(rangeSorts)); } } return false; } Maude-2.7/src/FreeTheory/freeLhsAutomaton.cc0000644000147300135640000002474311346614070016014 00000000000000/* This file is part of the Maude 2 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 FreeLhsAutomaton. // // 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" // interface class definitions #include "symbol.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 "subproblemAccumulator.hh" #include "substitution.hh" // variable class definitions #include "variableSymbol.hh" #include "variableTerm.hh" // free theory class definitions #include "freeNet.hh" #include "freeSymbol.hh" #include "freeRhsAutomaton.hh" #include "freeOccurrence.hh" #include "freeTerm.hh" #include "freeOccurrence.hh" #include "freeDagNode.hh" #include "freeLhsAutomaton.hh" FreeLhsAutomaton::FreeLhsAutomaton(const Vector& freeSymbols, const Vector& uncertainVars, const Vector& boundVars, const Vector& gndAliens, const Vector& nonGndAliens, const Vector& bestSequence, const Vector& subAutomata) : freeSubterms(freeSymbols.length() - 1), // skip topSymbol uncertainVariables(uncertainVars.length()), boundVariables(boundVars.length()), groundAliens(gndAliens.length()), nonGroundAliens(nonGndAliens.length()) { { // // Free symbol skeleton // FreeTerm* topTerm = static_cast(freeSymbols[0].term()); topSymbol = topTerm->symbol(); topTerm->setSlotIndex(0); int slotNr = 1; int nrFreeSymbols = freeSymbols.length(); for (int i = 1; i < nrFreeSymbols; i++) // skip topSymbol { const FreeOccurrence& oc = freeSymbols[i]; FreeTerm* parent = static_cast(freeSymbols[oc.position()].term()); FreeTerm* term = static_cast(oc.term()); Symbol* symbol = term->symbol(); freeSubterms[i - 1].position = parent->getSlotIndex(); freeSubterms[i - 1].argIndex = oc.argIndex(); freeSubterms[i - 1].symbol = symbol; freeSubterms[i - 1].saveIndex = term->getSaveIndex(); if (symbol->arity() > 0) term->setSlotIndex(slotNr++); } stack.expandTo(slotNr); } { // // Variables that may be bound // int nrUncertainVariables = uncertainVars.length(); for (int i = 0; i < nrUncertainVariables; i++) { const FreeOccurrence& oc = uncertainVars[i]; FreeTerm* parent = static_cast(freeSymbols[oc.position()].term()); VariableTerm* v = safeCast(VariableTerm*, oc.term()); uncertainVariables[i].position = parent->getSlotIndex(); uncertainVariables[i].argIndex = oc.argIndex(); uncertainVariables[i].varIndex = v->getIndex(); uncertainVariables[i].sort = v->getSort(); } } { // // Variables that will be bound // int nrBoundVariables = boundVars.length(); for (int i = 0; i < nrBoundVariables; i++) { const FreeOccurrence& oc = boundVars[i]; FreeTerm* parent = static_cast(freeSymbols[oc.position()].term()); VariableTerm* v = safeCast(VariableTerm*, oc.term()); boundVariables[i].position = parent->getSlotIndex(); boundVariables[i].argIndex = oc.argIndex(); boundVariables[i].varIndex = v->getIndex(); } } { // // Ground alien subterms // int nrGroundAliens = gndAliens.length(); for (int i = 0; i < nrGroundAliens; i++) { const FreeOccurrence& oc = gndAliens[i]; FreeTerm* parent = static_cast(freeSymbols[oc.position()].term()); groundAliens[i].position = parent->getSlotIndex(); groundAliens[i].argIndex = oc.argIndex(); groundAliens[i].alien = oc.term(); } } { // // Non-ground alien subterms // int nrNonGroundAliens = nonGndAliens.length(); for (int i = 0; i < nrNonGroundAliens; i++) { const FreeOccurrence& oc = nonGndAliens[bestSequence[i]]; FreeTerm* parent = static_cast(freeSymbols[oc.position()].term()); nonGroundAliens[i].position = parent->getSlotIndex(); nonGroundAliens[i].argIndex = oc.argIndex(); nonGroundAliens[i].automaton = subAutomata[i]; } } } FreeLhsAutomaton::~FreeLhsAutomaton() { int nrNonGroundAliens = nonGroundAliens.length(); for (int i = 0; i < nrNonGroundAliens; i++) delete nonGroundAliens[i].automaton; } bool FreeLhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* /* extensionInfo */) { if (subject->symbol() != topSymbol) return false; if (topSymbol->arity() == 0) { returnedSubproblem = 0; return true; } Vector::iterator stackBase = stack.begin(); *stackBase = static_cast(subject)->argArray(); if (!freeSubterms.isNull()) { // // Match free symbol skeleton. // Vector::iterator stackPointer = stackBase; const Vector& t = freeSubterms; Vector::const_iterator i = t.begin(); Vector::const_iterator e = t.end(); do { DagNode* d = stackBase[i->position][i->argIndex]; if (d->symbol() != i->symbol) return false; if (i->saveIndex != NONE) solution.bind(i->saveIndex, d); if (i->symbol->arity() != 0) *(++stackPointer) = static_cast(d)->argArray(); } while (++i != e); } if (!uncertainVariables.isNull()) { // // Either bind or check uncertain variables. // const Vector& t = uncertainVariables; Vector::const_iterator i = t.begin(); Vector::const_iterator e = t.end(); do { DagNode* d = stackBase[i->position][i->argIndex]; int v = i->varIndex; DagNode* b = solution.value(v); if (b == 0) { Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "missing sort information (2) for " << d); if (d->leq(i->sort)) solution.bind(v, d); else return false; } else { if (!(d->equal(b))) return false; } } while (++i != e); } if (!boundVariables.isNull()) { // // Check bound variables // const Vector& t = boundVariables; Vector::const_iterator i = t.begin(); Vector::const_iterator e = t.end(); do { if (!(stackBase[i->position][i->argIndex]->equal(solution.value(i->varIndex)))) return false; } while (++i != e); } if (!groundAliens.isNull()) { // // Match ground aliens // const Vector& t = groundAliens; Vector::const_iterator i = t.begin(); Vector::const_iterator e = t.end(); do { if (!(i->alien->equal(stackBase[i->position][i->argIndex]))) return false; } while (++i != e); } if (!nonGroundAliens.isNull()) { // // Match non-ground aliens // Assert(nonGroundAliens.size() > 0, "no nrNonGroundAliens"); SubproblemAccumulator subproblems; const Vector& t = nonGroundAliens; Vector::const_iterator i = t.begin(); Vector::const_iterator e = t.end(); do { Subproblem* subproblem; if (i->automaton->match(stackBase[i->position][i->argIndex], solution, subproblem)) subproblems.add(subproblem); else return false; } while (++i != e); returnedSubproblem = subproblems.extractSubproblem(); } else returnedSubproblem = 0; return true; } #ifdef DUMP void FreeLhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{FreeLhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "topSymbol = \"" << topSymbol << "\"\n"; s << Indent(indentLevel) << "freeSubterms:\n"; ++indentLevel; for (int i = 0; i < freeSubterms.length(); i++) { s << Indent(indentLevel) << "position = " << freeSubterms[i].position << "\targIndex = " << freeSubterms[i].argIndex << "\tsymbol = \"" << freeSubterms[i].symbol << "\"\tsaveIndex = " << freeSubterms[i].saveIndex << '\n'; } s << Indent(indentLevel - 1) << "uncertainVariables:\n"; for (int i = 0; i < uncertainVariables.length(); i++) { s << Indent(indentLevel) << "position = " << uncertainVariables[i].position << "\targIndex = " << uncertainVariables[i].argIndex << "\tvarIndex = " << uncertainVariables[i].varIndex << " \"" << variableInfo.index2Variable(uncertainVariables[i].varIndex) << '"'; s << "\tsort = " << uncertainVariables[i].sort << '\n'; } s << Indent(indentLevel - 1) << "boundVariables:\n"; for (int i = 0; i < boundVariables.length(); i++) { s << Indent(indentLevel) << "position = " << boundVariables[i].position << "\targIndex = " << boundVariables[i].argIndex << "\tvarIndex = " << boundVariables[i].varIndex << " \"" << variableInfo.index2Variable(boundVariables[i].varIndex) << '"'; s << '\n'; } s << Indent(indentLevel - 1) << "groundAliens:\n"; for (int i = 0; i < groundAliens.length(); i++) { s << Indent(indentLevel) << "position = " << groundAliens[i].position << "\targIndex = " << groundAliens[i].argIndex << "\talien = " << groundAliens[i].alien << '\n'; } s << Indent(indentLevel - 1) << "nonGroundAliens:\n"; for (int i = 0; i < nonGroundAliens.length(); i++) { s << Indent(indentLevel) << "position = " << nonGroundAliens[i].position << "\targIndex = " << nonGroundAliens[i].argIndex << "\tautomaton =\n"; nonGroundAliens[i].automaton->dump(s, variableInfo, indentLevel + 1); } s << Indent(indentLevel - 2) << "End{FreeLhsAutomaton}\n"; } #endif Maude-2.7/src/FreeTheory/freeGeneralExtor.hh0000744000147300135640000000263312277026552016010 00000000000000/* This file is part of the Maude 2 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 non-final extor for free symbols having > 3 arguments or non simple behavior. // #ifndef _freeGeneralExtor_hh_ #define _freeGeneralExtor_hh_ #include "nonFinalExtor.hh" class FreeGeneralExtor : public NonFinalExtor { NO_COPYING(FreeGeneralExtor); public: FreeGeneralExtor(FreeSymbol* symbol, const Vector& argumentSlots, int destIndex, Instruction* nextInstruction); void execute(StackMachine* machine) const; #ifdef DUMP //void dump(ostream& s, int indentLevel); #endif private: FreeSymbol* const symbol; Vector args; }; #endif Maude-2.7/src/FreeTheory/freeGeneralCtor.cc0000744000147300135640000000455112232626473015604 00000000000000/* This file is part of the Maude 2 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 FreeGeneralCtor. // // 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" // free theory class definitions #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeGeneralCtor.hh" FreeGeneralCtor::FreeGeneralCtor(FreeSymbol* symbol, const Vector& argumentSlots, int destinationIndex, Instruction* nextInstruction) : NonFinalCtor(destinationIndex, nextInstruction), symbol(symbol), args(argumentSlots.size()) { int nrArgs = argumentSlots.size(); for (int i = 0; i < nrArgs; ++i) args[i] = argumentSlots[i]; } void FreeGeneralCtor::execute(StackMachine* machine) const { // // Get the stack frame containing the pointer to us. // Frame* frame = machine->getTopFrame(); // // Use the special new(NONE) allocator that sets the reduced flag at creation. // FreeDagNode* d = new(NONE) FreeDagNode(symbol); // // Fill out arguments and sort. // int nrArgs = d->symbol()->arity(); DagNode** argArray = d->argArray(); int state = 0; for (int i = 0; i < nrArgs; ++i) { DagNode* a = frame->getSlot(args[i]); int t = a->getSortIndex(); state = symbol->traverse(state, t); argArray[i] = a; } d->setSortIndex(state); // // Finish up using parent class code. // saveResultAndContinue(machine, frame, d); } Maude-2.7/src/FreeTheory/freeSubterm.hh0000644000147300135640000000307507666302714015035 00000000000000/* This file is part of the Maude 2 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 subterms occurring under free skeleton. // #ifndef _freeSubterm_hh_ #define _freeSubterm_hh_ class FreeSubterm { public: enum Type { FREE_VARIABLE, BOUND_VARIABLE, GROUND_ALIEN, NON_GROUND_ALIEN }; FreeSubterm() {} // needed for Vector FreeSubterm(Type type, int positionIndex); Type type() const; int positionIndex() const; private: Type subtermType; int subtermPositionIndex; }; inline FreeSubterm::FreeSubterm(Type type, int positionIndex) { subtermType = type; subtermPositionIndex = positionIndex; } inline FreeSubterm::Type FreeSubterm::type() const { return subtermType; } inline int FreeSubterm::positionIndex() const { return subtermPositionIndex; } #endif Maude-2.7/src/FreeTheory/freePreNet.hh0000744000147300135640000001601112232342025014564 00000000000000/* This file is part of the Maude 2 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 abstract discrimination nets for the free theory which can // be use to produce a FreeNet for interpretation or compiled to C++. // #ifndef _freePreNet_hh_ #define _freePreNet_hh_ #include #include #include "unionFind.hh" #include "freePositionTable.hh" #include "freeSubterm.hh" class FreePreNet { NO_COPYING(FreePreNet); public: FreePreNet(bool expandRemainderNodes); void buildNet(FreeSymbol* symbol); #ifdef COMPILER void generateCode(CompilationContext& context); int generateCode(CompilationContext& context, bool& tailRecursive) const; #endif #ifdef DUMP void dump(ostream& s, int indentLevel = 0) const; #endif void semiCompile(FreeNet& freeNet); private: typedef set LiveSet; // live sets can be very sparse so don't use NatSet typedef map SlotMap; enum Flags { // // Pattern is a free skeleton with linear, error free maximal variables, // and is also a subsumer. Such a pattern must match if the free skeleton // matches. // UNFAILING = 1, // // Pattern does not have a condition associated with it and hence can subsume // other patterns. // SUBSUMER = 2 }; struct Pattern { Term* term; int flags; Vector subterms; }; struct Arc { Symbol* label; // symbol at test position; 0 denotes ? arc int target; // index of target if this symbol found }; struct Pair { int positionIndex; int slot; }; struct NodeIndex { bool operator<(const NodeIndex& other) const; LiveSet liveSet; // set of indices to live patterns NatSet reducedFringe; // set of indices to positions in reduced fringe }; struct NodeBody { NatSet positionsTested; // set of indices to positions tested on all paths to this node Vector sons; // exiting arcs, empty denotes terminal node union { int neqTarget; // exiting arc for ? case in test node int nextPattern; // sole exiting arc in remainder node }; union { int testPositionIndex; // test position in test node int patternIndex; // pattern index in remainder node }; Vector slotMap; int nodeNr; // // Only used for semi-compiler. // int freeNetIndex; // // Only used for full compiler. // int nrParents; int nrVisits; }; typedef map NodeMap; /* struct Node { LiveSet liveSet; // set of indices to live patterns NatSet reducedFringe; // set of indices to positions in reduced fringe NatSet positionsTested; // set of indices to positions tested on all paths to this node Vector sons; // exiting arcs, empty denotes terminal node union { int neqTarget; // exiting arc for ? case in test node int nextPattern; // sole exiting arc in remainder node }; union { int testPositionIndex; // test position in test node int patternIndex; // pattern index in remainder node }; Vector slotMap; // // Only used for semi-compiler. // int freeNetIndex; // // Only used for full compiler. // int nrParents; int nrVisits; }; */ int makeNode(const LiveSet& liveSet, const NatSet& reducedFringe, const NatSet& positionsTested); void expandFringe(int positionIndex, Symbol* symbol, NatSet& fringe); void reduceFringe(const LiveSet& liveSet, NatSet& fringe) const; void findLiveSet(const LiveSet& original, int positionIndex, Symbol* symbol, const NatSet& fringe, LiveSet& liveSet); void partitionLiveSet(const LiveSet& original, int positionIndex, const Vector& arc, Vector& liveSets, LiveSet& defaultLiveSet); bool partiallySubsumed(const LiveSet& liveSet, int victim, const NatSet& fringe); int findBestPosition(const NodeIndex& ni, NodeBody& n) const; bool subsumesWrtReducedFringe(Term* subsumer, Term* victim, int currentPositionIndex, const NatSet& reducedFringe); bool subsumesWrtReducedFringe(Term* subsumer, const NatSet& rangeSorts, int currentPositionIndex, const NatSet& reducedFringe); // // Semi-compiler stuff. // int semiCompileNode(FreeNet& freeNet, int nodeNr, const SlotMap& slotMap); void setVisitedFlags(const LiveSet& liveSet, const Vector& position, bool state); int allocateSlot(const LiveSet& liveSet, const Vector& position, Symbol* symbol); int buildSlotTranslation(Vector& slotTranslation); #ifdef COMPILER void allocateVariables(int nodeNr); void slotMapUnion(Vector& to, int fromNodeNr); void slotMapInsert(Vector& to, int positionIndex, int slot); int findSlot(const Vector& slotMap, int positionIndex); // void deleteSlot(Vector& slotMap, int positionIndex); void generateNode(CompilationContext& context, int indentLevel, int nodeNr, bool nextRemainder); void generatePointer(CompilationContext& context, const Vector& slotMap, int positionIndex); void generatePointer2(CompilationContext& context, const Vector& slotMap, int positionIndex); #endif #ifdef DUMP static void dumpNatSet(ostream& s, const NatSet& natSet); static void dumpLiveSet(ostream& s, const LiveSet& natSet); static void dumpPath(ostream& s, const Vector& path); void dumpPositionSet(ostream& s, const NatSet& positionSet) const; void dumpSlotMap(ostream& s, const Vector& slotMap) const; #endif const bool expandRemainderNodes; // must be true for full compilation Vector patterns; NodeMap net; Vector netVec; FreePositionTable positions; FreeSymbol* topSymbol; int topPositionIndex; // // Slot allocation for both semi and full compilers. // UnionFind slots; // // Only used for semi-complier. // Vector conflicts; LiveSet patternsUsed; // // Only used for full compiler. // int nrFailParents; int nrFailVisits; Vector slotTranslation; }; inline bool FreePreNet::NodeIndex::operator<(const NodeIndex& other) const { if (liveSet < other.liveSet) return true; if (other.liveSet < liveSet) return false; return reducedFringe < other.reducedFringe; } #endif Maude-2.7/src/FreeTheory/freeFastInstruction.hh0000744000147300135640000000351512273047716016551 00000000000000/* This file is part of the Maude 2 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 instruction for a free symbols that have 0 to 3 arguments and only fast equations (if any). // This might be combined with FreeInstruction at some point. // #ifndef _freeFastInstruction_hh_ #define _freeFastInstruction_hh_ #include "freeInstruction.hh" class FreeFastInstruction : public FreeInstruction { NO_COPYING(FreeFastInstruction); public: FreeFastInstruction(FreeSymbol* symbol, int destIndex, Instruction* nextInstruction); FreeFastInstruction(FreeSymbol* symbol, int argIndex0, int destIndex, Instruction* nextInstruction); FreeFastInstruction(FreeSymbol* symbol, int argIndex0, int argIndex1, int destIndex, Instruction* nextInstruction); FreeFastInstruction(FreeSymbol* symbol, int argIndex0, int argIndex1, int argIndex2, int destIndex, Instruction* nextInstruction); #ifdef DUMP //void dump(ostream& s, int indentLevel); #endif private: const SlotIndex argIndex0; const SlotIndex argIndex1; const SlotIndex argIndex2; friend class FreeInstruction; }; #endif Maude-2.7/src/FreeTheory/freeBinarySymbol.cc0000744000147300135640000000313412225622731016000 00000000000000/* This file is part of the Maude 2 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 FreeUnarySymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" // core class definitions #include "rewritingContext.hh" // free theory class definitions #include "freeBinarySymbol.hh" #include "freeDagNode.hh" FreeBinarySymbol::FreeBinarySymbol(int id) : FreeSymbol(id, 2) { } bool FreeBinarySymbol::eqRewrite(DagNode* subject, RewritingContext& context) { static_cast(subject)->internal[0]->reduce(context); static_cast(subject)->internal[1]->reduce(context); return DISC_NET.applyReplaceFast(subject, context); } Maude-2.7/src/FreeTheory/freeGeneralCtor.hh0000744000147300135640000000260312232626752015612 00000000000000/* This file is part of the Maude 2 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 non-final instruction for free symbols having > 3 arguments. // #ifndef _freeGeneralCtor_hh_ #define _freeGeneralCtor_hh_ #include "nonFinalCtor.hh" class FreeGeneralCtor : public NonFinalCtor { NO_COPYING(FreeGeneralCtor); public: FreeGeneralCtor(FreeSymbol* symbol, const Vector& argumentSlots, int destIndex, Instruction* nextInstruction); void execute(StackMachine* machine) const; #ifdef DUMP //void dump(ostream& s, int indentLevel); #endif private: FreeSymbol* const symbol; Vector args; }; #endif Maude-2.7/src/Temporal/0000755000147300135640000000000012305232003011766 500000000000000Maude-2.7/src/Temporal/temporal.hh0000644000147300135640000000215307666300727014102 00000000000000/* This file is part of the Maude 2 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 temporal classes. // #ifndef _temporal_hh_ #define _temporal_hh_ class LogicFormula; class TransitionSet; class RawTransitionSet; class VeryWeakAlternatingAutomaton; class GenBuchiAutomaton; class BuchiAutomaton2; class ModelChecker2; #endif Maude-2.7/src/Temporal/rawTransitionSet.cc0000644000147300135640000000353407666300727015571 00000000000000/* This file is part of the Maude 2 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 RawTransitionSet. // #include // utility stuff #include "macros.hh" #include "vector.hh" // temporal class definitions #include "rawTransitionSet.hh" RawTransitionSet::RawTransitionSet(const TransitionSet& transitionSet) { const TransitionSet::TransitionMap& tm = transitionSet.getMap(); copy(tm.begin(), tm.end(), inserter(*this, begin())); } RawTransitionSet::RawTransitionSet(const RawTransitionSet& ts1, const RawTransitionSet& ts2) { // // Construct the raw product of the two argument transition sets. // const const_iterator ie = ts1.end(); const const_iterator je = ts2.end(); Transition newTransition; for (const_iterator i = ts1.begin(); i != ie; ++i) { for (const_iterator j = ts2.begin(); j != je; ++j) { newTransition.second = bdd_and(i->second, j->second); if (newTransition.second != bdd_false()) { newTransition.first = i->first; newTransition.first.insert(j->first); insert(newTransition); } } } } Maude-2.7/src/Temporal/veryWeakAlternatingAutomaton.cc0000644000147300135640000001620507704653237020126 00000000000000/* This file is part of the Maude 2 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 VeryWeakAlternatingAutomaton. // #include // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "temporal.hh" // temporal class definitions #include "logicFormula.hh" #include "veryWeakAlternatingAutomaton.hh" VeryWeakAlternatingAutomaton::VeryWeakAlternatingAutomaton(LogicFormula* formula, int top) : states(top + 1), formula(formula), renaming(top + 1) { dnf(top, initialStates); #ifdef TDEBUG dump(cout); #endif reachabilityOpt(); #ifdef TDEBUG dump(cout); #endif } void VeryWeakAlternatingAutomaton::dnf(int subformulaIndex, TransitionSet& result) { // // Compute a disjunction of conjunctions of states. For convenience // we store this set of conjunctions of states as a set of transitions // where each conjunction is a transition (hyperarc) with the label true. // We also call computeTransitionSet() on all reachable states. // switch (formula->getOp(subformulaIndex)) { case LogicFormula::AND: { TransitionSet left; dnf(formula->getArg(subformulaIndex, 0), left); TransitionSet right; dnf(formula->getArg(subformulaIndex, 1), right); result.product(left, right); break; } case LogicFormula::OR: { dnf(formula->getArg(subformulaIndex, 0), result); TransitionSet right; dnf(formula->getArg(subformulaIndex, 1), right); result.insert(right); break; } default: { Transition t; t.first.insert(subformulaIndex); t.second = bdd_true(); result.insert(t); computeTransitionSet(subformulaIndex); // reachable } } } void VeryWeakAlternatingAutomaton::computeTransitionSet(int subformulaIndex) { TransitionSet& result = states[subformulaIndex]; if (!(result.getMap().empty())) return; // already computed (actually we miss false case - but false case does nothing) LogicFormula::Op op = formula->getOp(subformulaIndex); switch (op) { case LogicFormula::PROPOSITION: { Transition t; t.second = ithvar(formula->getProp(subformulaIndex)); result.insert(t); break; } case LogicFormula::LTL_TRUE: { Transition t; t.second = bdd_true(); result.insert(t); break; } case LogicFormula::LTL_FALSE: break; // empty transition set case LogicFormula::NOT: { Transition t; t.second = nithvar(formula->getProp(formula->getArg(subformulaIndex, 0))); result.insert(t); break; } case LogicFormula::NEXT: { dnf(formula->getArg(subformulaIndex, 0), result); break; } default: { int leftIndex = formula->getArg(subformulaIndex, 0); int rightIndex = formula->getArg(subformulaIndex, 1); computeTransitionSet(leftIndex); computeTransitionSet(rightIndex); const TransitionSet& left = states[leftIndex]; const TransitionSet& right = states[rightIndex]; switch (op) { case LogicFormula::AND: { result.product(left, right); break; } case LogicFormula::OR: { result = left; // deep copy result.insert(right); break; } default: { Transition t; t.first.insert(subformulaIndex); t.second = bdd_true(); if (op == LogicFormula::UNTIL) { TransitionSet self; self.insert(t); result.product(left, self); result.insert(right); finalStates.append(subformulaIndex); } else { Assert(op == LogicFormula::RELEASE, "bad op"); TransitionSet sum(left); sum.insert(t); result.product(sum, right); } } } } } } void VeryWeakAlternatingAutomaton::reachabilityOpt() { int nrStates = states.length(); nrNewStates = 0; for (int i = 0; i < nrStates; i++) renaming[i] = NONE; findReachable(initialStates); TransitionSet newInitialStates; newInitialStates.rename(initialStates, renaming); initialStates.swap(newInitialStates); Vector newStates(nrNewStates); for (int i = 0; i < nrStates; i++) { int newName = renaming[i]; if (newName != NONE) newStates[newName].rename(states[i], renaming); } states.swap(newStates); Vector newFinalStates; int nrFinalStates = finalStates.length(); for (int i = 0; i < nrFinalStates; i++) { int newName = renaming[finalStates[i]]; if (newName != NONE) newFinalStates.append(newName); } finalStates.swap(newFinalStates); } void VeryWeakAlternatingAutomaton::findReachable(const TransitionSet& ts) { const TransitionSet::TransitionMap& tm = ts.getMap(); TransitionSet::TransitionMap::const_iterator ei = tm.end(); for (TransitionSet::TransitionMap::const_iterator i = tm.begin(); i != ei; ++i) { NatSet::const_iterator ej = i->first.end(); for (NatSet::const_iterator j = i->first.begin(); j != ej; ++j) { int k = *j; if (renaming[k] == NONE) { renaming[k] = nrNewStates++; findReachable(states[k]); } } } } bool VeryWeakAlternatingAutomaton::checkFairness(const Transition& transition, int finalStateIndex) const { if (!(transition.first.contains(finalStateIndex))) return true; const TransitionSet::TransitionMap& tm = states[finalStateIndex].getMap(); TransitionSet::TransitionMap::const_iterator e = tm.end(); for (TransitionSet::TransitionMap::const_iterator i = tm.begin(); i != e; ++i) { if (!(i->first.contains(finalStateIndex)) && // no self loop transition.first.contains(i->first) && // contained in test transition transition.second.implies(i->second)) // implied by test transition return true; } return false; } void VeryWeakAlternatingAutomaton::computeFairnessSet(const Transition& transition, NatSet& fairnessSet) { int nrFinalsStates = finalStates.length(); for (int i = 0; i < nrFinalsStates; i++) { if (checkFairness(transition, finalStates[i])) fairnessSet.insert(i); } } void VeryWeakAlternatingAutomaton::dump(ostream& s) const { s << "begin{VeryWeakAlternatingAutomaton}\n"; int nrFinalStates = finalStates.length(); int nrStates = states.length(); for (int i = 0; i < nrStates; i++) { s << "state " << i; for (int j = 0 ; j < nrFinalStates; j++) { if (finalStates[j] == i) { s << "\tfinal"; break; } } s << '\n'; states[i].dump(s); s << '\n'; } s << "initial state conjunctions\n"; initialStates.dump(s); s << "end{VeryWeakAlternatingAutomaton}\n"; } Maude-2.7/src/Temporal/sccAnalysis.cc0000644000147300135640000001274307666300727014527 00000000000000/* This file is part of the Maude 2 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 strongly connected component analysis. // void GenBuchiAutomaton::sccAnalysis() { // // First we partition the graph of states into strongly connected // components, assigning a component number to each state in such // a way that components can only reach lower numbered components. // int nrStates = states.length(); stateInfo.expandTo(nrStates); for (int i = 0; i < nrStates; i++) stateInfo[i].traversalNumber = 0; traversalCount = 0; componentCount = 0; const NatSet::const_iterator e = initialStates.end(); for (NatSet::const_iterator i = initialStates.begin(); i != e; ++i) strongConnected(*i); // // Then we analyse each component to see if it is fair, unfair or dead. // For fair components, we also compute a set of redundant fairness sets; // non-redundant fairness sets in fair components have their indices // inserted into essential. // componentInfo.expandTo(componentCount); for (int i = 0; i < componentCount; i++) { handleComponent(i); #ifdef TDEBUG static const char* const text[] = {"dead", "unfair", "fair"}; cout << "Component " << i << "\tstatus: " << text[componentInfo[i].status] << "\tredundant fair sets" << componentInfo[i].redundant << endl; #endif } #ifdef TDEBUG cout << "essential fairness " << essential << endl; #endif } int GenBuchiAutomaton::strongConnected(int v) { // // Push state v on the stack and give it a traversal order number. // stateStack.push(v); int vLowLink = ++traversalCount; stateInfo[v].traversalNumber = vLowLink; // // Examine each outgoing arc from state v. // const FairTransitionSet& fts = fairTransitionSets.ithElement(states[v]); FairTransitionSet::const_iterator e = fts.end(); for(FairTransitionSet::const_iterator i = fts.begin(); i != e; ++i) { int w = i->first.first; int wNumber = stateInfo[w].traversalNumber; if (wNumber == 0) { // // Tree arc. // int wLowLink = strongConnected(w); if (wLowLink < vLowLink) vLowLink = wLowLink; } else { if (wNumber < vLowLink) // implies wNumber < stateInfo[v].traversalNumber; vLowLink = wNumber; // i.e. cross-link or frond } } if (stateInfo[v].traversalNumber == vLowLink) { // // Root of a new SCC; remove SCC from stack. // #ifdef TDEBUG cout << "Component " << componentCount << endl; #endif int i; do { i = stateStack.top(); stateStack.pop(); #ifdef TDEBUG cout << i << ' '; #endif stateInfo[i].traversalNumber = INT_MAX; // mark as no longer in stack stateInfo[i].component = componentCount; } while (i != v); #ifdef TDEBUG cout << endl; #endif ++componentCount; } return vLowLink; } void GenBuchiAutomaton::handleComponent(int number) { // // implies[i] is the set of indices of fairness sets implied by // the ith fairness set. We start with everything and remove // contradictions for each internal transition. // Vector implies(nrFairnessSets); for (int i = 0; i < nrFairnessSets; i++) implies[i] = allFair; NatSet sum; bool reachLiveScc = false; bool hasInternalTransitions = false; // to detect degenerate SCCs int nrStates = states.length(); for (int i = 0; i < nrStates; i++) { if (stateInfo[i].component == number) { const FairTransitionSet& fts = fairTransitionSets.ithElement(states[i]); FairTransitionSet::const_iterator e = fts.end(); for(FairTransitionSet::const_iterator j = fts.begin(); j != e; ++j) { int target = j->first.first; int targetComponentNr = stateInfo[target].component; if (targetComponentNr == number) { // // Internal transition. // hasInternalTransitions = true; const NatSet& fairness = fairnessConditions.ithElement(j->first.second); sum.insert(fairness); for (int k = 0; k < nrFairnessSets; k++) { if (fairness.contains(k)) implies[k].intersect(fairness); } } else { // // External transition. // Assert(targetComponentNr < number, "SCC partial order problem"); if (componentInfo[targetComponentNr].status != DEAD) reachLiveScc = true; } } } } if (!hasInternalTransitions || sum != allFair) { componentInfo[number].status = reachLiveScc ? UNFAIR : DEAD; return; } componentInfo[number].status = FAIR; NatSet& redundant = componentInfo[number].redundant; for (int i = 0; i < nrFairnessSets; i++) { if (!(redundant.contains(i))) { implies[i].subtract(i); redundant.insert(implies[i]); }; } NatSet used(allFair); used.subtract(redundant); essential.insert(used); } Maude-2.7/src/Temporal/modelChecker2.cc0000644000147300135640000001274707666300727014726 00000000000000/* This file is part of the Maude 2 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 ModelChecker2. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "temporal.hh" // utility class definitions #include "modelChecker2.hh" ModelChecker2::ModelChecker2(System& system, LogicFormula& property, int top) : system(system), propertyAutomaton(&property, top) { Verbose("ModelChecker: Property automaton has " << propertyAutomaton.getNrStates() << " states."); } bool ModelChecker2::findCounterexample() { intersectionStates.expandTo(1); const NatSet& initialStates = propertyAutomaton.getInitialStates(); const NatSet::const_iterator e = initialStates.end(); for (NatSet::const_iterator i = initialStates.begin(); i != e; ++i) { if (dfs1PropertyTransitions(0, *i)) return true; } return false; } // // First depth first search: find all reachable accepting states // in the intersection (synchronous product). // local_inline bool ModelChecker2::dfs1SystemTransitions(int systemStateNr, int propertyStateNr) { intersectionStates[systemStateNr].dfs1Seen.insert(propertyStateNr); for (int i = 0;; i++) { int n = system.getNextState(systemStateNr, i); if (n == NONE) break; if (n >= intersectionStates.length()) intersectionStates.expandTo(n + 1); if (dfs1PropertyTransitions(n, propertyStateNr)) return true; } return false; } bool ModelChecker2::dfs1PropertyTransitions(int systemStateNr, int propertyStateNr) { const BuchiAutomaton2::TransitionMap& tMap = propertyAutomaton.getTransitions(propertyStateNr); BuchiAutomaton2::TransitionMap::const_iterator e = tMap.end(); for (BuchiAutomaton2::TransitionMap::const_iterator i = tMap.begin(); i != e; ++i) { if (satisfiesPropositionalFormula(systemStateNr, i->second)) { int newPropertyStateNr = i->first; StateSet& s = intersectionStates[systemStateNr]; if (!(s.dfs1Seen.contains(newPropertyStateNr))) { s.onDfs1Stack.insert(newPropertyStateNr); if (dfs1SystemTransitions(systemStateNr, newPropertyStateNr) || (propertyAutomaton.isAccepting(newPropertyStateNr) && dfs2SystemTransitions(systemStateNr, newPropertyStateNr))) { path.push_front(systemStateNr); if (systemStateNr == cycleSystemStateNr && newPropertyStateNr == cyclePropertyStateNr) cycle.swap(path); return true; } intersectionStates[systemStateNr].onDfs1Stack.subtract(newPropertyStateNr); } } } return false; } // // Second depth first search: look for a path back to an intersection // state on the first DFS stack. // local_inline bool ModelChecker2::dfs2PropertyTransitions(int systemStateNr, int propertyStateNr) { const BuchiAutomaton2::TransitionMap& tMap = propertyAutomaton.getTransitions(propertyStateNr); BuchiAutomaton2::TransitionMap::const_iterator e = tMap.end(); for (BuchiAutomaton2::TransitionMap::const_iterator i = tMap.begin(); i != e; ++i) { if (satisfiesPropositionalFormula(systemStateNr, i->second)) { int newPropertyStateNr = i->first; StateSet& s = intersectionStates[systemStateNr]; if (s.onDfs1Stack.contains(newPropertyStateNr)) { cycleSystemStateNr = systemStateNr; cyclePropertyStateNr = newPropertyStateNr; return true; } if (!(s.dfs2Seen.contains(newPropertyStateNr))) { if (dfs2SystemTransitions(systemStateNr, newPropertyStateNr)) { path.push_front(systemStateNr); return true; } } } } return false; } bool ModelChecker2::dfs2SystemTransitions(int systemStateNr, int propertyStateNr) { intersectionStates[systemStateNr].dfs2Seen.insert(propertyStateNr); for (int i = 0;; i++) { int n = system.getNextState(systemStateNr, i); if (n == NONE) break; Assert(n < intersectionStates.length(), "visited system state for the first time on dfs2"); if (dfs2PropertyTransitions(n, propertyStateNr)) return true; } return false; } bool ModelChecker2::satisfiesPropositionalFormula(int systemStateNr, Bdd formula) { NatSet& testedProps = intersectionStates[systemStateNr].testedProps; NatSet& trueProps = intersectionStates[systemStateNr].trueProps; for(;;) { if (formula == bdd_true()) return true; if (formula == bdd_false()) return false; int propIndex = bdd_var(formula); if (testedProps.contains(propIndex)) formula = trueProps.contains(propIndex) ? bdd_high(formula) : bdd_low(formula); else { testedProps.insert(propIndex); if (system.checkProposition(systemStateNr, propIndex)) { trueProps.insert(propIndex); formula = bdd_high(formula); } else formula = bdd_low(formula); } } } Maude-2.7/src/Temporal/satSolve.cc0000644000147300135640000001536007666300727014051 00000000000000/* This file is part of the Maude 2 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 LTL satisfiability solving. // #include struct GenBuchiAutomaton::Step { Step(); int parent; Bdd formula; }; local_inline GenBuchiAutomaton::Step::Step() { parent = NONE; } bool GenBuchiAutomaton::satSolve(list& leadIn, list& cycle) { #ifdef TDEBUG dump(cout); #endif maximallyCollapseStates(); #ifdef TDEBUG dump(cout); #endif sccAnalysis(); int nrComponents = componentInfo.length(); for (int i = 0; i < nrComponents; i++) { if (componentInfo[i].status == FAIR) { // // First we find a shortest path to a state in a fair component. // leadIn.clear(); cycle.clear(); int fairState; bfsToFairComponent(fairState, leadIn); // // Now we need to find a path within this component with // transitions satisfying each of the fairness conditions. // We try to minimize the length of this path by only looking // for subpaths that satisfy at least one additional non-redundant // fairness condition. // int currentState = fairState; NatSet fairness(componentInfo[stateInfo[fairState].component].redundant); while (fairness != allFair) { list path; bfsToMoreFairness(fairness, currentState, path); cycle.splice(cycle.end(), path); } // // Finally we need to complete the cycle. // if (currentState != fairState || cycle.empty()) { list path; bfsToTarget(currentState, fairState, path); cycle.splice(cycle.end(), path); } // // We now see if the lead-in can be "rolled" into the cycle. // while (!(leadIn.empty()) && cycle.back().implies(leadIn.back())) { // // Last formula of cycle implies last formula of leadIn // so right-rotate cycle and delete last formula of leadIn. // cycle.splice(cycle.begin(), cycle, --(cycle.end())); leadIn.pop_back(); } return true; } } return false; } void GenBuchiAutomaton::bfsToFairComponent(int& fairState, list& path) const { // // Find a (possibly empty) shortest path to a state in a fair component. // Vector steps(states.length()); queue toVisit; const NatSet::const_iterator e = initialStates.end(); for (NatSet::const_iterator i = initialStates.begin(); i != e; ++i) { int s = *i; if (componentInfo[stateInfo[s].component].status == FAIR) { fairState = s; return; } toVisit.push(s); steps[s].parent = UNBOUNDED; } for (;;) { Assert(!(toVisit.empty()), "toVisit empty"); int stateNr = toVisit.front(); toVisit.pop(); const FairTransitionSet& fts = fairTransitionSets.ithElement(states[stateNr]); FairTransitionSet::const_iterator e = fts.end(); for(FairTransitionSet::const_iterator i = fts.begin(); i != e; ++i) { int s = i->first.first; if (componentInfo[stateInfo[s].component].status == FAIR) { fairState = s; path.push_front(i->second); for(;;) { const Step& step = steps[stateNr]; stateNr = step.parent; if (stateNr == UNBOUNDED) break; path.push_front(step.formula); } return; } Step& step = steps[s]; if (step.parent == NONE) { step.parent = stateNr; step.formula = i->second; toVisit.push(s); } } } } void GenBuchiAutomaton::bfsToMoreFairness(NatSet& fairness, int& start, list& path) const { // // Staying within the connected component containing start, find a // shortest sequence of transitions that give us additional fairness. // int ourComponent = stateInfo[start].component; Vector steps(states.length()); queue toVisit; toVisit.push(start); steps[start].parent = UNBOUNDED; for (;;) { Assert(!(toVisit.empty()), "toVisit empty"); int stateNr = toVisit.front(); toVisit.pop(); const FairTransitionSet& fts = fairTransitionSets.ithElement(states[stateNr]); FairTransitionSet::const_iterator e = fts.end(); for(FairTransitionSet::const_iterator i = fts.begin(); i != e; ++i) { int s = i->first.first; if (stateInfo[s].component == ourComponent) { const NatSet& arcFairness = fairnessConditions.ithElement(i->first.second); if (!(fairness.contains(arcFairness))) { fairness.insert(arcFairness); start = s; path.push_front(i->second); for(;;) { const Step& step = steps[stateNr]; stateNr = step.parent; if (stateNr == UNBOUNDED) break; path.push_front(step.formula); } return; } Step& step = steps[s]; if (step.parent == NONE) { step.parent = stateNr; step.formula = i->second; toVisit.push(s); } } } } } void GenBuchiAutomaton::bfsToTarget(int start, int target, list& path) const { // // Staying within the connected component containing start, find a // shortest non-empty sequence of transitions that arrives at target. // int ourComponent = stateInfo[start].component; Vector steps(states.length()); queue toVisit; toVisit.push(start); steps[start].parent = UNBOUNDED; for (;;) { Assert(!(toVisit.empty()), "toVisit empty"); int stateNr = toVisit.front(); toVisit.pop(); const FairTransitionSet& fts = fairTransitionSets.ithElement(states[stateNr]); FairTransitionSet::const_iterator e = fts.end(); for(FairTransitionSet::const_iterator i = fts.begin(); i != e; ++i) { int s = i->first.first; if (stateInfo[s].component == ourComponent) { if (s == target) { path.push_front(i->second); for(;;) { const Step& step = steps[stateNr]; stateNr = step.parent; if (stateNr == UNBOUNDED) break; path.push_front(step.formula); } return; } Step& step = steps[s]; if (step.parent == NONE) { step.parent = stateNr; step.formula = i->second; toVisit.push(s); } } } } } Maude-2.7/src/Temporal/ChangeLog0000644000147300135640000002402307704653301013500 000000000000002003-07-14 Steven Eker * veryWeakAlternatingAutomaton.cc (computeTransitionSet): TRUE -> LTL_TRUE, FALSE -> LTL_FALSE * logicFormula.cc: TRUE -> LTL_TRUE, FALSE -> LTL_FALSE * logicFormula.hh (class LogicFormula): TRUE -> LTL_TRUE, FALSE -> LTL_FALSE because TRUE and FALSE are #defined on some platforms ===================================Maude81=========================================== 2003-02-25 Steven Eker * veryWeakAlternatingAutomaton.cc: removed #pragma (computeTransitionSet): updated Assert() * veryWeakAlternatingAutomaton.hh: removed #pragma * transitionSet.cc: removed #pragma (insert): updated Assert() (rename): updated Assert() * transitionSet.hh: removed #pragma * sccAnalysis.cc (handleComponent): updated Assert() * satSolve.cc (bfsToFairComponent): updated Assert() (bfsToMoreFairness): updated Assert() (bfsToTarget): updated Assert() * rawTransitionSet.cc: removed #pragma * rawTransitionSet.hh: removed #pragma * parityGame.cc: removed #pragma (makeNode): updated Assert()s * parityGame.hh: removed #pragma * modelChecker2.cc: removed #pragma (dfs2SystemTransitions): updated Assert() * modelChecker2.hh: removed #pragma * logicFormula.cc: removed #pragma * logicFormula.hh: removed #pragma * genBuchiAutomaton.cc: removed #pragma (getStateIndex): updated Assert() (insertFairTransition): updated Assert()s * genBuchiAutomaton.hh: removed #pragma * collapseStates.cc (transformFairTransitionSet): updated Assert() (insertFairTransition2): updated Assert()s * buchiAutomaton2.cc: removed #pragma * buchiAutomaton2.hh: removed #pragma ===================================Maude79=========================================== 2002-03-01 Steven Eker * parityGame.hh: created * parityGame.cc: created 2002-02-28 Steven Eker * satSolve.cc (satSolve): try to get a shorter cycle by ignoring redundant fairness conditions * modelChecker2.cc (findCounterExample): renamed to findCounterexample() * modelChecker2.hh (class ModelChecker2): findCounterExample() -> findCounterexample() * satSolve.cc (satSolve): use Bdd:implies() * veryWeakAlternatingAutomaton.cc: use Bdd:implies() 2002-02-27 Steven Eker * satSolve.cc (satSolve): added call to maximallyCollapseStates(); in turn out this produce simpler models by combining states that have arcs into a fair SCC with states with self arcs actually in SCC (satSolve): added lead-in roll-into-cycle optimization; does this subsume the advantage of calling maximallyCollapseStates()? * veryWeakAlternatingAutomaton.cc (dnf): added comment as reorder statements in the default case to make this more understandable 2002-02-26 Steven Eker * logicFormula.cc (makeProp): (makeProp): set propositional flag (makeOp): compute propositional flag (structuallyImplies): commented out (structuallyContradicts): commented out (containsNegation): commented out (isNegation): commented out * logicFormula.hh (class LogicFormula): added propositional field to struct Node, made op field short (isPropositional): added (getOp): use cast 2002-02-22 Steven Eker * genBuchiAutomaton.hh (class GenBuchiAutomaton): updated decls for satSolve(), bfsToFairComponent(), bfsToMoreFairness(), bfsToTarget() * satSolve.cc (satSolve): rewritten (bfsToFairComponent): rewritten (bfsToMoreFairness): rewritten (bfsToTarget): rewritten (bfsToMoreFairness): need to make sure we don't leave SCC (bfsToTarget): need to make sure we don't leave SCC 2002-02-21 Steven Eker * genBuchiAutomaton.hh (class GenBuchiAutomaton): added decls for bfsToFairComponent(), bfsToMoreFairness(), bfsToTarget() * satSolve.cc: created * genBuchiAutomaton.hh (class GenBuchiAutomaton): stateCount -> traversalCount; .number -> .traversalNumber * sccAnalysis.cc (strongConnected): stateCount -> traversalCount (sccAnalysis): stateCount -> traversalCount (strongConnected): .number -> .traversalNumber (sccAnalysis): .number -> .traversalNumber * sccOptimizations.cc (sccOptimizations): use sccAnalysis() * genBuchiAutomaton.hh (class GenBuchiAutomaton): added decl for sccAnalysis() * sccAnalysis.cc (sccAnalysis): added (strongConnected): moved here (handleComponent): moved here * genBuchiAutomaton.hh (class GenBuchiAutomaton): added decl for satSolve() * buchiAutomaton2.cc (BuchiAutomaton2): call simplify() on GenBuchiAutomaton * genBuchiAutomaton.hh (class GenBuchiAutomaton): added decls for maximallyCollapseStates() and simplify() * genBuchiAutomaton.cc (simplify): added (GenBuchiAutomaton): optimization code deleted; we now call simplify() if we want to do this stuff; for sat solving we want to do things differently * collapseStates.cc (maximallyCollapseStates): added * genBuchiAutomaton.cc (getStateIndex): added comment * veryWeakAlternatingAutomaton.cc (VeryWeakAlternatingAutomaton): removed commented out code 2002-01-24 Steven Eker * modelChecker2.cc (ModelChecker2): added Verbose() call to print out the number of property automtaton states 2001-12-17 Steven Eker * modelChecker2.cc (dfs1PropertyTransitions): merged 3 if statements into 1 (dfs1SystemTransitions): made local_inline (dfs2PropertyTransitions): made local_inline * collapseStates.cc (collapseStates): use FastPair optimization for inserting fair transition sets into table * sccOptimizations.cc (sccOptimizations): use FastPair optimization for inserting fair transition sets into table * genBuchiAutomaton.cc (generateState): use FastPair optimization for inserting fair transition sets into table * veryWeakAlternatingAutomaton.hh (class VeryWeakAlternatingAutomaton): updated decl for dnf() * veryWeakAlternatingAutomaton.cc (dnf): no longer const * veryWeakAlternatingAutomaton.hh (class VeryWeakAlternatingAutomaton): updated decl for computeTransitionSet() * veryWeakAlternatingAutomaton.cc (dnf): call computeTransitionSet() on subformulas that are reachable from dnf; i.e. there is a transition going to their state in the dnf transition set (computeTransitionSet): don't take result arg; write result directly into state; check to see if state is already computed; recursive calls to compute transition sets for states that we need in out computation (computeTransitionSet): turned op == LogicFormula::RELEASE into an Assert (VeryWeakAlternatingAutomaton): don't iterate over states; they are now computed on demand 2001-12-14 Steven Eker * modelChecker2.cc (findCounterExample): use NatSet::const_iterator (dfs1PropertyTransitions): use pre rather than post increment (dfs2PropertyTransitions): use pre rather than post increment (dfs1PropertyTransitions): use i->foo rather than (*i).foo (dfs2PropertyTransitions): use i->foo rather than (*i).foo * buchiAutomaton2.cc (BuchiAutomaton2): use NatSet::const_iterator (generate): use pre rather than post increment (transformTransitionMap): use pre rather than post increment (hasNonAcceptingTarget): use pre rather than post increment (dump): use pre rather than post increment (generate): use i->foo rather than (*i).foo (insertTransition): use i->foo rather than (*i).foo (transformTransitionMap): use i->foo rather than (*i).foo (hasNonAcceptingTarget): use i->foo rather than (*i).foo * rawTransitionSet.cc (RawTransitionSet): use i->foo rather than (*i).foo; use pre rather than post increment * sccOptimizations.cc (eliminateFairness): use pre rather than post increment (sccOptimizations): use NatSet::const_iterator (strongConnected): use pre rather than post increment (transformFairTransitionSet2): use pre rather than post increment (handleComponent): use pre rather than post increment (eliminateFairness): use i->foo rather than (*i).foo (transformFairTransitionSet2): use i->foo rather than (*i).foo (strongConnected): use i->foo rather than (*i).foo (handleComponent): use i->foo rather than (*i).foo * collapseStates.cc (transformFairTransitionSet): use pre rather than post increment (transformFairTransitionSet): use i->foo rather than (*i).foo (insertFairTransition2): use i->foo rather than (*i).foo * genBuchiAutomaton.cc (generateState): use NatSet::const_iterator (GenBuchiAutomaton): use pre rather than post increment (generateState): use pre rather than post increment (GenBuchiAutomaton): use i->foo rather than (*i).foo (generateState): use i->foo rather than (*i).foo (insertFairTransition): use i->foo rather than (*i).foo (dump): use i->foo rather than (*i).foo * veryWeakAlternatingAutomaton.cc (findReachable): use i->foo rather than (*i).foo (checkFairness): use i->foo rather than (*i).foo * transitionSet.cc (insert): use pre rather than post increment (product): use pre rather than post increment (rename): use pre rather than post increment (rename): use NatSet::const_iterator (insert): use i->foo rather than (*i).foo for complex iterators (product): use i->foo rather than (*i).foo for complex iterators (dump): use i->foo rather than (*i).foo for complex iterators (rename): use i->foo rather than (*i).foo for complex iterators * veryWeakAlternatingAutomaton.cc (findReachable): use NatSet::const_iterator; use pre rather than post increment for complex iterators (checkFairness): use pre rather than post increment for complex iterators 2001-12-12 Steven Eker * modelChecker2.hh: removed class LogicFormula hack * buchiAutomaton2.cc: cleaned up includes * buchiAutomaton2.hh: cleaned up includes * genBuchiAutomaton.cc: cleaned up includes * genBuchiAutomaton.hh: cleaned up includes * logicFormula.cc: cleaned up includes * transitionSet.cc: cleaned up includes * transition.hh: deleted * transitionSet.hh: cleaned up includes * veryWeakAlternatingAutomaton.hh: removed class LogicFormula hack * veryWeakAlternatingAutomaton.cc: cleaned up includes * temporal.hh: created ===================================Maude69================================================== Maude-2.7/src/Temporal/buchiAutomaton2.cc0000644000147300135640000001601307666300727015311 00000000000000/* This file is part of the Maude 2 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 BuchiAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "temporal.hh" // temporal class definitions #include "genBuchiAutomaton.hh" #include "buchiAutomaton2.hh" BuchiAutomaton2::BuchiAutomaton2(LogicFormula* formula, int top) { GenBuchiAutomaton g(formula, top); g.simplify(); int nrOldStates = g.getNrStates(); if (nrOldStates == 0) return; initialStates = g.getInitialStates(); int nrFairnessSets = g.getNrFairnessSets(); int nrStates = nrOldStates * (nrFairnessSets + 1); states.expandTo(nrStates); for (int i = 0; i < nrStates; i++) states[i] = NONE; const NatSet::const_iterator e = initialStates.end(); for (NatSet::const_iterator i = initialStates.begin(); i != e; ++i) generate(g, *i, 0); #ifdef TDEBUG dump(cout); #endif if (transitionMaps.size() < states.length()) { int nrStates; do { nrStates = states.length(); collapseStates(); #ifdef TDEBUG dump(cout); #endif } while (states.length() < nrStates); } } void BuchiAutomaton2::generate(const GenBuchiAutomaton& g, int oldStateNr, int instanceNr) { int nrFairnessSets = g.getNrFairnessSets(); int nrOldStates = g.getNrStates(); int stateNr = oldStateNr + instanceNr * nrOldStates; states[stateNr] = UNBOUNDED; // to prevent looping TransitionMap m; const GenBuchiAutomaton::FairTransitionSet& ts = g.getTransitions(oldStateNr); GenBuchiAutomaton::FairTransitionSet::const_iterator e = ts.end(); for (GenBuchiAutomaton::FairTransitionSet::const_iterator i = ts.begin(); i != e; ++i) { Transition t; const NatSet& fairness = g.getFairnessCombination(i->first.second); int newInstanceNr = (instanceNr == nrFairnessSets) ? 0 : instanceNr; while (fairness.contains(newInstanceNr)) ++newInstanceNr; int oldTarget = i->first.first; int newTarget = oldTarget + newInstanceNr * nrOldStates; t.first = newTarget; t.second = i->second; insertTransition(m, t); if (states[newTarget] == NONE) generate(g, oldTarget, newInstanceNr); } states[stateNr] = transitionMaps.insert(m); if (instanceNr == nrFairnessSets) acceptingStates.insert(stateNr); } void BuchiAutomaton2::insertTransition(TransitionMap& m, const Transition& t) { pair i = m.insert(t); if (!(i.second)) i.first->second = bdd_or(i.first->second, t.second); } void BuchiAutomaton2::collapseStates() { // // Identify transition sets that are used by both accepting // and non-accepting states. // NatSet usedByAccepting; NatSet usedByNonAccepting; int nrStates = states.length(); for (int i = 0; i < nrStates; i++) { int tsIndex = states[i]; if (tsIndex != UNDEFINED) { if (acceptingStates.contains(i)) usedByAccepting.insert(tsIndex); else usedByNonAccepting.insert(tsIndex); } } usedByAccepting.intersect(usedByNonAccepting); // // Build a map on transition set indices that maps indices of // shared transition sets that where some of the transitions lead // to non-accepting states to fresh indices. // int nrTransitionSets = transitionMaps.size(); Vector acceptingMap(nrTransitionSets); int freshIndices = nrTransitionSets; for (int i = 0; i < nrTransitionSets; i++) { if (usedByAccepting.contains(i) && hasNonAcceptingTarget(transitionMaps.ithElement(i))) acceptingMap[i] = freshIndices++; else acceptingMap[i] = UNDEFINED; } // // Accepting states that used these shared transition sets // now use these fresh indices. // for (int i = 0; i < nrStates; i++) { if (acceptingStates.contains(i)) { int replacement = acceptingMap[states[i]]; if (replacement != UNDEFINED) states[i] = replacement; } } // // Now rebuild the Buchi Automata, collapsing states with the // same transition sets. // NatSet newInitialStates; NatSet newAcceptingStates; Vector newStates(freshIndices); TransitionMapTable newTransitionMaps; remapNatSet(newInitialStates, initialStates, states); remapNatSet(newAcceptingStates, acceptingStates, states); for (int i = 0; i < nrTransitionSets; i++) { TransitionMap transformed; transformTransitionMap(transformed, transitionMaps.ithElement(i)); newStates[i] = newTransitionMaps.insert(transformed); int acceptingCopy = acceptingMap[i]; if (acceptingCopy != UNDEFINED) newStates[acceptingCopy] = newStates[i]; } // // Swap new and old automata. // initialStates.swap(newInitialStates); acceptingStates.swap(newAcceptingStates); states.swap(newStates); transitionMaps.swap(newTransitionMaps); } void BuchiAutomaton2::transformTransitionMap(TransitionMap& transformed, const TransitionMap& original) { TransitionMap::const_iterator e = original.end(); for (TransitionMap::const_iterator i = original.begin(); i != e; ++i) { Transition t(states[i->first], i->second); insertTransition(transformed, t); } } bool BuchiAutomaton2::hasNonAcceptingTarget(const TransitionMap& tm) { TransitionMap::const_iterator e = tm.end(); for (TransitionMap::const_iterator i = tm.begin(); i != e; ++i) { if (!(acceptingStates.contains(i->first))) return true; } return false; } void BuchiAutomaton2::remapNatSet(NatSet& newSet, const NatSet& oldSet, const Vector& natMap) { for (int i = natMap.length() - 1; i >= 0; i--) { int t = natMap[i]; if (t != NONE && oldSet.contains(i)) newSet.insert(t); } } void BuchiAutomaton2::dump(ostream& s) { s << "begin{BuchiAutomaton2}\n"; int nrStates = states.length(); for (int i = 0; i < nrStates; i++) { s << "state " << i; if (acceptingStates.contains(i)) s << "\taccepting"; s << '\n'; if (states[i] != NONE) { const TransitionMap& t = transitionMaps.ithElement(states[i]); TransitionMap::const_iterator e = t.end(); for(TransitionMap::const_iterator j = t.begin(); j != e; ++j) { s << j->first << '\t'; BddUser::dump(s, j->second); s << '\n'; } } s << '\n'; } s << "initial states: " << initialStates << '\n'; s << "end{BuchiAutomaton2}\n"; } Maude-2.7/src/Temporal/buchiAutomaton2.hh0000644000147300135640000000461507666300727015330 00000000000000/* This file is part of the Maude 2 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 Buchi Automata. // #ifndef _buchiAutomaton2_hh_ #define _buchiAutomaton2_hh_ #include #include "bddUser.hh" #include "bdd.hh" #include "indexedSet.hh" class BuchiAutomaton2 : private BddUser { public: typedef pair Transition; typedef map TransitionMap; BuchiAutomaton2(LogicFormula* formula, int top); int getNrStates() const; const NatSet& getInitialStates() const; bool isAccepting(int stateNr) const; const TransitionMap& getTransitions(int stateNr) const; void dump(ostream& s); private: typedef IndexedSet TransitionMapTable; static void remapNatSet(NatSet& newSet, const NatSet& oldSet, const Vector& natMap); bool hasNonAcceptingTarget(const TransitionMap& tm); void transformTransitionMap(TransitionMap& transformed, const TransitionMap& original); void collapseStates(); void generate(const GenBuchiAutomaton& g, int oldStateNr, int instanceNr); void insertTransition(TransitionMap& m, const Transition& t); NatSet initialStates; NatSet acceptingStates; Vector states; TransitionMapTable transitionMaps; }; inline int BuchiAutomaton2::getNrStates() const { return states.length(); } inline const NatSet& BuchiAutomaton2::getInitialStates() const { return initialStates; } inline bool BuchiAutomaton2::isAccepting(int stateNr) const { return acceptingStates.contains(stateNr); } inline const BuchiAutomaton2::TransitionMap& BuchiAutomaton2::getTransitions(int stateNr) const { return transitionMaps.ithElement(states[stateNr]); } #endif Maude-2.7/src/Temporal/transitionSet.cc0000644000147300135640000001014007666300727015106 00000000000000/* This file is part of the Maude 2 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 TransitionSet. // #include // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" #include "bddUser.hh" // for dump() // temporal class definitions #include "transitionSet.hh" void TransitionSet::insert(const Transition& transition) { Bdd formula = transition.second; if (formula == bdd_false()) return; // for robustness const TransitionMap::iterator e = transitionMap.end(); TransitionMap::iterator equal = e; for (TransitionMap::iterator i = transitionMap.begin(); i != e;) { TransitionMap::iterator t = i++; if (t->first == transition.first) equal = t; else if (t->first.contains(transition.first)) { t->second = bdd_and(t->second, bdd_not(formula)); if (t->second == bdd_false()) transitionMap.erase(t); // existing pair completely subsumed } else if (transition.first.contains(t->first)) { formula = bdd_and(formula, bdd_not(t->second)); if (formula == bdd_false()) return; // new transition completely subsumed } } if (equal == e) { pair p = transitionMap.insert(transition); Assert(p.second, "failed to insert"); p.first->second = formula; } else equal->second = bdd_or(equal->second, formula); } void TransitionSet::insert(const TransitionSet& transitionSet) { const TransitionMap::const_iterator e = transitionSet.transitionMap.end(); for (TransitionMap::const_iterator i = transitionSet.transitionMap.begin(); i != e; ++i) insert(*i); } void TransitionSet::product(const TransitionSet& ts1, const TransitionSet& ts2) { transitionMap.clear(); const TransitionMap::const_iterator ie = ts1.transitionMap.end(); const TransitionMap::const_iterator je = ts2.transitionMap.end(); Transition newTransition; for (TransitionMap::const_iterator i = ts1.transitionMap.begin(); i != ie; ++i) { for (TransitionMap::const_iterator j = ts2.transitionMap.begin(); j != je; ++j) { newTransition.second = bdd_and(i->second, j->second); if (newTransition.second != bdd_false()) { newTransition.first = i->first; newTransition.first.insert(j->first); insert(newTransition); } } } } void TransitionSet::rename(const TransitionSet& original, const Vector& renaming) { // // Renaming must be injective: no two old states must map to // the name new state. We make use of that to do a fast insertion // of the renamed state sets. // transitionMap.clear(); const TransitionMap::const_iterator ei = original.transitionMap.end(); for (TransitionMap::const_iterator i = original.transitionMap.begin(); i != ei; ++i) { Transition t; const NatSet::const_iterator ej = i->first.end(); for (NatSet::const_iterator j = i->first.begin(); j != ej; ++j) { Assert(renaming[*j] != NONE, "no renaming for " << *j); t.first.insert(renaming[*j]); } t.second = i->second; transitionMap.insert(t); } } void TransitionSet::dump(ostream& s, int indentLevel) const { const TransitionMap::const_iterator e = transitionMap.end(); for (TransitionMap::const_iterator i = transitionMap.begin(); i != e; ++i) { s << Indent(indentLevel) << i->first << '\t'; BddUser::dump(s, i->second); s << '\n'; } } Maude-2.7/src/Temporal/transitionSet.hh0000644000147300135640000000465007666300727015131 00000000000000/* This file is part of the Maude 2 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. */ // // Intuitively a transition set maps each valuation to a disjunction // of conjunctions of next states. In practice is it maintained as a set of // // pairs where the truth of the boolean formula on a valuation indicates that // the set of states in the pair is in the disjunction for that valuation. // // We have the simplification rule that for any valuation, a conjunction // of states in its disjunction subsumes any larger conjunction of states // in its disjunction. // // We maintain a canonical form by storing the set of pairs as a map // from sets of states to formulae such that for any set Q of states, the // formulae is true on exactly those valuations in which Q appears as part // of the simplified disjunction. // #ifndef _transitionSet_hh_ #define _transitionSet_hh_ #include #include "natSet.hh" #include "bdd.hh" typedef pair Transition; // HACK class TransitionSet { public: typedef map TransitionMap; void insert(const Transition& transition); void insert(const TransitionSet& transitionSet); void product(const TransitionSet& ts1, const TransitionSet& ts2); void swap(TransitionSet& other); void rename(const TransitionSet& original, const Vector& renaming); const TransitionMap& getMap() const; void dump(ostream& s, int indentLevel = 0) const; private: TransitionMap transitionMap; }; inline void TransitionSet::swap(TransitionSet& other) { transitionMap.swap(other.transitionMap); } inline const TransitionSet::TransitionMap& TransitionSet::getMap() const { return transitionMap; } #endif Maude-2.7/src/Temporal/logicFormula.cc0000644000147300135640000001330607704653162014667 00000000000000/* This file is part of the Maude 2 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 LogicFormula. // // utility stuff #include "macros.hh" #include "vector.hh" #include "natSet.hh" // temporal class definitions #include "logicFormula.hh" int LogicFormula::makeProp(int propIndex) { int nrNodes = nodes.length(); for (int i = 0; i < nrNodes; i++) { Node& n = nodes[i]; if (n.op == PROPOSITION && n.args[0] == propIndex) return i; } nodes.expandBy(1); Node& n = nodes[nrNodes]; n.op = PROPOSITION; n.args[0] = propIndex; n.propositional = true; return nrNodes; } int LogicFormula::makeOp(Op op, int firstArg, int secondArg) { int nrNodes = nodes.length(); for (int i = 0; i < nrNodes; i++) { Node& n = nodes[i]; if (n.op == op && n.args[0] == firstArg && n.args[1] == secondArg) return i; } nodes.expandBy(1); Node& n = nodes[nrNodes]; n.op = op; n.args[0] = firstArg; n.args[1] = secondArg; n.propositional = false; switch (op) { case AND: case OR: { if (!(nodes[secondArg].propositional)) break; // fall thru } case NOT: { if (!(nodes[firstArg].propositional)) break; // fall thru } case LTL_TRUE: case LTL_FALSE: { n.propositional = true; break; } default: break; } return nrNodes; } /* bool LogicFormula::structuallyImplies(const NatSet& now, const NatSet& next, int candidate) const { if (now.contains(candidate)) return true; switch (getOp(candidate)) { case LTL_TRUE: return true; case NEXT: return next.contains(getArg(candidate, 0)); case AND: { return structuallyImplies(now, next, getArg(candidate, 0)) && structuallyImplies(now, next, getArg(candidate, 1)); } case OR: { return structuallyImplies(now, next, getArg(candidate, 0)) || structuallyImplies(now, next, getArg(candidate, 1)); } case UNTIL: { return structuallyImplies(now, next, getArg(candidate, 1)) || (structuallyImplies(now, next, getArg(candidate, 0)) && next.contains(candidate)); } case RELEASE: { return structuallyImplies(now, next, getArg(candidate, 1)) && (structuallyImplies(now, next, getArg(candidate, 0)) || next.contains(candidate)); } default: break; } return false; } bool LogicFormula::structuallyContradicts(const NatSet& now, const NatSet& next, int candidate) const { if (containsNegation(now, candidate)) return true; switch (getOp(candidate)) { case LTL_FALSE: return true; case NEXT: return containsNegation(next, getArg(candidate, 0)); case AND: { return structuallyContradicts(now, next, getArg(candidate, 0)) || structuallyContradicts(now, next, getArg(candidate, 1)); } case OR: { return structuallyContradicts(now, next, getArg(candidate, 0)) && structuallyContradicts(now, next, getArg(candidate, 1)); } case UNTIL: { return structuallyContradicts(now, next, getArg(candidate, 1)) && (structuallyContradicts(now, next, getArg(candidate, 0)) || containsNegation(next, candidate)); } case RELEASE: { return structuallyContradicts(now, next, getArg(candidate, 1)) || (structuallyContradicts(now, next, getArg(candidate, 0)) && containsNegation(next, candidate)); } default: break; } return false; } bool LogicFormula::containsNegation(const NatSet& indexSet, int formulaIndex) const { int max = indexSet.max(); for (int i = 0; i <= max; i++) { if (indexSet.contains(i) && isNegation(i, formulaIndex)) return true; } return false; } bool LogicFormula::isNegation(int f1, int f2) const { static Op inv[] = { NOT, LTL_FALSE, LTL_TRUE, PROPOSITION, NEXT, OR, AND, RELEASE, UNTIL }; Op op1 = getOp(f1); if (getOp(f2) == inv[op1]) { switch (op1) { case PROPOSITION: return getArg(f2, 0) == f1; case LTL_TRUE: case LTL_FALSE: return true; case NOT: return getArg(f1, 0) == f2; case NEXT: return isNegation(getArg(f1, 0), getArg(f2, 0)); case AND: case OR: case UNTIL: case RELEASE: { return isNegation(getArg(f1, 0), getArg(f2, 0)) && isNegation(getArg(f1, 1), getArg(f2, 1)); } } } return false; } */ void LogicFormula::dump(ostream& s) { int nrNodes = nodes.length(); for (int i = 0; i < nrNodes; i++) { s << i << '\t'; Node& n = nodes[i]; switch (n.op) { case PROPOSITION: s << "prop" << n.args[0]; break; case LTL_TRUE: s << "True"; break; case LTL_FALSE: s << "False"; break; case NOT: s << "~ " << n.args[0]; break; case NEXT: s << "@ " << n.args[0]; break; case AND: s << n.args[0] << " /\\ " << n.args[1]; break; case OR: s << n.args[0] << " \\/ " << n.args[1]; break; case UNTIL: s << n.args[0] << " U " << n.args[1]; break; case RELEASE: s << n.args[0] << " R " << n.args[1]; break; } s << '\n'; } } Maude-2.7/src/Temporal/Makefile.in0000644000147300135640000007147512305230426014000 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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/Temporal DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 libtemporal_a_AR = $(AR) $(ARFLAGS) libtemporal_a_LIBADD = am_libtemporal_a_OBJECTS = libtemporal_a-logicFormula.$(OBJEXT) \ libtemporal_a-buchiAutomaton2.$(OBJEXT) \ libtemporal_a-transitionSet.$(OBJEXT) \ libtemporal_a-veryWeakAlternatingAutomaton.$(OBJEXT) \ libtemporal_a-rawTransitionSet.$(OBJEXT) \ libtemporal_a-genBuchiAutomaton.$(OBJEXT) \ libtemporal_a-modelChecker2.$(OBJEXT) libtemporal_a_OBJECTS = $(am_libtemporal_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libtemporal_a_SOURCES) DIST_SOURCES = $(libtemporal_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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 = libtemporal.a libtemporal_a_CPPFLAGS = -I$(top_srcdir)/src/Utility libtemporal_a_SOURCES = \ logicFormula.cc \ buchiAutomaton2.cc \ transitionSet.cc \ veryWeakAlternatingAutomaton.cc \ rawTransitionSet.cc \ genBuchiAutomaton.cc \ modelChecker2.cc EXTRA_DIST = \ collapseStates.cc \ sccOptimizations.cc \ sccAnalysis.cc \ satSolve.cc noinst_HEADERS = \ buchiAutomaton2.hh \ genBuchiAutomaton.hh \ logicFormula.hh \ modelChecker2.hh \ rawTransitionSet.hh \ temporal.hh \ transitionSet.hh \ veryWeakAlternatingAutomaton.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/Temporal/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Temporal/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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) libtemporal.a: $(libtemporal_a_OBJECTS) $(libtemporal_a_DEPENDENCIES) $(EXTRA_libtemporal_a_DEPENDENCIES) -rm -f libtemporal.a $(libtemporal_a_AR) libtemporal.a $(libtemporal_a_OBJECTS) $(libtemporal_a_LIBADD) $(RANLIB) libtemporal.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtemporal_a-buchiAutomaton2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtemporal_a-genBuchiAutomaton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtemporal_a-logicFormula.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtemporal_a-modelChecker2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtemporal_a-rawTransitionSet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtemporal_a-transitionSet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtemporal_a-veryWeakAlternatingAutomaton.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libtemporal_a-logicFormula.o: logicFormula.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-logicFormula.o -MD -MP -MF $(DEPDIR)/libtemporal_a-logicFormula.Tpo -c -o libtemporal_a-logicFormula.o `test -f 'logicFormula.cc' || echo '$(srcdir)/'`logicFormula.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-logicFormula.Tpo $(DEPDIR)/libtemporal_a-logicFormula.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='logicFormula.cc' object='libtemporal_a-logicFormula.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-logicFormula.o `test -f 'logicFormula.cc' || echo '$(srcdir)/'`logicFormula.cc libtemporal_a-logicFormula.obj: logicFormula.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-logicFormula.obj -MD -MP -MF $(DEPDIR)/libtemporal_a-logicFormula.Tpo -c -o libtemporal_a-logicFormula.obj `if test -f 'logicFormula.cc'; then $(CYGPATH_W) 'logicFormula.cc'; else $(CYGPATH_W) '$(srcdir)/logicFormula.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-logicFormula.Tpo $(DEPDIR)/libtemporal_a-logicFormula.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='logicFormula.cc' object='libtemporal_a-logicFormula.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-logicFormula.obj `if test -f 'logicFormula.cc'; then $(CYGPATH_W) 'logicFormula.cc'; else $(CYGPATH_W) '$(srcdir)/logicFormula.cc'; fi` libtemporal_a-buchiAutomaton2.o: buchiAutomaton2.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-buchiAutomaton2.o -MD -MP -MF $(DEPDIR)/libtemporal_a-buchiAutomaton2.Tpo -c -o libtemporal_a-buchiAutomaton2.o `test -f 'buchiAutomaton2.cc' || echo '$(srcdir)/'`buchiAutomaton2.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-buchiAutomaton2.Tpo $(DEPDIR)/libtemporal_a-buchiAutomaton2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='buchiAutomaton2.cc' object='libtemporal_a-buchiAutomaton2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-buchiAutomaton2.o `test -f 'buchiAutomaton2.cc' || echo '$(srcdir)/'`buchiAutomaton2.cc libtemporal_a-buchiAutomaton2.obj: buchiAutomaton2.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-buchiAutomaton2.obj -MD -MP -MF $(DEPDIR)/libtemporal_a-buchiAutomaton2.Tpo -c -o libtemporal_a-buchiAutomaton2.obj `if test -f 'buchiAutomaton2.cc'; then $(CYGPATH_W) 'buchiAutomaton2.cc'; else $(CYGPATH_W) '$(srcdir)/buchiAutomaton2.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-buchiAutomaton2.Tpo $(DEPDIR)/libtemporal_a-buchiAutomaton2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='buchiAutomaton2.cc' object='libtemporal_a-buchiAutomaton2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-buchiAutomaton2.obj `if test -f 'buchiAutomaton2.cc'; then $(CYGPATH_W) 'buchiAutomaton2.cc'; else $(CYGPATH_W) '$(srcdir)/buchiAutomaton2.cc'; fi` libtemporal_a-transitionSet.o: transitionSet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-transitionSet.o -MD -MP -MF $(DEPDIR)/libtemporal_a-transitionSet.Tpo -c -o libtemporal_a-transitionSet.o `test -f 'transitionSet.cc' || echo '$(srcdir)/'`transitionSet.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-transitionSet.Tpo $(DEPDIR)/libtemporal_a-transitionSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transitionSet.cc' object='libtemporal_a-transitionSet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-transitionSet.o `test -f 'transitionSet.cc' || echo '$(srcdir)/'`transitionSet.cc libtemporal_a-transitionSet.obj: transitionSet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-transitionSet.obj -MD -MP -MF $(DEPDIR)/libtemporal_a-transitionSet.Tpo -c -o libtemporal_a-transitionSet.obj `if test -f 'transitionSet.cc'; then $(CYGPATH_W) 'transitionSet.cc'; else $(CYGPATH_W) '$(srcdir)/transitionSet.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-transitionSet.Tpo $(DEPDIR)/libtemporal_a-transitionSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transitionSet.cc' object='libtemporal_a-transitionSet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-transitionSet.obj `if test -f 'transitionSet.cc'; then $(CYGPATH_W) 'transitionSet.cc'; else $(CYGPATH_W) '$(srcdir)/transitionSet.cc'; fi` libtemporal_a-veryWeakAlternatingAutomaton.o: veryWeakAlternatingAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-veryWeakAlternatingAutomaton.o -MD -MP -MF $(DEPDIR)/libtemporal_a-veryWeakAlternatingAutomaton.Tpo -c -o libtemporal_a-veryWeakAlternatingAutomaton.o `test -f 'veryWeakAlternatingAutomaton.cc' || echo '$(srcdir)/'`veryWeakAlternatingAutomaton.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-veryWeakAlternatingAutomaton.Tpo $(DEPDIR)/libtemporal_a-veryWeakAlternatingAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='veryWeakAlternatingAutomaton.cc' object='libtemporal_a-veryWeakAlternatingAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-veryWeakAlternatingAutomaton.o `test -f 'veryWeakAlternatingAutomaton.cc' || echo '$(srcdir)/'`veryWeakAlternatingAutomaton.cc libtemporal_a-veryWeakAlternatingAutomaton.obj: veryWeakAlternatingAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-veryWeakAlternatingAutomaton.obj -MD -MP -MF $(DEPDIR)/libtemporal_a-veryWeakAlternatingAutomaton.Tpo -c -o libtemporal_a-veryWeakAlternatingAutomaton.obj `if test -f 'veryWeakAlternatingAutomaton.cc'; then $(CYGPATH_W) 'veryWeakAlternatingAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/veryWeakAlternatingAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-veryWeakAlternatingAutomaton.Tpo $(DEPDIR)/libtemporal_a-veryWeakAlternatingAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='veryWeakAlternatingAutomaton.cc' object='libtemporal_a-veryWeakAlternatingAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-veryWeakAlternatingAutomaton.obj `if test -f 'veryWeakAlternatingAutomaton.cc'; then $(CYGPATH_W) 'veryWeakAlternatingAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/veryWeakAlternatingAutomaton.cc'; fi` libtemporal_a-rawTransitionSet.o: rawTransitionSet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-rawTransitionSet.o -MD -MP -MF $(DEPDIR)/libtemporal_a-rawTransitionSet.Tpo -c -o libtemporal_a-rawTransitionSet.o `test -f 'rawTransitionSet.cc' || echo '$(srcdir)/'`rawTransitionSet.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-rawTransitionSet.Tpo $(DEPDIR)/libtemporal_a-rawTransitionSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawTransitionSet.cc' object='libtemporal_a-rawTransitionSet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-rawTransitionSet.o `test -f 'rawTransitionSet.cc' || echo '$(srcdir)/'`rawTransitionSet.cc libtemporal_a-rawTransitionSet.obj: rawTransitionSet.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-rawTransitionSet.obj -MD -MP -MF $(DEPDIR)/libtemporal_a-rawTransitionSet.Tpo -c -o libtemporal_a-rawTransitionSet.obj `if test -f 'rawTransitionSet.cc'; then $(CYGPATH_W) 'rawTransitionSet.cc'; else $(CYGPATH_W) '$(srcdir)/rawTransitionSet.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-rawTransitionSet.Tpo $(DEPDIR)/libtemporal_a-rawTransitionSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawTransitionSet.cc' object='libtemporal_a-rawTransitionSet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-rawTransitionSet.obj `if test -f 'rawTransitionSet.cc'; then $(CYGPATH_W) 'rawTransitionSet.cc'; else $(CYGPATH_W) '$(srcdir)/rawTransitionSet.cc'; fi` libtemporal_a-genBuchiAutomaton.o: genBuchiAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-genBuchiAutomaton.o -MD -MP -MF $(DEPDIR)/libtemporal_a-genBuchiAutomaton.Tpo -c -o libtemporal_a-genBuchiAutomaton.o `test -f 'genBuchiAutomaton.cc' || echo '$(srcdir)/'`genBuchiAutomaton.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-genBuchiAutomaton.Tpo $(DEPDIR)/libtemporal_a-genBuchiAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='genBuchiAutomaton.cc' object='libtemporal_a-genBuchiAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-genBuchiAutomaton.o `test -f 'genBuchiAutomaton.cc' || echo '$(srcdir)/'`genBuchiAutomaton.cc libtemporal_a-genBuchiAutomaton.obj: genBuchiAutomaton.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-genBuchiAutomaton.obj -MD -MP -MF $(DEPDIR)/libtemporal_a-genBuchiAutomaton.Tpo -c -o libtemporal_a-genBuchiAutomaton.obj `if test -f 'genBuchiAutomaton.cc'; then $(CYGPATH_W) 'genBuchiAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/genBuchiAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-genBuchiAutomaton.Tpo $(DEPDIR)/libtemporal_a-genBuchiAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='genBuchiAutomaton.cc' object='libtemporal_a-genBuchiAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-genBuchiAutomaton.obj `if test -f 'genBuchiAutomaton.cc'; then $(CYGPATH_W) 'genBuchiAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/genBuchiAutomaton.cc'; fi` libtemporal_a-modelChecker2.o: modelChecker2.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-modelChecker2.o -MD -MP -MF $(DEPDIR)/libtemporal_a-modelChecker2.Tpo -c -o libtemporal_a-modelChecker2.o `test -f 'modelChecker2.cc' || echo '$(srcdir)/'`modelChecker2.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-modelChecker2.Tpo $(DEPDIR)/libtemporal_a-modelChecker2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='modelChecker2.cc' object='libtemporal_a-modelChecker2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-modelChecker2.o `test -f 'modelChecker2.cc' || echo '$(srcdir)/'`modelChecker2.cc libtemporal_a-modelChecker2.obj: modelChecker2.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libtemporal_a-modelChecker2.obj -MD -MP -MF $(DEPDIR)/libtemporal_a-modelChecker2.Tpo -c -o libtemporal_a-modelChecker2.obj `if test -f 'modelChecker2.cc'; then $(CYGPATH_W) 'modelChecker2.cc'; else $(CYGPATH_W) '$(srcdir)/modelChecker2.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libtemporal_a-modelChecker2.Tpo $(DEPDIR)/libtemporal_a-modelChecker2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='modelChecker2.cc' object='libtemporal_a-modelChecker2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtemporal_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libtemporal_a-modelChecker2.obj `if test -f 'modelChecker2.cc'; then $(CYGPATH_W) 'modelChecker2.cc'; else $(CYGPATH_W) '$(srcdir)/modelChecker2.cc'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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 -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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 all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags 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 uninstall \ uninstall-am # 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-2.7/src/Temporal/genBuchiAutomaton.hh0000644000147300135640000001175407666300727015702 00000000000000/* This file is part of the Maude 2 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 Generalized Buchi Automata. // // We implement the VWAA to GBA translation and GBA optimization // algorithms from: // Paul Gastin and Denis Oddoux, // "Fast LTL to Buchi Automaton Translation", // CAV 2001, LNCS 2102, pp 53-65, 2001. // // We also do SCC based optimization using ideas from: // Fabio Somenzi and Roderick Bloem, // "Efficient Buchi Automata from LTL Formulae", // CAV 2000, LNCS 1633, p247-263, 2000. // However our GBAs have fairness conditions on the transitions // rather than on the states. // #ifndef _genBuchiAutomaton_hh_ #define _genBuchiAutomaton_hh_ #include #include #include "bddUser.hh" #include "natSet.hh" #include "bdd.hh" #include "indexedSet.hh" class GenBuchiAutomaton : private BddUser { public: typedef pair Key; // (state index, fairness set index) typedef pair FairTransition; typedef map FairTransitionSet; GenBuchiAutomaton(LogicFormula* formula, int top); void simplify(); bool satSolve(list& leadIn, list& cycle); int getNrStates() const; int getNrFairnessSets() const; const NatSet& getInitialStates() const; const NatSet& getFairnessCombination(int fairnessIndex) const; const FairTransitionSet& getTransitions(int stateNr) const; void dump(ostream& s) const; private: typedef IndexedSet NatSetTable; typedef IndexedSet FairTransitionSetTable; void generateState(int index); int getStateIndex(const NatSet& stateSet); void insertFairTransition(FairTransitionSet& fts, const FairTransition& ft); void insertFairTransition2(FairTransitionSet& fts, const FairTransition& ft); void transformFairTransitionSet(FairTransitionSet& transformed, const FairTransitionSet& original); void maximallyCollapseStates(); void collapseStates(); void sccOptimizations(); void sccAnalysis(); int strongConnected(int v); void handleComponent(int component); void eliminateFairness(FairTransitionSet& transformed, const FairTransitionSet& original, const Vector& stateMap); void transformFairTransitionSet2(NatSetTable& oldFairnessConditions, FairTransitionSet& transformed, const FairTransitionSet& original, const Vector& stateMap, const Vector& fairMap, int component); void remapNatSet(NatSet& newSet, const NatSet& oldSet, const Vector& natMap); void bfsToFairComponent(int& fairState, list& path) const; void bfsToMoreFairness(NatSet& fairness, int& start, list& path) const; void bfsToTarget(int start, int target, list& path) const; NatSet initialStates; Vector states; FairTransitionSetTable fairTransitionSets; int nrFairnessSets; NatSetTable fairnessConditions; // // Temporary data used during construction. // VeryWeakAlternatingAutomaton* vwaa; NatSetTable vwaaStateSets; // // Structures used for SCC Optimizations. // struct StateInfo { int traversalNumber; // DFS traversal number int component; // number of the component we're in }; enum ComponentStatus { DEAD, // unfair and can't reach a fair SCC UNFAIR, // unfair and can reach a fair SCC FAIR // has internal transitions covering all fairness sets }; struct ComponentInfo { ComponentStatus status; NatSet redundant; // redundant fairness sets for a fair component }; int traversalCount; int componentCount; stack stateStack; Vector stateInfo; Vector componentInfo; NatSet allFair; NatSet essential; // // Stucture used for sat solving. // struct Step; }; inline int GenBuchiAutomaton::getNrStates() const { return states.length(); } inline int GenBuchiAutomaton::getNrFairnessSets() const { return nrFairnessSets; } inline const NatSet& GenBuchiAutomaton::getInitialStates() const { return initialStates; } inline const NatSet& GenBuchiAutomaton::getFairnessCombination(int fairnessIndex) const { return fairnessConditions.ithElement(fairnessIndex); } inline const GenBuchiAutomaton::FairTransitionSet& GenBuchiAutomaton::getTransitions(int stateNr) const { return fairTransitionSets.ithElement(states[stateNr]); } #endif Maude-2.7/src/Temporal/modelChecker2.hh0000644000147300135640000000472207666300727014732 00000000000000/* This file is part of the Maude 2 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 LTL model checking. // // We implement the double depth first search method from: // G. J. Holzmann, D. Peled and M. Yannakakis, // "On nested depth first search", // Second SPIN Workshop, pp23-32, AMS 1996. // #ifndef _modelChecker2_hh_ #define _modelChecker2_hh_ #include #include "natSet.hh" #include "buchiAutomaton2.hh" class ModelChecker2 { NO_COPYING(ModelChecker2); public: struct System { virtual int getNextState(int stateNr, int transitionNr) = 0; virtual bool checkProposition(int stateNr, int propositionIndex) const = 0; }; ModelChecker2(System& system, LogicFormula& property, int top); bool findCounterexample(); const list& getLeadIn() const; const list& getCycle() const; private: struct StateSet { NatSet dfs1Seen; NatSet onDfs1Stack; NatSet dfs2Seen; NatSet testedProps; NatSet trueProps; }; bool dfs1PropertyTransitions(int systemStateNr, int propertyStateNr); bool dfs2PropertyTransitions(int systemStateNr, int propertyStateNr); bool dfs1SystemTransitions(int systemStateNr, int propertyStateNr); bool dfs2SystemTransitions(int systemStateNr, int propertyStateNr); bool satisfiesPropositionalFormula(int systemStateNr, Bdd formula); System& system; BuchiAutomaton2 propertyAutomaton; Vector intersectionStates; // // Stuff for recovering counterexample. // int cycleSystemStateNr; int cyclePropertyStateNr; list path; list cycle; }; inline const list& ModelChecker2::getLeadIn() const { return path; } inline const list& ModelChecker2::getCycle() const { return cycle; } #endif Maude-2.7/src/Temporal/collapseStates.cc0000644000147300135640000000734207666300727015240 00000000000000/* This file is part of the Maude 2 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 collapsing states which have same fair transition set. // void GenBuchiAutomaton::maximallyCollapseStates() { while (fairTransitionSets.size() < states.length()) { collapseStates(); #ifdef TDEBUG dump(cout); #endif } } void GenBuchiAutomaton::collapseStates() { int nrNewStates = fairTransitionSets.size(); // // We build collapsed automaton in these data structures. // Fairness combinations does not change. // NatSet newInitialStates; Vector newStates(nrNewStates); FairTransitionSetTable newFairTransitionSets; // // Use states as a surjection to collapse equivalent states. // remapNatSet(newInitialStates, initialStates, states); for (int i = 0; i < nrNewStates; i++) { FairTransitionSetTable::FastPair transformed; transformFairTransitionSet(transformed.first, fairTransitionSets.ithElement(i)); newStates[i] = newFairTransitionSets.insert(transformed); } // // Swap new and old automata. // initialStates.swap(newInitialStates); states.swap(newStates); fairTransitionSets.swap(newFairTransitionSets); } void GenBuchiAutomaton::transformFairTransitionSet(FairTransitionSet& transformed, const FairTransitionSet& original) { FairTransitionSet::const_iterator e = original.end(); for (FairTransitionSet::const_iterator i = original.begin(); i != e; ++i) { FairTransition f; f.first.first = states[i->first.first]; Assert(f.first.first != UNDEFINED, "state not generated"); f.first.second = i->first.second; f.second = i->second; insertFairTransition2(transformed, f); } } void GenBuchiAutomaton::insertFairTransition2(FairTransitionSet& fts, const FairTransition& ft) { Bdd formula = ft.second; Assert(formula != bdd_false(), "tried to insert false transition"); const FairTransitionSet::iterator e = fts.end(); FairTransitionSet::iterator equal = e; for (FairTransitionSet::iterator i = fts.begin(); i != e;) { FairTransitionSet::iterator t = i++; if (t->first == ft.first) equal = t; else if (t->first.first == ft.first.first) { const NatSet& existingFairness = fairnessConditions.ithElement(t->first.second); const NatSet& newFairness = fairnessConditions.ithElement(ft.first.second); if (newFairness.contains(existingFairness)) { t->second = bdd_and(t->second, bdd_not(formula)); if (t->second == bdd_false()) fts.erase(t); // existing pair completely subsumed } else if (existingFairness.contains(newFairness)) { formula = bdd_and(formula, bdd_not(t->second)); if (formula == bdd_false()) return; // new transition completely subsumed } } } if (equal == e) { pair p = fts.insert(ft); Assert(p.second, "failed to insert"); p.first->second = formula; } else equal->second = bdd_or(equal->second, formula); } Maude-2.7/src/Temporal/veryWeakAlternatingAutomaton.hh0000644000147300135640000000506207666300727020137 00000000000000/* This file is part of the Maude 2 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 Very Weak Alternating Automata. // // We implement the LTL to VWAA translation and VWAA optimization // algorithms from: // Paul Gastin and Denis Oddoux. // "Fast LTL to Buchi Automaton Translation", // CAV 2001, LNCS 2102, pp 53-65, 2001. // #ifndef _veryWeakAlternationAutomaton_hh_ #define _veryWeakAlternationAutomaton_hh_ #include "bddUser.hh" #include "transitionSet.hh" #include "natSet.hh" class VeryWeakAlternatingAutomaton : private BddUser { public: VeryWeakAlternatingAutomaton(LogicFormula* formula, int top); int getNrStates() const; int getNrFinalStates() const; const TransitionSet& getInitialStates(); const TransitionSet& getTransitionSet(int stateIndex) const; void computeFairnessSet(const Transition& transition, NatSet& fairnessSet); void dump(ostream& s) const; private: void dnf(int subformulaIndex, TransitionSet& result); void computeTransitionSet(int subformulaIndex); void reachabilityOpt(); void findReachable(const TransitionSet& ts); bool checkFairness(const Transition& transition, int finalStateIndex) const; TransitionSet initialStates; Vector states; Vector finalStates; // // Temporary data used during construction. // LogicFormula* const formula; int nrNewStates; Vector renaming; }; inline int VeryWeakAlternatingAutomaton::getNrStates() const { return states.length(); } inline int VeryWeakAlternatingAutomaton::getNrFinalStates() const { return finalStates.length(); } inline const TransitionSet& VeryWeakAlternatingAutomaton::getInitialStates() { return initialStates; } inline const TransitionSet& VeryWeakAlternatingAutomaton::getTransitionSet(int stateIndex) const { return states[stateIndex]; } #endif Maude-2.7/src/Temporal/genBuchiAutomaton.cc0000644000147300135640000001627007666300727015666 00000000000000/* This file is part of the Maude 2 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 GenBuchiAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "temporal.hh" // temporal class definitions #include "veryWeakAlternatingAutomaton.hh" #include "rawTransitionSet.hh" #include "genBuchiAutomaton.hh" #include "collapseStates.cc" #include "sccAnalysis.cc" #include "sccOptimizations.cc" #include "satSolve.cc" GenBuchiAutomaton::GenBuchiAutomaton(LogicFormula* formula, int top) { vwaa = new VeryWeakAlternatingAutomaton(formula, top); nrFairnessSets = vwaa->getNrFinalStates(); for (int i = nrFairnessSets - 1; i >= 0; i--) allFair.insert(i); const TransitionSet& vwaaInitialStates = vwaa->getInitialStates(); const TransitionSet::TransitionMap& tm = vwaaInitialStates.getMap(); TransitionSet::TransitionMap::const_iterator e = tm.end(); for (TransitionSet::TransitionMap::const_iterator i = tm.begin(); i != e; ++i) { int index = getStateIndex(i->first); initialStates.insert(index); generateState(index); } vwaaStateSets.clear(); delete vwaa; } void GenBuchiAutomaton::simplify() { #ifdef TDEBUG dump(cout); #endif maximallyCollapseStates(); sccOptimizations(); #ifdef TDEBUG dump(cout); #endif maximallyCollapseStates(); } void GenBuchiAutomaton::generateState(int index) { // // Construct the fair transition set for a GBA state if it has not // been done already. // if (states[index] != UNDEFINED) return; FairTransitionSetTable::FastPair fts; const NatSet& components = vwaaStateSets.ithElement(index); // set of VWAA state indices if (components.empty()) { // // If we hit the empty state, there are no future obligations // to be discharged and all future infinite sequences are acceptable. // We model this with a "true" self transition which has all fairness // conditions. // FairTransition f; f.first.first = index; f.first.second = fairnessConditions.insert(allFair); f.second = bdd_true(); insertFairTransition(fts.first, f); states[index] = fairTransitionSets.insert(fts); return; } // // We first compute the raw (unsimplified) product of the // transition sets for each component state in the VWAA. // NatSet::const_iterator i = components.begin(); RawTransitionSet pi(vwaa->getTransitionSet(*i)); { const NatSet::const_iterator e = components.end(); for (++i; i != e; ++i) { RawTransitionSet c(vwaa->getTransitionSet(*i)); RawTransitionSet t(pi, c); pi.swap(t); } } // // Each transition in the raw product must have a fairness set // computed for it. Any simplification must explicitly take fairness // into account so we don't end up discarding more fair transitions // in favor of less fair transitions. // RawTransitionSet::const_iterator e = pi.end(); for (RawTransitionSet::const_iterator i = pi.begin(); i != e; ++i) { NatSet fairness; vwaa->computeFairnessSet(*i, fairness); FairTransition f; f.first.first = getStateIndex(i->first); f.first.second = fairnessConditions.insert(fairness); f.second = i->second; insertFairTransition(fts.first, f); } states[index] = fairTransitionSets.insert(fts); // // Now generate states reachable from new state. // FairTransitionSet::const_iterator e2 = fts.first.end(); for (FairTransitionSet::const_iterator i = fts.first.begin(); i != e2; ++i) generateState(i->first.first); } int GenBuchiAutomaton::getStateIndex(const NatSet& stateSet) { // // Convert a set of VWAA state indices into a GBA state index, // creating a new GBA state index if we haven't seen this set before. // int index = vwaaStateSets.insert(stateSet); if (index >= states.length()) { Assert(index == states.length(), "states synch error"); states.expandTo(index + 1); states[index] = UNDEFINED; } return index; } void GenBuchiAutomaton::insertFairTransition(FairTransitionSet& fts, const FairTransition& ft) { Bdd formula = ft.second; Assert(formula != bdd_false(), "tried to insert false transition"); const FairTransitionSet::iterator e = fts.end(); FairTransitionSet::iterator equal = e; for (FairTransitionSet::iterator i = fts.begin(); i != e;) { FairTransitionSet::iterator t = i++; if (t->first == ft.first) equal = t; else { const NatSet& existingStates = vwaaStateSets.ithElement(t->first.first); const NatSet& existingFairness = fairnessConditions.ithElement(t->first.second); const NatSet& newStates = vwaaStateSets.ithElement(ft.first.first); const NatSet& newFairness = fairnessConditions.ithElement(ft.first.second); if (existingStates.contains(newStates) && newFairness.contains(existingFairness)) { t->second = bdd_and(t->second, bdd_not(formula)); if (t->second == bdd_false()) fts.erase(t); // existing pair completely subsumed } else if (newStates.contains(existingStates) && existingFairness.contains(newFairness)) { formula = bdd_and(formula, bdd_not(t->second)); if (formula == bdd_false()) return; // new transition completely subsumed } } } if (equal == e) { pair p = fts.insert(ft); Assert(p.second, "failed to insert"); p.first->second = formula; } else equal->second = bdd_or(equal->second, formula); } void GenBuchiAutomaton::remapNatSet(NatSet& newSet, const NatSet& oldSet, const Vector& natMap) { for (int i = natMap.length() - 1; i >= 0; i--) { int t = natMap[i]; if (t != NONE && oldSet.contains(i)) newSet.insert(t); } } void GenBuchiAutomaton::dump(ostream& s) const { s << "begin{GenBuchiAutomaton}\n"; int nrStates = states.length(); for (int i = 0; i < nrStates; i++) { s << "state " << i << "\t(" << states[i] << ")\n"; if (states[i] != UNDEFINED) { const FairTransitionSet& fts = fairTransitionSets.ithElement(states[i]); FairTransitionSet::const_iterator e = fts.end(); for (FairTransitionSet::const_iterator j = fts.begin(); j != e; ++j) { s << j->first.first << '\t' << fairnessConditions.ithElement(j->first.second) << '\t'; BddUser::dump(s, j->second); s << '\n'; } } s << '\n'; } s << "initial states: " << initialStates << '\n'; s << "\nend{GenBuchiAutomaton}\n"; } Maude-2.7/src/Temporal/Makefile.am0000644000147300135640000000106207711551662013765 00000000000000noinst_LIBRARIES = libtemporal.a libtemporal_a_CPPFLAGS = -I$(top_srcdir)/src/Utility libtemporal_a_SOURCES = \ logicFormula.cc \ buchiAutomaton2.cc \ transitionSet.cc \ veryWeakAlternatingAutomaton.cc \ rawTransitionSet.cc \ genBuchiAutomaton.cc \ modelChecker2.cc EXTRA_DIST = \ collapseStates.cc \ sccOptimizations.cc \ sccAnalysis.cc \ satSolve.cc noinst_HEADERS = \ buchiAutomaton2.hh \ genBuchiAutomaton.hh \ logicFormula.hh \ modelChecker2.hh \ rawTransitionSet.hh \ temporal.hh \ transitionSet.hh \ veryWeakAlternatingAutomaton.hh Maude-2.7/src/Temporal/logicFormula.hh0000644000147300135640000000437607704652705014712 00000000000000/* This file is part of the Maude 2 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 formulae in some propositional logic. // #ifndef _logicFormula_hh_ #define _logicFormula_hh_ class LogicFormula { public: enum Op { // // Primitive // PROPOSITION, LTL_TRUE, LTL_FALSE, // // Unary // NOT, NEXT, // // Binary // AND, OR, UNTIL, RELEASE }; int makeProp(int propIndex); int makeOp(Op op, int firstArg = NONE, int secondArg = NONE); int getProp(int nodeNr) const; Op getOp(int nodeNr) const; int getArg(int nodeNr, int argNr = 0) const; bool isPropositional(int nodeNr) const; /* bool structuallyImplies(const NatSet& now, const NatSet& next, int candidate) const; bool structuallyContradicts(const NatSet& now, const NatSet& next, int candidate) const; bool containsNegation(const NatSet& indexSet, int formulaIndex) const; bool isNegation(int f1, int f2) const; */ void dump(ostream& s); private: struct Node { short op; Bool propositional; int args[2]; }; Vector nodes; }; inline LogicFormula::Op LogicFormula::getOp(int nodeNr) const { return static_cast(nodes[nodeNr].op); } inline int LogicFormula::getProp(int nodeNr) const { return nodes[nodeNr].args[0]; } inline int LogicFormula::getArg(int nodeNr, int argNr) const { return nodes[nodeNr].args[argNr]; } inline bool LogicFormula::isPropositional(int nodeNr) const { return nodes[nodeNr].propositional; } #endif Maude-2.7/src/Temporal/rawTransitionSet.hh0000644000147300135640000000245107666300727015600 00000000000000/* This file is part of the Maude 2 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. */ // // A raw transition set is a non-canonical set of transitions. // // The only reason to define it is to encapsulate the (unsimplified) // product operation. // #ifndef _rawTransitionSet_hh_ #define _rawTransitionSet_hh_ #include #include "transitionSet.hh" class RawTransitionSet : public set { public: RawTransitionSet(const TransitionSet& transitionSet); RawTransitionSet(const RawTransitionSet& ts1, const RawTransitionSet& ts2); }; #endif Maude-2.7/src/Temporal/sccOptimizations.cc0000644000147300135640000001130207666300727015603 00000000000000/* This file is part of the Maude 2 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 strongly connected component optimizations. // void GenBuchiAutomaton::sccOptimizations() { sccAnalysis(); // // We now renumber states and fairness sets to take account of // states in dead components and fairness sets which are not essential. // int nrStates = states.length(); Vector stateMap(nrStates); int nrLive = 0; for (int i = 0; i < nrStates; i++) stateMap[i] = (componentInfo[stateInfo[i].component].status == DEAD) ? NONE : nrLive++; Vector fairMap(nrFairnessSets); int nrFair = 0; for (int i = 0; i < nrFairnessSets; i++) fairMap[i] = essential.contains(i) ? nrFair++ : NONE; // // Then we rebuild the GBA, removing dead states, non-essential fairness // sets together fairness info from every transition that is not // internal to a fair component. For transitions within a fair component // each arc will belong to the (surviving) redundant fairness sets for // that component in addition to anything they belonged to previously. // NatSet newInitialStates; Vector newStates(nrLive); FairTransitionSetTable newFairTransitionSets; NatSetTable oldFairnessConditions; oldFairnessConditions.swap(fairnessConditions); for (int i = 0; i < nrStates; i++) { if (stateMap[i] != NONE) { FairTransitionSetTable::FastPair transformed; int component = stateInfo[i].component; const FairTransitionSet& original = fairTransitionSets.ithElement(states[i]); if (componentInfo[component].status == UNFAIR) eliminateFairness(transformed.first, original, stateMap); else { transformFairTransitionSet2(oldFairnessConditions, transformed.first, original, stateMap, fairMap, component); } newStates[stateMap[i]] = newFairTransitionSets.insert(transformed); } } remapNatSet(newInitialStates, initialStates, stateMap); initialStates.swap(newInitialStates); fairTransitionSets.swap(newFairTransitionSets); states.swap(newStates); nrFairnessSets = nrFair; } void GenBuchiAutomaton::eliminateFairness(FairTransitionSet& transformed, const FairTransitionSet& original, const Vector& stateMap) { FairTransitionSet::const_iterator e = original.end(); for (FairTransitionSet::const_iterator i = original.begin(); i != e; ++i) { int to = i->first.first; if (stateMap[to] != NONE) { FairTransition f; f.first.first = stateMap[to]; NatSet emptySet; f.first.second = fairnessConditions.insert(emptySet); f.second = i->second; insertFairTransition2(transformed, f); } } } void GenBuchiAutomaton::transformFairTransitionSet2(NatSetTable& oldFairnessConditions, FairTransitionSet& transformed, const FairTransitionSet& original, const Vector& stateMap, const Vector& fairMap, int component) { FairTransitionSet::const_iterator e = original.end(); for (FairTransitionSet::const_iterator i = original.begin(); i != e; ++i) { int to = i->first.first; if (stateMap[to] != NONE) { FairTransition f; f.first.first = stateMap[to]; if (stateInfo[to].component == component) { // // Internal transition in fair component. // NatSet fairness(oldFairnessConditions.ithElement(i->first.second)); #ifdef TDEBUG cout << "start " << fairness; #endif fairness.insert(componentInfo[component].redundant); #ifdef TDEBUG cout << " after insert " << fairness; #endif NatSet newFairness; remapNatSet(newFairness, fairness, fairMap); #ifdef TDEBUG cout << " after remap " << newFairness << '\n'; #endif f.first.second = fairnessConditions.insert(newFairness); } else { NatSet emptySet; f.first.second = fairnessConditions.insert(emptySet); } f.second = i->second; insertFairTransition2(transformed, f); } } } Maude-2.7/src/StrategyLanguage/0000755000147300135640000000000012305232005013453 500000000000000Maude-2.7/src/StrategyLanguage/testStrategy.cc0000644000147300135640000000470211446507265016431 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "higher.hh" #include "strategyLanguage.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // higher class definitions #include "matchSearchState.hh" // strategy language class definitions #include "decompositionProcess.hh" #include "strategicSearch.hh" #include "testStrategy.hh" TestStrategy::TestStrategy(Term* patternTerm, int depth, const Vector& condition) : pattern(patternTerm, depth >= 0, condition), depth(depth) { WarningCheck(pattern.getUnboundVariables().empty(), *patternTerm << ": variable " << QUOTE(pattern.index2Variable(pattern.getUnboundVariables().min())) << " is used before it is bound in condition of test strategy."); // need to do something about recovery } StrategicExecution::Survival TestStrategy::decompose(StrategicSearch& searchObject, DecompositionProcess* remainder) { if (!pattern.getUnboundVariables().empty()) return StrategicExecution::DIE; // bad condition always fails RewritingContext* context = searchObject.getContext(); RewritingContext* newContext = context->makeSubcontext(searchObject.getCanonical(remainder->getDagIndex())); MatchSearchState* state = new MatchSearchState(newContext, &pattern, MatchSearchState::GC_CONTEXT, 0, depth); bool result = state->findNextMatch(); state->transferCount(*context); delete state; return result ? StrategicExecution::SURVIVE : StrategicExecution::DIE; } Maude-2.7/src/StrategyLanguage/branchTask.cc0000644000147300135640000001051211446506757016010 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class StrategicTask. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "branchTask.hh" #include "decompositionProcess.hh" BranchTask::BranchTask(StrategyStackManager& strategyStackManager, StrategicExecution* sibling, int startIndex, StrategyExpression* initialStrategy, BranchStrategy::Action successAction, StrategyExpression* successStrategy, BranchStrategy::Action failureAction, StrategyExpression* failureStrategy, StrategyStackManager::StackId pending, StrategicProcess* insertionPoint) : StrategicTask(sibling), strategyStackManager(strategyStackManager), startIndex(startIndex), initialStrategy(initialStrategy), successAction(successAction), successStrategy(successStrategy), failureAction(failureAction), failureStrategy(failureStrategy), pending(pending) { success = false; (void) new DecompositionProcess(startIndex, strategyStackManager.push(StrategyStackManager::EMPTY_STACK, initialStrategy), getDummyExecution(), insertionPoint); } StrategicExecution::Survival BranchTask::executionSucceeded(int resultIndex, StrategicProcess* insertionPoint) { success = true; switch (successAction) { case BranchStrategy::FAIL: return DIE; case BranchStrategy::IDLE: { (void) new DecompositionProcess(startIndex, pending, this, insertionPoint); return DIE; } case BranchStrategy::PASS_THRU: { (void) new DecompositionProcess(resultIndex, pending, this, insertionPoint); break; } case BranchStrategy::NEW_STRATEGY: { // // Start a new process that applies the success strategy followed by the pending // strategies to the result. It will report to our owner. // DecompositionProcess* p = new DecompositionProcess(resultIndex, pending, this, insertionPoint); p->pushStrategy(strategyStackManager, successStrategy); break; } case BranchStrategy::ITERATE: { // // We set up another branch task on the new result and we stay alive to // process any new results. // (void) new BranchTask(strategyStackManager, this, resultIndex, initialStrategy, successAction, successStrategy, failureAction, failureStrategy, pending, insertionPoint); break; } default: CantHappen("bad success action"); } return SURVIVE; } StrategicExecution::Survival BranchTask::executionsExhausted(StrategicProcess* insertionPoint) { if (!success) { // // We didn't have any successes with initial strategy from the original term. // switch (failureAction) { case BranchStrategy::FAIL: break; case BranchStrategy::IDLE: { (void) new DecompositionProcess(startIndex, pending, this, insertionPoint); break; } case BranchStrategy::NEW_STRATEGY: { // // Start a new process that applies the failure strategy followed by the pending // strategies to the original term. It will report to our owner. // DecompositionProcess* p = new DecompositionProcess(startIndex, pending, this, insertionPoint); p->pushStrategy(strategyStackManager, failureStrategy); break; } default: CantHappen("bad failure action"); } } // // We don't have any more slave executions so we can pack up and go home. // return DIE; } Maude-2.7/src/StrategyLanguage/matchProcess.cc0000644000147300135640000000763010677057013016361 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "higher.hh" #include "strategyLanguage.hh" // interface class definitions #include "term.hh" #include "extensionInfo.hh" #include "subproblem.hh" // core class definitions #include "cachedDag.hh" #include "rule.hh" // higher class definitions #include "assignmentConditionFragment.hh" #include "rewriteConditionFragment.hh" // strategy language class definitions #include "strategicSearch.hh" #include "strategyExpression.hh" #include "applicationStrategy.hh" #include "applicationProcess.hh" #include "matchProcess.hh" MatchProcess::MatchProcess(SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, RewritingContext* matchContext, Subproblem* subproblem, Rule* rule, int fragmentNr, const Vector& strategies, int strategyNr, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* insertionPoint) : StrategicProcess(taskSibling, insertionPoint), rewriteState(rewriteState), // share rewrite state redexIndex(redexIndex), // copy redex index extensionInfoCopy((extensionInfo == 0) ? 0 : extensionInfo->makeClone()), // clone extension info matchContext(matchContext), // take over ownership of matchContext subproblem(subproblem), // take over ownership of subproblem rule(rule), // copy rule pointer fragmentNr(fragmentNr), // copy fragment number strategies(strategies), // share reference to strategies vector strategyNr(strategyNr), // copy strategy number pending(pending) // copy pending stack { DebugAdvisory("created MatchProcess, matchContext has nrFragileBindings = " << matchContext->nrFragileBindings()); findFirst = true; } MatchProcess::~MatchProcess() { delete extensionInfoCopy; delete matchContext; delete subproblem; } StrategicExecution::Survival MatchProcess::run(StrategicSearch& searchObject) { // // Each time we run we look for a new solution to the matching problem // If we find one we call resolveRemainingConditionFragments() which will // fork off a new process to continue the seach. If we don't find one, // there is no more work to do and we die. // bool success; if (subproblem) { success = subproblem->solve(findFirst, *matchContext); // // solve() could perform rewrites to apply cmbs. // searchObject.getContext()->transferCount(*matchContext); } else success = findFirst; if (success) { findFirst = false; if (ApplicationProcess::resolveRemainingConditionFragments(searchObject, rewriteState, redexIndex, extensionInfoCopy, matchContext, rule, fragmentNr + 1, strategies, strategyNr, pending, this, this) == SURVIVE) return SURVIVE; } finished(this); return DIE; } Maude-2.7/src/StrategyLanguage/decompositionProcess.hh0000644000147300135640000000412711446505626020154 00000000000000/* This file is part of the Maude 2 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 for a process that tries to decompose a strategy to reach a leaf. // #ifndef _decompositionProcess_hh_ #define _decompositionProcess_hh_ #include "strategicProcess.hh" #include "strategyStackManager.hh" class DecompositionProcess : public StrategicProcess { public: DecompositionProcess(int dagIndex, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* other); // // We can't pass const here because we need to touch original to // handle double linking both on the task list and the process queue. // DecompositionProcess(DecompositionProcess* original); Survival run(StrategicSearch& searchObject); void pushStrategy(StrategyStackManager& stackManager, StrategyExpression* strategy); StrategyStackManager::StackId getPending() const; int getDagIndex() const; private: int dagIndex; StrategyStackManager::StackId pending; }; inline void DecompositionProcess::pushStrategy(StrategyStackManager& stackManager, StrategyExpression* strategy) { pending = stackManager.push(pending, strategy); } inline StrategyStackManager::StackId DecompositionProcess::getPending() const { return pending; } inline int DecompositionProcess::getDagIndex() const { return dagIndex; } #endif Maude-2.7/src/StrategyLanguage/strategicExecution.hh0000644000147300135640000000377311446472671017623 00000000000000/* This file is part of the Maude 2 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. */ // // Base class for an item of strategic execution that is owned by a task. // #ifndef _strategicExecution_hh_ #define _strategicExecution_hh_ class StrategicExecution { NO_COPYING(StrategicExecution); public: // // Return values to indicate whether the StrategicExecution object // called should be deleted, possibly after some book-keeping. // enum Survival { DIE, SURVIVE }; StrategicExecution(StrategicTask* owner); StrategicExecution(StrategicExecution* other); // // Needed so that things can be deleted through a StrategicExecution*. // virtual ~StrategicExecution(); StrategicExecution* getNextSlave() const; void finished(StrategicProcess* insertionPoint); void succeeded(int resultIndex, StrategicProcess* insertionPoint); StrategicTask* getOwner() const; private: StrategicTask* const owner; // our owner StrategicExecution* prev; // previous execution belonging to owner StrategicExecution* next; // next exectution belonging to owner }; inline StrategicExecution* StrategicExecution::getNextSlave() const { return next; } inline StrategicTask* StrategicExecution::getOwner() const { return owner; } #endif Maude-2.7/src/StrategyLanguage/branchTask.hh0000644000147300135640000000421111446507145016011 00000000000000/* This file is part of the Maude 2 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 for task that will make a branch in the strategy depending // on what happens with some initial strategy. // #ifndef _branchTask_hh_ #define _branchTask_hh_ #include "strategicTask.hh" #include "branchStrategy.hh" #include "strategyStackManager.hh" class BranchTask : public StrategicTask { NO_COPYING(BranchTask); public: BranchTask(StrategyStackManager& strategyStackManager, StrategicExecution* sibling, int startIndex, StrategyExpression* initialStrategy, BranchStrategy::Action successAction, StrategyExpression* successStrategy, BranchStrategy::Action failureAction, StrategyExpression* failureStrategy, StrategyStackManager::StackId pending, StrategicProcess* insertionPoint); // // Call-backs for interesting events. // virtual Survival executionSucceeded(int resultIndex, StrategicProcess* insertionPoint); virtual Survival executionsExhausted(StrategicProcess* insertionPoint); private: StrategyStackManager& strategyStackManager; const int startIndex; StrategyExpression* const initialStrategy; BranchStrategy::Action successAction; StrategyExpression* const successStrategy; BranchStrategy::Action failureAction; StrategyExpression* const failureStrategy; StrategyStackManager::StackId pending; bool success; }; #endif Maude-2.7/src/StrategyLanguage/strategicExecution.cc0000644000147300135640000000656711446472611017607 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class StrategicTask. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "strategicExecution.hh" #include "strategicTask.hh" StrategicExecution::StrategicExecution(StrategicTask* owner) : owner(owner) { // // This ctor is only used for initializing the dummy list element. // prev = next = this; // needed for insertions to work correctly } StrategicExecution::StrategicExecution(StrategicExecution* other) : owner(other->owner) { // // This ctor inserts us into "other"s owners list of slaves before "other". // prev = other->prev; prev->next = this; next = other; next->prev = this; } StrategicExecution::~StrategicExecution() { // // We don't unlink from owners slave list here. Either we were deleted by // owner, in which case the owner has taken care of that, or we // requested deletion (running process) or we requested deletion by the return // value of executionSucceeded() or executionsExhausted() (task) and // a succeeded() or finished() call would have unlinked us. // // The upshot of this is that a StrategicProcess must always call succeeded() or // finished() before requesing deletion, otherwise there will be a dangling pointer // in its owners slave list. // } void StrategicExecution::finished(StrategicProcess* insertionPoint) { // // First we remove ourselves from our owners list of slaves. // prev->next = next; next->prev = prev; // // Then if we were the only slave on the list we report that. // if (next == prev) { if (owner->executionsExhausted(insertionPoint) == DIE) { owner->finished(insertionPoint); delete owner; } } } void StrategicExecution::succeeded(int resultIndex, StrategicProcess* insertionPoint) { // // Can an execution succceed multiple times? // - might be necessary for condition fragments. // // First we remove ourselves from our owners list of slaves. // prev->next = next; next->prev = prev; // // Then we report our success to our owner. // if (owner->executionSucceeded(resultIndex, insertionPoint) == DIE) { owner->finished(insertionPoint); delete owner; return; } // // Then if we were the only slave on the list we report that. // if (next == prev) { if (owner->executionsExhausted(insertionPoint) == DIE) { owner->finished(insertionPoint); delete owner; } } } Maude-2.7/src/StrategyLanguage/rewriteTask.hh0000644000147300135640000000532711446504754016251 00000000000000/* This file is part of the Maude 2 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 for task that solves a rewrite condition fragment by initiating // a search with a substrategy. // #ifndef _rewriteTask_hh_ #define _rewriteTask_hh_ #include "strategicTask.hh" #include "strategyStackManager.hh" class RewriteTask : public StrategicTask { NO_COPYING(RewriteTask); public: RewriteTask(StrategicSearch& searchObject, SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, Substitution* substitutionSoFar, Rule* rule, int fragmentNr, const Vector& strategies, int strategyNr, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* insertionPoint); ~RewriteTask(); // // Call-backs for interesting events. // virtual Survival executionSucceeded(int resultindex, StrategicProcess* insertionPoint); virtual Survival executionsExhausted(StrategicProcess* insertionPoint); private: const HashConsSet& hashConsSet; // reference to shared hash cons set SharedRewriteSearchState::Ptr rewriteState; // smart pointer to rewrite state that found our redex const PositionState::PositionIndex redexIndex; // index of redex withing rewrite state ExtensionInfo* extensionInfoCopy; // copy of extension info from original match Rule* const rule; // pointer to rule whose lhs matched const int fragmentNr; // number of condition fragment within rule const Vector& strategies; // vector of strategies for rewrite fragments const int strategyNr; // number of next strategy to use StrategyStackManager::StackId pending; // continuation once we finally do a rewrite RewriteConditionFragment* rcf; // // We generate a fresh subcontext to evaluate the lhs of the rewrite condition fragment. // RewritingContext* newContext; }; #endif Maude-2.7/src/StrategyLanguage/ChangeLog0000644000147300135640000010575411446507411015174 000000000000002010-09-22 Steven Eker * applicationProcess.hh (class ApplicationProcess): updated decl for doRewrite() * branchTask.hh (class BranchTask): startIndex replaces startDag; updated decl for ctor * branchTask.cc (BranchTask::BranchTask): take startIndex rather than startDag (BranchTask::executionSucceeded): use startIndex rather than startDag (BranchTask::executionsExhausted): use startIndex rather than startDag * applicationProcess.hh (class ApplicationProcess): updated decl for ctor * applicationProcess.cc (ApplicationProcess::ApplicationProcess): take startIndex rather than startDag * applicationStrategy.cc (ApplicationStrategy::decompose): use getDagIndex() in place of getDag() * testStrategy.cc (TestStrategy::decompose): use getDagIndex() * branchStrategy.cc (BranchStrategy::decompose): use getDagIndex() rather than getDag() * applicationProcess.cc (ApplicationProcess::doRewrite): return result index (ApplicationProcess::run): use resultIndex * rewriteTask.cc (RewriteTask::RewriteTask): pass an index to DecompositionProcess() * rewriteTask.hh (class RewriteTask): updated decl for executionSucceeded() * rewriteTask.cc (RewriteTask::RewriteTask): initialize hashConsSet (RewriteTask::executionSucceeded): use hashConsSet and resultIndex * rewriteTask.hh (class RewriteTask): added data member hashConsSet * branchTask.hh (class BranchTask): updated decl for executionSucceeded() * branchTask.cc (BranchTask::executionSucceeded): use resultIndex rather than result * strategicSearch.cc (StrategicSearch::executionSucceeded): take resultIndex rather than result (StrategicSearch::findNextSolution): use solutionIndex * strategicSearch.hh (class StrategicSearch): solution becomes solutionIndex * strategicSearch.cc (StrategicSearch::StrategicSearch): call insert() to get a dagIndex to pass to DecompositionProcess() * strategicSearch.hh (class StrategicSearch): updated decl for executionSucceeded() * strategicTask.hh (class StrategicTask): updated decl for resultIndex * strategicExecution.hh (class StrategicExecution): updated decl for succeeded() * strategicExecution.cc (StrategicExecution::succeeded): take resultIndex rather than result * decompositionProcess.cc (DecompositionProcess::DecompositionProcess): take dagIndex (both versions) (DecompositionProcess::run): no need to look up dagIndex * decompositionProcess.hh (class DecompositionProcess): update ctor decl (class DecompositionProcess): dag becomes dagIndex (DecompositionProcess::getDag): becomes getDagIndex() 2010-09-16 Steven Eker * decompositionProcess.cc (DecompositionProcess::run): use HashConsSet rather than DagNodeCache * applicationProcess.cc (ApplicationProcess::doRewrite): use HashConsSet rather than DagNodeCache * strategicSearch.hh (class StrategicSearch): derive from HashConsSet rather than DagNodeCache ===================================Maude95=========================================== 2008-09-11 Steven Eker * applicationProcess.cc (resolveRemainingConditionFragments): remove cute coding; don't look up a AssignmentConditionFragment* twice ===================================Maude91a=========================================== 2007-09-28 Steven Eker * applicationProcess.cc (resolveRemainingConditionFragments): justify two uses of clone() and turn one into a copy() (doRewrite): justify use of clone() * rewriteTask.cc (RewriteTask, executionSucceeded): justify use of clone() ===================================Maude89h=========================================== 2007-01-23 Steven Eker * strategicTask.cc (alreadySeen): ugly hack to avoid a UMR in purify 2006-12-15 Steven Eker * decompositionProcess.cc (run): check if we've been here before on behalf of the same task (run): need to call finished if we are goind to die because of redundancy * strategicExecution.hh (getOwner): added * strategicTask.cc (alreadySeen): added * strategicTask.hh (class StrategicTask): added typedefs State and SeenSet and data member seenSet and decl for alreadySeen() 2006-12-14 Steven Eker * decompositionProcess.hh (class DecompositionProcess): deleted decl for non-stack verison of DecompositionProcess() * decompositionProcess.cc (DecompositionProcess): deleted non-stack version * strategyStackManager.cc (push): fix missing return statement bug * rewriteTask.cc (RewriteTask): pass a StackId to DecompositionProcess() * strategicSearch.cc (StrategicSearch): pass a StackId to DecompositionProcess() * rewriteTask.cc (RewriteTask): update pending argument * rewriteTask.hh (class RewriteTask): use StrategyStackManager for pending * matchProcess.cc (MatchProcess): update pending argument * matchProcess.hh (class MatchProcess): use StrategyStackManager for pending * branchTask.cc (BranchTask): initialize strategyStackManager; use a push() in order to call stack version of DecompositionProcess() (executionsExhausted, executionSucceeded): use strategyStackManager (executionSucceeded): pass strategyStackManager to our ctor * branchTask.hh (class BranchTask): added strategyStackManager data member * unionStrategy.cc (decompose): update now that we need to pass strategy manager to pushStrategy() * concatenationStrategy.cc (decompose): update now that we need to pass strategy manager to pushStrategy() * iterationStrategy.cc (decompose): update now that we need to pass strategy manager to pushStrategy() * branchStrategy.cc (decompose): pass strategyStackManager arg * branchTask.hh (class BranchTask): update decls as pending is now a StrategyStackManager::StackId * applicationProcess.cc: rewritten using class StrategyStackManager * applicationProcess.hh (class ApplicationProcess): update decls as pending is now a StrategyStackManager::StackId * decompositionProcess.cc (run): rewritten using StrategyStackManager * strategyStackManager.hh (class StrategyStackManager): added enum Constants * strategicExecution.hh (class StrategicExecution): deleted typedef StrategyStack * decompositionProcess.hh (class DecompositionProcess): update decls as pending is now a StrategyStackManager::StackId (pushStrategy): rewritten * strategicSearch.hh (class StrategicSearch): derive from StrategyStackManager * strategyLanguage.hh: added fwd decl for class StrategyStackManager 2006-12-13 Steven Eker * strategyStackManager.hh: created * strategyStackManager.cc: created ===================================Maude88d=========================================== 2006-11-10 Steven Eker * strategicSearch.hh (class StrategicSearch): added data member strategy and decl for dtor * strategicSearch.cc (StrategicSearch): save strategy (~StrategicSearch): added * testStrategy.cc (decompose): make test with unbound variables in condition always fail * matchProcess.cc (run): fixed uninitialized success bug 2006-11-09 Steven Eker * rewriteTask.hh (class RewriteTask): update decl for ctor * matchProcess.cc (run): use transferCount() to keep track of any rewrites generated by solve * applicationProcess.cc (resolveRemainingConditionFragments): use transferCount() to keep track of rewrites from reduction in assignment case * rewriteTask.cc (RewriteTask): take searchObject; use it to add in rewrite counts from reduction * applicationProcess.cc (resolveRemainingConditionFragments): fix a bug where we were losing eager copies of variables made by solve() (resolveRemainingConditionFragments): pass searchObject to RewriteTask() 2006-11-08 Steven Eker * applicationProcess.cc: ignore rewrites where the number of rewrite condition fragments in the rule differs from the number of substrategies * testStrategy.hh (getPatternTerm, getDepth, getCondition): added * branchStrategy.cc (BranchStrategy): rearranged initializers * branchStrategy.hh (class BranchStrategy): rearranged data members for better storage on 64bit matchines (getInitialStrategy, getSuccessStrategy, getFailureStrategy) (getSuccessAction, getFailureAction): added 2006-11-07 Steven Eker * unionStrategy.hh (getStrategies): added * iterationStrategy.hh (getStrategy): added (getZeroAllowed): added * concatenationStrategy.hh (getStrategies): added * strategyExpression.hh: added decl for operator<< * trivialStrategy.hh (getResult): added 2006-11-06 Steven Eker * strategyLanguage.hh: added classes MatchProcess and RewriteTask * rewriteTask.cc (executionSucceeded): use MatchProcess() * matchProcess.hh: created * matchProcess.cc: created * applicationProcess.cc (resolveRemainingConditionFragments): rewritten using MatchProcess * assignmentProcess.cc (run): new resolveRemainingConditionFragments() convention * applicationProcess.cc (run): new resolveRemainingConditionFragments() convention * assignmentProcess.hh (class AssignmentProcess): updated decl for one of the ctors * assignmentProcess.cc (AssignmentProcess): use substitutionSoFar instead of context * rewriteTask.cc (RewriteTask): use substitutionSoFar instead of context * rewriteTask.hh (class RewriteTask): updated decl for ctor * applicationProcess.hh (class ApplicationProcess): updated decl for resolveRemainingConditionFragments() * applicationProcess.cc (resolveRemainingConditionFragments) (doRewrite): rootContext -> baseContext (resolveRemainingConditionFragments): context -> substitutionSoFar 2006-11-03 Steven Eker * applicationProcess.cc (run): pass searchObject to doRewrite() (doRewrite): take search object; context now becomes just a substitution (resolveRemainingConditionFragments): pass searchObject to doRewrite() (doRewrite): handle caching new dag in searchObject (resolveRemainingConditionFragments): create special context to pass to solve() so we have the correct substituion as well as the correct root term; this fixes a bug that we weren't taking into account bindings made by previous condition fragments 2006-11-02 Steven Eker * rewriteTask.cc (RewriteTask): fix bug where rcf was declared local 2006-10-31 Steven Eker * applicationProcess.cc (resolveRemainingConditionFragments): use RewriteTask() * assignmentProcess.hh (class AssignmentProcess): added decl for rewrite version of ctor * assignmentProcess.cc (AssignmentProcess): added rewrite version 2006-10-30 Steven Eker * rewriteTask.hh: created * rewriteTask.cc: created 2006-10-26 Steven Eker * applicationProcess.cc (doRewrite): use new rebuildDag() semantics to fix trace bug 2006-10-25 Steven Eker * applicationProcess.cc (doRewrite): create a tracingContext that has both the correct whole term and the correct substitution; get hold of the redex specified by redexIndex using the PositionIndex version of getDagNode() * strategicSearch.cc (findNextSolution): check for aborts * assignmentProcess.cc (run): rewritten to make sure we call finished() before we return DIE * applicationProcess.cc (run): make sure we call finished() before we return DIE * assignmentProcess.cc (AssignmentProcess): fixed bug where we were storing new context in a local variable (run): call finished() when done 2006-10-24 Steven Eker * applicationProcess.cc (doRewrite): use context rather than substitution since we need to be able to trace substitutions via a context call * assignmentProcess.cc (run): use new resolveRemainingConditionFragments() conventions (AssignmentProcess): handle null extension info * applicationProcess.cc (resolveRemainingConditionFragments): rewritten to be more general (resolveRemainingConditionFragments): use AssignmentProcess() * applicationProcess.hh (doRewrite): deleted (class ApplicationProcess): update decl for resolveRemainingConditionFragments() * applicationProcess.cc (run): use new resolveRemainingConditionFragments() and doRewrite() conventions * applicationProcess.hh (doRewrite): updated * applicationProcess.cc (doRewrite): rewritten to take a substitution rather than a context (run): use simplified doRewrite() 2006-10-23 Steven Eker * applicationProcess.hh (class ApplicationProcess): added decl for new doRewrite() (doRewrite): added * applicationProcess.cc (doRewrite): rewritten to handle redexIndex, extensionInfo, substitution and rule that may have be saved from an earlier state of rewriteState * applicationProcess.hh (class ApplicationProcess): make resolveRemainingConditionFragments() static * assignmentProcess.hh: rewritten 2006-10-20 Steven Eker * assignmentProcess.cc: rewritten from scratch 2006-10-18 Steven Eker * strategyLanguage.hh: added class SharedRewriteSearchState 2006-10-17 Steven Eker * applicationProcess.cc: use SharedRewriteSearchState (~ApplicationProcess): deleted * applicationProcess.hh (class ApplicationProcess): use SharedRewriteSearchState; deleted data member initial * sharedRewriteSearchState.hh: created * sharedRewriteSearchState.cc: created 2006-10-11 Steven Eker * testStrategy.cc (decompose): pass depth to MatchSearchState() * testStrategy.hh: anywhere data member becomes depth; update decl for ctor * testStrategy.cc (TestStrategy): take depth arg ===================================Maude88b=========================================== 2006-09-29 Steven Eker * assignmentProcess.cc (AssignmentProcess): created * assignmentProcess.hh: created * applicationProcess.hh (class ApplicationProcess): updated decl for ctor * applicationProcess.cc (ApplicationProcess): take searchObject rather than context * applicationStrategy.cc (decompose): pass searchObject rather than context to ApplicationProcess() * applicationProcess.hh (class ApplicationProcess): updated decl for resolveRemainingConditionFragments(); delete data member context * applicationProcess.cc (ApplicationProcess): don't save context - just use it to make initial subcontext (resolveRemainingConditionFragments): don't take context; use getContext() (run): don't pass context to resolveRemainingConditionFragments(); use getContext() 2006-09-28 Steven Eker * applicationProcess.cc (run): use resolveRemainingConditionFragments() * applicationProcess.hh (class ApplicationProcess): added decl for resolveRemainingConditionFragments() (class ApplicationProcess): added data member strategy * applicationProcess.cc (doRewrite): become static; take rewriteState and context arguments (run): new doRewrite() convention (resolveRemainingConditionFragments): added * applicationProcess.hh (class ApplicationProcess): removed decl for run2(); added decl for doRewrite() * applicationProcess.cc (run2): deleted (run): rewritten (doRewrite): added 2006-09-27 Steven Eker * applicationStrategy.cc (decompose): use new ApplicationProcess convention * applicationProcess.hh (class ApplicationProcess): updated decl for ApplicationProcess() * applicationProcess.cc (ApplicationProcess): rewritten using new convention for passing ApplicationStrategy info * applicationStrategy.hh (getTop, getLabel, getVariables) (getValues, getStrategies): added * applicationProcess.cc (ApplicationProcess): pass IGNORE_CONDITION to rewriteState ctor 2006-09-15 Steven Eker * testStrategy.hh (class TestStrategy): withExtension becomes anywhere * testStrategy.cc (TestStrategy): withExtension becomes anywhere (decompose): withExtension becomes anywhere; allow unbounded depth in anywhere case 2006-09-14 Steven Eker * testStrategy.cc (decompose): implemented using class MatchSearchState 2006-09-13 Steven Eker * testStrategy.hh (class TestStrategy): need withExtension data member after all * testStrategy.cc (TestStrategy): check for unbound variables * testStrategy.hh (class TestStrategy): replace existing data members with pattern (class TestStrategy): update ctor decl * testStrategy.cc (TestStrategy): rewritten * strategyLanguage.hh: added class TestStrategy * testStrategy.cc: created * testStrategy.hh (class TestStrategy, class TestStrategy): update ctor decl; added data members condition and withExtension 2006-09-01 Steven Eker * testStrategy.hh (class TestStrategy): created * stateCache.hh: deleted * stateCache.cc: deleted * strategyLanguage.hh: rm class StateCache * branchStrategy.cc (decompose): use Survival data type * branchStrategy.hh (class BranchStrategy): update decl for decompose() * concatenationStrategy.cc (decompose): use Survival data type * concatenationStrategy.hh (class ConcatenationStrategy): update decl for decompose() * unionStrategy.cc (decompose): use Survival data type * unionStrategy.hh (class UnionStrategy): update decl for decompose() * iterationStrategy.cc (decompose): use Survival data type * iterationStrategy.hh (class IterationStrategy): update decl for decompose() * trivialStrategy.cc (decompose): rewritten * trivialStrategy.hh (class TrivialStrategy): update decl for decompose() * applicationStrategy.cc (decompose): use Survival data type * applicationStrategy.hh (class ApplicationStrategy): update decl for decompose() * strategicSearch.cc (findNextSolution): use Survival data type * strategyExpression.hh (class StrategyExpression): updated decl for decompose(); made pure virtual * strategicProcess.hh (class StrategicProcess): updated decl for run() * applicationProcess.hh (class ApplicationProcess): updated decl for run() * applicationProcess.cc (run): use Survival data type * decompositionProcess.hh (class DecompositionProcess): updated decl for run() * decompositionProcess.cc (run): use Survival data type * iterationStrategy.cc (decompose): remove normalForm Assert() (~IterationStrategy): simplified * iterationStrategy.hh (class IterationStrategy): rm zeroAllowed data member * iterationStrategy.cc (IterationStrategy): rewritten * iterationStrategy.hh (class IterationStrategy): rm normalForm data member; update ctor decl * strategyLanguage.hh: removed classes TrivialSetGenerator, ApplicationSetGenerator, SetGenerator, ConcatenationSetGenerator, IterationSetGenerator, BranchSetGenerator, UnionSetGenerator * setGenerator.hh: deleted * unionSetGenerator.cc: deleted * unionSetGenerator.hh: deleted * branchSetGenerator.cc: deleted * branchSetGenerator.hh: deleted * iterationSetGenerator.cc: deleted * iterationSetGenerator.hh: deleted * concatenationSetGenerator.cc: deleted * concatenationSetGenerator.hh: deleted * applicationSetGenerator.cc: deleted * applicationSetGenerator.hh: deleted * trivialSetGenerator.cc: deleted * trivialSetGenerator.hh: deleted * applicationStrategy.cc (execute): deleted * applicationStrategy.hh (class ApplicationStrategy): remove decl for execute() * trivialStrategy.cc (execute): deleted * trivialStrategy.hh (class TrivialStrategy): remove decl for execute() * iterationStrategy.hh (class IterationStrategy): remove decl for execute() * iterationStrategy.cc (execute): deleted * branchStrategy.cc (execute): deleted * branchStrategy.hh (class BranchStrategy): remove decl for execute() * concatenationStrategy.cc (execute): deleted * concatenationStrategy.hh (class ConcatenationStrategy): remove decl for execute() * unionStrategy.cc (execute): deleted * unionStrategy.hh (class UnionStrategy): remove decl for execute() * strategyExpression.hh (class StrategyExpression): remove decl for execute() * strategyLanguage.hh: removed class UnaryStrategy, class UnarySetGenerator * unarySetGenerator.cc: deleted * unarySetGenerator.hh (class UnarySetGenerator): deleted * unaryStrategy.hh: deleted * unaryStrategy.cc: deleted 2006-08-30 Steven Eker * branchStrategy.hh (class BranchStrategy): added ITERATE to enum Action * branchStrategy.cc (BranchStrategy): allow ITERATE * branchTask.cc (executionsExhausted): fixed bug where we were using successAction instead of failureAction (executionSucceeded): handle ITERATE case * branchStrategy.cc (BranchStrategy): rewritten (execute): rewritten (decompose): rewritten (BranchStrategy): added Assert()s (~BranchStrategy): updated * branchStrategy.hh (class BranchStrategy): added data members successAction and failureAction; renamed existing data members; updated ctor 2006-08-28 Steven Eker * strategicSearch.hh (class StrategicSearch): executionSucceeded() and executionsExhausted() now return Survival * strategicSearch.cc (executionSucceeded, executionsExhausted): now return Survival * branchTask.cc (executionsExhausted): rewritten (executionSucceeded): rewritten * branchTask.hh (class BranchTask): update decls for executionSucceeded() and executionsExhausted() * strategicExecution.cc (finished): handle return value from executionsExhausted() (succeeded): handle return values from executionSucceeded() and executionsExhausted() * strategicTask.hh (class StrategicTask): executionSucceeded() and executionsExhausted() now return survival flag * strategicExecution.hh (class StrategicExecution): added enum Survival * branchTask.hh (class BranchTask): remove enum Action * branchStrategy.hh (class BranchStrategy): added enum Action * branchStrategy.cc (decompose): new BranchTask() convention * branchTask.cc (executionSucceeded): make use of successAction (executionsExhausted): make use of failureAction * branchTask.hh (class BranchTask): added enum Action; added successAction and failureAction to ctor arg list (class BranchTask): added data members successAction and failureAction * strategicSearch.cc (StrategicSearch): disambig call to StrategicTask() * branchStrategy.cc (decompose): added * strategicTask.cc (StrategicTask): added sibling based ctor * strategicTask.hh (class StrategicTask): added decl for sibling based ctor * branchTask.hh (class BranchTask): updated decl for ctor * branchTask.cc (BranchTask): take sibling rather than master * branchStrategy.hh (class BranchStrategy): added decl for decompose() * branchTask.cc (executionsExhausted): use finished() rather than failed() * applicationProcess.cc (run): use finished() rather than failed() * decompositionProcess.cc (run): new convention for succeeded(); use finished() rather than failed() * strategicExecution.cc (failed): becomes finished(); use new insertionPoint convention (succeeded): use new insertionPoint convention * strategicSearch.hh (class StrategicSearch): updated decls for executionSucceeded(), executionsExhausted() * strategicExecution.hh (class StrategicExecution): updated decl for succeeded(), failed() becomes finished() * strategicTask.hh (class StrategicTask): updated decls for executionSucceeded(), executionsExhausted() * branchTask.hh (class BranchTask): updated decls for executionSucceeded(), executionsExhausted() * branchTask.cc (executionSucceeded, executionsExhausted): take insertionPoint arg 2006-08-25 Steven Eker * strategyLanguage.hh: added class BranchTask * branchTask.cc: created * branchTask.hh: created 2006-08-24 Steven Eker * iterationStrategy.hh (class IterationStrategy): added data member star * iterationStrategy.cc (decompose): added (IterationStrategy): create * subexpression in + case (~IterationStrategy): handle * subexpression (decompose): handle + case * iterationStrategy.hh (class IterationStrategy): added decl for decompose() * unionStrategy.cc (decompose): added * unionStrategy.hh (class UnionStrategy): added decl for decompose() * trivialStrategy.cc (decompose): take StrategicSearch&; don't call failed() * trivialStrategy.hh (class TrivialStrategy): updated decl for decompose() * strategicSearch.cc (findNextSolution): fix bad assert - if del == false we haven't run out of processes * concatenationStrategy.cc (decompose): fix obiwan bug in loop start * decompositionProcess.cc (run): call failed to unlink ourself if we are requesting destruction * applicationProcess.hh (class ApplicationProcess): fixed nasty bug where we were storing a reference to pending rather than a copy 2006-08-15 Steven Eker * decompositionProcess.cc (DecompositionProcess): fixed dag/start bug * strategicSearch.cc (StrategicSearch): added Assert()s for arguments * decompositionProcess.cc (DecompositionProcess): (2 versions) added Assert() * decompositionProcess.hh (getDag): added Assert() * applicationStrategy.cc (decompose): updated * concatenationStrategy.cc (decompose): updated * applicationStrategy.hh (class ApplicationStrategy): updated decl for decompose() * concatenationStrategy.hh (class ConcatenationStrategy): updated decl for decompose() * strategyExpression.hh (class StrategyExpression): updated decl for decompose() * decompositionProcess.cc (run): updated * applicationProcess.cc (run): updated * applicationProcess.hh (class ApplicationProcess): updated decl for run() * decompositionProcess.hh (class DecompositionProcess): updated decl for run() * strategicProcess.hh (class StrategicProcess): updated decl for run() * strategicSearch.cc (StrategicSearch): added * strategicTask.hh (getDummyExecution): added * strategicTask.cc (~StrategicTask): make consistent * strategicTask.hh (class StrategicTask): slaveList is a StrategicExecution not a StrategicExecution* * strategicSearch.hh (class StrategicSearch): added decl for getContext(); added data member initial (getContext): added 2006-08-14 Steven Eker * decompositionProcess.hh (getDag): added * applicationStrategy.hh (class ApplicationStrategy): added decl for decompose() * strategyLanguage.hh: add class ApplicationProcess; rm class StrategicProcessLink * applicationProcess.hh: created * applicationProcess.cc: created * strategicExecution.hh (class StrategicExecution): added typedef StrategyStack * decompositionProcess.hh (getPending): added (class DecompositionProcess): added decl for new ctor (class DecompositionProcess): removed typedef StrategyStack * concatenationStrategy.cc (decompose): added * concatenationStrategy.hh (class ConcatenationStrategy): added decl for decompose() 2006-08-11 Steven Eker * trivialStrategy.hh (class TrivialStrategy): added decl for decompose() * trivialStrategy.cc (decompose): added * strategyLanguage.hh: added class DecompositionProcess * strategyExpression.hh (class StrategyExpression): added new member function decompose() * decompositionProcess.cc: created (DecompositionProcess): take pointer rather than const ref for copy version * decompositionProcess.hh (pushStrategy): added (class DecompositionProcess): use stack<> rather than list<> 2006-08-10 Steven Eker * decompositionProcess.hh: created * strategicSearch.cc (findNextSolution): rewritten without explicit process queue * strategicProcess.hh (class StrategicProcess): derive from Strategic execution * strategicProcessLink.cc: becomes strategicProcess.cc * strategicProcessLink.hh: becomes strategicProcess.hh * strategicSearch.cc: new conventions * strategicSearch.hh: rewritten * strategyLanguage.hh: added classes StrategicProcessLink and StrategicProcess * strategicProcessLink.cc: created * strategicProcessLink.hh: created 2006-08-09 Steven Eker * strategicExecution.cc (succeeded): need to report executionsExhausted() (StrategicExecution): we do need to initialize to this pointer after all (StrategicExecution): insert before rather than after (~StrategicExecution): added * strategicTask.cc: rewritten to new design * strategicExecution.hh (getNextSlave): added * strategicTask.hh: rewritten to new design * strategicExecution.cc (StrategicExecution): initializing prev and next to 0 is as good as anything and should ease debugging 2006-08-08 Steven Eker * strategicSearch.cc: created * strategyLanguage.hh: added classes StrategicExecution, StrategicTask, StrategicSearch * strategicExecution.hh: created * strategicTask.cc: created * strategicTask.hh: created 2006-08-07 Steven Eker * strategicSearch.hh: created ===================================Maude88a=========================================== 2006-06-28 Steven Eker * iterationSetGenerator.cc (findNextSolution): fix new bug introduced by last fix (IterationSetGenerator): replace done with started (findNextSolution): use started hack rather that done * iterationSetGenerator.hh (class IterationSetGenerator): added data member done * iterationSetGenerator.cc (findNextSolution): fix bug where returning a normal form with an empty queue starts us over by using done flag (IterationSetGenerator): initialized done flag 2006-05-04 Steven Eker * strategyLanguage.hh: added class StateCache * stateCache.hh: created * stateCache.cc: created 2006-04-24 Steven Eker * strategyLanguage.hh: added classes UnaryStrategy and UnarySetGenerator 2006-04-21 Steven Eker * unarySetGenerator.cc: created * unaryStrategy.cc: created * unarySetGenerator.hh: created * unaryStrategy.hh: created 2006-04-18 Steven Eker * iterationStrategy.cc (IterationStrategy): set normalForm flag (execute): pass normalForm flag * iterationStrategy.hh (class IterationStrategy): added data member normalForm 2006-04-17 Steven Eker * iterationSetGenerator.hh (class IterationSetGenerator): updated decl for ctor * iterationSetGenerator.cc (IterationSetGenerator) (findNextSolution): support normalForm flag (IterationSetGenerator): updated * branchSetGenerator.hh (class BranchSetGenerator): rewritten for fairness * branchSetGenerator.cc: rewritten for fairness 2006-04-13 Steven Eker * applicationSetGenerator.hh (class ApplicationSetGenerator): update ctor decl * applicationStrategy.cc (execute): pass top flag to ApplicationSetGenerator() * applicationSetGenerator.cc (ApplicationSetGenerator): take and handle top flag 2006-04-12 Steven Eker * strategyLanguage.hh: removed classes StrategySequence and SequenceSetGenerator * strategySequence.hh: deleted * sequenceSetGenerator.hh: deleted * strategySequence.cc: deleted * sequenceSetGenerator.cc: deleted * concatenationSetGenerator.cc: created 2006-04-11 Steven Eker * concatenationSetGenerator.hh: created 2006-04-06 Steven Eker * concatenationStrategy.cc: created * concatenationStrategy.hh (class ConcatenationStrategy): created 2006-04-05 Steven Eker * applicationSetGenerator.cc (ApplicationSetGenerator): pass min and max depth args to RewriteSeachState init to fix bug that defaults only allow rewriting at top without extension ===================================Maude87a=========================================== 2006-03-24 Steven Eker * applicationStrategy.cc (ApplicationStrategy): need to call normalize() and prepare() on cached dags * unionSetGenerator.cc (findNextSolution): fix memory leak where we were not deleting failed set generators 2006-03-21 Steven Eker * unionSetGenerator.cc: created * unionSetGenerator.hh: created * strategyLanguage.hh: added decls for classes UnionStrategy and UnionSetGenerator * strategySequence.hh (class StrategySequence): made strategies const 2006-03-20 Steven Eker * applicationStrategy.hh (class ApplicationStrategy): fix ctor decl * applicationStrategy.cc (ApplicationStrategy): pass strategies by reference * unionStrategy.cc: created * unionStrategy.hh: created * strategyLanguage.hh: added decls for classes BranchStrategy and BranchSetGenerator * branchSetGenerator.hh: created * branchSetGenerator.cc: created * branchStrategy.hh: created * branchStrategy.cc: created 2006-03-17 Steven Eker * iterationStrategy.cc (~IterationStrategy): added 2006-03-07 Steven Eker * applicationStrategy.cc (execute): implemented * applicationSetGenerator.cc: created * strategyLanguage.hh: added class ApplicationSetGenerator * applicationSetGenerator.hh: created 2006-03-06 Steven Eker * iterationSetGenerator.cc: created * iterationSetGenerator.hh (class IterationSetGenerator): strategies -> strategy (class IterationSetGenerator): added data member start (class IterationSetGenerator): added data member zeroReturnable (class IterationSetGenerator): added typedef GenQueue 2006-02-27 Steven Eker * strategyLanguage.hh: added decls for IterationStrategy, IterationSetGenerator * iterationSetGenerator.hh: created * iterationStrategy.hh: created * iterationStrategy.cc: created * sequenceSetGenerator.cc (SequenceSetGenerator) (findNextSolution): simplified on the assumption that execute() never returns 0 (findNextSolution): change of variable * strategySequence.cc (execute): use SequenceSetGenerator() * strategyLanguage.hh: added decls for StrategySequence, TrivialSetGenerator, SequenceSetGenerator * sequenceSetGenerator.hh: updated * sequenceSetGenerator.cc: created 2006-02-15 Steven Eker * strategySequence.hh (StrategyExpression): created * trivialStrategy.cc (execute): use TrivialSetGenerator() * applicationStrategy.cc: was application.cc * applicationStrategy.hh: was application.hh * trivial.cc: becomes trivialStrategy.cc * trivial.hh: becomes trivialStrategy.hh * trivialSetGenerator.hh (class TrivialSetGenerator): created * trivialSetGenerator.cc: created * strategyLanguage.hh: created * application.cc (execute): updated * application.hh (StrategyExpression): update decl forexecute() * trivial.hh (StrategyExpression): update decl forexecute() * strategyExpression.hh (class StrategyExpression): update decl for execute() * setGenerator.hh (class SetGenerator): created 2006-02-13 Steven Eker * application.cc (Application): Assert() to check for label == NONE case * application.hh (StrategyExpression): added data member top (setTop): added 2006-02-06 Steven Eker * trivial.cc (Trivial): added ctor * trivial.hh (StrategyExpression): decl for ctor * application.cc (Application): added Assert() 2006-02-02 Steven Eker * application.cc (Application, ~Application): added 2006-02-01 Steven Eker * application.cc: created * idle.cc: becomes trivial.cc * idle.hh: becomes trivial.hh; add data member result * application.hh: created * strategyExpression.hh: created * idle.hh: created * idle.cc: created Maude-2.7/src/StrategyLanguage/strategicSearch.hh0000644000147300135640000000352411446473517017057 00000000000000/* This file is part of the Maude 2 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 for performing a search using a strategy. // #ifndef _stategicSearch_hh_ #define _stategicSearch_hh_ #include #include "hashConsSet.hh" #include "strategicTask.hh" #include "strategyStackManager.hh" class StrategicSearch : public HashConsSet, public StrategyStackManager, private StrategicTask { NO_COPYING(StrategicSearch); public: // // We take ownership of initial and strategy and delete them in our dtor. // StrategicSearch(RewritingContext* initial, StrategyExpression* strategy); ~StrategicSearch(); DagNode* findNextSolution(); RewritingContext* getContext(); private: // // Virtual in StrategicTask. // Survival executionSucceeded(int resultIndex, StrategicProcess* insertionPoint); Survival executionsExhausted(StrategicProcess* insertionPoint); RewritingContext* initial; StrategyExpression* strategy; bool exhausted; int solutionIndex; StrategicProcess* nextToRun; }; inline RewritingContext* StrategicSearch::getContext() { return initial; } #endif Maude-2.7/src/StrategyLanguage/branchStrategy.cc0000644000147300135640000000501011446506022016666 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for class BranchStrategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "branchStrategy.hh" #include "branchTask.hh" #include "decompositionProcess.hh" #include "strategicSearch.hh" BranchStrategy::BranchStrategy(StrategyExpression* initialStrategy, Action successAction, StrategyExpression* successStrategy, Action failureAction, StrategyExpression* failureStrategy) : initialStrategy(initialStrategy), successStrategy(successStrategy), failureStrategy(failureStrategy), successAction(successAction), failureAction(failureAction) { Assert(successAction >= FAIL && successAction <= ITERATE, "bad success action"); Assert((successAction == NEW_STRATEGY) == (successStrategy != 0), "success inconsistancy"); Assert(failureAction == FAIL || failureAction == IDLE || failureAction == NEW_STRATEGY, "bad failure action"); Assert((failureAction == NEW_STRATEGY) == (failureStrategy != 0), "failure inconsistancy"); } BranchStrategy::~BranchStrategy() { delete initialStrategy; delete successStrategy; delete failureStrategy; } StrategicExecution::Survival BranchStrategy::decompose(StrategicSearch& searchObject, DecompositionProcess* remainder) { (void) new BranchTask(searchObject, remainder, remainder->getDagIndex(), initialStrategy, successAction, successStrategy, failureAction, failureStrategy, remainder->getPending(), remainder); return StrategicExecution::DIE; // request deletion of DecompositionProcess } Maude-2.7/src/StrategyLanguage/testStrategy.hh0000644000147300135640000000351110524430742016427 00000000000000/* This file is part of the Maude 2 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 for idle and fail strategies. // #ifndef _testStrategy_hh_ #define _testStrategy_hh_ #include "strategyExpression.hh" #include "pattern.hh" class TestStrategy : public StrategyExpression { public: // // depth = -1 means at top, no extension // depth = 0 means at top, with extension // depth = UNBOUNDED means all the way down to the leaf nodes, with extension // TestStrategy(Term* patternTerm, int depth, const Vector& condition); Term* getPatternTerm() const; int getDepth() const; const Vector& getCondition(); StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder); private: Pattern pattern; const int depth; }; inline Term* TestStrategy::getPatternTerm() const { return pattern.getLhs(); } inline int TestStrategy::getDepth() const { return depth; } inline const Vector& TestStrategy::getCondition() { return pattern.getCondition(); } #endif Maude-2.7/src/StrategyLanguage/decompositionProcess.cc0000644000147300135640000000550311446472465020145 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class StrategicTask. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" #include "dagNode.hh" // strategy language class definitions #include "decompositionProcess.hh" #include "strategyExpression.hh" #include "strategicSearch.hh" DecompositionProcess::DecompositionProcess(int dagIndex, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* other) : StrategicProcess(taskSibling, other), dagIndex(dagIndex), pending(pending) { Assert(pending >= 0, "bad pending stack id " << pending); } DecompositionProcess::DecompositionProcess(DecompositionProcess* original) : StrategicProcess(original, original), dagIndex(original->dagIndex), pending(original->pending) { // // A copy of a process will be owned by same task as original and will // get put in the process queue just ahead of original. It will share // the dagIndex and persistant pending stack. // // Clones are handy when we want to explore several alternative futures in parallel. // } StrategicExecution::Survival DecompositionProcess::run(StrategicSearch& searchObject) { DebugAdvisory("DecompositionProcess::run(), dagIndex = " << dagIndex << " for " << searchObject.getCanonical(dagIndex)); if (getOwner()->alreadySeen(dagIndex, pending)) { DebugAdvisory("we've already been here: " << searchObject.getCanonical(dagIndex) << ", " << pending); finished(this); return DIE; } if (pending == StrategyStackManager::EMPTY_STACK) { // // Report our success. // succeeded(dagIndex, this); // // Request deletion. // return DIE; } StrategyExpression* s = searchObject.top(pending); pending = searchObject.pop(pending); Survival r = s->decompose(searchObject, this); if (r == DIE) finished(this); return r; } Maude-2.7/src/StrategyLanguage/applicationStrategy.cc0000644000147300135640000000517111446506203017745 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // interface class definitions #include "term.hh" // strategy language class definitions #include "strategicSearch.hh" #include "applicationStrategy.hh" #include "applicationProcess.hh" #include "decompositionProcess.hh" ApplicationStrategy::ApplicationStrategy(int label, const Vector& variables, const Vector& values, const Vector& strategies) : label(label), variables(variables), valueDags(values.size()), strategies(strategies) { Assert(label != NONE || (variables.empty() && strategies.empty()), "substitutions and condition strategies aren't allowed without a label"); top = false; int nrValues = values.size(); Assert(variables.size() == nrValues, "bad substitution"); for (int i = 0; i < nrValues; ++i) { valueDags[i].setTerm(values[i]); valueDags[i].normalize(); valueDags[i].prepare(); } } ApplicationStrategy::~ApplicationStrategy() { int nrVariables = variables.size(); for (int i = 0; i < nrVariables; ++i) variables[i]->deepSelfDestruct(); int nrStrategies = strategies.size(); for (int i = 0; i < nrStrategies; ++i) delete strategies[i]; } StrategicExecution::Survival ApplicationStrategy::decompose(StrategicSearch& searchObject, DecompositionProcess* remainder) { (void) new ApplicationProcess(searchObject, remainder->getDagIndex(), this, remainder->getPending(), remainder, // working for same task remainder); // place in process queue ahead of old process return StrategicExecution::DIE; // request deletion of DecompositionProcess } Maude-2.7/src/StrategyLanguage/trivialStrategy.cc0000644000147300135640000000300510476151734017115 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "trivialStrategy.hh" #include "decompositionProcess.hh" TrivialStrategy::TrivialStrategy(bool result) : result(result) { } StrategicExecution::Survival TrivialStrategy::decompose(StrategicSearch& /* searchObject */, DecompositionProcess* /* remainder */) { // // If we are idle, remainder survives; if we are fail, remainder dies. // return result ? StrategicExecution::SURVIVE : StrategicExecution::DIE; } Maude-2.7/src/StrategyLanguage/strategyExpression.hh0000644000147300135640000000241010524216322017640 00000000000000/* This file is part of the Maude 2 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. */ // // Abstract base class for expressions in the strategy language. // #ifndef _strategyExpression_hh_ #define _strategyExpression_hh_ #include "strategicExecution.hh" class StrategyExpression { public: virtual ~StrategyExpression() {} virtual StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder) = 0; }; ostream& operator<<(ostream& s, StrategyExpression* strategy); #endif Maude-2.7/src/StrategyLanguage/concatenationStrategy.cc0000644000147300135640000000351110540335405020261 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "concatenationStrategy.hh" #include "decompositionProcess.hh" #include "strategicSearch.hh" ConcatenationStrategy::ConcatenationStrategy(const Vector strategies) : strategies(strategies) { Assert(!strategies.empty(), "no strategies"); } ConcatenationStrategy::~ConcatenationStrategy() { int nrStrategies = strategies.size(); for (int i = 0; i < nrStrategies; ++i) delete strategies[i]; } StrategicExecution::Survival ConcatenationStrategy::decompose(StrategicSearch& searchObject, DecompositionProcess* remainder) { for (int i = strategies.size() - 1; i >= 0; --i) remainder->pushStrategy(searchObject, strategies[i]); return StrategicExecution::SURVIVE; // remainder should not request deletion } Maude-2.7/src/StrategyLanguage/strategicSearch.cc0000644000147300135640000000656411446473773017060 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class StrategicTask. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // core class definitions #include "rewritingContext.hh" // strategy language class definitions #include "strategyExpression.hh" #include "strategicProcess.hh" #include "strategicSearch.hh" #include "decompositionProcess.hh" StrategicSearch::StrategicSearch(RewritingContext* initial, StrategyExpression* strategy) : StrategicTask(static_cast(0)), initial(initial), strategy(strategy) { Assert(initial != 0, "null context"); Assert(initial->root() != 0, "null root"); Assert(strategy != 0, "null strategy"); nextToRun = new DecompositionProcess(insert(initial->root()), push(EMPTY_STACK, strategy), getDummyExecution(), 0); exhausted = false; } StrategicSearch::~StrategicSearch() { delete initial; delete strategy; } DagNode* StrategicSearch::findNextSolution() { solutionIndex = NONE; while (!exhausted) { // // Run can delete any process except nextToRun, which must // request deletion by returning DIE. // Survival s = nextToRun->run(*this); // // t will always be a valid process, but might be equal to // nextToRun in the degenerate case. // StrategicProcess* t = nextToRun->getNextProcess(); Assert(s == SURVIVE || t != nextToRun || exhausted, "ran out of processes without exhausted being set"); // // Now safe to delete nextToRun if it requested deletion. // if (s == DIE) delete nextToRun; // // Now safe to abort. // if (RewritingContext::getTraceStatus() && initial->traceAbort()) break; // // t may not be valid anymore, but in this case we should be // exhausted. // nextToRun = t; // // If the run triggered a solution we're done. // if (solutionIndex != NONE) return getCanonical(solutionIndex); } return 0; } StrategicExecution::Survival StrategicSearch::executionSucceeded(int resultIndex, StrategicProcess* /* insertionPoint */) { Assert(solutionIndex == NONE, "multiple solutions from a single step"); solutionIndex = resultIndex; return SURVIVE; // still want more solutions } StrategicExecution::Survival StrategicSearch::executionsExhausted(StrategicProcess* /* insertionPoint */) { exhausted = true; return SURVIVE; // root task cannot die in the usual way } Maude-2.7/src/StrategyLanguage/iterationStrategy.cc0000644000147300135640000000365110540335430017435 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for class IterationStrategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "iterationStrategy.hh" #include "decompositionProcess.hh" #include "strategicSearch.hh" IterationStrategy::IterationStrategy(StrategyExpression* child, bool zeroAllowed) : child(child), star(zeroAllowed ? 0 : new IterationStrategy(child, true)) { } IterationStrategy::~IterationStrategy() { delete (star != 0 ? star : child); } StrategicExecution::Survival IterationStrategy::decompose(StrategicSearch& searchObject, DecompositionProcess* remainder) { if (star) // + case; push * subexpression remainder->pushStrategy(searchObject, star); else // * case { (void) new DecompositionProcess(remainder); // idle alternative remainder->pushStrategy(searchObject, this); } remainder->pushStrategy(searchObject, child); return StrategicExecution::SURVIVE; // remainder should not request deletion } Maude-2.7/src/StrategyLanguage/iterationStrategy.hh0000644000147300135640000000316610524240660017452 00000000000000/* This file is part of the Maude 2 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 for iteration strategies. // #ifndef _iterationStrategy_hh_ #define _iterationStrategy_hh_ #include "strategyExpression.hh" class IterationStrategy : public StrategyExpression { public: IterationStrategy(StrategyExpression* child, bool zeroAllowed); ~IterationStrategy(); StrategyExpression* getStrategy() const; bool getZeroAllowed() const; StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder); private: StrategyExpression* const child; StrategyExpression* const star; // for a s+ expression we keep an s* expression here for decomposition }; inline StrategyExpression* IterationStrategy::getStrategy() const { return child; } inline bool IterationStrategy::getZeroAllowed() const { return star == 0; } #endif Maude-2.7/src/StrategyLanguage/branchStrategy.hh0000644000147300135640000000500010524423664016705 00000000000000/* This file is part of the Maude 2 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 for if-then-else-fi branch strategies. // #ifndef _branchStrategy_hh_ #define _branchStrategy_hh_ #include "strategyExpression.hh" class BranchStrategy : public StrategyExpression { public: enum Action { FAIL, // no results IDLE, // original term PASS_THRU, // results from test (success case only) NEW_STRATEGY, // apply new strategy ITERATE // apply the same branch strategy to any result }; BranchStrategy(StrategyExpression* initialStrategy, Action successAction, StrategyExpression* successStrategy, Action failureAction, StrategyExpression* failureStrategy); ~BranchStrategy(); StrategyExpression* getInitialStrategy() const; StrategyExpression* getSuccessStrategy() const; StrategyExpression* getFailureStrategy() const; Action getSuccessAction() const; Action getFailureAction() const; StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder); private: StrategyExpression* const initialStrategy; StrategyExpression* const successStrategy; StrategyExpression* const failureStrategy; const Action successAction; const Action failureAction; }; inline StrategyExpression* BranchStrategy::getInitialStrategy() const { return initialStrategy; } inline StrategyExpression* BranchStrategy::getSuccessStrategy() const { return successStrategy; } inline StrategyExpression* BranchStrategy::getFailureStrategy() const { return failureStrategy; } inline BranchStrategy::Action BranchStrategy::getSuccessAction() const { return successAction; } inline BranchStrategy::Action BranchStrategy::getFailureAction() const { return failureAction; } #endif Maude-2.7/src/StrategyLanguage/unionStrategy.cc0000644000147300135640000000370610540335415016573 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "unionStrategy.hh" #include "decompositionProcess.hh" #include "strategicSearch.hh" UnionStrategy::UnionStrategy(const Vector& strategies) : strategies(strategies) { Assert(!strategies.empty(), "no strategies"); } UnionStrategy::~UnionStrategy() { int nrStrategies = strategies.size(); for (int i = 0; i < nrStrategies; ++i) delete strategies[i]; } StrategicExecution::Survival UnionStrategy::decompose(StrategicSearch& searchObject, DecompositionProcess* remainder) { int last = strategies.size() - 1; for (int i = 0; i < last; ++i) { DecompositionProcess* p = new DecompositionProcess(remainder); // clone remainder p->pushStrategy(searchObject, strategies[i]); } remainder->pushStrategy(searchObject, strategies[last]); return StrategicExecution::SURVIVE; // remainder should not request deletion } Maude-2.7/src/StrategyLanguage/applicationStrategy.hh0000644000147300135640000000454010506607560017762 00000000000000/* This file is part of the Maude 2 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 for rule application strategy. // #ifndef _applicationStrategy_hh_ #define _applicationStrategy_hh_ #include "strategyExpression.hh" #include "cachedDag.hh" class ApplicationStrategy : public StrategyExpression { public: // // label == NONE means try all rules, labeled or not. // ApplicationStrategy(int label, const Vector& variables, const Vector& values, const Vector& strategies); ~ApplicationStrategy(); void setTop(); bool getTop() const; int getLabel() const; const Vector& getVariables() const; Vector& getValues(); const Vector& getStrategies() const; StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder); private: bool top; // restrict rewrites to top of term const int label; Vector variables; // substitution Vector valueDags; Vector strategies; // strategies for searches in conditions }; inline void ApplicationStrategy::setTop() { top = true; } inline bool ApplicationStrategy::getTop() const { return top; } inline int ApplicationStrategy::getLabel() const { return label; } inline const Vector& ApplicationStrategy::getVariables() const { return variables; } inline Vector& ApplicationStrategy::getValues() { return valueDags; } inline const Vector& ApplicationStrategy::getStrategies() const { return strategies; } #endif Maude-2.7/src/StrategyLanguage/Makefile.in0000644000147300135640000016134412305230426015456 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ 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/StrategyLanguage DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 libstrategyLanguage_a_AR = $(AR) $(ARFLAGS) libstrategyLanguage_a_LIBADD = am_libstrategyLanguage_a_OBJECTS = \ libstrategyLanguage_a-trivialStrategy.$(OBJEXT) \ libstrategyLanguage_a-applicationStrategy.$(OBJEXT) \ libstrategyLanguage_a-concatenationStrategy.$(OBJEXT) \ libstrategyLanguage_a-iterationStrategy.$(OBJEXT) \ libstrategyLanguage_a-branchStrategy.$(OBJEXT) \ libstrategyLanguage_a-unionStrategy.$(OBJEXT) \ libstrategyLanguage_a-testStrategy.$(OBJEXT) \ libstrategyLanguage_a-strategicExecution.$(OBJEXT) \ libstrategyLanguage_a-strategicTask.$(OBJEXT) \ libstrategyLanguage_a-branchTask.$(OBJEXT) \ libstrategyLanguage_a-strategicProcess.$(OBJEXT) \ libstrategyLanguage_a-decompositionProcess.$(OBJEXT) \ libstrategyLanguage_a-applicationProcess.$(OBJEXT) \ libstrategyLanguage_a-strategicSearch.$(OBJEXT) \ libstrategyLanguage_a-sharedRewriteSearchState.$(OBJEXT) \ libstrategyLanguage_a-matchProcess.$(OBJEXT) \ libstrategyLanguage_a-rewriteTask.$(OBJEXT) \ libstrategyLanguage_a-strategyStackManager.$(OBJEXT) libstrategyLanguage_a_OBJECTS = $(am_libstrategyLanguage_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(libstrategyLanguage_a_SOURCES) DIST_SOURCES = $(libstrategyLanguage_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ 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@ 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@ 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 = libstrategyLanguage.a libstrategyLanguage_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Higher \ -I$(top_srcdir)/src/FullCompiler libstrategyLanguage_a_SOURCES = \ trivialStrategy.cc \ applicationStrategy.cc \ concatenationStrategy.cc \ iterationStrategy.cc \ branchStrategy.cc \ unionStrategy.cc \ testStrategy.cc \ strategicExecution.cc \ strategicTask.cc \ branchTask.cc \ strategicProcess.cc \ decompositionProcess.cc \ applicationProcess.cc \ strategicSearch.cc \ sharedRewriteSearchState.cc \ matchProcess.cc \ rewriteTask.cc \ strategyStackManager.cc noinst_HEADERS = \ strategyLanguage.hh \ strategyExpression.hh \ trivialStrategy.hh \ applicationStrategy.hh \ concatenationStrategy.hh \ iterationStrategy.hh \ branchStrategy.hh \ unionStrategy.hh \ testStrategy.hh \ strategicExecution.hh \ strategicTask.hh \ branchTask.hh \ strategicProcess.hh \ decompositionProcess.hh \ applicationProcess.hh \ strategicSearch.hh \ sharedRewriteSearchState.hh \ matchProcess.hh \ rewriteTask.hh \ strategyStackManager.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/StrategyLanguage/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/StrategyLanguage/Makefile .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 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) libstrategyLanguage.a: $(libstrategyLanguage_a_OBJECTS) $(libstrategyLanguage_a_DEPENDENCIES) $(EXTRA_libstrategyLanguage_a_DEPENDENCIES) -rm -f libstrategyLanguage.a $(libstrategyLanguage_a_AR) libstrategyLanguage.a $(libstrategyLanguage_a_OBJECTS) $(libstrategyLanguage_a_LIBADD) $(RANLIB) libstrategyLanguage.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-applicationProcess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-applicationStrategy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-branchStrategy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-branchTask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-concatenationStrategy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-decompositionProcess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-iterationStrategy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-matchProcess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-rewriteTask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-sharedRewriteSearchState.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-strategicExecution.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-strategicProcess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-strategicSearch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-strategicTask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-strategyStackManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-testStrategy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-trivialStrategy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrategyLanguage_a-unionStrategy.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libstrategyLanguage_a-trivialStrategy.o: trivialStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-trivialStrategy.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-trivialStrategy.Tpo -c -o libstrategyLanguage_a-trivialStrategy.o `test -f 'trivialStrategy.cc' || echo '$(srcdir)/'`trivialStrategy.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-trivialStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-trivialStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='trivialStrategy.cc' object='libstrategyLanguage_a-trivialStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-trivialStrategy.o `test -f 'trivialStrategy.cc' || echo '$(srcdir)/'`trivialStrategy.cc libstrategyLanguage_a-trivialStrategy.obj: trivialStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-trivialStrategy.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-trivialStrategy.Tpo -c -o libstrategyLanguage_a-trivialStrategy.obj `if test -f 'trivialStrategy.cc'; then $(CYGPATH_W) 'trivialStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/trivialStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-trivialStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-trivialStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='trivialStrategy.cc' object='libstrategyLanguage_a-trivialStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-trivialStrategy.obj `if test -f 'trivialStrategy.cc'; then $(CYGPATH_W) 'trivialStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/trivialStrategy.cc'; fi` libstrategyLanguage_a-applicationStrategy.o: applicationStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-applicationStrategy.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-applicationStrategy.Tpo -c -o libstrategyLanguage_a-applicationStrategy.o `test -f 'applicationStrategy.cc' || echo '$(srcdir)/'`applicationStrategy.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-applicationStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-applicationStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='applicationStrategy.cc' object='libstrategyLanguage_a-applicationStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-applicationStrategy.o `test -f 'applicationStrategy.cc' || echo '$(srcdir)/'`applicationStrategy.cc libstrategyLanguage_a-applicationStrategy.obj: applicationStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-applicationStrategy.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-applicationStrategy.Tpo -c -o libstrategyLanguage_a-applicationStrategy.obj `if test -f 'applicationStrategy.cc'; then $(CYGPATH_W) 'applicationStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/applicationStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-applicationStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-applicationStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='applicationStrategy.cc' object='libstrategyLanguage_a-applicationStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-applicationStrategy.obj `if test -f 'applicationStrategy.cc'; then $(CYGPATH_W) 'applicationStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/applicationStrategy.cc'; fi` libstrategyLanguage_a-concatenationStrategy.o: concatenationStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-concatenationStrategy.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-concatenationStrategy.Tpo -c -o libstrategyLanguage_a-concatenationStrategy.o `test -f 'concatenationStrategy.cc' || echo '$(srcdir)/'`concatenationStrategy.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-concatenationStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-concatenationStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='concatenationStrategy.cc' object='libstrategyLanguage_a-concatenationStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-concatenationStrategy.o `test -f 'concatenationStrategy.cc' || echo '$(srcdir)/'`concatenationStrategy.cc libstrategyLanguage_a-concatenationStrategy.obj: concatenationStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-concatenationStrategy.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-concatenationStrategy.Tpo -c -o libstrategyLanguage_a-concatenationStrategy.obj `if test -f 'concatenationStrategy.cc'; then $(CYGPATH_W) 'concatenationStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/concatenationStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-concatenationStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-concatenationStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='concatenationStrategy.cc' object='libstrategyLanguage_a-concatenationStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-concatenationStrategy.obj `if test -f 'concatenationStrategy.cc'; then $(CYGPATH_W) 'concatenationStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/concatenationStrategy.cc'; fi` libstrategyLanguage_a-iterationStrategy.o: iterationStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-iterationStrategy.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-iterationStrategy.Tpo -c -o libstrategyLanguage_a-iterationStrategy.o `test -f 'iterationStrategy.cc' || echo '$(srcdir)/'`iterationStrategy.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-iterationStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-iterationStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iterationStrategy.cc' object='libstrategyLanguage_a-iterationStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-iterationStrategy.o `test -f 'iterationStrategy.cc' || echo '$(srcdir)/'`iterationStrategy.cc libstrategyLanguage_a-iterationStrategy.obj: iterationStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-iterationStrategy.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-iterationStrategy.Tpo -c -o libstrategyLanguage_a-iterationStrategy.obj `if test -f 'iterationStrategy.cc'; then $(CYGPATH_W) 'iterationStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/iterationStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-iterationStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-iterationStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='iterationStrategy.cc' object='libstrategyLanguage_a-iterationStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-iterationStrategy.obj `if test -f 'iterationStrategy.cc'; then $(CYGPATH_W) 'iterationStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/iterationStrategy.cc'; fi` libstrategyLanguage_a-branchStrategy.o: branchStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-branchStrategy.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-branchStrategy.Tpo -c -o libstrategyLanguage_a-branchStrategy.o `test -f 'branchStrategy.cc' || echo '$(srcdir)/'`branchStrategy.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-branchStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-branchStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='branchStrategy.cc' object='libstrategyLanguage_a-branchStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-branchStrategy.o `test -f 'branchStrategy.cc' || echo '$(srcdir)/'`branchStrategy.cc libstrategyLanguage_a-branchStrategy.obj: branchStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-branchStrategy.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-branchStrategy.Tpo -c -o libstrategyLanguage_a-branchStrategy.obj `if test -f 'branchStrategy.cc'; then $(CYGPATH_W) 'branchStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/branchStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-branchStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-branchStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='branchStrategy.cc' object='libstrategyLanguage_a-branchStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-branchStrategy.obj `if test -f 'branchStrategy.cc'; then $(CYGPATH_W) 'branchStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/branchStrategy.cc'; fi` libstrategyLanguage_a-unionStrategy.o: unionStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-unionStrategy.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-unionStrategy.Tpo -c -o libstrategyLanguage_a-unionStrategy.o `test -f 'unionStrategy.cc' || echo '$(srcdir)/'`unionStrategy.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-unionStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-unionStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='unionStrategy.cc' object='libstrategyLanguage_a-unionStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-unionStrategy.o `test -f 'unionStrategy.cc' || echo '$(srcdir)/'`unionStrategy.cc libstrategyLanguage_a-unionStrategy.obj: unionStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-unionStrategy.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-unionStrategy.Tpo -c -o libstrategyLanguage_a-unionStrategy.obj `if test -f 'unionStrategy.cc'; then $(CYGPATH_W) 'unionStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/unionStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-unionStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-unionStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='unionStrategy.cc' object='libstrategyLanguage_a-unionStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-unionStrategy.obj `if test -f 'unionStrategy.cc'; then $(CYGPATH_W) 'unionStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/unionStrategy.cc'; fi` libstrategyLanguage_a-testStrategy.o: testStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-testStrategy.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-testStrategy.Tpo -c -o libstrategyLanguage_a-testStrategy.o `test -f 'testStrategy.cc' || echo '$(srcdir)/'`testStrategy.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-testStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-testStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testStrategy.cc' object='libstrategyLanguage_a-testStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-testStrategy.o `test -f 'testStrategy.cc' || echo '$(srcdir)/'`testStrategy.cc libstrategyLanguage_a-testStrategy.obj: testStrategy.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-testStrategy.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-testStrategy.Tpo -c -o libstrategyLanguage_a-testStrategy.obj `if test -f 'testStrategy.cc'; then $(CYGPATH_W) 'testStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/testStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-testStrategy.Tpo $(DEPDIR)/libstrategyLanguage_a-testStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testStrategy.cc' object='libstrategyLanguage_a-testStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-testStrategy.obj `if test -f 'testStrategy.cc'; then $(CYGPATH_W) 'testStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/testStrategy.cc'; fi` libstrategyLanguage_a-strategicExecution.o: strategicExecution.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicExecution.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicExecution.Tpo -c -o libstrategyLanguage_a-strategicExecution.o `test -f 'strategicExecution.cc' || echo '$(srcdir)/'`strategicExecution.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicExecution.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicExecution.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicExecution.cc' object='libstrategyLanguage_a-strategicExecution.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicExecution.o `test -f 'strategicExecution.cc' || echo '$(srcdir)/'`strategicExecution.cc libstrategyLanguage_a-strategicExecution.obj: strategicExecution.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicExecution.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicExecution.Tpo -c -o libstrategyLanguage_a-strategicExecution.obj `if test -f 'strategicExecution.cc'; then $(CYGPATH_W) 'strategicExecution.cc'; else $(CYGPATH_W) '$(srcdir)/strategicExecution.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicExecution.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicExecution.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicExecution.cc' object='libstrategyLanguage_a-strategicExecution.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicExecution.obj `if test -f 'strategicExecution.cc'; then $(CYGPATH_W) 'strategicExecution.cc'; else $(CYGPATH_W) '$(srcdir)/strategicExecution.cc'; fi` libstrategyLanguage_a-strategicTask.o: strategicTask.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicTask.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicTask.Tpo -c -o libstrategyLanguage_a-strategicTask.o `test -f 'strategicTask.cc' || echo '$(srcdir)/'`strategicTask.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicTask.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicTask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicTask.cc' object='libstrategyLanguage_a-strategicTask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicTask.o `test -f 'strategicTask.cc' || echo '$(srcdir)/'`strategicTask.cc libstrategyLanguage_a-strategicTask.obj: strategicTask.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicTask.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicTask.Tpo -c -o libstrategyLanguage_a-strategicTask.obj `if test -f 'strategicTask.cc'; then $(CYGPATH_W) 'strategicTask.cc'; else $(CYGPATH_W) '$(srcdir)/strategicTask.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicTask.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicTask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicTask.cc' object='libstrategyLanguage_a-strategicTask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicTask.obj `if test -f 'strategicTask.cc'; then $(CYGPATH_W) 'strategicTask.cc'; else $(CYGPATH_W) '$(srcdir)/strategicTask.cc'; fi` libstrategyLanguage_a-branchTask.o: branchTask.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-branchTask.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-branchTask.Tpo -c -o libstrategyLanguage_a-branchTask.o `test -f 'branchTask.cc' || echo '$(srcdir)/'`branchTask.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-branchTask.Tpo $(DEPDIR)/libstrategyLanguage_a-branchTask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='branchTask.cc' object='libstrategyLanguage_a-branchTask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-branchTask.o `test -f 'branchTask.cc' || echo '$(srcdir)/'`branchTask.cc libstrategyLanguage_a-branchTask.obj: branchTask.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-branchTask.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-branchTask.Tpo -c -o libstrategyLanguage_a-branchTask.obj `if test -f 'branchTask.cc'; then $(CYGPATH_W) 'branchTask.cc'; else $(CYGPATH_W) '$(srcdir)/branchTask.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-branchTask.Tpo $(DEPDIR)/libstrategyLanguage_a-branchTask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='branchTask.cc' object='libstrategyLanguage_a-branchTask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-branchTask.obj `if test -f 'branchTask.cc'; then $(CYGPATH_W) 'branchTask.cc'; else $(CYGPATH_W) '$(srcdir)/branchTask.cc'; fi` libstrategyLanguage_a-strategicProcess.o: strategicProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicProcess.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicProcess.Tpo -c -o libstrategyLanguage_a-strategicProcess.o `test -f 'strategicProcess.cc' || echo '$(srcdir)/'`strategicProcess.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicProcess.cc' object='libstrategyLanguage_a-strategicProcess.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicProcess.o `test -f 'strategicProcess.cc' || echo '$(srcdir)/'`strategicProcess.cc libstrategyLanguage_a-strategicProcess.obj: strategicProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicProcess.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicProcess.Tpo -c -o libstrategyLanguage_a-strategicProcess.obj `if test -f 'strategicProcess.cc'; then $(CYGPATH_W) 'strategicProcess.cc'; else $(CYGPATH_W) '$(srcdir)/strategicProcess.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicProcess.cc' object='libstrategyLanguage_a-strategicProcess.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicProcess.obj `if test -f 'strategicProcess.cc'; then $(CYGPATH_W) 'strategicProcess.cc'; else $(CYGPATH_W) '$(srcdir)/strategicProcess.cc'; fi` libstrategyLanguage_a-decompositionProcess.o: decompositionProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-decompositionProcess.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-decompositionProcess.Tpo -c -o libstrategyLanguage_a-decompositionProcess.o `test -f 'decompositionProcess.cc' || echo '$(srcdir)/'`decompositionProcess.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-decompositionProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-decompositionProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='decompositionProcess.cc' object='libstrategyLanguage_a-decompositionProcess.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-decompositionProcess.o `test -f 'decompositionProcess.cc' || echo '$(srcdir)/'`decompositionProcess.cc libstrategyLanguage_a-decompositionProcess.obj: decompositionProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-decompositionProcess.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-decompositionProcess.Tpo -c -o libstrategyLanguage_a-decompositionProcess.obj `if test -f 'decompositionProcess.cc'; then $(CYGPATH_W) 'decompositionProcess.cc'; else $(CYGPATH_W) '$(srcdir)/decompositionProcess.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-decompositionProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-decompositionProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='decompositionProcess.cc' object='libstrategyLanguage_a-decompositionProcess.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-decompositionProcess.obj `if test -f 'decompositionProcess.cc'; then $(CYGPATH_W) 'decompositionProcess.cc'; else $(CYGPATH_W) '$(srcdir)/decompositionProcess.cc'; fi` libstrategyLanguage_a-applicationProcess.o: applicationProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-applicationProcess.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-applicationProcess.Tpo -c -o libstrategyLanguage_a-applicationProcess.o `test -f 'applicationProcess.cc' || echo '$(srcdir)/'`applicationProcess.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-applicationProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-applicationProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='applicationProcess.cc' object='libstrategyLanguage_a-applicationProcess.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-applicationProcess.o `test -f 'applicationProcess.cc' || echo '$(srcdir)/'`applicationProcess.cc libstrategyLanguage_a-applicationProcess.obj: applicationProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-applicationProcess.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-applicationProcess.Tpo -c -o libstrategyLanguage_a-applicationProcess.obj `if test -f 'applicationProcess.cc'; then $(CYGPATH_W) 'applicationProcess.cc'; else $(CYGPATH_W) '$(srcdir)/applicationProcess.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-applicationProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-applicationProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='applicationProcess.cc' object='libstrategyLanguage_a-applicationProcess.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-applicationProcess.obj `if test -f 'applicationProcess.cc'; then $(CYGPATH_W) 'applicationProcess.cc'; else $(CYGPATH_W) '$(srcdir)/applicationProcess.cc'; fi` libstrategyLanguage_a-strategicSearch.o: strategicSearch.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicSearch.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicSearch.Tpo -c -o libstrategyLanguage_a-strategicSearch.o `test -f 'strategicSearch.cc' || echo '$(srcdir)/'`strategicSearch.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicSearch.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicSearch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicSearch.cc' object='libstrategyLanguage_a-strategicSearch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicSearch.o `test -f 'strategicSearch.cc' || echo '$(srcdir)/'`strategicSearch.cc libstrategyLanguage_a-strategicSearch.obj: strategicSearch.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategicSearch.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategicSearch.Tpo -c -o libstrategyLanguage_a-strategicSearch.obj `if test -f 'strategicSearch.cc'; then $(CYGPATH_W) 'strategicSearch.cc'; else $(CYGPATH_W) '$(srcdir)/strategicSearch.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategicSearch.Tpo $(DEPDIR)/libstrategyLanguage_a-strategicSearch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategicSearch.cc' object='libstrategyLanguage_a-strategicSearch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategicSearch.obj `if test -f 'strategicSearch.cc'; then $(CYGPATH_W) 'strategicSearch.cc'; else $(CYGPATH_W) '$(srcdir)/strategicSearch.cc'; fi` libstrategyLanguage_a-sharedRewriteSearchState.o: sharedRewriteSearchState.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-sharedRewriteSearchState.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-sharedRewriteSearchState.Tpo -c -o libstrategyLanguage_a-sharedRewriteSearchState.o `test -f 'sharedRewriteSearchState.cc' || echo '$(srcdir)/'`sharedRewriteSearchState.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-sharedRewriteSearchState.Tpo $(DEPDIR)/libstrategyLanguage_a-sharedRewriteSearchState.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='sharedRewriteSearchState.cc' object='libstrategyLanguage_a-sharedRewriteSearchState.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-sharedRewriteSearchState.o `test -f 'sharedRewriteSearchState.cc' || echo '$(srcdir)/'`sharedRewriteSearchState.cc libstrategyLanguage_a-sharedRewriteSearchState.obj: sharedRewriteSearchState.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-sharedRewriteSearchState.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-sharedRewriteSearchState.Tpo -c -o libstrategyLanguage_a-sharedRewriteSearchState.obj `if test -f 'sharedRewriteSearchState.cc'; then $(CYGPATH_W) 'sharedRewriteSearchState.cc'; else $(CYGPATH_W) '$(srcdir)/sharedRewriteSearchState.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-sharedRewriteSearchState.Tpo $(DEPDIR)/libstrategyLanguage_a-sharedRewriteSearchState.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='sharedRewriteSearchState.cc' object='libstrategyLanguage_a-sharedRewriteSearchState.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-sharedRewriteSearchState.obj `if test -f 'sharedRewriteSearchState.cc'; then $(CYGPATH_W) 'sharedRewriteSearchState.cc'; else $(CYGPATH_W) '$(srcdir)/sharedRewriteSearchState.cc'; fi` libstrategyLanguage_a-matchProcess.o: matchProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-matchProcess.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-matchProcess.Tpo -c -o libstrategyLanguage_a-matchProcess.o `test -f 'matchProcess.cc' || echo '$(srcdir)/'`matchProcess.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-matchProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-matchProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='matchProcess.cc' object='libstrategyLanguage_a-matchProcess.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-matchProcess.o `test -f 'matchProcess.cc' || echo '$(srcdir)/'`matchProcess.cc libstrategyLanguage_a-matchProcess.obj: matchProcess.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-matchProcess.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-matchProcess.Tpo -c -o libstrategyLanguage_a-matchProcess.obj `if test -f 'matchProcess.cc'; then $(CYGPATH_W) 'matchProcess.cc'; else $(CYGPATH_W) '$(srcdir)/matchProcess.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-matchProcess.Tpo $(DEPDIR)/libstrategyLanguage_a-matchProcess.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='matchProcess.cc' object='libstrategyLanguage_a-matchProcess.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-matchProcess.obj `if test -f 'matchProcess.cc'; then $(CYGPATH_W) 'matchProcess.cc'; else $(CYGPATH_W) '$(srcdir)/matchProcess.cc'; fi` libstrategyLanguage_a-rewriteTask.o: rewriteTask.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-rewriteTask.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-rewriteTask.Tpo -c -o libstrategyLanguage_a-rewriteTask.o `test -f 'rewriteTask.cc' || echo '$(srcdir)/'`rewriteTask.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-rewriteTask.Tpo $(DEPDIR)/libstrategyLanguage_a-rewriteTask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rewriteTask.cc' object='libstrategyLanguage_a-rewriteTask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-rewriteTask.o `test -f 'rewriteTask.cc' || echo '$(srcdir)/'`rewriteTask.cc libstrategyLanguage_a-rewriteTask.obj: rewriteTask.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-rewriteTask.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-rewriteTask.Tpo -c -o libstrategyLanguage_a-rewriteTask.obj `if test -f 'rewriteTask.cc'; then $(CYGPATH_W) 'rewriteTask.cc'; else $(CYGPATH_W) '$(srcdir)/rewriteTask.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-rewriteTask.Tpo $(DEPDIR)/libstrategyLanguage_a-rewriteTask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rewriteTask.cc' object='libstrategyLanguage_a-rewriteTask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-rewriteTask.obj `if test -f 'rewriteTask.cc'; then $(CYGPATH_W) 'rewriteTask.cc'; else $(CYGPATH_W) '$(srcdir)/rewriteTask.cc'; fi` libstrategyLanguage_a-strategyStackManager.o: strategyStackManager.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategyStackManager.o -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategyStackManager.Tpo -c -o libstrategyLanguage_a-strategyStackManager.o `test -f 'strategyStackManager.cc' || echo '$(srcdir)/'`strategyStackManager.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategyStackManager.Tpo $(DEPDIR)/libstrategyLanguage_a-strategyStackManager.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategyStackManager.cc' object='libstrategyLanguage_a-strategyStackManager.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategyStackManager.o `test -f 'strategyStackManager.cc' || echo '$(srcdir)/'`strategyStackManager.cc libstrategyLanguage_a-strategyStackManager.obj: strategyStackManager.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libstrategyLanguage_a-strategyStackManager.obj -MD -MP -MF $(DEPDIR)/libstrategyLanguage_a-strategyStackManager.Tpo -c -o libstrategyLanguage_a-strategyStackManager.obj `if test -f 'strategyStackManager.cc'; then $(CYGPATH_W) 'strategyStackManager.cc'; else $(CYGPATH_W) '$(srcdir)/strategyStackManager.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libstrategyLanguage_a-strategyStackManager.Tpo $(DEPDIR)/libstrategyLanguage_a-strategyStackManager.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='strategyStackManager.cc' object='libstrategyLanguage_a-strategyStackManager.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrategyLanguage_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libstrategyLanguage_a-strategyStackManager.obj `if test -f 'strategyStackManager.cc'; then $(CYGPATH_W) 'strategyStackManager.cc'; else $(CYGPATH_W) '$(srcdir)/strategyStackManager.cc'; fi` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(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 -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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 all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags 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 uninstall \ uninstall-am # 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-2.7/src/StrategyLanguage/strategyStackManager.cc0000644000147300135640000000425610540370414020042 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for class StrategyStackManager. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "strategyStackManager.hh" StrategyStackManager::StrategyStackManager() : stackTable(1) { // // Create empty stack entry. // Entry& e = stackTable[0]; e.strategy = 0; e.restOfStack = NONE; e.firstSuccessor = NONE; e.nextPeer = NONE; } StrategyStackManager::StackId StrategyStackManager::push(StackId stackId, StrategyExpression* strategy) { for (StackId i = stackTable[stackId].firstSuccessor; i != NONE; i = stackTable[i].nextPeer) { // // Ideally we would like to compare strategies for equality rather than pointers // but for the moment we just use pointers for simplicity. We don't expect too many // sucessors to a given stack otherwise hashing might be a win. // if (stackTable[i].strategy == strategy) return i; } StackId newStackId = stackTable.size(); stackTable.expandBy(1); Entry& e = stackTable[newStackId]; e.strategy = strategy; e.restOfStack = stackId; e.firstSuccessor = NONE; e.nextPeer = stackTable[stackId].firstSuccessor; stackTable[stackId].firstSuccessor = newStackId; return newStackId; } Maude-2.7/src/StrategyLanguage/strategicProcess.cc0000644000147300135640000000341410466742121017243 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class StrategicTask. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "strategicProcess.hh" StrategicProcess::StrategicProcess(StrategicExecution* taskSibling, StrategicProcess* other) : StrategicExecution(taskSibling) { if (other == 0) { // // Make degenerate circular list. // next = prev = this; } else { // // Insert us into circular list just before other; i.e. we become // the tail of the list w.r.t. other to ensure that all the remaining // processes get to run before us. // prev = other->prev; prev->next = this; next = other; next->prev = this; } } StrategicProcess::~StrategicProcess() { prev->next = next; next->prev = prev; } Maude-2.7/src/StrategyLanguage/sharedRewriteSearchState.cc0000644000147300135640000000357710515270760020670 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for class SharedRewriteSearchState. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "higher.hh" #include "strategyLanguage.hh" // interface class definitions #include "term.hh" // strategy language class definitions #include "sharedRewriteSearchState.hh" SharedRewriteSearchState::SharedRewriteSearchState(RewritingContext* parentContext, DagNode* start, int label, int maxDepth) : RewriteSearchState(parentContext->makeSubcontext(start), label, GC_CONTEXT | ALLOW_NONEXEC | IGNORE_CONDITION, 0, maxDepth) { refCount = 1; } SharedRewriteSearchState::Ptr::Ptr(RewritingContext* parentContext, DagNode* start, int label, int maxDepth) { ptr = new SharedRewriteSearchState(parentContext, start, label, maxDepth); } SharedRewriteSearchState::Ptr::Ptr(const Ptr& other) { ptr = other.ptr; ++(ptr->refCount); } SharedRewriteSearchState::Ptr::~Ptr() { if (--(ptr->refCount) == 0) delete ptr; } Maude-2.7/src/StrategyLanguage/strategicTask.cc0000644000147300135640000000422111444523205016521 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class StrategicTask. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "strategyLanguage.hh" // strategy language class definitions #include "strategicTask.hh" StrategicTask::StrategicTask(StrategicTask* master) : StrategicExecution(master), slaveList(this) { } StrategicTask::StrategicTask(StrategicExecution* sibling) : StrategicExecution(sibling), slaveList(this) { } StrategicTask::~StrategicTask() { // // Once we disappear, our slaves will have no place to report to, so // we must delete them first. // StrategicExecution* next; for (StrategicExecution* i = slaveList.getNextSlave(); i != &slaveList; i = next) { next = i->getNextSlave(); delete i; } } /* bool StrategicTask::alreadySeen(int dagIndex, StrategyStackManager::StackId stackId) { State s(dagIndex, stackId); return !(seenSet.insert(s).second); } */ bool StrategicTask::alreadySeen(int dagIndex, StrategyStackManager::StackId stackId) { DebugAdvisory("alreadySeen( " << dagIndex << ", " << stackId << ") - seenSet.size() " << seenSet.size()); State s(dagIndex, stackId); pair p = seenSet.insert(s); // to avoid UMR in purify return !(p.second); } Maude-2.7/src/StrategyLanguage/sharedRewriteSearchState.hh0000644000147300135640000000321711444247411020670 00000000000000/* This file is part of the Maude 2 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 for a simplified RewriteSearchState, together with reference counting smart pointers to // determine when it is deleted, when it gets shared between multiple users. // #ifndef _sharedRewriteSearchState_hh_ #define _sharedRewriteSearchState_hh_ #include "rewriteSearchState.hh" class SharedRewriteSearchState : private RewriteSearchState { public: class Ptr { public: Ptr(RewritingContext* parentContext, DagNode* start, int label, int maxDepth); Ptr(const Ptr& other); ~Ptr(); RewriteSearchState* operator->(); private: SharedRewriteSearchState* ptr; }; private: SharedRewriteSearchState(RewritingContext* parentContext, DagNode* start, int label, int maxDepth); int refCount; }; inline RewriteSearchState* SharedRewriteSearchState::Ptr::operator->() { return ptr; } #endif Maude-2.7/src/StrategyLanguage/strategicProcess.hh0000644000147300135640000000301310476150513017247 00000000000000/* This file is part of the Maude 2 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. */ // // Abstract base class for round-robin based strategic execution. // #ifndef _strategicProcess_hh_ #define _strategicProcess_hh_ #include "strategicExecution.hh" class StrategicProcess : public StrategicExecution { NO_COPYING(StrategicProcess); public: StrategicProcess(StrategicExecution* taskSibling, StrategicProcess* other); ~StrategicProcess(); StrategicProcess* getNextProcess() const; virtual Survival run(StrategicSearch& searchObject) = 0; private: StrategicProcess* prev; // previous process in circular queue StrategicProcess* next; // next process in circular queue }; inline StrategicProcess* StrategicProcess::getNextProcess() const { return next; } #endif Maude-2.7/src/StrategyLanguage/Makefile.am0000644000147300135640000000225010540133172015432 00000000000000noinst_LIBRARIES = libstrategyLanguage.a libstrategyLanguage_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Higher \ -I$(top_srcdir)/src/FullCompiler libstrategyLanguage_a_SOURCES = \ trivialStrategy.cc \ applicationStrategy.cc \ concatenationStrategy.cc \ iterationStrategy.cc \ branchStrategy.cc \ unionStrategy.cc \ testStrategy.cc \ strategicExecution.cc \ strategicTask.cc \ branchTask.cc \ strategicProcess.cc \ decompositionProcess.cc \ applicationProcess.cc \ strategicSearch.cc \ sharedRewriteSearchState.cc \ matchProcess.cc \ rewriteTask.cc \ strategyStackManager.cc noinst_HEADERS = \ strategyLanguage.hh \ strategyExpression.hh \ trivialStrategy.hh \ applicationStrategy.hh \ concatenationStrategy.hh \ iterationStrategy.hh \ branchStrategy.hh \ unionStrategy.hh \ testStrategy.hh \ strategicExecution.hh \ strategicTask.hh \ branchTask.hh \ strategicProcess.hh \ decompositionProcess.hh \ applicationProcess.hh \ strategicSearch.hh \ sharedRewriteSearchState.hh \ matchProcess.hh \ rewriteTask.hh \ strategyStackManager.hh Maude-2.7/src/StrategyLanguage/strategyLanguage.hh0000644000147300135640000000264310540325234017235 00000000000000/* This file is part of the Maude 2 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. */ // // Forward declarations for strategy language classes. // #ifndef _strategyLanguage_hh_ #define _strategyLanguage_hh_ class StrategyExpression; class TrivialStrategy; class ApplicationStrategy; class ConcatenationStrategy; class IterationStrategy; class BranchStrategy; class UnionStrategy; class TestStrategy; class StrategicExecution; class StrategicProcess; class DecompositionProcess; class ApplicationProcess; class MatchProcess; class StrategicTask; class StrategicSearch; class BranchTask; class RewriteTask; class SharedRewriteSearchState; class StrategyStackManager; #endif Maude-2.7/src/StrategyLanguage/concatenationStrategy.hh0000644000147300135640000000277110524235450020303 00000000000000/* This file is part of the Maude 2 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 for concatenation strategy combinator. // #ifndef _concatenationStrategy_hh_ #define _concatenationStrategy_hh_ #include "strategyExpression.hh" class ConcatenationStrategy : public StrategyExpression { public: ConcatenationStrategy(const Vector strategies); ~ConcatenationStrategy(); const Vector& getStrategies() const; StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder); private: const Vector strategies; }; inline const Vector& ConcatenationStrategy::getStrategies() const { return strategies; } #endif Maude-2.7/src/StrategyLanguage/applicationProcess.cc0000644000147300135640000002622711446506407017574 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "higher.hh" #include "strategyLanguage.hh" // interface class definitions #include "term.hh" #include "subproblem.hh" // core class definitions #include "cachedDag.hh" #include "rule.hh" #include "rewritingContext.hh" // higher class definitions #include "assignmentConditionFragment.hh" #include "rewriteConditionFragment.hh" // strategy language class definitions #include "strategicSearch.hh" #include "strategyExpression.hh" #include "applicationStrategy.hh" #include "decompositionProcess.hh" #include "matchProcess.hh" #include "rewriteTask.hh" #include "applicationProcess.hh" ApplicationProcess::ApplicationProcess(StrategicSearch& searchObject, int startIndex, ApplicationStrategy* strategy, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* insertionPoint) : StrategicProcess(taskSibling, insertionPoint), rewriteState(searchObject.getContext(), searchObject.getCanonical(startIndex), strategy->getLabel(), strategy->getTop() ? NONE : UNBOUNDED), pending(pending), strategy(strategy) { Vector& values = strategy->getValues(); int nrValues = values.size(); if (nrValues > 0) { Vector tmpVariables(strategy->getVariables()); Vector tmpValues(nrValues); for (int i = 0; i < nrValues; ++i) tmpValues[i] = values[i].getDagRoot(); rewriteState->setInitialSubstitution(tmpVariables, tmpValues); } } StrategicExecution::Survival ApplicationProcess::run(StrategicSearch& searchObject) { if (rewriteState->findNextRewrite()) { Rule* rule = rewriteState->getRule(); if (rule->hasCondition()) { // // Need to check that we have the correct number of substrategies for our rule. // int nrStrategies = strategy->getStrategies().size(); int nrRewriteFragments = 0; const Vector& condition = rule->getCondition(); FOR_EACH_CONST(i, Vector, condition) { if (dynamic_cast(*i)) ++nrRewriteFragments; } if (nrStrategies != nrRewriteFragments) return SURVIVE; // might match a different rule on later runs // // We need to check the condition in a fair way, given // that rewrite conditions may have to follow a given strategy // may not terminate. Also processing the condition may // bind substitution entries needed to build an instance of // the rhs of the rule. // if (resolveRemainingConditionFragments(searchObject, rewriteState, rewriteState->getPositionIndex(), rewriteState->getExtensionInfo(), rewriteState->getContext(), rule, 0, strategy->getStrategies(), 0, pending, this, this) == SURVIVE) return SURVIVE; } else { if (strategy->getStrategies().size() > 0) return SURVIVE; // might match a different rule on later runs int resultIndex = doRewrite(searchObject, rewriteState, rewriteState->getPositionIndex(), rewriteState->getExtensionInfo(), rewriteState->getContext(), rule); if (resultIndex != NONE) { (void) new DecompositionProcess(resultIndex, pending, this, this); return SURVIVE; // stick around to look for another rewrite } } } finished(this); // need to unlink ourself from slave list before we request deletion return DIE; // request deletion } int ApplicationProcess::doRewrite(StrategicSearch& searchObject, SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, Substitution* substitution, Rule* rule) { // // The rule for using substitution is tricky: // It does not belong to us and we should never bind variables that // occur in the rule pattern or any fragment pattern in case we // disrupt matching in other branches of the search. But it is fine // to bind constructed entries, protected or not, since they will // simply be overwritten in other branches. // RewritingContext* baseContext = rewriteState->getContext(); bool trace = RewritingContext::getTraceStatus(); if (trace) { // // We have a problem: the whole term that is being rewritten is in the // rewriting context rewriteState->getContext() while the substitution we // will use is in context which may be a different rewriting context with // a different whole term. // // We resolve the issue by creating a special context containing the correct // whole term and substitution just for tracing. // RewritingContext* tracingContext = baseContext->makeSubcontext(baseContext->root()); // // We use clone() rather than copy() because tracingContext will have copy size of 0. // tracingContext->clone(*substitution); tracingContext->tracePreRuleRewrite(rewriteState->getDagNode(redexIndex), rule); delete tracingContext; if (baseContext->traceAbort()) return NONE; } // // Instantiate the rhs of the rule with the substitution. // //cout << "ApplicationProcess::doRewrite() nrFragileBindings = " << substitution->nrFragileBindings() << endl; DagNode* replacement = rule->getRhsBuilder().construct(*substitution); // // Rebuild the original term, using the replacement in place of the redex, // also accounting for any extension info; count this a rule rewrite // RewriteSearchState::DagPair r = rewriteState->rebuildDag(replacement, extensionInfo, redexIndex); searchObject.getContext()->incrementRlCount(); // // Make a new subcontext to equationally reduce the new term. // RewritingContext* c = baseContext->makeSubcontext(r.first); if (trace) { c->tracePostRuleRewrite(r.second); if (c->traceAbort()) { delete c; return NONE; } } c->reduce(); if (c->traceAbort()) { delete c; return NONE; } searchObject.getContext()->addInCount(*c); int dagIndex = searchObject.insert(c->root()); delete c; return dagIndex; } StrategicExecution::Survival ApplicationProcess::resolveRemainingConditionFragments(StrategicSearch& searchObject, SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, Substitution* substitutionSoFar, Rule* rule, int fragmentNr, const Vector& strategies, int strategyNr, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* other) { const Vector& fragments = rule->getCondition(); int nrFragments = fragments.size(); for (; fragmentNr < nrFragments; ++fragmentNr) { ConditionFragment* fragment = fragments[fragmentNr]; if (dynamic_cast(fragment) != 0) { (void) new RewriteTask(searchObject, rewriteState, redexIndex, extensionInfo, substitutionSoFar, rule, fragmentNr, strategies, strategyNr, pending, taskSibling, other); return SURVIVE; } else if (AssignmentConditionFragment* acf = dynamic_cast(fragment)) { // // Make a subcontext, construct and evalutate the instance of R. // RewritingContext* newContext = rewriteState->getContext()-> makeSubcontext(acf->makeRhsInstance(*substitutionSoFar), RewritingContext::CONDITION_EVAL); newContext->reduce(); // // We transfer, rather than simply add in the rewrite count because MatchProcess may do // some more rewriting with newContext. // searchObject.getContext()->transferCount(*newContext); // // We use clone() rather than copy() because newContext will have the wrong copy size. // newContext->clone(*substitutionSoFar); // BUG: this seems to be reducing substitution size! Subproblem* subproblem; if (acf->matchRoot(*newContext, subproblem)) { (void) new MatchProcess(rewriteState, redexIndex, extensionInfo, newContext, // MatchProcess takes over ownership of newContext subproblem, // MatchProcess takes over ownership of subproblem rule, fragmentNr, strategies, strategyNr, pending, taskSibling, other); } else { delete subproblem; delete newContext; } return SURVIVE; } // // Since we don't recognize the fragment as needing special treatment, assume it // is branch free and solve it with a specially created context (to have the correct // root and substitution) and dummy state stack. // RewritingContext* baseContext = rewriteState->getContext(); RewritingContext* solveContext = baseContext->makeSubcontext(baseContext->root()); // // We use clone() rather than copy() because newContext will have copy size 0. // solveContext->clone(*substitutionSoFar); stack dummy; bool success = fragment->solve(true, *solveContext, dummy); searchObject.getContext()->addInCount(*solveContext); if (!success) { // // A fragment failed so this branch of the search is pruned. But the process // or task that called us should survive to generate other possibilities. // delete solveContext; return SURVIVE; } // // solve() may have bound some protected slots in solveContext as part of // making instantiations; for example eager copies of variables. These // must be copied back into substitutionSoFar. // substitutionSoFar->copy(*solveContext); delete solveContext; } // // The condition succeeded so now we need to do the rewrite and resume the strategy. // int resultIndex = doRewrite(searchObject, rewriteState, redexIndex, extensionInfo, substitutionSoFar, rule); if (resultIndex != NONE) { (void) new DecompositionProcess(resultIndex, pending, taskSibling, other); return SURVIVE; // stick around to look for another rewrite } return DIE; // only happens when we are aborting } Maude-2.7/src/StrategyLanguage/matchProcess.hh0000644000147300135640000000514410540357554016373 00000000000000/* This file is part of the Maude 2 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 for processes that solve matching problems associated with condition fragments. // #ifndef _matchProcess_hh_ #define _matchProcess_hh_ #include "strategicProcess.hh" #include "sharedRewriteSearchState.hh" #include "strategyStackManager.hh" class MatchProcess : public StrategicProcess { NO_COPYING(MatchProcess); public: MatchProcess(SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, RewritingContext* matchContext, Subproblem* subproblem, Rule* rule, int fragmentNr, const Vector& strategies, int strategyNr, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* insertionPoint); ~MatchProcess(); Survival run(StrategicSearch& searchObject); private: SharedRewriteSearchState::Ptr rewriteState; // smart pointer to rewrite state that found our redex const PositionState::PositionIndex redexIndex; // index of redex withing rewrite state ExtensionInfo* extensionInfoCopy; // copy of extension info from original rule match RewritingContext* matchContext; // rewrite context associated with our fragment match Subproblem* subproblem; // subproblem associated with our fragment match Rule* const rule; // pointer to rule whose lhs matched const int fragmentNr; // number of condition fragment within rule const Vector& strategies; // vector of strategies for rewrite fragments const int strategyNr; // number of next strategy to use StrategyStackManager::StackId pending; // continuation once we finally do a rewrite bool findFirst; // are we looking for a first solution to fragment match? }; #endif Maude-2.7/src/StrategyLanguage/applicationProcess.hh0000644000147300135640000000454311446507372017605 00000000000000/* This file is part of the Maude 2 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 for applying rls. // #ifndef _applicationProcess_hh_ #define _applicationProcess_hh_ #include "strategicProcess.hh" #include "sharedRewriteSearchState.hh" #include "strategyStackManager.hh" class ApplicationProcess : public StrategicProcess { NO_COPYING(ApplicationProcess); public: ApplicationProcess(StrategicSearch& searchObject, int startIndex, ApplicationStrategy* strategy, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* insertionPoint); Survival run(StrategicSearch& searchObject); static StrategicExecution::Survival resolveRemainingConditionFragments(StrategicSearch& searchObject, SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, Substitution* substitutionSoFar, Rule* rule, int fragmentNr, const Vector& strategies, int strategyNr, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* other); private: static int doRewrite(StrategicSearch& searchObject, SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, Substitution* substitution, Rule* rule); SharedRewriteSearchState::Ptr rewriteState; StrategyStackManager::StackId pending; ApplicationStrategy* strategy; }; #endif Maude-2.7/src/StrategyLanguage/rewriteTask.cc0000644000147300135640000001212611446505126016224 00000000000000/* This file is part of the Maude 2 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. */ // // Implementation for class RewriteTask. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "higher.hh" #include "strategyLanguage.hh" // interface class definitions #include "term.hh" #include "extensionInfo.hh" #include "subproblem.hh" // core class definitions #include "cachedDag.hh" #include "rule.hh" // higher class definitions #include "assignmentConditionFragment.hh" #include "rewriteConditionFragment.hh" // strategy language class definitions #include "strategicSearch.hh" #include "strategyExpression.hh" #include "applicationStrategy.hh" #include "applicationProcess.hh" #include "decompositionProcess.hh" #include "matchProcess.hh" #include "rewriteTask.hh" RewriteTask::RewriteTask(StrategicSearch& searchObject, SharedRewriteSearchState::Ptr rewriteState, PositionState::PositionIndex redexIndex, ExtensionInfo* extensionInfo, Substitution* substitutionSoFar, Rule* rule, int fragmentNr, const Vector& strategies, int strategyNr, StrategyStackManager::StackId pending, StrategicExecution* taskSibling, StrategicProcess* insertionPoint) : StrategicTask(taskSibling), hashConsSet(searchObject), rewriteState(rewriteState), // share rewrite state redexIndex(redexIndex), // copy redex index extensionInfoCopy((extensionInfo == 0) ? 0 : extensionInfo->makeClone()), // clone extension info rule(rule), // copy rule pointer fragmentNr(fragmentNr), // copy fragment number strategies(strategies), // share reference to strategies vector strategyNr(strategyNr), // copy strategy number pending(pending) // copy pending stack { // // Find the L => R fragment that we are going to test. // rcf = safeCast(RewriteConditionFragment*, (rule->getCondition())[fragmentNr]); // // Make a subcontext, construct and evalutate the instance of L. // RewritingContext* baseContext = rewriteState->getContext(); newContext = baseContext->makeSubcontext(rcf->makeLhsInstance(*substitutionSoFar), RewritingContext::CONDITION_EVAL); newContext->reduce(); // // We won't be doing anymore rewriting with newContext so it is safe to add in its rewrites here. // searchObject.getContext()->addInCount(*newContext); // // We now reuse newContext to save a copy of the partial substitution (since we don't // own substitutionSoFar an it will probably change between now and our call-backs being // called. We use clone() rather than copy() since the copy size will be wrong. // newContext->clone(*substitutionSoFar); // // Start a new search from the result of evaluating L, using a substrategy. // StrategyExpression* substrategy = strategies[strategyNr]; (void) new DecompositionProcess(searchObject.insert(newContext->root()), searchObject.push(StrategyStackManager::EMPTY_STACK, substrategy), getDummyExecution(), insertionPoint); } RewriteTask::~RewriteTask() { delete newContext; // Can we delete this earlier? } StrategicExecution::Survival RewriteTask::executionSucceeded(int resultIndex, StrategicProcess* insertionPoint) { // // We now need to match the result of a rewrite seach against our rhs pattern. // DagNode* result = hashConsSet.getCanonical(resultIndex); RewritingContext* matchContext = rewriteState->getContext()->makeSubcontext(result, RewritingContext::CONDITION_EVAL); // // We need to use clone() rather than copy() since matchContext with have a copy size of zero. // matchContext->clone(*newContext); Subproblem* subproblem; if (rcf->matchRoot(*matchContext, subproblem)) { (void) new MatchProcess(rewriteState, redexIndex, extensionInfoCopy, matchContext, // MatchProcess takes over ownership of matchContext subproblem, // MatchProcess takes over ownership of subproblem rule, fragmentNr, strategies, strategyNr + 1, pending, this, insertionPoint); } return SURVIVE; } StrategicExecution::Survival RewriteTask::executionsExhausted(StrategicProcess* insertionPoint) { // // We don't have any more slave executions so there are no more solutions to // rewrite condition fragment. // return DIE; } Maude-2.7/src/StrategyLanguage/unionStrategy.hh0000644000147300135640000000267110524241377016612 00000000000000/* This file is part of the Maude 2 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 for union strategies. // #ifndef _unionStrategy_hh_ #define _unionStrategy_hh_ #include "strategyExpression.hh" class UnionStrategy : public StrategyExpression { public: UnionStrategy(const Vector& strategies); ~UnionStrategy(); const Vector& getStrategies() const; StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder); private: const Vector strategies; }; inline const Vector& UnionStrategy::getStrategies() const { return strategies; } #endif Maude-2.7/src/StrategyLanguage/strategyStackManager.hh0000644000147300135640000000417411444243560020060 00000000000000/* This file is part of the Maude 2 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 for managing a collection of persistent stacks of strategies with sharing. // #ifndef _strategyStackManager_hh_ #define _strategyStackManager_hh_ class StrategyStackManager { public: typedef int StackId; enum Constants { EMPTY_STACK = 0 }; StrategyStackManager(); static StackId emptyStack(); bool empty(StackId stackId) const; StrategyExpression* top(StackId stackId) const; StackId pop(StackId stackId) const; StackId push(StackId stackId, StrategyExpression* strategy); private: struct Entry { StrategyExpression* strategy; StackId restOfStack; // // This fields are use solelyto keep a linked list of entries having // the same restOfStack so we can minimize the creation of duplicate // entries. // StackId firstSuccessor; // first stack that has us as restOfStack StackId nextPeer; // next stack that shares our restOfStack }; Vector stackTable; }; inline bool StrategyStackManager::empty(StackId stackId) const { return stackId == EMPTY_STACK; } inline StrategyExpression* StrategyStackManager::top(StackId stackId) const { return stackTable[stackId].strategy; } inline StrategyStackManager::StackId StrategyStackManager::pop(StackId stackId) const { return stackTable[stackId].restOfStack; } #endif Maude-2.7/src/StrategyLanguage/trivialStrategy.hh0000644000147300135640000000246110524155375017133 00000000000000/* This file is part of the Maude 2 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 for idle and fail strategies. // #ifndef _trivialStrategy_hh_ #define _trivialStrategy_hh_ #include "strategyExpression.hh" class TrivialStrategy : public StrategyExpression { public: TrivialStrategy(bool result); bool getResult() const; StrategicExecution::Survival decompose(StrategicSearch& searchObject, DecompositionProcess* remainder); private: const bool result; }; inline bool TrivialStrategy::getResult() const { return result; } #endif Maude-2.7/src/StrategyLanguage/strategicTask.hh0000644000147300135640000000407511446473033016547 00000000000000/* This file is part of the Maude 2 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. */ // // Abstract base class for event triggered strategic execution. // #ifndef _stategicTask_hh_ #define _stategicTask_hh_ #include #include "strategicExecution.hh" #include "strategyStackManager.hh" class StrategicTask : public StrategicExecution { NO_COPYING(StrategicTask); public: StrategicTask(StrategicTask* master); StrategicTask(StrategicExecution* sibling); ~StrategicTask(); // // Call-backs for interesting events. // virtual Survival executionSucceeded(int resultIndex, StrategicProcess* insertionPoint) = 0; virtual Survival executionsExhausted(StrategicProcess* insertionPoint) = 0; bool alreadySeen(int dagIndex, StrategyStackManager::StackId stackId); protected: StrategicExecution* getDummyExecution(); private: // // A state is an index to a dag and a stack identifier. // typedef pair State; typedef set SeenSet; // // To simplify coding, the head and tail of our list of slaves // (processes and tasks working for us) is stored as a dummy // execution, essentially forming a circular list. // StrategicExecution slaveList; SeenSet seenSet; }; inline StrategicExecution* StrategicTask::getDummyExecution() { return &slaveList; } #endif Maude-2.7/src/Utility/0000755000147300135640000000000012305232002011645 500000000000000Maude-2.7/src/Utility/allSat.cc0000644000147300135640000000613311421717333013334 00000000000000/* This file is part of the Maude 2 interpreter. Copyright 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 NatSet. // #include "macros.hh" #include "vector.hh" #include "allSat.hh" AllSat::AllSat(Bdd formula, int firstVariable, int lastVariable) : formula(formula), firstVariable(firstVariable), lastVariable(lastVariable), nodeStack(0, lastVariable - firstVariable + 1), dontCareSet(0, lastVariable - firstVariable + 1) { firstAssignment = true; } bool AllSat::nextAssignment() { if (firstAssignment) { // // First solution. // if (formula == bddfalse) return false; assignment.resize(lastVariable + 1); for (int i = firstVariable; i <= lastVariable; ++i) assignment[i] = UNDEFINED; forward(formula); firstAssignment = false; return true; } // // Try to find another way of assigning to don't care variables. // int nrDontCares = dontCareSet.size(); for (int i = nrDontCares - 1; i >= 0; --i) { int var = dontCareSet[i]; if (assignment[var] == 0) { assignment[var] = 1; for (++i; i < nrDontCares; ++i) assignment[dontCareSet[i]] = 0; return true; } } for (int i = 0; i < nrDontCares; ++i) assignment[dontCareSet[i]] = UNDEFINED; dontCareSet.clear(); // // Try to find another route to true through BDD. // int nodeDepth = nodeStack.size(); for (int i = nodeDepth - 1; i >= 0; --i) { Bdd b = nodeStack[i]; int var = bdd_var(b); if (assignment[var] == 0) { Bdd n = bdd_high(b); if (n != bddfalse) { assignment[var] = 1; nodeStack.resize(i + 1); forward(n); return true; } } assignment[var] = UNDEFINED; } return false; } void AllSat::forward(Bdd b) { Assert(b != bddfalse, "false BDD"); // // There must be at least one path to true from b; find the least one. // while (b != bddtrue) { nodeStack.append(b); int var = bdd_var(b); Bdd n = bdd_low(b); if (n == bddfalse) { n = bdd_high(b); assignment[var] = 1; } else assignment[var] = 0; b = n; } // // Any variables of interest not assigned to on this path are don't cares. // for (int i = firstVariable; i <= lastVariable; ++i) { if (assignment[i] == UNDEFINED) { assignment[i] = 0; dontCareSet.append(i); } } } Maude-2.7/src/Utility/pointerMap.cc0000644000147300135640000000600507666300443014236 00000000000000/* This file is part of the Maude 2 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 PointerMap // // We use a hash table to map void* to void* with // clashes being resolved by open addressing (with double hashing) // See Cormen, Lieserson & Rivest p235 // #include "macros.hh" #include "vector.hh" #include "pointerMap.hh" inline int PointerMap::hash(void* pointer) { int i = reinterpret_cast(pointer); return (i >> NR_PTR_LOSE_BITS) ^ (i >> (2 * NR_PTR_LOSE_BITS)); } inline int PointerMap::hash2(void* pointer) // 2nd hash function must always return an odd value { int i = reinterpret_cast(pointer); return ((i >> NR_PTR_LOSE_BITS) ^ (i >> (WORD_SIZE / 2))) | 1; } PointerMap::PointerMap(int size) { int s = 2; while (s < size) s *= 2; s *= 2; hashTable.expandTo(s); for (int i = 0; i < s; i++) hashTable[i].from = 0; used = 0; } void* PointerMap::setMap(void* from, void* to) { Assert(from != 0, "can't map null pointer"); if (hashTable.length() <= 2 * used) resize(); Pair& p = hashTable[findEntry(from)]; void* r; if (p.from == 0) { r = 0; p.from = from; ++used; } else r = p.to; p.to = to; return r; } void* PointerMap::getMap(void* from) const { Assert(from != 0, "can't map null pointer"); const Pair& p = hashTable[findEntry(from)]; return (p.from == 0) ? 0 : p.to; } int PointerMap::findEntry(void* from) const { int mask = hashTable.length() - 1; int i = hash(from) & mask; if (hashTable[i].from == 0 || hashTable[i].from == from) return i; int step = hash2(from); do i = (i + step) & mask; while (hashTable[i].from != 0 && hashTable[i].from != from); return i; } void PointerMap::resize() { int s = hashTable.length(); int n = 2 * s; Vector newHashTable(n); for (int i = 0; i < n; i++) newHashTable[i].from = 0; int mask = n - 1; for (int i = 0; i < s; i++) { Pair& p = hashTable[i]; if (p.from != 0 && p.to != 0) { int j = hash(p.from) & mask; if (newHashTable[j].from != 0) { int step = hash2(p.from); do j = (j + step) & mask; while (newHashTable[j].from != 0); } newHashTable[j] = p; } } hashTable.swap(newHashTable); } Maude-2.7/src/Utility/sequencePartition.hh0000644000147300135640000000373407666300442015641 00000000000000/* This file is part of the Maude 2 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 generate sequence partitions associated with A and AU matching. // #ifndef _sequencePartition_hh_ #define _sequencePartition_hh_ class SequencePartition { public: SequencePartition(int sequenceLength, int estNrParts = 0); void insertPart(int minLength, int maxLength); bool solve(); int start(int partNr) const; int end(int partNr) const; int partCount() const; private: struct Part { int minLength; int maxLength; int sumPrevMin; int sumPrevMax; int start; }; bool mainSolve(bool findFirst); const int sequenceLength; Vector parts; int minSum; int maxSum; bool closed; bool failed; }; inline int SequencePartition::start(int partNr) const { Assert(closed, "solve() not called"); Assert(!failed, "non-existent solution"); return parts[partNr].start; } inline int SequencePartition::end(int partNr) const { Assert(closed, "solve() not called"); Assert(!failed, "non-existent solution"); return (partNr == parts.length() - 1) ? sequenceLength - 1 : parts[partNr + 1].start - 1; } inline int SequencePartition::partCount() const { return parts.length(); } #endif Maude-2.7/src/Utility/pointerSet.cc0000644000147300135640000001475511305565572014270 00000000000000/* This file is part of the Maude 2 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 PointerSet // #include "macros.hh" #include "vector.hh" #include "pointerSet.hh" PointerSet::~PointerSet() { } inline int PointerSet::localHash(unsigned int rawHashValue) { return rawHashValue ^ (rawHashValue >> 2); } inline int PointerSet::localHash2(unsigned int rawHashValue) { // // Second local hash function must always return an odd value. // return (rawHashValue ^ (rawHashValue >> (WORD_SIZE / 2))) | 1; } local_inline bool PointerSet::isEqual(const Pair& pair, void* p, unsigned int rawHashValue) const { return pair.rawHashValue == rawHashValue && isEqual(pair.pointer, p); } unsigned int PointerSet::hash(void* pointer) const { return reinterpret_cast(pointer) >> NR_PTR_LOSE_BITS; } bool PointerSet::isEqual(void* pointer1, void* pointer2) const { return pointer1 == pointer2; } int PointerSet::insert(void* p, unsigned int rawHashValue) { if (pointerTable.length() == 0) resize(STARTING_HASH_TABLE_SIZE); int i = findEntry(p, rawHashValue); int j = hashTable[i]; if (j == UNUSED) { j = pointerTable.length(); pointerTable.expandBy(1); Pair& pair = pointerTable[j]; pair.pointer = p; pair.rawHashValue = rawHashValue; int size = 2 * (j + 1); //if (size > 2000) // cerr << "size = " << size << '\n'; if (size > hashTable.length()) resize(size); else hashTable[i] = j; } return j; } void PointerSet::insert(const PointerSet& other) { int size = 2 * (pointerTable.length() + other.pointerTable.length()); if (size > hashTable.length()) resize(size); // pre-emptively resize hash table based on estimate for (int i = other.pointerTable.length() - 1; i >= 0; i--) { const Pair& pair = other.pointerTable[i]; void* p = pair.pointer; unsigned int rawHashValue = pair.rawHashValue; int j = findEntry(p, rawHashValue); if (hashTable[j] == UNUSED) { int k = pointerTable.length(); pointerTable.expandBy(1); Pair& pair2 = pointerTable[k]; pair2.pointer = p; pair2.rawHashValue = rawHashValue; hashTable[j] = k; } } } void PointerSet::subtract(void* p, unsigned int rawHashValue) { int n = pointerTable.length(); if (n == 0) return; int i = findEntry(p, rawHashValue); int j = hashTable[i]; if (j == UNUSED) return; --n; pointerTable[j] = pointerTable[n]; pointerTable.contractTo(n); rehash(); // removing an element is expensive } void PointerSet::subtract(const PointerSet& other) { int n = pointerTable.length(); if (n == 0 || other.pointerTable.length() == 0) return; int j = 0; for (int i = 0; i < n; i++) { Pair& pair = pointerTable[i]; void* p = pair.pointer; unsigned int rawHashValue = pair.rawHashValue; if (other.hashTable[other.findEntry(p, rawHashValue)] == UNUSED) { Pair& pair2 = pointerTable[j++]; pair2.pointer = p; pair.rawHashValue = rawHashValue; } } if (j != n) { pointerTable.contractTo(j); rehash(); } } void PointerSet::intersect(const PointerSet& other) { int n = pointerTable.length(); if (n == 0) return; if (other.pointerTable.length() == 0) { pointerTable.contractTo(0); hashTable.contractTo(0); return; } int j = 0; for (int i = 0; i < n; i++) { Pair& pair = pointerTable[i]; void* p = pair.pointer; unsigned int rawHashValue = pair.rawHashValue; if (other.hashTable[other.findEntry(p, rawHashValue)] != UNUSED) { Pair& pair2 = pointerTable[j++]; pair2.pointer = p; pair.rawHashValue = rawHashValue; } } if (j != n) { pointerTable.contractTo(j); rehash(); } } bool PointerSet::contains(const PointerSet& other) const { int i = other.pointerTable.length(); if (i == 0) return true; if (pointerTable.length() < i) return false; for (i--; i >= 0; i--) { const Pair& pair = other.pointerTable[i]; if (hashTable[findEntry(pair.pointer, pair.rawHashValue)] == UNUSED) return false; } return true; } bool PointerSet::disjoint(const PointerSet& other) const { int i = other.pointerTable.length(); if (i == 0 || pointerTable.length() == 0) return true; for (i--; i >= 0; i--) { const Pair& pair = other.pointerTable[i]; if (hashTable[findEntry(pair.pointer, pair.rawHashValue)] != UNUSED) return false; } return true; } int PointerSet::findEntry(void* p, unsigned int rawHashValue) const { Assert(hashTable.length() != 0, "zero length hash table"); int mask = hashTable.length() - 1; int i = localHash(rawHashValue) & mask; int j = hashTable[i]; if (j != UNUSED && !(isEqual(pointerTable[j], p, rawHashValue))) { int step = localHash2(rawHashValue); do { #ifndef NO_ASSERT collision(p, rawHashValue, pointerTable[j].pointer, pointerTable[j].rawHashValue, hashTable.length(), i); #endif i = (i + step) & mask; j = hashTable[i]; } while (j != UNUSED && !(isEqual(pointerTable[j], p, rawHashValue))); } return i; } void PointerSet::resize(int minSize) { int n = hashTable.length(); n = (n == 0) ? STARTING_HASH_TABLE_SIZE : 2 * n; while (n < minSize) n *= 2; hashTable.expandTo(n); rehash(); } void PointerSet::rehash() { int n = hashTable.length(); for (int i = 0; i < n; i++) hashTable[i] = UNUSED; int mask = n - 1; for (int i = pointerTable.length() - 1; i >= 0; i--) { unsigned int rawHashValue = pointerTable[i].rawHashValue; int j = localHash(rawHashValue) & mask; if (hashTable[j] != UNUSED) { int step = localHash2(rawHashValue); do j = (j + step) & mask; while (hashTable[j] != UNUSED); } hashTable[j] = i; } } Maude-2.7/src/Utility/flagSet.hh0000644000147300135640000000324307666300442013517 00000000000000/* This file is part of the Maude 2 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 set of 32 flags. // #ifndef _flagSet_hh_ #define _flagSet_hh_ class FlagSet { public: FlagSet(int initFlags = 0); bool getFlag(int flag) const; bool oneOrMoreSet(int activeFlags) const; bool allSet(int activeFlags) const; void clearFlags(int activeFlags); void setFlags(int activeFlags); private: int flags; }; inline FlagSet::FlagSet(int initFlags) { flags = initFlags; } inline bool FlagSet::getFlag(int flag) const { return flags & flag; } inline bool FlagSet::oneOrMoreSet(int activeFlags) const { return flags & activeFlags; } inline bool FlagSet::allSet(int activeFlags) const { return (flags & activeFlags) == activeFlags; } inline void FlagSet::clearFlags(int activeFlags) { flags &= ~activeFlags; } inline void FlagSet::setFlags(int activeFlags) { flags |= activeFlags; } #endif Maude-2.7/src/Utility/decBuf.cc0000644000147300135640000000523007666300443013307 00000000000000/* This file is part of the Maude 2 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 DecBuf. // #include "macros.hh" #include "decBuf.hh" void DecBuf::shiftAndAdd(int shift, Uint64 c) { for (deque::iterator i = buf.begin(); i != buf.end(); ++i) { Uint64 r = c + (static_cast(*i) << shift); c = r / 10; *i = r - 10 * c; } while (c > 0) { Uint64 r = c; c = r / 10; buf.push_back(r - 10 * c); } } void DecBuf::ascii(char* s, int length) { Assert(length <= nrDigits(), "bad length" << length); for (deque::reverse_iterator i = buf.rbegin(); length > 0; ++i, --length) *s++ = *i + '0'; *s = '\0'; } int DecBuf::nrTrailingZeros() { int nrZeros = 0; for (deque::iterator i = buf.begin(); i != buf.end(); ++i) { if (*i != 0) break; ++nrZeros; } return nrZeros; } void DecBuf::increment(int startDigit) { for (deque::iterator i = buf.begin() + startDigit; i != buf.end(); ++i) { int r = *i + 1; if (r < 10) { *i = r; return; } *i = 0; } buf.push_back(1); } void DecBuf::round(int roundTo, bool fracGtZero, int fracCmpHalf) { int roundDigit = nrDigits() - roundTo; // // We need to round up if remaining part of the number (including the fraction) // is either > 0.5; or = 0.5 and the last digit (roundDigit) of the piece we // want is odd. // bool roundUp; if (roundDigit == 0) roundUp = (fracCmpHalf > 0 || (fracCmpHalf == 0 && (buf[0] & 1))); else { int critical = buf[roundDigit - 1]; if (critical < 5) roundUp = false; else if (critical > 5 || fracGtZero || (buf[roundDigit] & 1)) roundUp = true; else { roundUp = false; for (int i = 0; i < roundDigit - 1; i++) { if (buf[i] != 0) { roundUp = true; break; } } } } if (roundUp) increment(roundDigit); } Maude-2.7/src/Utility/pointerSet.hh0000644000147300135640000001245511305565503014267 00000000000000/* This file is part of the Maude 2 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 table based sets of pointers to user data structures. // // By default equality is on pointers (equivalently on unique data structures). // hash(void*) and isEqual(void*, void*) may be overloaded for a coarser // notion of equality that depends on the contents of the data structures. // #ifndef _pointerSet_hh_ #define _pointerSet_hh_ class PointerSet { public: PointerSet(); PointerSet(const PointerSet& original); virtual ~PointerSet(); // // If these four members are never called then we guarentee that // hash(void*) will never be called. These may be useful in situations // where the hash function is expensive and caching it would be awkward. // int insert(void* p); void subtract(void* p); bool contains(void* p) const; int pointer2Index(void *p) const; // // Alternative members - hash value must be provided with the pointer. // int insert(void* p, unsigned int rawHashValue); void subtract(void* p, unsigned int rawHashValue); bool contains(void* p, unsigned int rawHashValue) const; int pointer2Index(void *p, unsigned int rawHashValue) const; void makeEmpty(); void insert(const PointerSet& other); void subtract(const PointerSet& other); void intersect(const PointerSet& other); PointerSet& operator=(const PointerSet& original); bool empty() const; bool contains(const PointerSet& other) const; bool disjoint(const PointerSet& other) const; int cardinality() const; bool operator==(const PointerSet& other) const; bool operator!=(const PointerSet& other) const; void* index2Pointer(int i) const; void swap(PointerSet& other); protected: virtual unsigned int hash(void* pointer) const; virtual bool isEqual(void* pointer1, void* pointer2) const; #ifndef NO_ASSERT // // Allow analysis/debugging of collisions. // virtual void collision(void* pointer1, unsigned int rawHashValue1, void* pointer2, unsigned int rawHashValue2, unsigned int tableSize, unsigned int disputedSlot) const {} #endif private: enum Parameters { STARTING_HASH_TABLE_SIZE = 8 }; struct Pair { void* pointer; unsigned int rawHashValue; }; static int localHash(unsigned int rawHashValue); static int localHash2(unsigned int rawHashValue); bool isEqual(const Pair& pair, void* p, unsigned int rawHashValue) const; int findEntry(void* p, unsigned int rawHashValue) const; void resize(int minSize); void rehash(); Vector pointerTable; Vector hashTable; }; inline PointerSet::PointerSet() { } inline PointerSet::PointerSet(const PointerSet& original) : pointerTable(original.pointerTable), hashTable(original.hashTable) { } // // These are the only four functions that are allowed to call hash(void*). // inline int PointerSet::insert(void* p) { return insert(p, hash(p)); } inline void PointerSet::subtract(void* p) { if (pointerTable.length() != 0) subtract(p, hash(p)); } inline bool PointerSet::contains(void* p) const { return pointerTable.length() != 0 && hashTable[findEntry(p, hash(p))] != UNUSED; } inline int PointerSet::pointer2Index(void *p) const { return (pointerTable.length() != 0) ? hashTable[findEntry(p, hash(p))] : NONE; } // // Alternative versions. // inline bool PointerSet::contains(void* p, unsigned int rawHashValue) const { return pointerTable.length() != 0 && hashTable[findEntry(p, rawHashValue)] != UNUSED; } inline int PointerSet::pointer2Index(void *p, unsigned int rawHashValue) const { return (pointerTable.length() != 0) ? hashTable[findEntry(p, rawHashValue)] : NONE; } // // Remaining member functions // inline void PointerSet::makeEmpty() { pointerTable.contractTo(0); hashTable.contractTo(0); } inline PointerSet& PointerSet::operator=(const PointerSet& original) { pointerTable = original.pointerTable; // deep copy hashTable = original.hashTable; // deep copy return *this; } inline bool PointerSet::empty() const { return pointerTable.length() == 0; } inline int PointerSet::cardinality() const { return pointerTable.length(); } inline bool PointerSet::operator==(const PointerSet& other) const { return pointerTable.length() == other.pointerTable.length() && contains(other); } inline bool PointerSet::operator!=(const PointerSet& other) const { return !(*this == other); } inline void* PointerSet::index2Pointer(int i) const { return pointerTable[i].pointer; } inline void PointerSet::swap(PointerSet& other) { pointerTable.swap(other.pointerTable); hashTable.swap(other.hashTable); } #endif Maude-2.7/src/Utility/diophantineSystem.hh0000644000147300135640000001635507666300442015651 00000000000000/* This file is part of the Maude 2 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 solve Diophantine systems associated with AC and ACU matching. // // Based on: // Steven Eker, // "Single Elementary Associative-Commutative Matching", // Journal of Automated Reasoning, pp35-51, 28(1), 2002. // // Given an n-component vector of positive integers R and an m-component vector // of positive integers C a solution is an n*m matrix M of natural numbers such // that // R * M = C. // The intuition is that M_{i,j} is the multiplicity of the jth constant assigned // to the ith variable in an single elementary AC or ACU matching problem. // For AC we are only interested in solutions which all rows (possibly all but // one in the case of extension variables) of M have a non-zero sum. // // We solve a slightly more general problem where minimum and maximum // values may be specified for the sum of each row of M. // The algorithm used here is optimized for moderately large problem instances. // We do not combine repeated entries in R or make use of failure information // since these approaches to reducing the search space only pay for their overheads // for very large problem instances and would considerably complicate the code. // // Rows are created by the member function // insertRow(int coeff, int minSize, int maxSize) // when "coeff" is the component of R and "minSize" and "maxSize" are the // minimum and maximum values for the sum of the corresponding row of M. // // Columns are created by the member function // insertColumn(int value) // where "value" is the component of C. // // To generate the first and successive solutions the member function solve() is // called; this returns true if a solution was generated and false if no more // solutions exist. If true was returned the components of M can be extracted // using the member function solution(int row, int column). // // Note that is a error to add more rows or columns after the first call to // solve(), or to try to examine a non-existent solution. // // The basic approach is to sort R into descending order and solve one row // at a time, backtracking whenever a dead end is detected. To solve a row // we consider C as a multiset and compute a sub-multiset that we could // potentially use for the current row. We then systematically try selections // from this sub-multiset starting with the smallest ones. // // The bottom level of the implementation uses two different algorithms for // solving a row depending on whether the system as a whole is "simple" or // "complex". A system is "simple" iff at least one element of R is 1 and // has a maximum allowable sum greater or equal that the largest column value. // Otherwise the system is "complex". // Since we sort R into descending order, simple systems // have the property that any natural number can be expressed as a natural number // linear combination of any final segment of the sorted R. Thus we can rule // out one cause of failure for partial solutions. For complex systems we keep // a "solubility vector" which allows us to detect this kind of failure early // and prune the useless branches from the search. // #ifndef _diophantineSystem_hh_ #define _diophantineSystem_hh_ class DiophantineSystem { public: enum SpecialValues { INSOLUBLE = -1 }; DiophantineSystem(int estNrRows = 0, int estNrColumns = 0); void insertRow(int coeff, int minSize, int maxSize); void insertColumn(int value); bool solve(); int solution(int row, int column) const; int rowCount() const; int columnCount() const; private: struct Select { int base; // base value for element of M (0 for simple systems) int extra; // extra value representing current state of solution int maxExtra; // maximum for extra }; // // In a complex system, for each row with coefficient R_i and for each possible // column value V we compute and store the minimum and maximum K such that // V - K*R_i can be expressed as a natural number linear combination over // R_j for j > i, respecting the maximum allowable sums but not the minimum // allowable sums (since some other column may make up the minimum). // If no such (natural number) K exists we store min = max = INSOLUBLE. // struct Soluble { int min; // minimum assignment to row for given column value int max; // maximum assignment to row for given column value }; // // Structure for each row. We have a pair of member functions to handle // making a selection from a multiset, both normally and in the presence // of solubility constraints on the non-selected part. // struct Row { bool multisetSelect(Vector& bag, bool findFirst); bool multisetComplex(Vector& bag, Vector& soluble, bool findFirst); int name; // original position of row int coeff; // coefficient int minSize; // minimum acceptable sum int minProduct; // coeff * minSize int minLeave; // minimum sum that must be left for // remaining rows int maxSize; // maximum acceptable sum int maxProduct; // coeff * maxSize int maxLeave; // maximum sum that may be left for // remaining rows int currentSize; // current size of selection from multiset int currentMaxSize; // maximum size of selection from multiset Vector& s = r.selection; s.expandTo(nrColumns); for (int j = 0; j < nrColumns; j++) s[j].base = 0; minTotal += r.minProduct; maxTotal += r.maxProduct; } if (rows[nrRows - 1].coeff > 1 || rows[nrRows - 1].maxSize < maxColumnValue) { // // Complex case // buildSolubilityVectors(); Vector& soluble = rows[0].soluble; for (int j = 0; j < nrColumns; j++) { if (soluble[columns[j]].min < 0) { failed = true; return false; } } complex = true; } return true; } // // Function to build the solubility vectors discussed above using a dynamic // programming approach. // void DiophantineSystem::buildSolubilityVectors() { int nrRows = rows.length(); // // Compute solubility vector for last row // { Row& r = rows[nrRows - 1]; Vector& s = r.soluble; s.expandTo(maxColumnValue + 1); int coeff = r.coeff; for (int j = 1; j <= maxColumnValue; j++) s[j].min = s[j].max = INSOLUBLE; int count = 0; for (int j = 0; j <= maxColumnValue && count <= r.maxSize; j += coeff) s[j].min = s[j].max = count++; } // // Compute remaining vectors in descending order // for (int i = nrRows - 2; i >= 0; i--) { Vector& prev = rows[i + 1].soluble; Vector& next = rows[i].soluble; next.expandTo(maxColumnValue + 1); int coeff = rows[i].coeff; int maxSize = rows[i].maxSize; for (int j = 0; j <= maxColumnValue; j++) { int t = j - coeff; if (t >= 0 && next[t].min != INSOLUBLE && next[t].min < maxSize) { next[j].min = (prev[j].min == INSOLUBLE) ? next[t].min + 1 : 0; if (next[t].max < maxSize) next[j].max = next[t].max + 1; else { int newMax = maxSize; for (int k = j - maxSize * coeff; prev[k].min == INSOLUBLE; k += coeff) --newMax; Assert(newMax >= next[t].min + 1, "bad newMax"); next[j].max = newMax; } } else { next[j].min = next[j].max = ((prev[j].min == INSOLUBLE) ? INSOLUBLE : 0); } } } } // // For each initial segment of the unsolved portion of R we check that there // is a large enough sum of large enough elements in (what is left of) C to // rule out a certain kind of failure. Return false if the current partial // solution fails this test (and must therefore fail). // local_inline bool DiophantineSystem::viable(int rowNr) const { int nrRows = rows.length(); int nrColumns = columns.length(); int localSumOfMinProducts = 0; for (int i = rowNr; i <= nrRows - 2; i++) // no need to consider last row { int t = rows[i].minProduct; if (t > 0) { localSumOfMinProducts += t; int lowerLimit = rows[i].coeff; int localColumnSum = 0; for (int j = 0; j < nrColumns; j++) { int c = columns[j]; if (c >= lowerLimit) { localColumnSum += c; if (localColumnSum >= localSumOfMinProducts) goto okay; } } return false; } okay: ; } return true; } ///////////////////////////////////////////////////////////////////////// // // Code for solving simple case // ///////////////////////////////////////////////////////////////////////// // // Find a selection from a multiset by undoing the previous selection until // the selected amount of some element can be increased by one (without // exceeding overall selection size). Then make up the size of the selection // by selecting the earliest elements available. // local_inline bool DiophantineSystem::Row::multisetSelect(Vector& bag, bool findFirst) { int bagLength = bag.length(); int undone; if (!findFirst) { if (currentSize > 0) { undone = 0; for (int j = 0; j < bagLength; j++) { Assert(selection[j].extra <= selection[j].maxExtra, "extra > maxExtra"); int t = selection[j].extra; if (undone > 0 && t < selection[j].maxExtra) { ++(selection[j].extra); --undone; bag[j] -= coeff; goto forwards; } if (t > 0) { selection[j].extra = 0; undone += t; bag[j] += t * coeff; } } } return false; } else undone = currentSize; forwards: for(int j = 0; undone > 0; j++) { Assert(j < bagLength, "overran bag"); int t = min(undone, selection[j].maxExtra); if (t > 0) { selection[j].extra = t; undone -= t; bag[j] -= t * coeff; } } return true; } // // Solve last row by allocating what is left. // local_inline void DiophantineSystem::solveLastRowSimple() { Vector& selection = rows[rows.length() - 1].selection; Vector& soluble = rows[rows.length() - 1].soluble; int nrColumns = columns.length(); for (int i = 0; i < nrColumns; i++) { int t = soluble[columns[i]].min; Assert(t != INSOLUBLE, "solubility bug"); selection[i].extra = t; } } // // Solve non-last row by trying to find a next selection for it and increasing // the size of selection we are looking for if necessary. If we are looking for // a first solution we first have to generate the multiset and determine the // feasable range of selection sizes taking into account solubility constraints. // Because of solubility constaints we may end up with minimum values for // certain elements of M which are subtracted out of C just before searching // for the first solution and added back when the final failure occurs (just // before returning false). // local_inline bool DiophantineSystem::solveRowComplex(int rowNr, bool findFirst) { int nrColumns = columns.length(); Row& r = rows[rowNr]; int coeff = r.coeff; Vector