diff --git a/Makefile.in b/Makefile.in index 9c841205..70a65b3a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -136,8 +136,8 @@ am__recursive_targets = \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ - config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -199,8 +199,6 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip -# Exists only to be overridden by the user if desired. -AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -220,6 +218,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -228,10 +227,12 @@ 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@ @@ -555,10 +556,6 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) -dist-zstd: distdir - tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst - $(am__post_remove_distdir) - dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -601,8 +598,6 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ - *.tar.zst*) \ - zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -618,7 +613,7 @@ distcheck: dist $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -779,7 +774,7 @@ uninstall-am: am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ - dist-zstd distcheck distclean distclean-generic distclean-hdr \ + distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/NEWS b/NEWS index 99b9509f..67498a7b 100755 --- a/NEWS +++ b/NEWS @@ -1,4 +1,12 @@ -Overview of Changes in alpha150 +Overview of Changes in alpha151 (2023-08-11) +============================================ +* fmod INITIAL-EQUALITY-PREDICATE added to prelude +* more LaTeX support +* fixed bug where debug modifier wasn't being printed +* fixed break deselect, trace deselect, trace include, print reveal bugs +* fixed LaTeX timing bugs + +Overview of Changes in alpha150 (2023-07-21) ============================================ * added set show resources command * intial support for LaTeX diff --git a/aclocal.m4 b/aclocal.m4 index d0a28b66..cb7551ad 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.3 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.70],, -[m4_warning([this file was generated for autoconf 2.70. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.3], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.3])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,9 +371,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE="gmake" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -400,7 +398,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -597,7 +595,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -618,7 +616,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -639,7 +637,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -682,7 +680,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -703,7 +701,12 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -716,7 +719,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -745,7 +748,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -792,7 +795,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -811,7 +814,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -892,7 +895,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -952,7 +955,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -980,7 +983,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -999,7 +1002,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2020 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/config.h.in b/config.h.in index 52129eb8..d0e4590a 100644 --- a/config.h.in +++ b/config.h.in @@ -36,6 +36,9 @@ /* 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 @@ -123,13 +126,10 @@ /* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P -/* Define to 1 if all of the C90 standard headers exist (not just the ones - required in a freestanding environment). This macro is provided for - backward compatibility; new code need not use it. */ +/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to 1 if you can safely include both and . This - macro is obsolete. */ +/* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* use CVC4 SMT solver library */ diff --git a/configure b/configure index bd98bf10..c86f1153 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.70 for Maude alpha150. +# Generated by GNU Autoconf 2.69 for Maude alpha151. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -35,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -83,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -91,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -108,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -133,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -168,53 +187,42 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null -then : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -222,21 +230,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,19 +255,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: maude-bugs@lists.cs.illinois.edu about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run @@ -294,7 +294,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -312,14 +311,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -334,7 +325,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -343,7 +334,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -382,13 +373,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -400,27 +390,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -432,9 +413,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -461,7 +442,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -505,7 +486,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -519,10 +500,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -536,13 +513,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -610,49 +580,56 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Maude' PACKAGE_TARNAME='maude' -PACKAGE_VERSION='alpha150' -PACKAGE_STRING='Maude alpha150' +PACKAGE_VERSION='alpha151' +PACKAGE_STRING='Maude alpha151' PACKAGE_BUGREPORT='maude-bugs@lists.cs.illinois.edu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_cxx_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS BUILD_COMPILER_FALSE BUILD_COMPILER_TRUE +EGREP +GREP +CXXCPP GCC_LIBS GMP_LIBS LIBSIGSEGV_LIB @@ -783,7 +760,8 @@ LIBS CPPFLAGS CXX CXXFLAGS -CCC' +CCC +CXXCPP' # Initialize some variables set by options. @@ -822,7 +800,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='/run' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -852,6 +830,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -892,9 +872,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -918,9 +898,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1131,9 +1111,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1147,9 +1127,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1193,9 +1173,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1211,7 +1191,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1275,7 +1255,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1332,7 +1312,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Maude alpha150 to adapt to many kinds of systems. +\`configure' configures Maude alpha151 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1372,7 +1352,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [/run] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1403,7 +1383,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Maude alpha150:";; + short | recursive ) echo "Configuration of Maude alpha151:";; esac cat <<\_ACEOF @@ -1442,6 +1422,7 @@ Some influential environment variables: you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1462,9 +1443,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1492,8 +1473,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1501,7 +1481,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1510,10 +1490,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Maude configure alpha150 -generated by GNU Autoconf 2.70 +Maude configure alpha151 +generated by GNU Autoconf 2.69 -Copyright (C) 2020 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1530,14 +1510,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1545,15 +1525,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1569,14 +1548,14 @@ fi ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1584,15 +1563,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1608,14 +1586,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1623,18 +1601,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1649,43 +1626,138 @@ fi } # ac_fn_c_try_link -# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_cxx_check_header_compile () +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------------- ## +## Report this to maude-bugs@lists.cs.illinois.edu ## +## ----------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_cxx_check_header_compile +} # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -1695,26 +1767,25 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status @@ -1725,6 +1796,37 @@ fi } # ac_fn_cxx_try_run +# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_cxx_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_header_compile + # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES # ---------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -1739,7 +1841,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; @@ -1749,15 +1851,14 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -1767,10 +1868,9 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid; break -else $as_nop +else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= @@ -1778,14 +1878,14 @@ else $as_nop fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; @@ -1795,15 +1895,14 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; @@ -1813,10 +1912,9 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=$ac_mid; break -else $as_nop +else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= @@ -1824,14 +1922,14 @@ else $as_nop fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done -else $as_nop +else ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val @@ -1839,7 +1937,7 @@ while test "x$ac_lo" != "x$ac_hi"; do /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -1849,13 +1947,12 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid -else $as_nop +else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; @@ -1865,12 +1962,12 @@ esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 -static long int longval (void) { return $2; } -static unsigned long int ulongval (void) { return $2; } +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } #include #include int -main (void) +main () { FILE *f = fopen ("conftest.val", "w"); @@ -1898,10 +1995,9 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_run "$LINENO" -then : +if ac_fn_cxx_try_run "$LINENO"; then : echo >>conftest.val; read $3 config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Maude $as_me alpha150, which was -generated by GNU Autoconf 2.70. Invocation command line was +It was created by Maude $as_me alpha151, which was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -1973,12 +2049,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2013,7 +2085,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2048,13 +2120,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2065,8 +2135,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2090,7 +2160,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2098,14 +2168,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2113,15 +2183,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2129,8 +2199,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2144,48 +2214,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2195,756 +2280,148 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; +# +# Allow directory names that look like macros. +# -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' +# +# Local macros. +# -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -# Test code for whether the C++ compiler supports C++98 (global declarations) -ac_cxx_conftest_cxx98_globals=' -// Does the compiler advertise C++98 conformance? -#if !defined __cplusplus || __cplusplus < 199711L -# error "Compiler does not advertise C++98 conformance" -#endif - -// These inclusions are to reject old compilers that -// lack the unsuffixed header files. -#include -#include - -// and are *not* freestanding headers in C++98. -extern void assert (int); -namespace std { - extern int strcmp (const char *, const char *); -} - -// Namespaces, exceptions, and templates were all added after "C++ 2.0". -using std::exception; -using std::strcmp; - -namespace { - -void test_exception_syntax() -{ - try { - throw "test"; - } catch (const char *s) { - // Extra parentheses suppress a warning when building autoconf itself, - // due to lint rules shared with more typical C programs. - assert (!(strcmp) (s, "test")); - } -} - -template struct test_template -{ - T const val; - explicit test_template(T t) : val(t) {} - template T add(U u) { return static_cast(u) + val; } -}; - -} // anonymous namespace -' - -# Test code for whether the C++ compiler supports C++98 (body of main) -ac_cxx_conftest_cxx98_main=' - assert (argc); - assert (! argv[0]); -{ - test_exception_syntax (); - test_template tt (2.0); - assert (tt.add (4) == 6.0); - assert (true && !false); -} -' - -# Test code for whether the C++ compiler supports C++11 (global declarations) -ac_cxx_conftest_cxx11_globals=' -// Does the compiler advertise C++ 2011 conformance? -#if !defined __cplusplus || __cplusplus < 201103L -# error "Compiler does not advertise C++11 conformance" -#endif - -namespace cxx11test -{ - constexpr int get_val() { return 20; } - - struct testinit - { - int i; - double d; - }; - - class delegate - { - public: - delegate(int n) : n(n) {} - delegate(): delegate(2354) {} - - virtual int getval() { return this->n; }; - protected: - int n; - }; - - class overridden : public delegate - { - public: - overridden(int n): delegate(n) {} - virtual int getval() override final { return this->n * 2; } - }; - - class nocopy - { - public: - nocopy(int i): i(i) {} - nocopy() = default; - nocopy(const nocopy&) = delete; - nocopy & operator=(const nocopy&) = delete; - private: - int i; - }; - - // for testing lambda expressions - template Ret eval(Fn f, Ret v) - { - return f(v); - } - - // for testing variadic templates and trailing return types - template auto sum(V first) -> V - { - return first; - } - template auto sum(V first, Args... rest) -> V - { - return first + sum(rest...); - } -} -' - -# Test code for whether the C++ compiler supports C++11 (body of main) -ac_cxx_conftest_cxx11_main=' -{ - // Test auto and decltype - auto a1 = 6538; - auto a2 = 48573953.4; - auto a3 = "String literal"; - - int total = 0; - for (auto i = a3; *i; ++i) { total += *i; } - - decltype(a2) a4 = 34895.034; -} -{ - // Test constexpr - short sa[cxx11test::get_val()] = { 0 }; -} -{ - // Test initializer lists - cxx11test::testinit il = { 4323, 435234.23544 }; -} -{ - // Test range-based for - int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, - 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; - for (auto &x : array) { x += 23; } -} -{ - // Test lambda expressions - using cxx11test::eval; - assert (eval ([](int x) { return x*2; }, 21) == 42); - double d = 2.0; - assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); - assert (d == 5.0); - assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); - assert (d == 5.0); -} -{ - // Test use of variadic templates - using cxx11test::sum; - auto a = sum(1); - auto b = sum(1, 2); - auto c = sum(1.0, 2.0, 3.0); -} -{ - // Test constructor delegation - cxx11test::delegate d1; - cxx11test::delegate d2(); - cxx11test::delegate d3(45); -} -{ - // Test override and final - cxx11test::overridden o1(55464); -} -{ - // Test nullptr - char *c = nullptr; -} -{ - // Test template brackets - test_template<::test_template> v(test_template(12)); -} -{ - // Unicode literals - char const *utf8 = u8"UTF-8 string \u2500"; - char16_t const *utf16 = u"UTF-8 string \u2500"; - char32_t const *utf32 = U"UTF-32 string \u2500"; -} -' - -# Test code for whether the C compiler supports C++11 (complete). -ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} -${ac_cxx_conftest_cxx11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_cxx_conftest_cxx98_main} - ${ac_cxx_conftest_cxx11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C++98 (complete). -ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_cxx_conftest_cxx98_main} - return ok; -} -" - -as_fn_append ac_header_cxx_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_cxx_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_cxx_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_cxx_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_cxx_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_cxx_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_cxx_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_cxx_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_cxx_list " unistd.h unistd_h HAVE_UNISTD_H" -as_fn_append ac_header_cxx_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" - -# Auxiliary files required by this configure script. -ac_aux_files="compile missing install-sh config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" +# +# Figure out system we are building for and set $host shell variable. +# +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" break fi - ac_first_candidate=false - - as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi - # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# -# Allow directory names that look like macros. -# - - -# -# Local macros. -# - -# -# Figure out system we are building for and set $host shell variable. -# +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -2963,22 +2440,21 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3002,8 +2478,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # am__api_version='1.16' - - # Find a good install program. We prefer a C program (faster), +# Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -3017,25 +2492,20 @@ am__api_version='1.16' # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -3045,13 +2515,13 @@ case $as_dir in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -3059,12 +2529,12 @@ case $as_dir in #(( echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -3080,7 +2550,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -3090,8 +2560,8 @@ fi INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3101,8 +2571,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -printf %s "checking whether build environment is sane... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3156,8 +2626,8 @@ else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -3176,23 +2646,26 @@ test "$program_suffix" != NONE && # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` - +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` - - if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -3212,12 +2685,11 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -3225,15 +2697,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3244,11 +2712,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3257,12 +2725,11 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -3270,15 +2737,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3289,11 +2752,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -3301,8 +2764,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -3314,31 +2777,25 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 -printf %s "checking for a race-free mkdir -p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test ${ac_cv_path_mkdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue - case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done @@ -3349,7 +2806,7 @@ IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version - if test ${ac_cv_path_mkdir+y}; then + if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -3359,19 +2816,18 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -printf "%s\n" "$MKDIR_P" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -3379,15 +2835,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3398,25 +2850,24 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -3432,12 +2883,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3451,8 +2902,7 @@ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi @@ -3462,13 +2912,12 @@ case $enable_silent_rules in # ((( *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if printf "%s\n" 'TRUE=$(BAR$(V)) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3480,8 +2929,8 @@ else am_cv_make_support_nested_variables=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -3513,13 +2962,17 @@ fi # Define the identity of the package. PACKAGE='maude' - VERSION='alpha150' + VERSION='alpha151' -printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF -printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF # Some tools Automake needs. @@ -3565,29 +3018,29 @@ _am_tools='gnutar plaintar pax cpio none' # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } _am_tools=none fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } _am_tools=none fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -printf %s "checking how to create a ustar tar archive... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. @@ -3662,15 +3115,14 @@ printf %s "checking how to create a ustar tar archive... " >&6; } done rm -rf conftest.dir - if test ${am_cv_prog_tar_ustar+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 +else am_cv_prog_tar_ustar=$_am_tool fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -printf "%s\n" "$am_cv_prog_tar_ustar" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +$as_echo "$am_cv_prog_tar_ustar" >&6; } @@ -3743,15 +3195,6 @@ fi # # *** PROGRAMS *** # - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3760,12 +3203,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3773,15 +3215,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3792,11 +3230,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3805,12 +3243,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3818,15 +3255,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3837,11 +3270,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3849,8 +3282,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3863,12 +3296,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3876,15 +3308,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3895,11 +3323,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3908,12 +3336,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3922,19 +3349,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3950,18 +3373,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3972,12 +3395,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3985,15 +3407,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4004,11 +3422,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4021,12 +3439,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4034,15 +3451,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4053,11 +3466,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4069,8 +3482,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4078,129 +3491,25 @@ esac fi fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4210,7 +3519,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4218,7 +3527,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4230,9 +3539,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4253,12 +3562,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4275,7 +3583,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4291,46 +3599,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4344,15 +3650,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4361,7 +3667,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4373,8 +3679,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4382,10 +3688,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4393,40 +3699,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4440,12 +3745,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4454,32 +3758,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4489,33 +3792,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4524,60 +3823,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4592,144 +3888,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -4738,23 +3984,21 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -printf %s "checking whether $CC understands -c and -o together... " >&6; } -if test ${am_cv_prog_cc_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4782,8 +4026,8 @@ _ACEOF rm -f core conftest* unset am_i fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -4802,8 +4046,8 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -4839,12 +4083,11 @@ esac fi done rm -f confinc.* confmf.* -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -printf "%s\n" "${_am_result}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test ${enable_dependency_tracking+y} -then : +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -4865,12 +4108,11 @@ fi depcc="$CC" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CC_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -4977,8 +4219,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4992,12 +4234,6 @@ else fi - - - - - - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5008,16 +4244,15 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -5025,15 +4260,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5044,11 +4275,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5057,16 +4288,15 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -5074,15 +4304,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5093,11 +4319,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -printf "%s\n" "$ac_ct_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5109,8 +4335,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -5120,7 +4346,7 @@ fi fi fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -5130,7 +4356,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -5140,21 +4366,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 -printf %s "checking whether the compiler supports GNU C++... " >&6; } -if test ${ac_cv_cxx_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -5164,33 +4389,29 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+y} +ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -printf %s "checking whether $CXX accepts -g... " >&6; } -if test ${ac_cv_prog_cxx_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no @@ -5199,60 +4420,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else $as_nop +else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } -if test $ac_test_CXXFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -5267,100 +4485,6 @@ else CXXFLAGS= fi fi -ac_prog_cxx_stdcxx=no -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 -printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_11=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx11_program -_ACEOF -for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx11" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx11" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_prog_cxx_stdcxx=cxx11 -fi -fi -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 -printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_98=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx98_program -_ACEOF -for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx98=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx98" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx98" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx98" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx98" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 - ac_prog_cxx_stdcxx=cxx98 -fi -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5369,12 +4493,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CXX_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -5481,8 +4604,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if @@ -5497,21 +4620,20 @@ fi if (test "$GXX" = yes) then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking g++ compiler version" >&5 -printf %s "checking g++ compiler version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ compiler version" >&5 +$as_echo_n "checking g++ compiler version... " >&6; } GXX_VERSION=`$CXX -dumpversion` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GXX_VERSION" >&5 -printf "%s\n" "$GXX_VERSION" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GXX_VERSION" >&5 +$as_echo "$GXX_VERSION" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -5519,15 +4641,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5538,11 +4656,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -printf "%s\n" "$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5551,12 +4669,11 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_RANLIB+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -5564,15 +4681,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5583,11 +4696,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -printf "%s\n" "$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -5595,8 +4708,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -5617,18 +4730,17 @@ fi # *** SYSTEM CALLS *** # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ppoll(2)" >&5 -printf %s "checking for ppoll(2)... " >&6; } - if test ${ax_cv_have_ppoll+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ppoll(2)" >&5 +$as_echo_n "checking for ppoll(2)... " >&6; } + if ${ax_cv_have_ppoll+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main (void) +main () { int rc; rc = poll((struct pollfd *)(0), 0, 0); @@ -5637,26 +4749,24 @@ rc = ppoll((struct pollfd *)(0), 0, (struct timespec const *)(0), (sigset_t cons return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ax_cv_have_ppoll=yes -else $as_nop +else ax_cv_have_ppoll=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi - if test "${ax_cv_have_ppoll}" = "yes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + if test "${ax_cv_have_ppoll}" = "yes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_PPOLL /**/" >>confdefs.h +$as_echo "#define HAVE_PPOLL /**/" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5667,12 +4777,11 @@ fi # Figure out what libraries need to be linked in to use sockets. # #AC_CHECK_LIB(nsl, inet_addr) # Adds unnecessary dependencies to the binaries in Linux -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -printf %s "checking for socket in -lsocket... " >&6; } -if test ${ac_cv_lib_socket_socket+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if ${ac_cv_lib_socket_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5681,30 +4790,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char socket (); int -main (void) +main () { return socket (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes -else $as_nop +else ac_cv_lib_socket_socket=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes -then : - printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF LIBS="-lsocket $LIBS" @@ -5723,10 +4835,9 @@ fi # # Check whether --with-yices2 was given. -if test ${with_yices2+y} -then : +if test "${with_yices2+set}" = set; then : withval=$with_yices2; WITH_YICES2=$withval -else $as_nop +else WITH_YICES2=yes fi @@ -5736,7 +4847,7 @@ if (test $WITH_YICES2 = yes) then # not set default. # -printf "%s\n" "#define USE_YICES2 /**/" >>confdefs.h +$as_echo "#define USE_YICES2 /**/" >>confdefs.h if (test -z "$YICES2_LIB") then YICES2_LIB="-lyices" @@ -5750,10 +4861,9 @@ fi # # Check whether --with-cvc4 was given. -if test ${with_cvc4+y} -then : +if test "${with_cvc4+set}" = set; then : withval=$with_cvc4; WITH_CVC4=$withval -else $as_nop +else WITH_CVC4=no fi @@ -5763,7 +4873,7 @@ if (test $WITH_CVC4 = yes) then # not set default. # -printf "%s\n" "#define USE_CVC4 /**/" >>confdefs.h +$as_echo "#define USE_CVC4 /**/" >>confdefs.h if (test -z "$CVC4_LIB") then CVC4_LIB="-lcvc4" @@ -5773,12 +4883,11 @@ printf "%s\n" "#define USE_CVC4 /**/" >>confdefs.h # # CVC4 needs the clock_gettime() function from the POSIX Realtime Extensions library. # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -printf %s "checking for clock_gettime in -lrt... " >&6; } -if test ${ac_cv_lib_rt_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5787,367 +4896,817 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char clock_gettime (); int -main (void) +main () { return clock_gettime (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes -else $as_nop +else ac_cv_lib_rt_clock_gettime=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes -then : - printf "%s\n" "#define HAVE_LIBRT 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRT 1 +_ACEOF LIBS="-lrt $LIBS" fi else - CVC4_LIB="" + CVC4_LIB="" +fi +# +# Check to see if we should use Tecla for command line editing. +# + +# Check whether --with-tecla was given. +if test "${with_tecla+set}" = set; then : + withval=$with_tecla; WITH_TECLA=$withval +else + WITH_TECLA=yes +fi + +if (test $WITH_TECLA = yes) then +# +# Check if user set particular Tecla libraries to use and if +# not set defaults. +# + +$as_echo "#define USE_TECLA /**/" >>confdefs.h + + if (test -z "$TECLA_LIBS") then +# +# Find out where the curses functions live. +# + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -ltinfo" >&5 +$as_echo_n "checking for tputs in -ltinfo... " >&6; } +if ${ac_cv_lib_tinfo_tputs+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltinfo $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tputs (); +int +main () +{ +return tputs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_tinfo_tputs=yes +else + ac_cv_lib_tinfo_tputs=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tputs" >&5 +$as_echo "$ac_cv_lib_tinfo_tputs" >&6; } +if test "x$ac_cv_lib_tinfo_tputs" = xyes; then : + TECLA_LIBS="-ltecla -ltinfo" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 +$as_echo_n "checking for tputs in -lncurses... " >&6; } +if ${ac_cv_lib_ncurses_tputs+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lncurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tputs (); +int +main () +{ +return tputs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ncurses_tputs=yes +else + ac_cv_lib_ncurses_tputs=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 +$as_echo "$ac_cv_lib_ncurses_tputs" >&6; } +if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : + TECLA_LIBS="-ltecla -lncurses" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 +$as_echo_n "checking for tputs in -lcurses... " >&6; } +if ${ac_cv_lib_curses_tputs+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tputs (); +int +main () +{ +return tputs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_curses_tputs=yes +else + ac_cv_lib_curses_tputs=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 +$as_echo "$ac_cv_lib_curses_tputs" >&6; } +if test "x$ac_cv_lib_curses_tputs" = xyes; then : + TECLA_LIBS="-ltecla -lncurses" +else + TECLA_LIBS="-ltecla" +fi + +fi + +fi + + fi +else + TECLA_LIBS="" +fi + +# +# Check to see if we should use libsigsegv to handle segmentation faults. +# + +# Check whether --with-libsigsegv was given. +if test "${with_libsigsegv+set}" = set; then : + withval=$with_libsigsegv; WITH_LIBSIGSEGV=$withval +else + WITH_LIBSIGSEGV=yes +fi + +if (test $WITH_LIBSIGSEGV = yes) then +# +# Check if user set particular libsigsegv to use and if +# not set default. +# + +$as_echo "#define USE_LIBSIGSEGV /**/" >>confdefs.h + + if (test -z "$LIBSIGSEGV_LIB") then + LIBSIGSEGV_LIB="-lsigsegv" + fi +else + LIBSIGSEGV_LIB="" +fi + +# +# Check if user set particular GMP libraries to use and if +# not set defaults. +# +if (test -z "$GMP_LIBS") then + GMP_LIBS="-lgmpxx -lgmp" +fi + +# +# Check if the user set particular GCC libraries to use - otherwise +# let the compiler pick. +# +if (test -z "$GCC_LIBS") then + GCC_LIBS="" +fi + +# +# *** HEADERS *** +# +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP fi -# -# Check to see if we should use Tecla for command line editing. -# -# Check whether --with-tecla was given. -if test ${with_tecla+y} -then : - withval=$with_tecla; WITH_TECLA=$withval -else $as_nop - WITH_TECLA=yes + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -if (test $WITH_TECLA = yes) then -# -# Check if user set particular Tecla libraries to use and if -# not set defaults. -# - -printf "%s\n" "#define USE_TECLA /**/" >>confdefs.h - if (test -z "$TECLA_LIBS") then -# -# Find out where the curses functions live. -# - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tputs in -ltinfo" >&5 -printf %s "checking for tputs in -ltinfo... " >&6; } -if test ${ac_cv_lib_tinfo_tputs+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-ltinfo $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char tputs (); int -main (void) +main () { -return tputs (); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_tinfo_tputs=yes -else $as_nop - ac_cv_lib_tinfo_tputs=no +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tputs" >&5 -printf "%s\n" "$ac_cv_lib_tinfo_tputs" >&6; } -if test "x$ac_cv_lib_tinfo_tputs" = xyes -then : - TECLA_LIBS="-ltecla -ltinfo" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 -printf %s "checking for tputs in -lncurses... " >&6; } -if test ${ac_cv_lib_ncurses_tputs+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char tputs (); -int -main (void) -{ -return tputs (); - ; - return 0; -} _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_ncurses_tputs=yes -else $as_nop - ac_cv_lib_ncurses_tputs=no +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest* + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 -printf "%s\n" "$ac_cv_lib_ncurses_tputs" >&6; } -if test "x$ac_cv_lib_ncurses_tputs" = xyes -then : - TECLA_LIBS="-ltecla -lncurses" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 -printf %s "checking for tputs in -lcurses... " >&6; } -if test ${ac_cv_lib_curses_tputs+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char tputs (); +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int -main (void) +main () { -return tputs (); - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_curses_tputs=yes -else $as_nop - ac_cv_lib_curses_tputs=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if ac_fn_cxx_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 -printf "%s\n" "$ac_cv_lib_curses_tputs" >&6; } -if test "x$ac_cv_lib_curses_tputs" = xyes -then : - TECLA_LIBS="-ltecla -lncurses" -else $as_nop - TECLA_LIBS="-ltecla" +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h - fi -else - TECLA_LIBS="" fi -# -# Check to see if we should use libsigsegv to handle segmentation faults. -# +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -# Check whether --with-libsigsegv was given. -if test ${with_libsigsegv+y} -then : - withval=$with_libsigsegv; WITH_LIBSIGSEGV=$withval -else $as_nop - WITH_LIBSIGSEGV=yes fi -if (test $WITH_LIBSIGSEGV = yes) then -# -# Check if user set particular libsigsegv to use and if -# not set default. -# +done -printf "%s\n" "#define USE_LIBSIGSEGV /**/" >>confdefs.h - if (test -z "$LIBSIGSEGV_LIB") then - LIBSIGSEGV_LIB="-lsigsegv" - fi -else - LIBSIGSEGV_LIB="" -fi +for ac_header in sys/time.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIME_H 1 +_ACEOF -# -# Check if user set particular GMP libraries to use and if -# not set defaults. -# -if (test -z "$GMP_LIBS") then - GMP_LIBS="-lgmpxx -lgmp" fi -# -# Check if the user set particular GCC libraries to use - otherwise -# let the compiler pick. -# -if (test -z "$GCC_LIBS") then - GCC_LIBS="" -fi +done -# -# *** HEADERS *** -# -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +for ac_header in math.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" +if test "x$ac_cv_header_math_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MATH_H 1 +_ACEOF +fi -ac_header= ac_cache= -for ac_item in $ac_header_cxx_list -do - if test $ac_cache; then - ac_fn_cxx_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi done +for ac_header in ieeefp.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default" +if test "x$ac_cv_header_ieeefp_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IEEEFP_H 1 +_ACEOF +fi +done +for ac_header in sys/termios.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_termios_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TERMIOS_H 1 +_ACEOF +fi +done - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : - -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h +for ac_header in stddef.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" +if test "x$ac_cv_header_stddef_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDDEF_H 1 +_ACEOF fi +done -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - -printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h +for ac_header in limits.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIMITS_H 1 +_ACEOF fi -# End of obsolete code. - -ac_fn_cxx_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h -fi +done -ac_fn_cxx_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" -if test "x$ac_cv_header_math_h" = xyes -then : - printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h +for ac_header in stdlib.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default" -if test "x$ac_cv_header_ieeefp_h" = xyes -then : - printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h - -fi +done -ac_fn_cxx_check_header_compile "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_termios_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TERMIOS_H 1" >>confdefs.h +for ac_header in stdio.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" +if test "x$ac_cv_header_stdio_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDIO_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" -if test "x$ac_cv_header_stddef_h" = xyes -then : - printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h - -fi +done -ac_fn_cxx_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" -if test "x$ac_cv_header_limits_h" = xyes -then : - printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h +for ac_header in ctype.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" +if test "x$ac_cv_header_ctype_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CTYPE_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - -fi +done -ac_fn_cxx_check_header_compile "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" -if test "x$ac_cv_header_stdio_h" = xyes -then : - printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h +for ac_header in unistd.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNISTD_H 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" -if test "x$ac_cv_header_ctype_h" = xyes -then : - printf "%s\n" "#define HAVE_CTYPE_H 1" >>confdefs.h - -fi +done -ac_fn_cxx_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = xyes -then : - printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h +for ac_header in ostream +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "ostream" "ac_cv_header_ostream" "$ac_includes_default" +if test "x$ac_cv_header_ostream" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OSTREAM 1 +_ACEOF fi -ac_fn_cxx_check_header_compile "$LINENO" "ostream" "ac_cv_header_ostream" "$ac_includes_default" -if test "x$ac_cv_header_ostream" = xyes -then : - printf "%s\n" "#define HAVE_OSTREAM 1" >>confdefs.h - -fi +done -ac_fn_cxx_check_header_compile "$LINENO" "ostream.h" "ac_cv_header_ostream_h" "$ac_includes_default" -if test "x$ac_cv_header_ostream_h" = xyes -then : - printf "%s\n" "#define HAVE_OSTREAM_H 1" >>confdefs.h +for ac_header in ostream.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "ostream.h" "ac_cv_header_ostream_h" "$ac_includes_default" +if test "x$ac_cv_header_ostream_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OSTREAM_H 1 +_ACEOF fi +done + # # *** SIZES *** # @@ -6155,19 +5714,17 @@ fi # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -printf %s "checking size of short... " >&6; } -if test ${ac_cv_sizeof_short+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : + +else if test "$ac_cv_type_short" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else @@ -6176,31 +5733,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -printf "%s\n" "$ac_cv_sizeof_short" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } -printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -printf %s "checking size of int... " >&6; } -if test ${ac_cv_sizeof_int+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + +else if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else @@ -6209,31 +5766,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -printf "%s\n" "$ac_cv_sizeof_int" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } -printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -printf %s "checking size of long... " >&6; } -if test ${ac_cv_sizeof_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else @@ -6242,31 +5799,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -printf "%s\n" "$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } -printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 -printf %s "checking size of unsigned long... " >&6; } -if test ${ac_cv_sizeof_unsigned_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 +$as_echo_n "checking size of unsigned long... " >&6; } +if ${ac_cv_sizeof_unsigned_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : + +else if test "$ac_cv_type_unsigned_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long) See \`config.log' for more details" "$LINENO" 5; } else @@ -6275,31 +5832,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 -printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 +$as_echo "$ac_cv_sizeof_unsigned_long" >&6; } -printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -printf %s "checking size of void *... " >&6; } -if test ${ac_cv_sizeof_void_p+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + +else if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else @@ -6308,12 +5865,14 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } -printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF # @@ -6321,24 +5880,23 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h # If we are not debugging, assume we are optimizing. # # Check whether --enable-debug was given. -if test ${enable_debug+y} -then : +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; DEBUGGING=$enableval -else $as_nop +else DEBUGGING=no fi if (test "$DEBUGGING" = yes) then -printf "%s\n" "#define DUMP /**/" >>confdefs.h +$as_echo "#define DUMP /**/" >>confdefs.h else -printf "%s\n" "#define NO_ASSERT /**/" >>confdefs.h +$as_echo "#define NO_ASSERT /**/" >>confdefs.h -printf "%s\n" "#define LOCAL_INLINES /**/" >>confdefs.h +$as_echo "#define LOCAL_INLINES /**/" >>confdefs.h # # Set compiler optimization flags if user didn't set CXXFLAGS. @@ -6407,7 +5965,7 @@ printf "%s\n" "#define LOCAL_INLINES /**/" >>confdefs.h TWEAKFLAGS="-march=i686 -mpreferred-stack-boundary=2" if (test $USER_SET_CXXFLAGS = no) then -printf "%s\n" "#define HAVE_CMOV /**/" >>confdefs.h +$as_echo "#define HAVE_CMOV /**/" >>confdefs.h fi ;; @@ -6419,7 +5977,7 @@ printf "%s\n" "#define HAVE_CMOV /**/" >>confdefs.h x86_64-*) TWEAKFLAGS="-mpreferred-stack-boundary=4" -printf "%s\n" "#define HAVE_CMOV /**/" >>confdefs.h +$as_echo "#define HAVE_CMOV /**/" >>confdefs.h ;; # @@ -6428,7 +5986,7 @@ printf "%s\n" "#define HAVE_CMOV /**/" >>confdefs.h # alpha*) -printf "%s\n" "#define HAVE_CMOV /**/" >>confdefs.h +$as_echo "#define HAVE_CMOV /**/" >>confdefs.h ;; @@ -6464,7 +6022,7 @@ case $host in # *-darwin*) -printf "%s\n" "#define DARWIN /**/" >>confdefs.h +$as_echo "#define DARWIN /**/" >>confdefs.h ;; @@ -6483,35 +6041,33 @@ fi # Check to see if we should build the compiler. # # Check whether --enable-compiler was given. -if test ${enable_compiler+y} -then : +if test "${enable_compiler+set}" = set; then : enableval=$enable_compiler; COMPILER=$enableval -else $as_nop +else COMPILER=no fi if (test "$COMPILER" = yes) then -printf "%s\n" "#define COMPILER /**/" >>confdefs.h +$as_echo "#define COMPILER /**/" >>confdefs.h -printf "%s\n" "#define ANNOTATED /**/" >>confdefs.h +$as_echo "#define ANNOTATED /**/" >>confdefs.h fi # # Check to see if we should support MOS oracles. # # Check whether --enable-mos was given. -if test ${enable_mos+y} -then : +if test "${enable_mos+set}" = set; then : enableval=$enable_mos; MOS=$enableval -else $as_nop +else MOS=no fi if (test "$MOS" = yes) then -printf "%s\n" "#define MOS /**/" >>confdefs.h +$as_echo "#define MOS /**/" >>confdefs.h fi # @@ -6556,8 +6112,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -6587,15 +6143,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -6609,8 +6165,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -6627,7 +6183,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -6638,14 +6194,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -printf %s "checking that generated files are newer than configure... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -6675,8 +6231,8 @@ fi ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -6699,16 +6255,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -6718,46 +6272,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -6766,6 +6320,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -6774,12 +6335,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -6791,10 +6348,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -6807,14 +6384,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -6841,20 +6417,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -6866,13 +6440,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -6903,7 +6476,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -6925,10 +6498,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -6942,12 +6511,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -6989,7 +6552,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -6998,7 +6561,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7060,8 +6623,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Maude $as_me alpha150, which was -generated by GNU Autoconf 2.70. Invocation command line was +This file was extended by Maude $as_me alpha151, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7123,16 +6686,14 @@ $config_commands Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Maude config.status alpha150 -configured by $0, generated by GNU Autoconf 2.70, +Maude config.status alpha151 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2020 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -7172,15 +6733,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -7188,7 +6749,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -7197,7 +6758,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -7225,7 +6786,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -7239,7 +6800,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -7305,9 +6866,9 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -7643,7 +7204,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -7651,17 +7212,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -7678,7 +7239,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7702,9 +7263,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -7766,8 +7327,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -7811,9 +7372,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -7829,20 +7390,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -7862,7 +7423,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7882,8 +7443,8 @@ printf "%s\n" X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -7909,7 +7470,7 @@ esac for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -7921,7 +7482,7 @@ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$am_mf" | +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7943,7 +7504,7 @@ printf "%s\n" X"$am_mf" | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | +$as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -7968,12 +7529,10 @@ printf "%s\n" X/"$am_mf" | (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -8019,8 +7578,7 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi - diff --git a/configure.ac b/configure.ac index c31be763..d78db08d 100755 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ # # Initialize autoconf stuff. # -AC_INIT(Maude, alpha150, [maude-bugs@lists.cs.illinois.edu]) +AC_INIT(Maude, alpha151, [maude-bugs@lists.cs.illinois.edu]) # # Allow directory names that look like macros. # diff --git a/doc/Makefile.am b/doc/Makefile.am index 37b6c449..a2a6858d 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -17,4 +17,6 @@ EXTRA_DIST = \ alpha146.txt \ alpha147.txt \ alpha148.txt \ - alpha149.txt + alpha149.txt \ + alpha150.txt \ + alpha151.txt diff --git a/doc/Makefile.in b/doc/Makefile.in index 48a01703..f8f4aac9 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -135,6 +135,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -143,10 +144,12 @@ 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@ @@ -246,7 +249,9 @@ EXTRA_DIST = \ alpha146.txt \ alpha147.txt \ alpha148.txt \ - alpha149.txt + alpha149.txt \ + alpha150.txt \ + alpha151.txt all: all-am diff --git a/doc/alpha151.txt b/doc/alpha151.txt new file mode 100644 index 00000000..d2a5e0ae --- /dev/null +++ b/doc/alpha151.txt @@ -0,0 +1,112 @@ +Alpha 151 release notes +======================== + +Bug fixes +========== + +(1) Related bugs where the debug modifier was not echoed for the commands + debug reduce + debug rewrite + debug frewrite + debug erewrite +either normally or in LaTeX. + +(2) Related bugs where any of: + break deselect foo . + trace deselect foo . + trace include foo . + print reveal foo . +cause memory corruption. Reported by Dwight Guth + +(3) A bug where the real time shown in LaTeX output was off by a factor +of 10. + +(4) A bug where the cpu and real times shown in LaTeX output were +sometimes larger than those shown in the text output because the readings +were taken later. + +New features +============= + +(1) There is a new module in the prelude: + +fmod INITIAL-EQUALITY-PREDICATE is + protecting BOOL . + op _.=._ : Universal Universal -> Bool + [prec 51 poly (1 2) comm + special (id-hook CommutativeDecomposeEqualitySymbol + op-hook conjunctionSymbol (_and_ : Bool Bool ~> Bool) + op-hook disjunctionSymbol (_or_ : Bool Bool ~> Bool) + term-hook equalTerm (true) + term-hook notEqualTerm (false))] . +endfm + +We say an operarator (occurrence) f is good if it is +(i) a constructor (on the sorts of the arguments where it occurs) +(ii) equation free +(iii) does not have the special attribute +(iv) stable, i.e. it is not a variable and it cannot disappear via axioms; +with the current axioms, this means it does not have a collapse axiom, but +the distributivity axiom would also make both of its symbols unstable. + +The semantics of this polymorphic operator is that both arguments are +eagerly evaluated and then: +(a) If the arguments are equal it returns true; +(b) Otherwise if both arguments are ground it returns false; +(c) Otherwise if one term is f(t1,..., tn) for with f good and either +free, iter or commutative and the other term is ti for some i, return false; +(d) Otherwise if both top symbols are good and differ return false; +(f) Otherwise if both top symbols and good and agree with the +arguments of _.=._ being f(s1,..., sn) and f(t1,..., tn) then +(i) if f is free then return the conjunction + s1 .=. t1 and ... and sn .=. tn +(ii) if f is iter, treat it like the stack of unary free symbols it + notionally represents using (i) +(iii) otherwise if f is commutative return the disjunction + s1 .=. t1 and s2 .=. t2 or s1 .=. t2 and s2 .=. t2 +(g) If none of these built-in semantics are applicable, user equations +for the particular polymorphic instance are run. + +Note that unlike _==_, it can become inert because no built-in semantics +or user equations are applicable. For this reason it is commutative so +that the equation + eq A and A = A . +in fmod BOOL-OPS can simplify + X .=.Y and Y .=. X +to + X .=.Y +for example. + +Also _or_ is a defined operator that will immediately rewrite to polynomial +normal form, i.e. an expression in terms of _and_ and _xor_. + +(2) Improvements to the -latex-log= option +(i) Comments in the LaTeX which mark the output of commands now look like: + +\begin{comment} +% +% +% +\end{comment} + +% +% End of +% + +to enable easier location of blocks of LaTeX code to cut and paste. The +header is wrapped in a comment environment to ensure user syntax in the +full command does not prematurely end the comment. + +(ii) show command on/off option is now respected. + +(iii) Addditional language features are supported: +(a) strat and sd/csd statements in smod/sth +(b) strat mappings in renamings and views +(c) srewrite/dsrewrite commands +(d) search command +(e) show path , show path states , + show path labels , show graph commands +(f) narrow command +(g) vu-narrow/fvu-narrow commands +(h) show vars , show ops , show strats , + show sds , show kinds , show summary diff --git a/src/ACU_Persistent/Makefile.in b/src/ACU_Persistent/Makefile.in index 6c83562b..e32d7618 100644 --- a/src/ACU_Persistent/Makefile.in +++ b/src/ACU_Persistent/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -195,6 +195,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -203,10 +204,12 @@ 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@ diff --git a/src/ACU_Theory/ACU_Symbol.cc b/src/ACU_Theory/ACU_Symbol.cc index 0ad147db..c3fbc31e 100755 --- a/src/ACU_Theory/ACU_Symbol.cc +++ b/src/ACU_Theory/ACU_Symbol.cc @@ -446,6 +446,31 @@ ACU_Symbol::termify(DagNode* dagNode) return new ACU_Term(this, arguments, multiplicities); } +bool +ACU_Symbol::determineGround(DagNode* dagNode) +{ + if (safeCastNonNull(dagNode)->isTree()) + { + const ACU_Tree& tree = safeCastNonNull(dagNode)->getTree(); + for (ACU_FastIter i(tree); i.valid(); i.next()) + { + if (!(i.getDagNode()->determineGround())) + return false; + } + } + else + { + const ArgVec& argArray = safeCastNonNull(dagNode)->argArray; + for (const ACU_Pair& i : argArray) + { + if (!(i.dagNode->determineGround())) + return false; + } + } + dagNode->setGround(); + return true; +} + // // Unification code. // diff --git a/src/ACU_Theory/ACU_Symbol.hh b/src/ACU_Theory/ACU_Symbol.hh index 5bb250e2..4448018f 100644 --- a/src/ACU_Theory/ACU_Symbol.hh +++ b/src/ACU_Theory/ACU_Symbol.hh @@ -55,6 +55,7 @@ public: bool respectFrozen, bool eagerContext); Term* termify(DagNode* dagNode); + bool determineGround(DagNode* dagNode); // // Member functions overiding default handling. // diff --git a/src/ACU_Theory/ChangeLog b/src/ACU_Theory/ChangeLog index 7bf5c65c..73d72bcc 100755 --- a/src/ACU_Theory/ChangeLog +++ b/src/ACU_Theory/ChangeLog @@ -1,3 +1,11 @@ +2023-07-24 Steven Eker + + * ACU_Symbol.cc (ACU_Symbol::determineGround): added + + * ACU_Symbol.hh (class ACU_Symbol): added decl for determineGround() + +===================================Maude151=========================================== + 2023-06-02 Steven Eker * ACU_UnificationSubproblem2.cc diff --git a/src/ACU_Theory/Makefile.in b/src/ACU_Theory/Makefile.in index c8b13aac..cdfbb050 100644 --- a/src/ACU_Theory/Makefile.in +++ b/src/ACU_Theory/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -232,6 +232,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -240,10 +241,12 @@ 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@ diff --git a/src/AU_Persistent/Makefile.in b/src/AU_Persistent/Makefile.in index 055bb0cf..eca585d6 100644 --- a/src/AU_Persistent/Makefile.in +++ b/src/AU_Persistent/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -196,6 +196,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -204,10 +205,12 @@ 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@ diff --git a/src/AU_Theory/AU_Symbol.cc b/src/AU_Theory/AU_Symbol.cc index a000883a..4c687399 100755 --- a/src/AU_Theory/AU_Symbol.cc +++ b/src/AU_Theory/AU_Symbol.cc @@ -494,7 +494,7 @@ AU_Symbol::termify(DagNode* dagNode) { Vector arguments; - if (safeCast(AU_BaseDagNode*, dagNode)->isDeque()) + if (safeCast(const AU_BaseDagNode*, dagNode)->isDeque()) { const AU_Deque& deque = safeCast(const AU_DequeDagNode*, dagNode)->getDeque(); for (AU_DequeIter i(deque); i.valid(); i.next()) @@ -512,6 +512,31 @@ AU_Symbol::termify(DagNode* dagNode) return new AU_Term(this, arguments); } +bool +AU_Symbol::determineGround(DagNode* dagNode) +{ + if (safeCastNonNull(dagNode)->isDeque()) + { + const AU_Deque& deque = safeCastNonNull(dagNode)->getDeque(); + for (AU_DequeIter i(deque); i.valid(); i.next()) + { + if (!(i.getDagNode()->determineGround())) + return false; + } + } + else + { + const ArgVec& argArray = safeCastNonNull(dagNode)->argArray; + for (DagNode* a : argArray) + { + if (!(a->determineGround())) + return false; + } + } + dagNode->setGround(); + return true; +} + // // Unification code. // diff --git a/src/AU_Theory/AU_Symbol.hh b/src/AU_Theory/AU_Symbol.hh index fa278a59..14ef5576 100644 --- a/src/AU_Theory/AU_Symbol.hh +++ b/src/AU_Theory/AU_Symbol.hh @@ -51,6 +51,7 @@ public: bool respectFrozen, bool eagerContext); Term* termify(DagNode* dagNode); + bool determineGround(DagNode* dagNode); // // Member functions overiding default handling. // diff --git a/src/AU_Theory/ChangeLog b/src/AU_Theory/ChangeLog index 75a6da2a..1359424a 100755 --- a/src/AU_Theory/ChangeLog +++ b/src/AU_Theory/ChangeLog @@ -1,3 +1,12 @@ +2023-07-24 Steven Eker + + * AU_Symbol.cc (AU_Symbol::termify): cast to const AU_BaseDagNode* + (AU_Symbol::determineGround): added + + * AU_Symbol.hh (class AU_Symbol): added decl for determineGround() + +===================================Maude151=========================================== + 2023-06-02 Steven Eker * AU_Normalize.cc (AU_DagNode::normalizeAtTop): replace FOR_EACH_CONST with diff --git a/src/AU_Theory/Makefile.in b/src/AU_Theory/Makefile.in index 920325f3..7e5e3633 100644 --- a/src/AU_Theory/Makefile.in +++ b/src/AU_Theory/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -216,6 +216,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -224,10 +225,12 @@ 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@ diff --git a/src/BuiltIn/Makefile.in b/src/BuiltIn/Makefile.in index 6e10f3c1..002bb4b7 100644 --- a/src/BuiltIn/Makefile.in +++ b/src/BuiltIn/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -233,6 +233,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -241,10 +242,12 @@ 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@ diff --git a/src/CUI_Theory/CUI_Symbol.cc b/src/CUI_Theory/CUI_Symbol.cc index 3975b965..383433d2 100755 --- a/src/CUI_Theory/CUI_Symbol.cc +++ b/src/CUI_Theory/CUI_Symbol.cc @@ -317,6 +317,16 @@ CUI_Symbol::termify(DagNode* dagNode) return new CUI_Term(this, arguments); } +bool +CUI_Symbol::determineGround(DagNode* dagNode) +{ + DagNode** argArray = safeCastNonNull(dagNode)->argArray; + if (!(argArray[0]->determineGround()) || !(argArray[1]->determineGround())) + return false; + dagNode->setGround(); + return true; +} + // // Unification code. // diff --git a/src/CUI_Theory/CUI_Symbol.hh b/src/CUI_Theory/CUI_Symbol.hh index 9e809f75..d3e7efce 100755 --- a/src/CUI_Theory/CUI_Symbol.hh +++ b/src/CUI_Theory/CUI_Symbol.hh @@ -57,6 +57,7 @@ public: bool respectFrozen, bool eagerContext); Term* termify(DagNode* dagNode); + bool determineGround(DagNode* dagNode); // // Member functions overiding default handling. // diff --git a/src/CUI_Theory/ChangeLog b/src/CUI_Theory/ChangeLog index abc1d401..efc81cd7 100755 --- a/src/CUI_Theory/ChangeLog +++ b/src/CUI_Theory/ChangeLog @@ -1,3 +1,11 @@ +2023-07-24 Steven Eker + + * CUI_Symbol.cc (CUI_Symbol::determineGround): added + + * CUI_Symbol.hh (class CUI_Symbol): added decl for determineGround() + +===================================Maude151=========================================== + 2020-12-11 Steven Eker * CUI_DagNode.cc (CUI_DagNode::instantiate2): take and pass diff --git a/src/CUI_Theory/Makefile.in b/src/CUI_Theory/Makefile.in index 05bb22da..715237cf 100644 --- a/src/CUI_Theory/Makefile.in +++ b/src/CUI_Theory/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -208,6 +208,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -216,10 +217,12 @@ 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@ diff --git a/src/Core/Makefile.in b/src/Core/Makefile.in index d6dc11ac..4c05b459 100644 --- a/src/Core/Makefile.in +++ b/src/Core/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -281,6 +281,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -289,10 +290,12 @@ 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@ diff --git a/src/Core/module.cc b/src/Core/module.cc index f5b0b2e3..953adcb5 100644 --- a/src/Core/module.cc +++ b/src/Core/module.cc @@ -430,7 +430,7 @@ Module::indexRules() } void -Module::insertLateSymbol(Symbol*s) +Module::insertLateSymbol(Symbol* s) { Assert(status >= SIGNATURE_CLOSED, "bad status"); s->setModuleInfo(this, symbols.length()); diff --git a/src/FreeTheory/ChangeLog b/src/FreeTheory/ChangeLog index f7b14b83..2504716b 100755 --- a/src/FreeTheory/ChangeLog +++ b/src/FreeTheory/ChangeLog @@ -1,3 +1,11 @@ +2023-07-24 Steven Eker + + * freeSymbol.cc (FreeSymbol::determineGround): added + + * freeSymbol.hh (class FreeSymbol): added decl for determineGround() + +===================================Maude151=========================================== + 2023-07-13 Steven Eker * freePreNet.cc (FreePreNet::reduceFringe): fix bug where we were diff --git a/src/FreeTheory/Makefile.in b/src/FreeTheory/Makefile.in index b59fafd4..d84606da 100644 --- a/src/FreeTheory/Makefile.in +++ b/src/FreeTheory/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -244,6 +244,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -252,10 +253,12 @@ 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@ diff --git a/src/FreeTheory/freeDagNode.cc b/src/FreeTheory/freeDagNode.cc index 8956c9e9..5cc2d6f5 100755 --- a/src/FreeTheory/freeDagNode.cc +++ b/src/FreeTheory/freeDagNode.cc @@ -53,7 +53,6 @@ #include "variableDagNode.hh" // free theory class definitions -//#include "freeNet.hh" #include "freeSymbol.hh" #include "freeDagNode.hh" #include "freeDagArgumentIterator.hh" diff --git a/src/FreeTheory/freeSymbol.cc b/src/FreeTheory/freeSymbol.cc index 5ef8da36..b2bfc93b 100755 --- a/src/FreeTheory/freeSymbol.cc +++ b/src/FreeTheory/freeSymbol.cc @@ -402,8 +402,21 @@ FreeSymbol::isStable() const return true; } -// experimental code for faster sort computations +bool +FreeSymbol::determineGround(DagNode* dagNode) +{ + Index nrArgs = arity(); + DagNode** args = safeCastNonNull(dagNode)->argArray(); + for (Index i = 0; i < nrArgs; ++i) + { + if (!(args[i]->determineGround())) + return false; // fail early + } + dagNode->setGround(); + return true; +} +// experimental code for faster sort computations void FreeSymbol::computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, diff --git a/src/FreeTheory/freeSymbol.hh b/src/FreeTheory/freeSymbol.hh index adcba015..03c19eef 100755 --- a/src/FreeTheory/freeSymbol.hh +++ b/src/FreeTheory/freeSymbol.hh @@ -68,6 +68,7 @@ public: DagNode* subject, Vector& outputBdds); bool isStable() const; + bool determineGround(DagNode* dagNode); // // Hash cons stuff. // diff --git a/src/FullCompiler/Makefile.in b/src/FullCompiler/Makefile.in index 0363469d..5d1c230d 100644 --- a/src/FullCompiler/Makefile.in +++ b/src/FullCompiler/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -201,6 +201,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -209,10 +210,12 @@ 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@ diff --git a/src/Higher/Makefile.in b/src/Higher/Makefile.in index 5e38e52c..b6119fcd 100644 --- a/src/Higher/Makefile.in +++ b/src/Higher/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -256,6 +256,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -264,10 +265,12 @@ 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@ diff --git a/src/Higher/variantFolder.cc b/src/Higher/variantFolder.cc index 95d041bf..726d9801 100755 --- a/src/Higher/variantFolder.cc +++ b/src/Higher/variantFolder.cc @@ -85,14 +85,17 @@ VariantFolder::insertVariant(const Vector& variant, int parentIndex, int variableFamily) { + //DebugAlways("variant=" << variant.back()); // // First we check if it is subsumed by one of the existing variants. // if (isSubsumed(variant)) { + //DebugAlways("new variant subsumed=" << variant.back()); DebugAdvisory("new variant subsumed"); return false; } + //DebugAlways("new variant added=" << variant.back()); DebugAdvisory("new variant added"); // // Compile a set of matching automata for this variant. @@ -128,7 +131,7 @@ VariantFolder::insertVariant(const Vector& variant, // // Our parent was subsumed so we are also subsumed. // - DebugAdvisory("new variant evicted descendent of an older variant " << i->first); + //DebugAlways("new variant evicted descendent of an older variant " << i->first); existingVariantsSubsumed.insert(i->first); delete potentialVictim; mostGeneralSoFar.erase(i); @@ -138,7 +141,7 @@ VariantFolder::insertVariant(const Vector& variant, // // Direct subsumption by new variant. // - DebugAdvisory("new variant evicted an older variant " << i->first); + //DebugAlways("new variant evicted an older variant " << i->first); existingVariantsSubsumed.insert(i->first); delete potentialVictim; mostGeneralSoFar.erase(i); diff --git a/src/Higher/variantNarrowingSearchState.cc b/src/Higher/variantNarrowingSearchState.cc index 98e1c996..4a8c1c57 100755 --- a/src/Higher/variantNarrowingSearchState.cc +++ b/src/Higher/variantNarrowingSearchState.cc @@ -70,7 +70,7 @@ VariantNarrowingSearchState::VariantNarrowingSearchState(RewritingContext* conte module(context->root()->symbol()->getModule()), blockerSubstitution(originalVariables.getNrVariables()) { - DebugEnter("variant term = " << context->root()); + //DebugAlways("variant term = " << context->root()); // // The variant term is contained in the context. // The variant substitution could be empty vector if we don't care about it. @@ -245,20 +245,26 @@ VariantNarrowingSearchState::findNextVariant(DagNode*& newVariantTerm, VectorgetNextSurvivingUnifier(survivor, positionIndex, equationIndex)) { + //DebugAlways("trying unifier"); // // Compute accumulated substitution and check for reducibility. // for (int i = 0; i < variantSubstitutionSize; ++i) { DagNode* d = variantSubstitution[i]->instantiate(*survivor, false); + //DebugAlways("considering entry " << i << " which is\n " << variantSubstitution[i] << "\ninstantiated to\n " << d); if (d == 0) d = variantSubstitution[i]; // no change d->computeTrueSort(*context); // also handles theory normalization if (d->reducibleByVariantEquation(*context)) - goto nextUnifier; + { + //DebugAlways("killed by entry " << i << " of " << variantSubstitutionSize); + goto nextUnifier; + } newVariantSubstitution[i] = d; blockerSubstitution.bind(i, d); } + //DebugAlways("survived reducibilitity check"); // // Check if this variant causes any of the blocker dags to become reducible. // @@ -280,6 +286,7 @@ VariantNarrowingSearchState::findNextVariant(DagNode*& newVariantTerm, Vector& variant, int index) Vector newVariantSubstitution; while (vnss.findNextVariant(variantTerm, newVariantSubstitution)) { + //DebugAlways("found " << variantTerm); // // Deep copy to protect variant substitution from GC during the folding and reduction. // diff --git a/src/Higher/variantUnifierFilter.cc b/src/Higher/variantUnifierFilter.cc index e6034030..6f5e948d 100644 --- a/src/Higher/variantUnifierFilter.cc +++ b/src/Higher/variantUnifierFilter.cc @@ -128,6 +128,7 @@ VariantUnifierFilter::insertUnifier(const Vector& unifier, // subsumption checks. // encodedUnifier.setNode(tupleSymbol->makeDagNode(unifier)); + //DebugAlways("encoded unifier=" << encodedUnifier.getNode()); for (RetainedUnifierList::iterator i = mostGeneralSoFar.begin(); i != mostGeneralSoFar.end(); ++i) { // @@ -145,11 +146,13 @@ VariantUnifierFilter::insertUnifier(const Vector& unifier, // RewritingContext* newContext = context->makeSubcontext(encodedUnifier.getNode()); Vector dummy; // subsumption mode can't use blocker dags because there is no substitution + //DebugAlways("starting subsumption mode"); VariantSearch* variants = new VariantSearch(newContext, dummy, freshVariableGenerator, VariantSearch::SUBSUMPTION_MODE, variableFamily); + //DebugAlways("subsumption mode completed"); context->addInCount(*newContext); if (variants->isIncomplete()) filteringIncompleteFlag = true; diff --git a/src/IO_Stuff/Makefile.in b/src/IO_Stuff/Makefile.in index b9f93b59..64b0dc02 100644 --- a/src/IO_Stuff/Makefile.in +++ b/src/IO_Stuff/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -195,6 +195,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -203,10 +204,12 @@ 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@ diff --git a/src/Interface/ChangeLog b/src/Interface/ChangeLog index 076bb1b8..7402bd1f 100755 --- a/src/Interface/ChangeLog +++ b/src/Interface/ChangeLog @@ -1,3 +1,18 @@ +2023-07-24 Steven Eker + + * symbol.hh (class Symbol): added decl for determineGround() + + * dagNode.hh (DagNode::determineGround): added + + * dagNode.cc (DagNode::computeSolvedForm): deleted commented out + code; DebugInfo() -> DebugEnter() + (DagNode::computeSolvedForm2): DebugAdvisory() -> DebugEnter(); + deleted commented out code + + * dagNode.hh (DagNode::indexVariables): removed commented out code + +===================================Maude151========================================= + 2023-03-29 Steven Eker * dagNode.hh (DagNode::LessThan::operator()): added diff --git a/src/Interface/Makefile.in b/src/Interface/Makefile.in index 0aa0422b..80ac478c 100644 --- a/src/Interface/Makefile.in +++ b/src/Interface/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -204,6 +204,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -212,10 +213,12 @@ 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@ diff --git a/src/Interface/dagNode.cc b/src/Interface/dagNode.cc index a77dfafc..8c85db6a 100755 --- a/src/Interface/dagNode.cc +++ b/src/Interface/dagNode.cc @@ -212,8 +212,7 @@ DagNode::computeBaseSortForGroundSubterms(bool warnAboutUnimplemented) bool DagNode::computeSolvedForm(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending) { - DebugInfo("\nlhs = " << this << " rhs = " << rhs); - //cout << this << " =? " << rhs << endl; + DebugEnter("\nlhs = " << this << " rhs = " << rhs); // // If we are nonground we dispatch the theory specific algorithm. // @@ -235,8 +234,7 @@ DagNode::computeSolvedForm(DagNode* rhs, UnificationContext& solution, PendingUn bool DagNode::computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending) { - DebugAdvisory("DagNode::computeSolvedForm2() " << this << " vs " << rhs); - + DebugEnter("\nlhs= " << this << " rhs = " << rhs); if (isGround()) { // @@ -262,8 +260,7 @@ DagNode::computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingU // If rhs is nonground then its theory should have been given the problem. // And we just handle the variable rhs case above. // - CantHappen("unimplemted theory this = " << this << " rhs = " << rhs); - //IssueWarning("Unification modulo the theory of operator " << QUOTE(this->topSymbol) << " is not currently supported."); + CantHappen("unimplemented theory this = " << this << " rhs = " << rhs); return false; } @@ -287,7 +284,6 @@ DagNode::computeGeneralizedSort(const SortBdds& sortBdds, } // experimental code - void DagNode::computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, diff --git a/src/Interface/dagNode.hh b/src/Interface/dagNode.hh index 9373c70a..a8002793 100755 --- a/src/Interface/dagNode.hh +++ b/src/Interface/dagNode.hh @@ -76,7 +76,8 @@ public: void setUnstackable(); bool isUnstackable() const; void setGround(); - bool isGround() const; + bool isGround() const; // just checks ground flag + bool determineGround(); // actually detemines if we're ground and sets flag if so void setIrreducibleByVariantEquations(); bool isIrreducibleByVariantEquations() const; @@ -504,6 +505,17 @@ DagNode::isGround() const return getMemoryInfo()->getFlag(GROUND_FLAG); } +inline bool +DagNode::determineGround() +{ + // We trust a set ground flag because + // * ground flags start as clear in newly created nodes + // * in-place reduction below can never introduce variables + // For the same reasons we must treat clear ground flags as unknown. + // + return isGround() ? true : symbol()->determineGround(this); +} + inline void DagNode::setIrreducibleByVariantEquations() { @@ -690,8 +702,6 @@ DagNode::indexVariables(NarrowingVariableInfo& indices, int baseIndex) // us that removed ground flags below us and these need to be replaced for // safe unification. // - //if (isGround()) - // return true; // no variables below us to index bool ground = indexVariables2(indices, baseIndex); if (ground) setGround(); diff --git a/src/Interface/symbol.hh b/src/Interface/symbol.hh index e70ca049..e03ed1c7 100755 --- a/src/Interface/symbol.hh +++ b/src/Interface/symbol.hh @@ -160,6 +160,10 @@ public: // virtual bool isStable() const = 0; // + // Checks if dagNode is ground; believes set ground flags and disregards clear ground flags. + // + virtual bool determineGround(DagNode* dagNode) = 0; + // // Symbols that can resolved theory clashes (typically by collapsing) should // redefined this to return true and be ready to handle alien right hand sides // by restricted unification in unification problem passed to their unification diff --git a/src/Main/ChangeLog b/src/Main/ChangeLog index 9fc0c49e..5a0c48fb 100755 --- a/src/Main/ChangeLog +++ b/src/Main/ChangeLog @@ -1,3 +1,59 @@ +2023-08-11 Steven Eker + + * maude.sty: use longtable, added \maudeBigIndent + +2023-08-10 Steven Eker + + * maude.sty: fix \maudeArcArrow + +2023-08-09 Steven Eker + + * maude.sty: made pretty using extarrows; added + \maudeArcArrow + +2023-08-08 Steven Eker + + * maude.sty: added \maudePathLeft, \maudePathRight, + \maudePathWithLabel, \maudePathWithoutLabel + +2023-08-07 Steven Eker + + * prelude.maude: added op-hook disjunctionSymbol tp .=. + +2023-08-03 Steven Eker + + * maude.sty: change spacing around search arrows; added + \maudeIsAssigned + +2023-08-02 Steven Eker + + * maude.sty: added \maudeOneStep, \maudeAtLeastOneStep, + \maudeAnySteps, \maudeToNormalForm + +2023-08-01 Steven Eker + + * maude.sty: added \endCommand + +2023-07-31 Steven Eker + + * maude.sty: add space to \maudeStratUnion and \maudeStratQuery + +2023-07-28 Steven Eker + + * maude.sty: added \maudeStratAssign, \maudeStratConcat, + \maudeStratQuery, \maudeStratColon, \maudeStratBang + increase space in \maudeStratAt + increase space in \maudeStratConcat + added \maudeStratUnion + + * main.cc (printHelp): add -latex-log= + +2023-07-27 Steven Eker + + * maude.sty: added \maudeStratAt + + * prelude.maude: added fmod INITIAL-EQUALITY-PREDICATE + 2023-07-21 Steven Eker * maude.sty: added \maudeRenaming and \maudeSummation; deleted diff --git a/src/Main/Makefile.in b/src/Main/Makefile.in index 60984ad4..b180369c 100644 --- a/src/Main/Makefile.in +++ b/src/Main/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -229,6 +229,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -237,10 +238,12 @@ 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@ diff --git a/src/Main/main.cc b/src/Main/main.cc index 4a1c1524..d3d08cea 100755 --- a/src/Main/main.cc +++ b/src/Main/main.cc @@ -316,6 +316,7 @@ printHelp(const char* name) " -allow-dir\t\tAllow operations on directories\n" " -trust\t\tAllow all potentially risky capabilities\n" " -assoc-unif-depth=\tSet depth bound multiplier for associative unification\n" + " -latex-log=\tSet file in which to produce an LaTeX log\n" "Intended for developer use:\n" " -debug\t\tPrint copious messages about internal state (debug build only)\n" " -early-quit=\tQuit abruptly after a given number of garbage collections\n" diff --git a/src/Main/maude.sty b/src/Main/maude.sty index 6cbb8b34..2bc80bcd 100644 --- a/src/Main/maude.sty +++ b/src/Main/maude.sty @@ -18,16 +18,17 @@ % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. % % Latex package for use with the -latex-log= feature. -% Version Alpha150. +% Version Alpha151. % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{maude}[2023/07/21 Package for Maude logs] -\RequirePackage{amssymb,xcolor,verbatim,alltt} +\ProvidesPackage{maude}[2023/08/11 Package for Maude logs] +\RequirePackage{amssymb,extarrows,longtable,xcolor,verbatim,alltt} \RequirePackage[T1]{fontenc} % % Spacing % \newcommand{\maudeIndent}{\hspace*{1em}} % for module contents +\newcommand{\maudeBigIndent}{\hspace*{3em}} % for data in show \newcommand{\maudeBannerIndent}{\hspace*{5em}} % for banner \newcommand{\maudeInterwordSpace}{\hskip0.3em} % @@ -117,8 +118,34 @@ \newcommand{\maudeLessThan}{<} % for subsorts \newcommand{\maudeComma}{,\linebreak[0]} % to separate parameters and function arguments \newcommand{\maudeEndStatement}{\maudeInterwordSpace\maudePunctuation{.}} % include space and try to avoid preceeding linebreak +\newcommand{\maudeEndCommand}{\maudeInterwordSpace\maudePunctuation{.}} % include space and try to avoid preceeding linebreak \newcommand{\maudeDisambigDot}{.} % for (). % +% Strategy language. +% +\newcommand{\maudeStratAt}{\maudeInterwordSpace\, @\maudeInterwordSpace\,} +\newcommand{\maudeStratAssign}{\,\leftarrow\,} +\newcommand{\maudeStratConcat}{\maudeInterwordSpace;\maudeInterwordSpace} +\newcommand{\maudeStratStar}{*} +\newcommand{\maudeStratPlus}{+} +\newcommand{\maudeStratQuery}{\maudeInterwordSpace ?\maudeInterwordSpace} +\newcommand{\maudeStratColon}{:} +\newcommand{\maudeStratBang}{!} +\newcommand{\maudeStratUnion}{\maudeInterwordSpace |\maudeInterwordSpace} +% +% Search +% +\newcommand{\maudeOneStep}{\,\Rightarrow^1} +\newcommand{\maudeAtLeastOneStep}{\,\Rightarrow^+} +\newcommand{\maudeAnySteps}{\,\Rightarrow^*} +\newcommand{\maudeToNormalForm}{\,\Rightarrow^!} +\newcommand{\maudeIsAssigned}{\,\longrightarrow\,} +\newcommand{\maudePathLeft}{\xlongequal{\hspace*{2em}}\hspace*{-0.48em}[\maudeInterwordSpace} +\newcommand{\maudePathRight}{\maudeInterwordSpace]\hspace*{-0.48em}\xLongrightarrow{\hspace*{2em}}} +\newcommand{\maudePathWithLabel}[1]{-\hspace*{-0.48em}-\hspace*{-0.48em}-\hspace*{-0.48em}-\hspace*{-0.45em}-\hspace*{0.2em}#1\hspace*{-0.05em}\xlongrightarrow{\hspace*{2em}}} +\newcommand{\maudePathWithoutLabel}{\xlongrightarrow{\hspace*{4em}}} +\newcommand{\maudeArcArrow}{\Longrightarrow} +% % Line breaking. % \newcommand{\maudeSpace}{\maudeInterwordSpace\linebreak[0]} % normally a space is a preferred place for a linebreak diff --git a/src/Main/prelude.maude b/src/Main/prelude.maude index 91faaa6a..149ee6dc 100644 --- a/src/Main/prelude.maude +++ b/src/Main/prelude.maude @@ -22,7 +22,7 @@ *** *** Maude interpreter standard prelude. -*** Version 3.3. +*** Version alpha151. *** *** Some of the overall structure is taken from the OBJ3 *** interpreter standard prelude. @@ -92,6 +92,17 @@ fmod EXT-BOOL is eq false or-else B = B . endfm +fmod INITIAL-EQUALITY-PREDICATE is + protecting BOOL . + op _.=._ : Universal Universal -> Bool + [prec 51 poly (1 2) comm + special (id-hook CommutativeDecomposeEqualitySymbol + op-hook conjunctionSymbol (_and_ : Bool Bool ~> Bool) + op-hook disjunctionSymbol (_or_ : Bool Bool ~> Bool) + term-hook equalTerm (true) + term-hook notEqualTerm (false))] . +endfm + *** *** Builtin data types. *** diff --git a/src/Makefile.in b/src/Makefile.in index e3aa14d4..9ac9888f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -195,6 +195,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -203,10 +204,12 @@ 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@ diff --git a/src/Meta/Makefile.in b/src/Meta/Makefile.in index d1e620be..6abed5d4 100644 --- a/src/Meta/Makefile.in +++ b/src/Meta/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -204,6 +204,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -212,10 +213,12 @@ 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@ diff --git a/src/Mixfix/ChangeLog b/src/Mixfix/ChangeLog index 3a054698..d5a2aa09 100644 --- a/src/Mixfix/ChangeLog +++ b/src/Mixfix/ChangeLog @@ -1,3 +1,782 @@ +2023-08-11 Steven Eker + + * interpreter.cc (Interpreter::showSummary): added latex + support + + * latexModulePrint.cc + (VisibleModule::latexShowSortsAndSubsorts): use longtable + rather than tabular + (VisibleModule::latexShowKinds): use \maudeBigIndent + (VisibleModule::latexShowSummary): added + + * interpreter.cc (Interpreter::showKinds): added latex + support + + * visibleModule.hh (class VisibleModule): added decl for + latexShowKinds() + + * latexModulePrint.cc (VisibleModule::latexShowKinds): + added + + * interpreter.cc (Interpreter::showStrats): added latex + support + (Interpreter::showSds): added latex support + (Interpreter::showOps): added latex support + + * latexCommand.cc (MaudeLatexBuffer::generateCommand): set + needNewline + +2023-08-10 Steven Eker + + * interpreter.cc (Interpreter::showVars): support latex + + * visibleModule.hh (class VisibleModule): updated decl for + latexShowVars() and made it public + + * latexModulePrint.cc (VisibleModule::latexShowVars): take + indent arg + (VisibleModule::latexShowModule): pass indent arg to + latexShowVars() + + * interpreter.cc (showProcessedView): reimplemented using + generateShow() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl + for View* version of generateShow() + + * latexCommand.cc (MaudeLatexBuffer::generateSearch): don't + output \par at the start of command + (MaudeLatexBuffer::generateCommand): don't output \par at + the start of command + (MaudeLatexBuffer::generateContinue): don't output \par at + the start of command + (MaudeLatexBuffer::generateShow): added View* version + + * interpreter.cc (Interpreter::showModule): reimplemented + using generateShow() + (Interpreter::showSortsAndSubsorts): reimplemented using + generateShow() + (Interpreter::showMbs): ditto + (Interpreter::showEqs): ditto + (Interpreter::showRls): ditto + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateShow() + + * latexCommand.cc (MaudeLatexBuffer::generateShow): added + + * narrowing.cc (Interpreter::narrowingCont): pass showFlag arg + to generateContinue() + (Interpreter::vuNarrowingCont): ditto + + * search.cc (Interpreter::searchCont): pass showFlag arg + to generateContinue() + + * srewrite.cc (Interpreter::sRewriteCont): pass showFlag arg + to generateContinue() + (Interpreter::dsRewriteCont): ditto + + * erewrite.cc (Interpreter::eRewriteCont): pass showFlag arg + to generateContinue() + + * execute.cc (Interpreter::rewriteCont): pass showFlag arg + to generateContinue() + (Interpreter::fRewriteCont): ditto + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl + for generateContinue() + + * latexCommand.cc (MaudeLatexBuffer::generateContinue): take + showCommand argument; set needNewline + + * latexResult.cc (MaudeLatexBuffer::generateNonResult): use + needNewline to decide whether to output a \newline + + * latexCommand.cc (MaudeLatexBuffer::generateSearch): don't + output \newline + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSolutionNr): + only output \newline if needNewline + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added data + member need newline + + * maudeLatexBuffer.cc: init needNewline + + * latexCommand.cc (MaudeLatexBuffer::generateSearch): set + needNewline + + * latexResult.cc (MaudeLatexBuffer::generateSearchNonResult): + use needNewline flag to decide whether to start a newline + (MaudeLatexBuffer::generateSearchResult): ditto + + * latexCommand.cc (MaudeLatexBuffer::generateSearch): print + \newline after command + + * latexResult.cc (MaudeLatexBuffer::generateSearchResult): put + \newline after rather than before solution + (MaudeLatexBuffer::generateSearchNonResult): don't print + \newline + + * latexCommand.cc (MaudeLatexBuffer::generateSearch): handle + showCommand flag + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl + for generateSearch() + + * search.cc (Interpreter::search): pass showCommand flag to + generateSearch() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): deleted decls + for generateReduce(), generateRewrite(), generateFrewrite(), + generateErewrite(), generateSrewrite() + + * latexCommand.cc (MaudeLatexBuffer::generateReduce) + (MaudeLatexBuffer::generateRewrite) + (MaudeLatexBuffer::generateFrewrite) + (MaudeLatexBuffer::generateErewrite) + (MaudeLatexBuffer::generateSrewrite): deleted + + * srewrite.cc (Interpreter::sRewrite): use generateCommand() + rather than generateSrewrite() + + * erewrite.cc (Interpreter::eRewrite): use generateCommand() + rather than generateErewrite() + + * execute.cc (Interpreter::reduce): use generateCommand() + rather than generateReduce() + (Interpreter::rewrite): use generateCommand() + rather than generateRewrite() + (Interpreter::fRewrite): use generateCommand() + rather than generateFrewrite() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): update decl + for generateCommand() and made it public + + * latexCommand.cc (MaudeLatexBuffer::generateCommand): take + showCommand argument + +2023-08-09 Steven Eker + + * search.cc (Interpreter::showSearchGraph): use + generateSearchGraph() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateSearchGraph() + + * latexResult.cc (MaudeLatexBuffer::generateSearchGraph): added + + * search.cc (Interpreter::showSearchPathLabels): use + generateSearchPathLabels() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl + for generateSearchPathLabels() + + * latexResult.cc (MaudeLatexBuffer::generateSearchPath): use + \maudeEndCommand + (MaudeLatexBuffer::generateSearchPathLabels): added + +2023-08-08 Steven Eker + + * latexModulePrint.cc (VisibleModule::latexPrintRule): don't + enclose rule in $s if indent is null + + * search.cc (Interpreter::showSearchPath): use + generateSearchPath() + + * latexResult.cc (MaudeLatexBuffer::generateSearchPath): added + + * visibleModule.hh (class VisibleModule): updated decls for + latexPrintMembershipAxiom(), latexShowMbs(), latexPrintEquation(), + latexPrintRule(), latexShowRls() + + * latexModulePrint.cc (VisibleModule::latexPrintMembershipAxiom): + made const + (VisibleModule::latexShowMbs): made const + (VisibleModule::latexPrintEquation): made const + (VisibleModule::latexShowEqs): made const + (VisibleModule::latexPrintRule): made const + (VisibleModule::latexShowRls): made const + + * visibleModule.hh (class VisibleModule): made latexPrintRule() + public + (class VisibleModule): made latexPrintAttributes() static + + * latexModulePrint.cc (VisibleModule::latexPrintRule): only + start a new line if indent is non-null + + * commutativeDecomposeEqualitySymbol.cc + (CommutativeDecomposeEqualitySymbol::eqRewrite): check that both + symbols are non-special before returning notEqual + + * specialSymbolTypes.cc: deleted DecomposeEqualitySymbol + + * fancySymbols.cc (MixfixModule::newFancySymbol): deleted + DecomposeEqualitySymbol + + * mixfix.hh: deleted class DecomposeEqualitySymbol + + * decomposeEqualitySymbol.cc: deleted + + * decomposeEqualitySymbol.hh: deleted + + * commutativeDecomposeEqualitySymbol.cc + (CommutativeDecomposeEqualitySymbol::hasImmediateSubterm): fix + bugs where we were comparing pointers rather than using equal(); + handle iter theory + + * commutativeDecomposeEqualitySymbol.hh + (class CommutativeDecomposeEqualitySymbol): update decl for + decomose() + + * commutativeDecomposeEqualitySymbol.cc + (CommutativeDecomposeEqualitySymbol::decompose): handle iter + theory; remove const because we need to place our own symbol + in the new dag node + +2023-08-07 Steven Eker + + * decomposeEqualitySymbol.cc + (DecomposeEqualitySymbol::decompose): only handle commutative + case if disjunctionSymbol is defined + + * commutativeDecomposeEqualitySymbol.cc + (CommutativeDecomposeEqualitySymbol::decompose): only handle + commutative case if disjunctionSymbol is defined + + * decomposeEqualitySymbol.hh (class DecomposeEqualitySymbol): + updated decl for decompose(); made hasImmediateSubterm() const + + * decomposeEqualitySymbol.cc (DecomposeEqualitySymbol::decompose): + handle commutative case, made const + + * commutativeDecomposeEqualitySymbol.hh + (class CommutativeDecomposeEqualitySymbol): updated decl for + decompose(); made hasImmediateSubterm() static + + * commutativeDecomposeEqualitySymbol.cc: init disjunctionSymbol + (CommutativeDecomposeEqualitySymbol::attachSymbol): attach + disjunctionSymbol + (CommutativeDecomposeEqualitySymbol::copyAttachments): copy + disjunctionSymbol + (CommutativeDecomposeEqualitySymbol::getSymbolAttachments): + handle disjunctionSymbol + (CommutativeDecomposeEqualitySymbol::decompose): added support + for CUI_Symbol + (CommutativeDecomposeEqualitySymbol::decompose): made const + + * commutativeDecomposeEqualitySymbol.hh + (class CommutativeDecomposeEqualitySymbol): added decl for + hasImmediateSubterm(), make decompose() private + (class CommutativeDecomposeEqualitySymbol): added data member + disjunctionSymbol + + * commutativeDecomposeEqualitySymbol.cc + (CommutativeDecomposeEqualitySymbol::hasImmediateSubterm): added + (CommutativeDecomposeEqualitySymbol::eqRewrite): use + hasImmediateSubterm() + + * decomposeEqualitySymbol.hh (class DecomposeEqualitySymbol): + make decompose() private + + * decomposeEqualitySymbol.cc (DecomposeEqualitySymbol): init + disjunctionSymbol + (DecomposeEqualitySymbol::attachSymbol): attach disjunctionSymbol + (DecomposeEqualitySymbol::copyAttachments): copy + disjunctionSymbol + (DecomposeEqualitySymbol::getSymbolAttachments): handle + disjunctionSymbol + (DecomposeEqualitySymbol::hasImmediateSubterm): added + (DecomposeEqualitySymbol::eqRewrite): use hasImmediateSubterm() + + * decomposeEqualitySymbol.hh (class DecomposeEqualitySymbol): + added data member disjunctionSymbol + +2023-08-04 Steven Eker + + * narrowing.cc (Interpreter::doVuNarrowing): call cleanUp() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + Vector& version of generateSubstitution() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSubstitution): + added Vector& version + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + NarrowingVariableInfo& version of generateSubstitution() + + * narrowing.cc (Interpreter::doVuNarrowing): added latex support + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSubstitution): + added NarrowingVariableInfo& version + + * narrowing.cc (Interpreter::doVuNarrowing): use new printStats() + (Interpreter::vuNarrowingCont): call + MaudeLatexBuffer::generateContinue() + + * maudeLatexBuffer.hh (MaudeLatexBuffer::generateHeading): added + + * narrowing.cc (Interpreter::narrowingCont): call + MaudeLatexBuffer::generateContinue() + + * search.cc (Interpreter::searchCont): call + MaudeLatexBuffer::generateContinue() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): delete decl for + generateDag() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateDag): deleted + + * latexCommand.cc (MaudeLatexBuffer::generateCommand): don't + start pendingClose with \n + (MaudeLatexBuffer::generateContinue): don't start pending close + with \n + + * latexResult.cc (MaudeLatexBuffer::generateResult): use + MixfixModule::latexPrintDagNode() instead of generateDag() + + * latexCommand.cc (MaudeLatexBuffer::generateSearch): moved here + (MaudeLatexBuffer::generateCommand): moved here + (MaudeLatexBuffer::generateCommand): print $ after \par; use + MixfixModule::latexPrintDagNode() rather than generateDag() + (MaudeLatexBuffer::generateContinue): moved here + (MaudeLatexBuffer::generateReduce): moved here + (MaudeLatexBuffer::generateRewrite): moved here + (MaudeLatexBuffer::generateFrewrite): moved here + (MaudeLatexBuffer::generateErewrite): moved here + (MaudeLatexBuffer::generateSrewrite): moved here + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): deleted decls + for generateTiming() and old version of generateStats() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateTiming): deleted + (MaudeLatexBuffer::generateStats): deleted old version + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decls + for generateSearchResult(), generateSearchNonResult() + + * search.cc (Interpreter::doSearching): use new + generateSearchNonResult() convention + (Interpreter::doSearching): use new generateSearchResult() + convention + + * latexResult.cc (MaudeLatexBuffer::generateStats): moved + new version here + (MaudeLatexBuffer::generateNonResult): moved here + (MaudeLatexBuffer::generateResult): moved here + (MaudeLatexBuffer::generateSearchNonResult): moved here; use new + generateStats() + (MaudeLatexBuffer::generateSearchResult): moved here; use new + generateStats() + (MaudeLatexBuffer::generateStats): output extra space after nrStates + + * narrowing.cc (Interpreter::doNarrowing): use new + generateNonResult() convention + (Interpreter::doNarrowing): use new generateStats() + (Interpreter::doNarrowing): use new printStats() (2 places) + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl for + generateNonResult() + + * srewrite.cc (Interpreter::doStrategicSearch): use new + generateNonResult() convention + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateNonResult): take + cpuTime and realTime; use new generateStats() + + * srewrite.cc (Interpreter::doStrategicSearch): use new printStats() + and new generateResult() convention + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl for + generateResult() + + * execute.cc (Interpreter::endRewriting): call cleanUp(); use new + generateResult() conventions + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateResult): redesigned + to take cpuTime and realTime rather than timer + + * execute.cc (Interpreter::endRewriting): rewritten to use + new printStats() + + * interpreter.hh (class Interpreter): added decl for new + printStats() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + new generateStats() + + * execute.cc (Interpreter::printStats): added new version that + takes cpuTime and realTime + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateTiming): fixed + bug where we were dividing real by 100 rather than 1000 + (MaudeLatexBuffer::generateStats): added new version that takes + cpuTime and realTime + +2023-08-03 Steven Eker + + * narrowing.cc (Interpreter::doNarrowing): call generateStats() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): made generateStats() + public + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSearch): call + Tty::unblockEscapeSequences() + + * narrowing.cc (Interpreter::doNarrowing): call cleanUp() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateState() + + * narrowing.cc (Interpreter::doNarrowing): use generateNonResult(), + generateWarning(), generateSolutionNr(), generateState(), + generateSubstitution() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSolutionNr): use + \maudeNumber{} + (MaudeLatexBuffer::generateState): added + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateWarning() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateWarning): added + + * search.cc (Interpreter::doSearching): call generateSubstitution() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateSubstitution() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSearch): don't + start pendingClose with \n + (MaudeLatexBuffer::generateSearchNonResult) + (MaudeLatexBuffer::generateSearchResult): pass nrStates to + generateStats() + (MaudeLatexBuffer::generateSearch): print \begin{maudeResultParagraph} + (MaudeLatexBuffer::generateSubstitution): added + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl for + generateStats() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSearchNonResult): + added + (MaudeLatexBuffer::generateSearchResult): added + (MaudeLatexBuffer::generateSearch): \maudeKeyWord -> \maudeKeyword + (MaudeLatexBuffer::generateSearch): added \maudeSpace after : + (MaudeLatexBuffer::generateStats): handle nrStates + + * search.cc (Interpreter::doSearching): use + generateSearchNonResult(), generateSearchResult() + (Interpreter::doSearching): call cleanUp() + +2023-08-02 Steven Eker + + * search.cc (Interpreter::search): use latexBuffer->generateSearch() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateSearch() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateSearch): added + + * visibleModule.hh (class VisibleModule): made latexPrintCondition() + public + + * latexDagNodePrint.cc (MixfixModule::latexPrintDagNode): added + + * mixfixModule.hh (class MixfixModule): added decl for + latexPrintDagNode() + +2023-08-01 Steven Eker + + * interpreter.cc (Interpreter::updateSet): fixed bug where range + erase() was used to delete a range from a set other than *this + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): deleted decl for + generateModifiers() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateCommand): use + \maudeEndCommand + (MaudeLatexBuffer::generateContinue): use \maudeEndCommand + (MaudeLatexBuffer::generateModifiers): deleted + + * latexModulePrint.cc (VisibleModule::latexPrintMembershipAxiom) + (VisibleModule::latexPrintEquation) + (VisibleModule::latexPrintRule): start math mode just after \par + (VisibleModule::latexPrintStrategyDecl) + (VisibleModule::latexPrintStrategyDefinition): start math mode just + after \par + (VisibleModule::latexShowImports): start math mode just after \par + (VisibleModule::latexShowSorts): typeset whole line in math mode + (VisibleModule::latexShowVars): start math mode just after \par + (VisibleModule::latexShowDecls): start math mode just after \par + (VisibleModule::latexShowSubsorts): typeset whole line in math mode + (VisibleModule::latexShowPolymorphDecl): start math mode just after + \par + + * srewrite.cc (Interpreter::sRewriteCont): call generateContinue() + (Interpreter::dsRewriteCont): call generateContinue() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): made generateType(), + generateDag(), generateModifiers(), generateCommand() private + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateResult): use + cleanUp() + (MaudeLatexBuffer::generateNonResult): don't handle pendingClose + + * srewrite.cc (Interpreter::doStrategicSearch): call cleanUp() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): made + generateStats(), generateTiming() private + + * srewrite.cc (Interpreter::doStrategicSearch): use + MaudeLatexBuffer::generateNonResult() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateCommand): pass + command by reference + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateNonResult() + (class MaudeLatexBuffer): updated decl for generateCommand() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateNonResult): added + + * execute.cc (Interpreter::endRewriting): pass result to + MaudeLatexBuffer::generateResult() + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl for + generateResult() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateResult): take + result argument + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added decl for + generateSrewrite() + + * srewrite.cc (Interpreter::sRewrite): add latex support + (Interpreter::doStrategicSearch): add latex support + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl for + generateCommand() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateCommand): take + strategy argument + (MaudeLatexBuffer::generateSrewrite): added + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decl for + generateResult() + (class MaudeLatexBuffer): added decl for generateSolutionNr() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateResult): take + finished argument + (MaudeLatexBuffer::generateSolutionNr): added + + * execute.cc (Interpreter::endRewriting): deleted commented out + test of serialization code + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateContinue): put + comment outside of \begin{maudeResultParagraph} + (MaudeLatexBuffer::generateCommand): put comment outside of + \begin{maudeResultParagraph} + + * execute.cc (Interpreter::endRewriting): use cleanUp() + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateResult): output + pendingClose + (MaudeLatexBuffer::generateCommand): set pendingClose + (MaudeLatexBuffer::generateContinue): set pendingClose + (~MaudeLatexBuffer): output pendingClose + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): added data member + pendingClose + (MaudeLatexBuffer::cleanUp): added + +2023-07-31 Steven Eker + + * maudeLatexBuffer.hh (class MaudeLatexBuffer): updated decls for + generateReduce(), generateContinue(), generateRewrite(), + generateFrewrite(), generateErewrite() + + * erewrite.cc (Interpreter::eRewrite): echo debug modifier, both + in regular output and latex + (Interpreter::eRewriteCont): echo debug modifier in latex + + * execute.cc (Interpreter::reduce, Interpreter::rewrite) + (Interpreter::fRewrite): echo debug modifier, both in regular + output and latex + (Interpreter::rewriteCont, Interpreter::fRewriteCont): echo debug + modifier in latex + + * maudeLatexBuffer.cc (MaudeLatexBuffer::generateReduce) + (MaudeLatexBuffer::generateRewrite) + (MaudeLatexBuffer::generateFrewrite) + (MaudeLatexBuffer::generateErewrite) + (MaudeLatexBuffer::generateContinue): handle debug flag + + * visibleModule.hh (class VisibleModule): made latexPrintStrategy() + public + + * latexViewPrint.cc (SyntacticView::latexShowProcessedView): handle + strat to expr mappings + + * latexRenaming.cc (Renaming::latexRenaming): handle strat mappings; + handle attr mappings with sorts + +2023-07-28 Steven Eker + + * visibleModule.hh (class VisibleModule): updated decl for + latexPrintStrategy() + + * latexStrategyPrint.cc (VisibleModule::latexPrintStrategy): made + const + + * mixfixModule.hh (class MixfixModule): updated decl for + latexPrintStrategyTerm() + + * latexTermPrint.cc (MixfixModule::latexPrintStrategyTerm): made + const + + * visibleModule.hh (class VisibleModule): made latexPrintStrategy() + non-static + + * latexStrategyPrint.cc (VisibleModule::latexPrintStrategy): finished + implementation + + * visibleModule.hh (class VisibleModule): made + latexPrintConditionFragment() and latexPrintCondition() (both + versions) static + + * latexStrategyPrint.cc (VisibleModule::latexPrintStrategy): renamed + from latexPrettyPrint and moved from class MixfixModule to class + VisibleModule + + * latexTermPrint.cc (MixfixModule::latexPrintStrategyTerm): moved + here + + * latexStrategyPrint.cc (MixfixModule::latexPrintStrategyTerm): + use simpler latexPrettyPrint() + + * mixfixModule.hh (class MixfixModule): updated decl for + latexPrettyPrint() (StrategyExpression* version) + + * latexModulePrint.cc (VisibleModule::latexPrintEquation): use + simpler latexPrettyPrint() (2 places) + (VisibleModule::latexPrintRule): use simpler latexPrettyPrint() (2 + places) + (VisibleModule::latexShowAttributes): use simpler + latexPrettyPrint() (2 places) + (VisibleModule::latexShowPolymorphAttributes): use simpler + latexPrettyPrint() (2 places) + (VisibleModule::latexPrintMembershipAxiom): use simpler + latexPrettyPrint() + (VisibleModule::latexPrintConditionFragment): use simpler + lexPrettyPrint() (7 places) + +2023-07-27 Steven Eker + + * mixfixModule.hh (class MixfixModule): added decl for Strategy* + version of latexPrettyPrint() + (class MixfixModule): added decl for latexPrintStrategyTerm() + + * latexStrategyPrint.cc: created + + * visibleModule.hh (class VisibleModule): added decl for + latexPrintStrategyDefinition() + + * latexModulePrint.cc (VisibleModule::latexPrintStrategyDefinition): + added + + * visibleModule.hh (class VisibleModule): added decl for + latexPrintStrategyDecl() + + * latexModulePrint.cc (VisibleModule::latexShowRls) + (VisibleModule::latexShowEqs, VisibleModule::latexShowMbs): use + size() + (VisibleModule::latexShowDecls): code cleaning + (VisibleModule::latexShowPolymorphDecl): code cleaning + (VisibleModule::latexPrintStrategyDecl): added + (VisibleModule::latexShowImportscode): cleaning + + * visibleModule.hh (class VisibleModule): added decls for + latexShowStrats(), latexShowSds() + + * latexModulePrint.cc (VisibleModule::latexShowStrats): added + (VisibleModule::latexShowSds): added + (VisibleModule::latexShowModule): call latexShowStrats() and + latexShowSds() + + * decomposeEqualitySymbol.cc + (DecomposeEqualitySymbol::domainSortAlwaysLeqThan): added comment + (DecomposeEqualitySymbol::decompose): code cleaning + (DecomposeEqualitySymbol::attachSymbol): code cleaning + (DecomposeEqualitySymbol::postInterSymbolPass): code cleaning + + * commutativeDecomposeEqualitySymbol.cc + (CommutativeDecomposeEqualitySymbol::domainSortAlwaysLeqThan): + added comment + (CommutativeDecomposeEqualitySymbol::decompose): code cleaning + + * decomposeEqualitySymbol.cc + (DecomposeEqualitySymbol::eqRewrite): only consider decomposition + if conjunctionSymbol is defined + + * commutativeDecomposeEqualitySymbol.cc + (CommutativeDecomposeEqualitySymbol::eqRewrite): only consider + decomposition if conjunctionSymbol is defined + +2023-07-26 Steven Eker + + * specialSymbolTypes.cc: added CommutativeDecomposeEqualitySymbol + + * fancySymbols.cc (MixfixModule::newFancySymbol): added + CommutativeDecomposeEqualitySymbol + + * symbolType.hh (class SymbolType): added + COMMUTATIVE_DECOMPOSE_EQUALITY_SYMBOL to BasicTypes + + * mixfix.hh: added class CommutativeDecomposeEqualitySymbol + + * commutativeDecomposeEqualitySymbol.cc: created + + * commutativeDecomposeEqualitySymbol.hh: created + + * decomposeEqualitySymbol.hh: fix comment + +2023-07-25 Steven Eker + + * decomposeEqualitySymbol.cc (DecomposeEqualitySymbol::decompose): + use getPolymorphIndex() + (DecomposeEqualitySymbol::DecomposeEqualitySymbol): fix bug where + we were forgetting to initialized conjunctionSymbol + + * mixfixModule.hh (getPolymorphIndex): added + (getSymbolType): made argument const + + * decomposeEqualitySymbol.hh (class DecomposeEqualitySymbol): + added decl for decompose() + + * decomposeEqualitySymbol.cc (DecomposeEqualitySymbol::decompose): + added + + * mixfix.hh: added class DecomposeEqualitySymbol + + * decomposeEqualitySymbol.cc (DecomposeEqualitySymbol::eqRewrite): + only support standard, eager strategy + +2023-07-24 Steven Eker + + * decomposeEqualitySymbol.cc: added + + * decomposeEqualitySymbol.hh: added + + * symbolType.hh (class SymbolType): added + DECOMPOSE_EQUALITY_SYMBOL + + * fancySymbols.cc (MixfixModule::newFancySymbol): added + DecomposeEqualitySymbol + + * specialSymbolTypes.cc: added DecomposeEqualitySymbol + +===================================Maude151=========================================== + 2023-07-21 Steven Eker * latexModulePrint.cc (VisibleModule::latexShowModule): use diff --git a/src/Mixfix/Makefile.am b/src/Mixfix/Makefile.am index 7765ec38..02f5495d 100644 --- a/src/Mixfix/Makefile.am +++ b/src/Mixfix/Makefile.am @@ -52,6 +52,7 @@ libmixfix_a_SOURCES = \ quotedIdentifierDagNode.cc \ quotedIdentifierTerm.cc \ quotedIdentifierOpSymbol.cc \ + commutativeDecomposeEqualitySymbol.cc \ mixfixModule.cc \ token.cc \ global.cc \ @@ -188,7 +189,10 @@ EXTRA_DIST = \ latexViewPrint.cc \ latexToken.cc \ latexRenaming.cc \ - latexImportModule.cc + latexImportModule.cc \ + latexStrategyPrint.cc \ + latexResult.cc \ + latexCommand.cc noinst_HEADERS = \ renaming.hh \ @@ -223,6 +227,7 @@ noinst_HEADERS = \ quotedIdentifierOpSymbol.hh \ quotedIdentifierSymbol.hh \ quotedIdentifierTerm.hh \ + commutativeDecomposeEqualitySymbol.hh \ symbolType.hh \ token.hh \ userLevelRewritingContext.hh \ diff --git a/src/Mixfix/Makefile.in b/src/Mixfix/Makefile.in index 9dcd6979..c250aafa 100644 --- a/src/Mixfix/Makefile.in +++ b/src/Mixfix/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -117,8 +117,8 @@ am__libmixfix_a_SOURCES_DIST = parameterDatabase.cc syntaxContainer.cc \ strategyTranslation.cc fileTable.cc loopSymbol.cc \ quotedIdentifierSymbol.cc quotedIdentifierDagNode.cc \ quotedIdentifierTerm.cc quotedIdentifierOpSymbol.cc \ - mixfixModule.cc token.cc global.cc \ - userLevelRewritingContext.cc preModule.cc \ + commutativeDecomposeEqualitySymbol.cc mixfixModule.cc token.cc \ + global.cc userLevelRewritingContext.cc preModule.cc \ syntacticPreModule.cc symbolType.cc xmlBuffer.cc \ maudemlBuffer.cc interpreter.cc moduleDatabase.cc \ viewDatabase.cc profileModule.cc mixfixParser.cc \ @@ -146,6 +146,7 @@ am_libmixfix_a_OBJECTS = libmixfix_a-parameterDatabase.$(OBJEXT) \ libmixfix_a-quotedIdentifierDagNode.$(OBJEXT) \ libmixfix_a-quotedIdentifierTerm.$(OBJEXT) \ libmixfix_a-quotedIdentifierOpSymbol.$(OBJEXT) \ + libmixfix_a-commutativeDecomposeEqualitySymbol.$(OBJEXT) \ libmixfix_a-mixfixModule.$(OBJEXT) libmixfix_a-token.$(OBJEXT) \ libmixfix_a-global.$(OBJEXT) \ libmixfix_a-userLevelRewritingContext.$(OBJEXT) \ @@ -188,6 +189,7 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libmixfix_a-banner.Po \ + ./$(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Po \ ./$(DEPDIR)/libmixfix_a-compiler.Po \ ./$(DEPDIR)/libmixfix_a-deserializer.Po \ ./$(DEPDIR)/libmixfix_a-enclosingObject.Po \ @@ -299,6 +301,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -307,10 +310,12 @@ 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@ @@ -441,6 +446,7 @@ libmixfix_a_SOURCES = \ quotedIdentifierDagNode.cc \ quotedIdentifierTerm.cc \ quotedIdentifierOpSymbol.cc \ + commutativeDecomposeEqualitySymbol.cc \ mixfixModule.cc \ token.cc \ global.cc \ @@ -541,7 +547,11 @@ EXTRA_DIST = \ latexModulePrint.cc \ latexViewPrint.cc \ latexToken.cc \ - latexRenaming.cc + latexRenaming.cc \ + latexImportModule.cc \ + latexStrategyPrint.cc \ + latexResult.cc \ + latexCommand.cc noinst_HEADERS = \ renaming.hh \ @@ -576,6 +586,7 @@ noinst_HEADERS = \ quotedIdentifierOpSymbol.hh \ quotedIdentifierSymbol.hh \ quotedIdentifierTerm.hh \ + commutativeDecomposeEqualitySymbol.hh \ symbolType.hh \ token.hh \ userLevelRewritingContext.hh \ @@ -645,6 +656,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmixfix_a-banner.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmixfix_a-compiler.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmixfix_a-deserializer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmixfix_a-enclosingObject.Po@am__quote@ # am--include-marker @@ -993,6 +1005,20 @@ libmixfix_a-quotedIdentifierOpSymbol.obj: quotedIdentifierOpSymbol.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmixfix_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmixfix_a-quotedIdentifierOpSymbol.obj `if test -f 'quotedIdentifierOpSymbol.cc'; then $(CYGPATH_W) 'quotedIdentifierOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/quotedIdentifierOpSymbol.cc'; fi` +libmixfix_a-commutativeDecomposeEqualitySymbol.o: commutativeDecomposeEqualitySymbol.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmixfix_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmixfix_a-commutativeDecomposeEqualitySymbol.o -MD -MP -MF $(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Tpo -c -o libmixfix_a-commutativeDecomposeEqualitySymbol.o `test -f 'commutativeDecomposeEqualitySymbol.cc' || echo '$(srcdir)/'`commutativeDecomposeEqualitySymbol.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Tpo $(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='commutativeDecomposeEqualitySymbol.cc' object='libmixfix_a-commutativeDecomposeEqualitySymbol.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmixfix_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmixfix_a-commutativeDecomposeEqualitySymbol.o `test -f 'commutativeDecomposeEqualitySymbol.cc' || echo '$(srcdir)/'`commutativeDecomposeEqualitySymbol.cc + +libmixfix_a-commutativeDecomposeEqualitySymbol.obj: commutativeDecomposeEqualitySymbol.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmixfix_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmixfix_a-commutativeDecomposeEqualitySymbol.obj -MD -MP -MF $(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Tpo -c -o libmixfix_a-commutativeDecomposeEqualitySymbol.obj `if test -f 'commutativeDecomposeEqualitySymbol.cc'; then $(CYGPATH_W) 'commutativeDecomposeEqualitySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/commutativeDecomposeEqualitySymbol.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Tpo $(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='commutativeDecomposeEqualitySymbol.cc' object='libmixfix_a-commutativeDecomposeEqualitySymbol.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmixfix_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmixfix_a-commutativeDecomposeEqualitySymbol.obj `if test -f 'commutativeDecomposeEqualitySymbol.cc'; then $(CYGPATH_W) 'commutativeDecomposeEqualitySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/commutativeDecomposeEqualitySymbol.cc'; fi` + libmixfix_a-mixfixModule.o: mixfixModule.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmixfix_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmixfix_a-mixfixModule.o -MD -MP -MF $(DEPDIR)/libmixfix_a-mixfixModule.Tpo -c -o libmixfix_a-mixfixModule.o `test -f 'mixfixModule.cc' || echo '$(srcdir)/'`mixfixModule.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmixfix_a-mixfixModule.Tpo $(DEPDIR)/libmixfix_a-mixfixModule.Po @@ -1477,8 +1503,7 @@ all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-am +install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -1515,6 +1540,7 @@ clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libmixfix_a-banner.Po + -rm -f ./$(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Po -rm -f ./$(DEPDIR)/libmixfix_a-compiler.Po -rm -f ./$(DEPDIR)/libmixfix_a-deserializer.Po -rm -f ./$(DEPDIR)/libmixfix_a-enclosingObject.Po @@ -1608,6 +1634,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libmixfix_a-banner.Po + -rm -f ./$(DEPDIR)/libmixfix_a-commutativeDecomposeEqualitySymbol.Po -rm -f ./$(DEPDIR)/libmixfix_a-compiler.Po -rm -f ./$(DEPDIR)/libmixfix_a-deserializer.Po -rm -f ./$(DEPDIR)/libmixfix_a-enclosingObject.Po @@ -1672,7 +1699,7 @@ ps-am: uninstall-am: -.MAKE: all check install install-am install-exec install-strip +.MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ diff --git a/src/Mixfix/commutativeDecomposeEqualitySymbol.cc b/src/Mixfix/commutativeDecomposeEqualitySymbol.cc new file mode 100644 index 00000000..a09c9f50 --- /dev/null +++ b/src/Mixfix/commutativeDecomposeEqualitySymbol.cc @@ -0,0 +1,370 @@ +/* + + This file is part of the Maude 3 interpreter. + + Copyright 2023 SRI International, Menlo Park, CA 94025, USA. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public 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 CommutativeDecomposeEqualitySymbol. +// + +// utility stuff +#include "macros.hh" +#include "vector.hh" +#include "indent.hh" + +// forward declarations +#include "interface.hh" +#include "core.hh" +#include "freeTheory.hh" +#include "CUI_Theory.hh" +#include "strategyLanguage.hh" +#include "mixfix.hh" + +// interface class definitions +#include "symbol.hh" +#include "dagNode.hh" +#include "term.hh" + +// core class definitions +#include "argumentIterator.hh" +#include "rewritingContext.hh" +#include "symbolMap.hh" + +// free theory class definitions +#include "freeSymbol.hh" +#include "freeDagNode.hh" + +// CUI theory class definitions +#include "CUI_Symbol.hh" +#include "CUI_DagNode.hh" + +// S theory class definitions +#include "S_Symbol.hh" +#include "S_DagNode.hh" + +// built in class definitions +#include "bindingMacros.hh" +#include "commutativeDecomposeEqualitySymbol.hh" + +// mixfix class defintions. +#include "mixfixModule.hh" + +CommutativeDecomposeEqualitySymbol::CommutativeDecomposeEqualitySymbol(int id, const Vector& strategy) + : CUI_Symbol(id, strategy, false, COMM) +{ + conjunctionSymbol = 0; + disjunctionSymbol = 0; +} + +bool +CommutativeDecomposeEqualitySymbol::attachData(const Vector& opDeclaration, + const char* purpose, + const Vector& data) +{ + NULL_DATA(purpose, CommutativeDecomposeEqualitySymbol, data); + return CUI_Symbol::attachData(opDeclaration, purpose, data); +} + +bool +CommutativeDecomposeEqualitySymbol::attachSymbol(const char* purpose, Symbol* symbol) +{ + BIND_SYMBOL(purpose, symbol, conjunctionSymbol, Symbol*); + BIND_SYMBOL(purpose, symbol, disjunctionSymbol, Symbol*); + return CUI_Symbol::attachSymbol(purpose, symbol); +} + +bool +CommutativeDecomposeEqualitySymbol::attachTerm(const char* purpose, Term* term) +{ + BIND_TERM(purpose, term, equalTerm); + BIND_TERM(purpose, term, notEqualTerm); + return CUI_Symbol::attachTerm(purpose, term); +} + +void +CommutativeDecomposeEqualitySymbol::copyAttachments(Symbol* original, SymbolMap* map) +{ + CommutativeDecomposeEqualitySymbol* orig = safeCastNonNull(original); + COPY_SYMBOL(orig, conjunctionSymbol, map, Symbol*); + COPY_SYMBOL(orig, disjunctionSymbol, map, Symbol*); + COPY_TERM(orig, equalTerm, map); + COPY_TERM(orig, notEqualTerm, map); + CUI_Symbol::copyAttachments(original, map); +} + +void +CommutativeDecomposeEqualitySymbol::getDataAttachments(const Vector& opDeclaration, + Vector& purposes, + Vector >& data) +{ + APPEND_DATA(purposes, data, CommutativeDecomposeEqualitySymbol); + CUI_Symbol::getDataAttachments(opDeclaration, purposes, data); +} + +void +CommutativeDecomposeEqualitySymbol::getSymbolAttachments(Vector& purposes, + Vector& symbols) +{ + APPEND_SYMBOL(purposes, symbols, conjunctionSymbol); + APPEND_SYMBOL(purposes, symbols, disjunctionSymbol); + CUI_Symbol::getSymbolAttachments(purposes, symbols); +} + +void +CommutativeDecomposeEqualitySymbol::getTermAttachments(Vector& purposes, + Vector& terms) +{ + APPEND_TERM(purposes, terms, equalTerm); + APPEND_TERM(purposes, terms, notEqualTerm); + CUI_Symbol::getTermAttachments(purposes, terms); +} + +void +CommutativeDecomposeEqualitySymbol::postInterSymbolPass() +{ + DebugInfo("using (raw pointer) conjunctionSymbol=" << (void*) conjunctionSymbol); + DebugInfo("using conjunctionSymbol=" << conjunctionSymbol); + (void) equalTerm.normalize(); + equalTerm.prepare(); + (void) notEqualTerm.normalize(); + notEqualTerm.prepare(); +} + +void +CommutativeDecomposeEqualitySymbol::reset() +{ + equalTerm.reset(); // so equal dag can be garbage collected + notEqualTerm.reset(); // so notEqualDag dag can be garbage collected + CUI_Symbol::reset(); // parents reset() tasks +} + +bool +CommutativeDecomposeEqualitySymbol::eqRewrite(DagNode* subject, RewritingContext& context) +{ + Assert(this == subject->symbol(), "bad symbol"); + + const CUI_DagNode* f = static_cast(subject); + DagNode* l = f->getArgument(0); + DagNode* r = f->getArgument(1); + // + // This only makes sense with the standard, eager strategy. + // + l->reduce(context); + r->reduce(context); + // + // Equal dags are always equal. + // + if (l->equal(r)) + return context.builtInReplace(subject, equalTerm.getDag()); + // + // Unequal ground dags are always unequal. + // + if (determineGround(subject)) + return context.builtInReplace(subject, notEqualTerm.getDag()); + // + // Otherwise we consider the properties of the top symbols. + // + Symbol* ls = l->symbol(); + if (ls->isStable() && ls->equationFree() && ls->isConstructor(l)) + { + // + // Left symbol cannot change under axioms, cannot equationally rewrite, and is declared + // to be a constructor on the arguments it has. + // + MixfixModule* m = safeCastNonNull(ls->getModule()); + if (m->getSymbolType(ls).getBasicType() == SymbolType::STANDARD) + { + // + // No special properties either. + // + // (by axioms since we've already ruled out equational rewriting and special properties but + // not a future axiom f(X, f(X, Y)) = f(X, Y) for example), then return not equal. + // + if (hasImmediateSubterm(l, r)) + return context.builtInReplace(subject, notEqualTerm.getDag()); + Symbol* rs = r->symbol(); + if (ls == rs) + { + if (conjunctionSymbol) + { + // + // Consider decomposition. + // + if (DagNode* decomposition = decompose(m, l, r)) + return context.builtInReplace(subject, decomposition); + } + } + else + { + // + // Consider returning not equal. + // + if (rs->isStable() && rs->equationFree() && rs->isConstructor(r) && + m->getSymbolType(rs).getBasicType() == SymbolType::STANDARD) + return context.builtInReplace(subject, notEqualTerm.getDag()); + } + } + } + else + { + Symbol* rs = r->symbol(); + if (rs->isStable() && rs->equationFree() && rs->isConstructor(r)) + { + // + // Check for the converse case where rs is inert and r has an immediate subterm l. + // + MixfixModule* m = safeCastNonNull(rs->getModule()); + if (m->getSymbolType(rs).getBasicType() == SymbolType::STANDARD && hasImmediateSubterm(r, l)) + return context.builtInReplace(subject, notEqualTerm.getDag()); + } + } + // + // Support user reductions. + // + return CUI_Symbol::eqRewrite(subject, context); +} + +bool +CommutativeDecomposeEqualitySymbol::domainSortAlwaysLeqThan(Sort* /* sort */, int /* argNr */) +{ + // + // We're a polymorph instance that is defined on kinds so this is never true. + // + return false; +} + +DagNode* +CommutativeDecomposeEqualitySymbol::decompose(MixfixModule* m, DagNode* l, DagNode* r) +{ + Symbol* topSymbol = l->symbol(); + if (FreeSymbol* f = dynamic_cast(topSymbol)) + { + // + // FreeSymbol case: decompose into a conjunction. + // + int polymorphIndex = m->getPolymorphIndex(this); // find our polymorph + int arity = f->arity(); + FreeDagNode* left = safeCastNonNull(l); + FreeDagNode* right = safeCastNonNull(r); + Vector subterms(arity); + Vector pair(2); + for (int i = 0; i < arity; ++i) + { + int kindIndex = f->domainComponent(i)->getIndexWithinModule(); + Symbol* sibling = m->instantiatePolymorph(polymorphIndex, kindIndex); + pair[0] = left->getArgument(i); + pair[1] = right->getArgument(i); + subterms[i] = sibling->makeDagNode(pair); + } + return (arity == 1) ? subterms[0] : conjunctionSymbol->makeDagNode(subterms); + } + else if (S_Symbol* f = dynamic_cast(topSymbol)) + { + // + // Range and domain of the iter symbol must be the same + // so we use the same polymorph instance. + // + S_DagNode* left = safeCastNonNull(l); + S_DagNode* right = safeCastNonNull(r); + const mpz_class& ln = left->getNumber(); + DagNode* la = left->getArgument(); + const mpz_class& rn = right->getNumber(); + DagNode* ra = right->getArgument(); + + Vector pair(2); + if (ln > rn) + { + pair[0] = new S_DagNode(f, ln - rn, la); + pair[1] = ra; + } + else + { + pair[0] = la; + pair[1] = (ln < rn) ? new S_DagNode(f, rn - ln, ra) : ra; + } + return makeDagNode(pair); + } + else if (disjunctionSymbol) + { + // + // Having a defined disjunctionSymbol allow us to do more. + // + if (CUI_Symbol* f = dynamic_cast(topSymbol)) + { + int polymorphIndex = m->getPolymorphIndex(this); // find our polymorph + int kindIndex = f->domainComponent(0)->getIndexWithinModule(); + Symbol* sibling = m->instantiatePolymorph(polymorphIndex, kindIndex); + CUI_DagNode* left = safeCastNonNull(l); + CUI_DagNode* right = safeCastNonNull(r); + DagNode* l0 = left->getArgument(0); + DagNode* l1 = left->getArgument(1); + DagNode* r0 = right->getArgument(0); + DagNode* r1 = right->getArgument(1); + + Vector orArgs(2); + Vector andArgs(2); + Vector pair(2); + + pair[0] = l0; + pair[1] = r0; + andArgs[0] = sibling->makeDagNode(pair); + pair[0] = l1; + pair[1] = r1; + andArgs[1] = sibling->makeDagNode(pair); + orArgs[0] = conjunctionSymbol->makeDagNode(andArgs); + + pair[0] = l0; + pair[1] = r1; + andArgs[0] = sibling->makeDagNode(pair); + pair[0] = l1; + pair[1] = r0; + andArgs[1] = sibling->makeDagNode(pair); + orArgs[1] = conjunctionSymbol->makeDagNode(andArgs); + + return disjunctionSymbol->makeDagNode(orArgs); + } + } + return 0; +} + +bool +CommutativeDecomposeEqualitySymbol::hasImmediateSubterm(DagNode* bigger, DagNode* smaller) +{ + if (FreeSymbol* f = dynamic_cast(bigger->symbol())) + { + int arity = f->arity(); + FreeDagNode* b = safeCastNonNull(bigger); + for (int i = 0; i < arity; ++i) + { + if (b->getArgument(i)->equal(smaller)) + return true; + } + } + else if (S_DagNode* b = dynamic_cast(bigger)) + return b->getArgument()->equal(smaller); + else if (CUI_DagNode* b = dynamic_cast(bigger)) + { + // + // We know the top symbol of b is stable so it must only be cummutative. + // + return b->getArgument(0)->equal(smaller) || b->getArgument(1)->equal(smaller); + } + return false; +} diff --git a/src/Mixfix/commutativeDecomposeEqualitySymbol.hh b/src/Mixfix/commutativeDecomposeEqualitySymbol.hh new file mode 100644 index 00000000..305743e6 --- /dev/null +++ b/src/Mixfix/commutativeDecomposeEqualitySymbol.hh @@ -0,0 +1,67 @@ +/* + + This file is part of the Maude 3 interpreter. + + Copyright 2023 SRI International, Menlo Park, CA 94025, USA. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +*/ + +// +// Class for symbols for built-in commutative equality decomposition operations. + +// +#ifndef _commutativeDecomposeEqualitySymbol_hh_ +#define _commutativeDecomposeEqualitySymbol_hh_ +#include "CUI_Symbol.hh" +#include "cachedDag.hh" + +class CommutativeDecomposeEqualitySymbol : public CUI_Symbol +{ +public: + CommutativeDecomposeEqualitySymbol(int id, const Vector& strategy); + + bool attachData(const Vector& opDeclaration, + const char* purpose, + const Vector& data); + bool attachSymbol(const char* purpose, Symbol* symbol); + bool attachTerm(const char* purpose, Term* term); + void copyAttachments(Symbol* original, SymbolMap* map); + void getDataAttachments(const Vector& opDeclaration, + Vector& purposes, + Vector >& data); + void getSymbolAttachments(Vector& purposes, + Vector& symbols); + void getTermAttachments(Vector& purposes, + Vector& terms); + + void postInterSymbolPass(); + void reset(); + bool eqRewrite(DagNode* subject, RewritingContext& context); + + bool domainSortAlwaysLeqThan(Sort* sort, int argNr); + +private: + DagNode* decompose(MixfixModule* m, DagNode* l, DagNode* r); + static bool hasImmediateSubterm(DagNode* bigger, DagNode* smaller); + + Symbol* conjunctionSymbol; + Symbol* disjunctionSymbol; + CachedDag equalTerm; + CachedDag notEqualTerm; +}; + +#endif diff --git a/src/Mixfix/erewrite.cc b/src/Mixfix/erewrite.cc index c134378f..66e9650c 100644 --- a/src/Mixfix/erewrite.cc +++ b/src/Mixfix/erewrite.cc @@ -2,7 +2,7 @@ This file is part of the Maude 3 interpreter. - Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. + Copyright 1997-2023 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,17 +29,21 @@ Interpreter::eRewrite(const Vector& subject, Int64 limit, Int64 gas, bool { if (DagNode* d = makeDag(subject)) { - if (getFlag(SHOW_COMMAND)) + bool showCommand = getFlag(SHOW_COMMAND); + if (showCommand) { UserLevelRewritingContext::beginCommand(); + if (debug) + cout << "debug "; cout << "erewrite "; printModifiers(limit, gas); cout << d << " ." << endl; if (xmlBuffer != 0) xmlBuffer->generateErewrite(d, limit, gas); - if (latexBuffer != 0) - latexBuffer->generateErewrite(d, limit, gas); } + if (latexBuffer != 0) + latexBuffer->generateCommand(showCommand, debug ? "debug erewrite" : "erewrite", d, limit, gas); + CacheableRewritingContext* context = new CacheableRewritingContext(d); context->setObjectMode(ObjectSystemRewritingContext::EXTERNAL); VisibleModule* fm = currentModule->getFlatModule(); @@ -65,8 +69,8 @@ Interpreter::eRewriteCont(Int64 limit, bool debug) continueFunc = 0; if (xmlBuffer != 0 && getFlag(SHOW_COMMAND)) xmlBuffer->generateContinue("erewrite", fm, limit); - if (latexBuffer != 0 && getFlag(SHOW_COMMAND)) - latexBuffer->generateContinue(limit); + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); context->clearCount(); beginRewriting(debug); Timer timer(getFlag(SHOW_TIMING)); diff --git a/src/Mixfix/execute.cc b/src/Mixfix/execute.cc index ceba8f47..2b1f8962 100644 --- a/src/Mixfix/execute.cc +++ b/src/Mixfix/execute.cc @@ -132,6 +132,30 @@ Interpreter::printStats(const Timer& timer, RewritingContext& context, bool timi } } +void +Interpreter::printStats(RewritingContext& context, + int64_t cpuTime, + int64_t realTime, + bool timingFlag, + int64_t nrStates) +{ + Int64 nrRewrites = context.getTotalCount(); + if (nrStates != NONE) + cout << "states: " << nrStates << " "; + cout << "rewrites: " << nrRewrites; + if (timingFlag) + printTiming(nrRewrites, cpuTime, realTime); + cout << '\n'; + if (getFlag(SHOW_BREAKDOWN)) + { + cout << "mb applications: " << context.getMbCount() << + " equational rewrites: " << context.getEqCount() << + " rule rewrites: " << context.getRlCount() << + " variant narrowing steps: " << context.getVariantNarrowingCount() << + " narrowing steps: " << context.getNarrowingCount() << '\n'; + } +} + void Interpreter::endRewriting(Timer& timer, CacheableRewritingContext* context, @@ -147,27 +171,20 @@ Interpreter::endRewriting(Timer& timer, { delete context; (void) module->unprotect(); + if (latexBuffer != 0) + latexBuffer->cleanUp(); } else { + Int64 real = 0; + Int64 virt = 0; + Int64 prof = 0; + bool showTiming = getFlag(SHOW_TIMING) && timer.getTimes(real, virt, prof); if (getFlag(SHOW_STATS)) - printStats(timer, *context, getFlag(SHOW_TIMING)); + printStats(*context, prof, real, showTiming); + DagNode* r = context->root(); cout << "result " << r->getSort() << ": " << r << '\n'; - // SERIALIZATION - // TEST - // CODE - /* - Rope ser = module->serialize(r); - cout << module->serialize(r) << endl; - string mess; - Token::ropeToString(ser, mess); - cout << "string: " << mess << endl; - - DagNode* d = module->deserialize(ser); - cout << "read back: " << d << endl; - */ - cout.flush(); if (xmlBuffer != 0) { @@ -180,12 +197,14 @@ Interpreter::endRewriting(Timer& timer, if (latexBuffer != 0) { latexBuffer->generateResult(*context, - timer, + context->root(), + prof, + real, getFlag(SHOW_STATS), - getFlag(SHOW_TIMING), + showTiming, getFlag(SHOW_BREAKDOWN)); + latexBuffer->cleanUp(); } - if (cf == 0) { delete context; @@ -211,15 +230,19 @@ Interpreter::reduce(const Vector& subject, bool debug) if (DagNode* d = makeDag(subject)) { CacheableRewritingContext* context = new CacheableRewritingContext(d); - if (getFlag(SHOW_COMMAND)) + bool showCommand = getFlag(SHOW_COMMAND); + if (showCommand) { UserLevelRewritingContext::beginCommand(); + if (debug) + cout << "debug "; cout << "reduce in " << currentModule << " : " << d << " ." << endl; if (xmlBuffer != 0) xmlBuffer->generateReduce(d); - if (latexBuffer != 0) - latexBuffer->generateReduce(d); } + if (latexBuffer != 0) + latexBuffer->generateCommand(showCommand, debug ? "debug reduce" : "reduce", d); + VisibleModule* fm = currentModule->getFlatModule(); startUsingModule(fm); beginRewriting(debug); @@ -265,19 +288,22 @@ Interpreter::rewrite(const Vector& subject, Int64 limit, bool debug) { if (DagNode* d = makeDag(subject)) { - if (getFlag(SHOW_COMMAND)) + bool showCommand = getFlag(SHOW_COMMAND); + if (showCommand) { UserLevelRewritingContext::beginCommand(); + if (debug) + cout << "debug "; cout << "rewrite "; if (limit != NONE) cout << '[' << limit << "] "; cout << "in " << currentModule << " : " << d << " ." << endl; if (xmlBuffer != 0) xmlBuffer->generateRewrite(d, limit); - if (latexBuffer != 0) - latexBuffer->generateRewrite(d, limit); } - + if (latexBuffer != 0) + latexBuffer->generateCommand(showCommand, debug ? "debug rewrite" : "rewrite", d, limit); + CacheableRewritingContext* context = new CacheableRewritingContext(d); VisibleModule* fm = currentModule->getFlatModule(); @@ -301,8 +327,8 @@ Interpreter::rewriteCont(Int64 limit, bool debug) continueFunc = 0; if (xmlBuffer != 0 && getFlag(SHOW_COMMAND)) xmlBuffer->generateContinue("rewrite", fm, limit); - if (latexBuffer != 0 && getFlag(SHOW_COMMAND)) - latexBuffer->generateContinue(limit); + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); context->clearCount(); beginRewriting(debug); Timer timer(getFlag(SHOW_TIMING)); @@ -315,17 +341,21 @@ Interpreter::fRewrite(const Vector& subject, Int64 limit, Int64 gas, bool { if (DagNode* d = makeDag(subject)) { - if (getFlag(SHOW_COMMAND)) + bool showCommand = getFlag(SHOW_COMMAND); + if (showCommand) { UserLevelRewritingContext::beginCommand(); + if (debug) + cout << "debug "; cout << "frewrite "; printModifiers(limit, gas); cout << d << " ." << endl; if (xmlBuffer != 0) xmlBuffer->generateFrewrite(d, limit, gas); - if (latexBuffer != 0) - latexBuffer->generateFrewrite(d, limit, gas); } + if (latexBuffer != 0) + latexBuffer->generateCommand(showCommand, debug ? "debug frewrite" : "frewrite", d, limit, gas); + CacheableRewritingContext* context = new CacheableRewritingContext(d); context->setObjectMode(ObjectSystemRewritingContext::FAIR); VisibleModule* fm = currentModule->getFlatModule(); @@ -350,8 +380,8 @@ Interpreter::fRewriteCont(Int64 limit, bool debug) continueFunc = 0; if (xmlBuffer != 0 && getFlag(SHOW_COMMAND)) xmlBuffer->generateContinue("frewrite", fm, limit); - if (latexBuffer != 0 && getFlag(SHOW_COMMAND)) - latexBuffer->generateContinue(limit); + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); context->clearCount(); beginRewriting(debug); Timer timer(getFlag(SHOW_TIMING)); diff --git a/src/Mixfix/fancySymbols.cc b/src/Mixfix/fancySymbols.cc index 51c4b6ad..4e7c84ee 100644 --- a/src/Mixfix/fancySymbols.cc +++ b/src/Mixfix/fancySymbols.cc @@ -109,6 +109,8 @@ MixfixModule::newFancySymbol(Token prefixName, return new BranchSymbol(name, nrArgs); case SymbolType::EQUALITY_SYMBOL: return new EqualitySymbol(name, strategy); + case SymbolType::COMMUTATIVE_DECOMPOSE_EQUALITY_SYMBOL: + return new CommutativeDecomposeEqualitySymbol(name, strategy); case SymbolType::FLOAT: return new FloatSymbol(name); case SymbolType::STRING: diff --git a/src/Mixfix/interpreter.cc b/src/Mixfix/interpreter.cc index b4ae3f84..11ef019a 100644 --- a/src/Mixfix/interpreter.cc +++ b/src/Mixfix/interpreter.cc @@ -75,8 +75,8 @@ #include "freshVariableSource.hh" #include "viewExpression.hh" #include "moduleExpression.hh" -#include "maudeLatexBuffer.hh" #include "interpreter.hh" +#include "maudeLatexBuffer.hh" // our stuff #include "execute.cc" @@ -335,7 +335,10 @@ Interpreter::updateSet(set& target, bool add) if (add) target.insert(selected.begin(), selected.end()); else - target.erase(selected.begin(), selected.end()); + { + for (int i : selected) + target.erase(i); + } selected.clear(); } @@ -367,16 +370,11 @@ void Interpreter::showSortsAndSubsorts() const { currentModule->getFlatModule()->showSortsAndSubsorts(cout); - if (latexBuffer != 0) + if (latexBuffer) { - ostream& s = latexBuffer->getStream(); - s << "\\begin{maudeShowParagraph}\n\\begin{comment}\n show sorts " << - currentModule->getFlatModule() << " .\n\\end{comment}\n"; - s << "\\maudeKeyword{show} \\maudeKeyword{sorts} "; - latexBuffer->generateModuleName(currentModule->getFlatModule()); - s << " \\maudePunctuation{.}\\newline\n"; - currentModule->getFlatModule()->latexShowSortsAndSubsorts(s); - s << "\\end{maudeShowParagraph}\n"; + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show sorts", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowSortsAndSubsorts(latexBuffer->getStream()); + latexBuffer->cleanUp(); } } @@ -384,17 +382,11 @@ void Interpreter::showModule(bool all) const { currentModule->getFlatModule()->showModule(cout, all); - if (latexBuffer != 0) + if (latexBuffer) { - const char* modifier = all ? "all" : "desugared"; - ostream& s = latexBuffer->getStream(); - s << "\\begin{maudeShowParagraph}\n\\begin{comment}\n show " << modifier << " " << - currentModule->getFlatModule() << " .\n\\end{comment}\n"; - s << "\\maudeKeyword{show} \\maudeKeyword{" << modifier << "} "; - latexBuffer->generateModuleName(currentModule->getFlatModule()); - s << " \\maudePunctuation{.}\\newline\n"; - currentModule->getFlatModule()->latexShowModule(s, all); - s << "\\end{maudeShowParagraph}\n"; + latexBuffer->generateShow(getFlag(SHOW_COMMAND), all ? "show all" : "show desugared", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowModule(latexBuffer->getStream(), all); + latexBuffer->cleanUp(); } } @@ -413,15 +405,11 @@ Interpreter::showProcessedView() const if (currentView->evaluate()) // in case it became stale { currentView->showProcessedView(cout); - if (latexBuffer != 0) + if (latexBuffer) { - ostream& s = latexBuffer->getStream(); - s << "\\begin{maudeShowParagraph}\n\\begin{comment}\n show processed view " << - currentView << " .\n\\end{comment}\n"; - s << "\\maudeKeyword{show} \\maudeKeyword{processed} \\maudeKeyword{view} \\maudeView{" << - currentView << "} \\maudePunctuation{.}\\newline\n"; - currentView->latexShowProcessedView(s); - s << "\\end{maudeShowParagraph}\n"; + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show processed view", currentView); + currentView->latexShowProcessedView(latexBuffer->getStream()); + latexBuffer->cleanUp(); } } else @@ -449,28 +437,36 @@ Interpreter::showOps(bool all) const { currentModule->getFlatModule()->showPolymorphs(cout, false, all); currentModule->getFlatModule()->showOps(cout, false, all); + if (latexBuffer) + { + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show ops", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowPolymorphs(latexBuffer->getStream(), "", all); + currentModule->getFlatModule()->latexShowOps(latexBuffer->getStream(), "", all); + latexBuffer->cleanUp(); + } } void Interpreter::showVars() const { currentModule->getFlatModule()->showVars(cout, false); + if (latexBuffer) + { + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show vars", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowVars(latexBuffer->getStream(), ""); + latexBuffer->cleanUp(); + } } void Interpreter::showMbs(bool all) const { currentModule->getFlatModule()->showMbs(cout, false, all); - if (latexBuffer != 0) + if (latexBuffer) { - ostream& s = latexBuffer->getStream(); - s << "\\begin{maudeShowParagraph}\n\\begin{comment}\n show mbs " << currentModule->getFlatModule() << - " .\n\\end{comment}\n"; - s << "\\maudeKeyword{show} \\maudeKeyword{mbs} "; - latexBuffer->generateModuleName(currentModule->getFlatModule()); - s << " \\maudePunctuation{.}\\newline\n"; - currentModule->getFlatModule()->latexShowMbs(s, "", all); - s << "\\end{maudeShowParagraph}\n"; + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show mbs", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowMbs(latexBuffer->getStream(), "", all); + latexBuffer->cleanUp(); } } @@ -478,16 +474,11 @@ void Interpreter::showEqs(bool all) const { currentModule->getFlatModule()->showEqs(cout, false, all); - if (latexBuffer != 0) + if (latexBuffer) { - ostream& s = latexBuffer->getStream(); - s << "\\begin{maudeShowParagraph}\n\\begin{comment}\n show eqs " << currentModule->getFlatModule() << - " .\n\\end{comment}\n"; - s << "\\maudeKeyword{show} \\maudeKeyword{eqs} "; - latexBuffer->generateModuleName(currentModule->getFlatModule()); - s << " \\maudePunctuation{.}\\newline\n"; - currentModule->getFlatModule()->latexShowEqs(s, "", all); - s << "\\end{maudeShowParagraph}\n"; + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show eqs", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowEqs(latexBuffer->getStream(), "", all); + latexBuffer->cleanUp(); } } @@ -495,16 +486,11 @@ void Interpreter::showRls(bool all) const { currentModule->getFlatModule()->showRls(cout, false, all); - if (latexBuffer != 0) + if (latexBuffer) { - ostream& s = latexBuffer->getStream(); - s << "\\begin{maudeShowParagraph}\n\\begin{comment}\n show rls " << currentModule->getFlatModule() << - " .\n\\end{comment}\n"; - s << "\\maudeKeyword{show} \\maudeKeyword{rls} "; - latexBuffer->generateModuleName(currentModule->getFlatModule()); - s << " \\maudePunctuation{.}\\newline\n"; - currentModule->getFlatModule()->latexShowRls(s, "", all); - s << "\\end{maudeShowParagraph}\n"; + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show rls", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowRls(latexBuffer->getStream(), "", all); + latexBuffer->cleanUp(); } } @@ -512,24 +498,48 @@ void Interpreter::showStrats(bool all) const { currentModule->getFlatModule()->showStrats(cout, false, all); + if (latexBuffer) + { + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show strats", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowStrats(latexBuffer->getStream(), "", all); + latexBuffer->cleanUp(); + } } void Interpreter::showSds(bool all) const { currentModule->getFlatModule()->showSds(cout, false, all); + if (latexBuffer) + { + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show sds", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowSds(latexBuffer->getStream(), "", all); + latexBuffer->cleanUp(); + } } void Interpreter::showKinds() const { currentModule->getFlatModule()->showKinds(cout); + if (latexBuffer) + { + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show kinds", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowKinds(latexBuffer->getStream()); + latexBuffer->cleanUp(); + } } void Interpreter::showSummary() const { currentModule->getFlatModule()->showSummary(cout); + if (latexBuffer) + { + latexBuffer->generateShow(getFlag(SHOW_COMMAND), "show summary", currentModule->getFlatModule()); + currentModule->getFlatModule()->latexShowSummary(latexBuffer->getStream()); + latexBuffer->cleanUp(); + } } ImportModule* diff --git a/src/Mixfix/interpreter.hh b/src/Mixfix/interpreter.hh index 03b67f8a..3ca2d866 100644 --- a/src/Mixfix/interpreter.hh +++ b/src/Mixfix/interpreter.hh @@ -265,7 +265,12 @@ private: DagNode* makeDag(const Vector& subject); void startUsingModule(VisibleModule* module); void printModifiers(Int64 number, Int64 number2); - void printStats(const Timer& timer, RewritingContext& context, bool timingFlag); + void printStats(const Timer& timer, RewritingContext& context, bool timingFlag = false); + void printStats(RewritingContext& context, + int64_t cpuTime, + int64_t realTime, + bool timingFlag, + int64_t nrStates = NONE); void beginRewriting(bool debug); void endRewriting(Timer& timer, CacheableRewritingContext* context, diff --git a/src/Mixfix/latexCommand.cc b/src/Mixfix/latexCommand.cc new file mode 100644 index 00000000..cda250c5 --- /dev/null +++ b/src/Mixfix/latexCommand.cc @@ -0,0 +1,215 @@ +/* + + This file is part of the Maude 3 interpreter. + + Copyright 2023 SRI International, Menlo Park, CA 94025, USA. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public 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 +MaudeLatexBuffer::generateSearch(bool showCommand, + Interpreter::SearchKind searchKind, + DagNode* subject, + int searchType, + Term* target, + const Vector& condition, + int variantFlags, + int64_t limit, + int64_t depth, + bool debug) +{ + // + // These commands are for the form: + // in : . + // + static const char* searchKindName[] = { "search", "narrow", "xg-narrow", "smt-search", "vu-narrow", "fvu-narrow"}; + static const char* searchTypeSymbol[] = { "=>1", "=>+", "=>*", "=>!" }; + static const char* searchTypeLatex[] = { "\\maudeOneStep", "\\maudeAtLeastOneStep", "\\maudeAnySteps", "\\maudeToNormalForm" }; + + Module* module = subject->symbol()->getModule(); + // + // Print comment. + // + Tty::blockEscapeSequences(); + output << "\\begin{comment}\n%\n% "; + if (debug) + output << "debug "; + if (variantFlags & NarrowingSequenceSearch3::FOLD) + output << "{fold} "; + output << searchKindName[searchKind] << ' '; + if (variantFlags & (VariantSearch::IRREDUNDANT_MODE | VariantUnificationProblem::FILTER_VARIANT_UNIFIERS)) + { + output << '{'; + const char* sep = ""; + if (variantFlags & VariantSearch::IRREDUNDANT_MODE) + { + output << "delay"; + sep = ", "; + } + if (variantFlags & VariantUnificationProblem::FILTER_VARIANT_UNIFIERS) + output << sep << "filter"; + output << "} "; + } + safeCastNonNull(module)->printModifiers(output, limit, depth); + output << subject << ' ' << searchTypeSymbol[searchType] << ' ' << target; + if (!condition.empty()) + { + output << " such that "; + MixfixModule::printCondition(output, condition); + } + output << " .\n%\n\\end{comment}\n"; + Tty::unblockEscapeSequences(); + // + // Print latex version of command. + // + output << "\\begin{maudeResultParagraph}\n"; + if (showCommand) + { + output << "$"; + if (debug) + output << "\\maudeKeyword{debug}\\maudeSpace"; + if (variantFlags & NarrowingSequenceSearch3::FOLD) + output << "\\maudeLeftBrace\\maudeKeyword{fold}\\maudeRightBrace\\maudeSpace"; + output << "\\maudeKeyword{" << searchKindName[searchKind] << "}\\maudeSpace"; + + if (variantFlags & (VariantSearch::IRREDUNDANT_MODE | VariantUnificationProblem::FILTER_VARIANT_UNIFIERS)) + { + output << "\\maudeLeftBrace"; + const char* sep = ""; + if (variantFlags & VariantSearch::IRREDUNDANT_MODE) + { + output << "\\maudeKeyWord{delay}"; + sep = "\\maudePunctuation{,}\\maudeSpace"; + } + if (variantFlags & VariantUnificationProblem::FILTER_VARIANT_UNIFIERS) + output << sep << "\\maudeKeyWord{filter}"; + output << "\\maudeRightBrace"; + } + + if (limit != NONE || depth != NONE) + { + output << "\\maudePunctuation{[}"; + if (limit != NONE) + output << "\\maudeNumber{" << limit << "}"; + if (depth != NONE) + output << "\\maudePunctuation{,}\\maudeSpace\\maudeNumber{" << depth << "}"; + output << "\\maudePunctuation{]}\\maudeSpace"; + } + + output << "\\maudeKeyword{in}\\maudeSpace\\maudeModule{" << Token::latexName(module->id()) << + "}\\maudeSpace\\maudePunctuation{:}\\maudeSpace\n"; + + MixfixModule::latexPrintDagNode(output, subject); + output << searchTypeLatex[searchType]; + MixfixModule::latexPrettyPrint(output, target); + + if (!condition.empty()) + { + output << "\\maudeSpace\\maudeKeyword{such that}\\maudeSpace"; + VisibleModule::latexPrintCondition(output, condition); + } + output << "$\\maudeEndCommand\n"; + } + needNewline = showCommand; + pendingClose = "\\end{maudeResultParagraph}\n%\n% End of "; + pendingClose += searchKindName[searchKind]; + pendingClose += "\n%\n"; +} + +void +MaudeLatexBuffer::generateCommand(bool showCommand, + const string& command, + DagNode* subject, + Int64 number, + Int64 number2, + StrategyExpression* strategy) +{ + Module* module = subject->symbol()->getModule(); + // + // Print comment. + // + Tty::blockEscapeSequences(); + output << "\\begin{comment}\n%\n% " << command << " "; + safeCastNonNull(module)->printModifiers(output, number, number2); + output << subject << " .\n%\n\\end{comment}\n"; + Tty::unblockEscapeSequences(); + // + // Print latex version of command. + // + output << "\\begin{maudeResultParagraph}\n"; + if (showCommand) + { + output << "$\\maudeKeyword{" << command << "}\\maudeSpace"; + if (number != NONE || number2 != NONE) + { + output << "\\maudePunctuation{[}"; + if (number != NONE) + output << "\\maudeNumber{" << number << "}"; + if (number2 != NONE) + output << "\\maudePunctuation{,}\\maudeSpace\\maudeNumber{" << number2 << "}"; + output << "\\maudePunctuation{]}\\maudeSpace"; + } + output << "\\maudeKeyword{in}\\maudeSpace\\maudeModule{" << Token::latexName(module->id()) << + "}\\maudeSpace\\maudePunctuation{:}\\maudeSpace\n"; + MixfixModule::latexPrintDagNode(output, subject); + if (strategy != 0) + { + output << "\\maudeSpace\\maudeKeyword{using}\\maudeSpace"; + safeCastNonNull(subject->symbol()->getModule())->latexPrintStrategy(output, strategy); + } + output << "$\\maudeEndCommand\n"; + } + needNewline = showCommand; // for results that need a newline after the command + pendingClose = "\\end{maudeResultParagraph}\n%\n% End of " + command + "\n%\n"; +} + +void +MaudeLatexBuffer::generateContinue(bool showCommand, Int64 limit, bool debug) +{ + Tty::blockEscapeSequences(); + output << "\\begin{comment}\n%\n% continue " << limit << " .\n%\n\\end{comment}\n\\begin{maudeResultParagraph}\n"; + Tty::unblockEscapeSequences(); + if (showCommand) + output << "\\maudeKeyword{continue} \\maudeNumber{" << limit << "}\\maudeEndCommand\n"; + // + // We might be continuing a command that separates solutions by a blank line. + // + needNewline = showCommand; + pendingClose = "\\end{maudeResultParagraph}\n%\n% End of continue\n%\n"; +} + +void +MaudeLatexBuffer::generateShow(bool showCommand, const string& command, Module* module) +{ + output << "\\begin{comment}\n%\n% " << command << " " << module << " .\n%\n\\end{comment}\n\\begin{maudeShowParagraph}"; + if (showCommand) + { + output << "\\maudeKeyword{" << command << "}\\maudeSpace"; + generateModuleName(module); + output << "\\maudeEndCommand\\newline\n"; + } + pendingClose = "\\end{maudeShowParagraph}\n%\n% End of " + command + "\n%\n"; +} + +void +MaudeLatexBuffer::generateShow(bool showCommand, const string& command, View* view) +{ + output << "\\begin{comment}\n%\n% " << command << " " << view << " .\n%\n\\end{comment}\n\\begin{maudeShowParagraph}"; + if (showCommand) + output << "\\maudeKeyword{" << command << "}\\maudeSpace\\maudeView{" << view << "}\\maudeEndCommand\\newline\n"; + pendingClose = "\\end{maudeShowParagraph}\n%\n% End of " + command + "\n%\n"; +} diff --git a/src/Mixfix/latexDagNodePrint.cc b/src/Mixfix/latexDagNodePrint.cc index d03e8f2a..84b11c37 100644 --- a/src/Mixfix/latexDagNodePrint.cc +++ b/src/Mixfix/latexDagNodePrint.cc @@ -51,6 +51,26 @@ MixfixModule::latexPrettyPrint(ostream& s, DagNode* dagNode) } } +void +MixfixModule::latexPrintDagNode(ostream& s, DagNode* dagNode) +{ + MixfixModule* module = safeCastNonNull(dagNode->symbol()->getModule()); + if (interpreter.getPrintFlag(Interpreter::PRINT_GRAPH)) + /*module->latexGraphPrint(s, dagNode)*/; + else + { + globalIndent = 0; + MixfixModule::ColoringInfo coloringInfo; + if (interpreter.getPrintFlag(Interpreter::PRINT_COLOR)) + { + MixfixModule::computeGraphStatus(dagNode, coloringInfo.visited, coloringInfo.statusVec); + coloringInfo.reducedAbove = false; + coloringInfo.reducedDirectlyAbove = false; + } + module->latexPrettyPrint(s, coloringInfo, dagNode, UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + } +} + const char* MixfixModule::latexComputeColor(ColoringInfo& coloringInfo, DagNode* dagNode) { diff --git a/src/Mixfix/latexModulePrint.cc b/src/Mixfix/latexModulePrint.cc index b006b2a8..c7943bb0 100644 --- a/src/Mixfix/latexModulePrint.cc +++ b/src/Mixfix/latexModulePrint.cc @@ -29,26 +29,26 @@ VisibleModule::latexPrintConditionFragment(ostream& s, const ConditionFragment* { if (const EqualityConditionFragment* e = dynamic_cast(c)) { - latexPrettyPrint(s, e->getLhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, e->getLhs()); s << "\n\\maudeEquals\n"; - latexPrettyPrint(s, e->getRhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, e->getRhs()); } else if (const SortTestConditionFragment* t = dynamic_cast(c)) { - latexPrettyPrint(s, t->getLhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, t->getLhs()); s << "\n\\maudeHasSort\n" << latexType(t->getSort()); } else if(const AssignmentConditionFragment* a = dynamic_cast(c)) { - latexPrettyPrint(s, a->getLhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, a->getLhs()); s << "\n\\maudeAssign\n"; - latexPrettyPrint(s, a->getRhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, a->getRhs()); } else if(const RewriteConditionFragment* r = dynamic_cast(c)) { - latexPrettyPrint(s, r->getLhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, r->getLhs()); s << "\n\\maudeRewritesTo\n"; - latexPrettyPrint(s, r->getRhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, r->getRhs()); } else CantHappen("bad condition fragment"); @@ -129,11 +129,11 @@ VisibleModule::latexPrintAttributes(ostream& s, } void -VisibleModule::latexPrintMembershipAxiom(ostream& s, const char* indent, const SortConstraint* mb) +VisibleModule::latexPrintMembershipAxiom(ostream& s, const char* indent, const SortConstraint* mb) const { - s << "\\par" << indent << (mb->hasCondition() ? "\\maudeKeyword{cmb}" : "\\maudeKeyword{mb}"); - s << "\\maudeSpace $"; - latexPrettyPrint(s, mb->getLhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + s << "\\par$" << indent << (mb->hasCondition() ? "\\maudeKeyword{cmb}" : "\\maudeKeyword{mb}"); + s << "\\maudeSpace"; + latexPrettyPrint(s, mb->getLhs()); s << "\\maudeHasSort" << latexType(mb->getSort()); if (mb->hasCondition()) latexPrintCondition(s, mb); @@ -142,10 +142,10 @@ VisibleModule::latexPrintMembershipAxiom(ostream& s, const char* indent, const S } void -VisibleModule::latexShowMbs(ostream& s, const char* indent, bool all) +VisibleModule::latexShowMbs(ostream& s, const char* indent, bool all) const { const Vector& mbs = getSortConstraints(); - Index nrMbs = all ? mbs.length() : getNrOriginalMembershipAxioms(); + Index nrMbs = all ? mbs.size() : getNrOriginalMembershipAxioms(); for (Index i = 0; i < nrMbs; ++i) { if (UserLevelRewritingContext::interrupted()) @@ -155,13 +155,13 @@ VisibleModule::latexShowMbs(ostream& s, const char* indent, bool all) } void -VisibleModule::latexPrintEquation(ostream& s, const char* indent, const Equation* eq) +VisibleModule::latexPrintEquation(ostream& s, const char* indent, const Equation* eq) const { - s << "\\par" << indent << (eq->hasCondition() ? "\\maudeKeyword{ceq}" : "\\maudeKeyword{eq}"); - s << "\\maudeSpace $"; - latexPrettyPrint(s, eq->getLhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + s << "\\par$" << indent << (eq->hasCondition() ? "\\maudeKeyword{ceq}" : "\\maudeKeyword{eq}"); + s << "\\maudeSpace"; + latexPrettyPrint(s, eq->getLhs()); s << "\\maudeEquals"; - latexPrettyPrint(s, eq->getRhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, eq->getRhs()); if (eq->hasCondition()) latexPrintCondition(s, eq); latexPrintAttributes(s, @@ -174,10 +174,10 @@ VisibleModule::latexPrintEquation(ostream& s, const char* indent, const Equation } void -VisibleModule::latexShowEqs(ostream& s, const char* indent, bool all) +VisibleModule::latexShowEqs(ostream& s, const char* indent, bool all) const { const Vector& equations = getEquations(); - Index nrEquations = all ? equations.length() : getNrOriginalEquations(); + Index nrEquations = all ? equations.size() : getNrOriginalEquations(); for (Index i = 0; i < nrEquations; ++i) { if (UserLevelRewritingContext::interrupted()) @@ -187,13 +187,15 @@ VisibleModule::latexShowEqs(ostream& s, const char* indent, bool all) } void -VisibleModule::latexPrintRule(ostream& s, const char* indent, const Rule* rl) +VisibleModule::latexPrintRule(ostream& s, const char* indent, const Rule* rl) const { - s << "\\par" << indent << (rl->hasCondition() ? "\\maudeKeyword{crl}" : "\\maudeKeyword{rl}"); - s << "\\maudeSpace $"; - latexPrettyPrint(s, rl->getLhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + if (indent) + s << "\\par$" << indent; + s << (rl->hasCondition() ? "\\maudeKeyword{crl}" : "\\maudeKeyword{rl}"); + s << "\\maudeSpace"; + latexPrettyPrint(s, rl->getLhs()); s << "\\maudeRewritesTo"; - latexPrettyPrint(s, rl->getRhs(), UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, rl->getRhs()); if (rl->hasCondition()) latexPrintCondition(s, rl); latexPrintAttributes(s, @@ -203,14 +205,16 @@ VisibleModule::latexPrintRule(ostream& s, const char* indent, const Rule* rl) false, false, rl->isNarrowing()); - s << "$\\maudeEndStatement\n"; + if (indent) + s << "$"; + s << "\\maudeEndStatement\n"; } void -VisibleModule::latexShowRls(ostream& s, const char* indent, bool all) +VisibleModule::latexShowRls(ostream& s, const char* indent, bool all) const { const Vector& rules = getRules(); - Index nrRules = all ? rules.length() : getNrOriginalRules(); + Index nrRules = all ? rules.size() : getNrOriginalRules(); for (Index i = 0; i < nrRules; ++i) { if (UserLevelRewritingContext::interrupted()) @@ -219,6 +223,68 @@ VisibleModule::latexShowRls(ostream& s, const char* indent, bool all) } } +void +VisibleModule::latexPrintStrategyDecl(ostream& s, const char* indent, const RewriteStrategy* rs) +{ + s << "\\par$" << indent << "\\maudeKeyword{strat}\\maudeSpace" << Token::latexIdentifier(rs->id()); + const Vector& domain = rs->getDomain(); + int arity = rs->arity(); + if (arity > 0) + { + s << "\\maudeHasSort"; + for (Index i = 0; i < arity; ++i) + s << (i == 0 ? "" : "\\maudeSpace") << latexType(domain[i]) << ' '; + } + s << "\\maudeStratAt" << latexType(rs->getSubjectSort()); + int metadata = getMetadata(MixfixModule::STRAT_DECL, rs); + if (metadata != NONE) + { + s << "\\maudeSpace\\maudeLeftBracket\\maudeKeyword{metadata}\\maudeSpace\\maudeString{" << + Token::latexName(metadata) << "}\\maudeRightBracket"; + } + s << "$\\maudeEndStatement\n"; +} + +void +VisibleModule::latexShowStrats(ostream& s, const char* indent, bool all) +{ + const Vector& strategies = getStrategies(); + Index nrStrategies = strategies.size(); + Index start = all ? 0 : getNrImportedStrategies(); + for (Index i = start; i < nrStrategies; ++i) + { + if (UserLevelRewritingContext::interrupted()) + return; + latexPrintStrategyDecl(s, indent, strategies[i]); + } +} + +void +VisibleModule::latexPrintStrategyDefinition(ostream& s, const char* indent, const StrategyDefinition* e) +{ + s << "\\par$" << indent << (e->hasCondition() ? "\\maudeKeyword{csd}" : "\\maudeKeyword{sd}") << "\\maudeSpace"; + latexPrintStrategyTerm(s, e->getStrategy(), e->getLhs()); + s << "\\maudeAssign"; + latexPrintStrategy(s, e->getRhs()); + if (e->hasCondition()) + latexPrintCondition(s, e); + latexPrintAttributes(s, e, getMetadata(MetadataStore::STRAT_DEF, e), 0); + s << "$\\maudeEndStatement\n"; +} + +void +VisibleModule::latexShowSds(ostream& s, const char* indent, bool all) +{ + const Vector& defs = getStrategyDefinitions(); + Index nrDefs = all ? defs.size() : getNrOriginalStrategyDefinitions(); + for (Index i = 0; i < nrDefs; ++i) + { + if (UserLevelRewritingContext::interrupted()) + return; + latexPrintStrategyDefinition(s, indent, defs[i]); + } +} + void VisibleModule::latexShowImports(ostream& s) const { @@ -227,12 +293,8 @@ VisibleModule::latexShowImports(ostream& s) const { if (UserLevelRewritingContext::interrupted()) return; - //const char* moduleName = Token::removeBoundParameterBrackets(getImportedModule(i)->id()).makeZeroTerminatedString(); - //s << "\\par\\maudeIndent\\maudeKeyword{"<< importModeString(getImportMode(i)) << "}\\ \\maudeModule{" << - // Token::latexName(moduleName) << "}\\maudeEndStatement\n"; - s << "\\par\\maudeIndent$\\maudeKeyword{"<< importModeString(getImportMode(i)) << "}\\maudeSpace" << + s << "\\par$\\maudeIndent\\maudeKeyword{"<< importModeString(getImportMode(i)) << "}\\maudeSpace" << getImportedModule(i)->latexModuleExpression() <<"$\\maudeEndStatement\n"; - //delete [] moduleName; } } @@ -247,10 +309,10 @@ VisibleModule::latexShowSorts(ostream& s, bool all) const if (nrSorts > 0) { const Vector& sorts = getSorts(); - s << "\\par\\maudeIndent\\maudeKeyword{sort" << pluralize(nrSorts) << "}"; + s << "\\par$\\maudeIndent\\maudeKeyword{sort" << pluralize(nrSorts) << "}"; for (Index i = begin; i < end; ++i) s << "\\maudeSpace" << latexType(sorts[i]); - s << "\\maudeEndStatement\n"; + s << "$\\maudeEndStatement\n"; } } @@ -270,23 +332,23 @@ VisibleModule::latexShowSubsorts(ostream& s, bool all) const Index nrSubsorts = end - begin; if (nrSubsorts > 0) { - s << "\\par\\maudeIndent\\maudeKeyword{subsort" << pluralize(nrSubsorts) << "}"; + s << "\\par$\\maudeIndent\\maudeKeyword{subsort" << pluralize(nrSubsorts) << "}"; for (Index j = begin; j < end; ++j) s << "\\maudeSpace" << latexType(subsorts[j]); - s << "\\maudeSpace\\maudeLessThan\\maudeSpace" << latexType(sort) << "\\maudeEndStatement\n"; + s << "\\maudeSpace\\maudeLessThan\\maudeSpace" << latexType(sort) << "$\\maudeEndStatement\n"; } } } void -VisibleModule::latexShowVars(ostream& s) const +VisibleModule::latexShowVars(ostream& s, const char* indent) const { const AliasMap& variableAliases = getVariableAliases(); for (const auto& p : variableAliases) { if (UserLevelRewritingContext::interrupted()) return; - s << "\\par\\maudeIndent\\maudeKeyword{var} $" << Token::latexIdentifier(p.first) << "\\maudeHasSort" << + s << "\\par$" << indent << "\\maudeKeyword{var}\\maudeSpace" << Token::latexIdentifier(p.first) << "\\maudeHasSort" << latexType(p.second) << "$\\maudeEndStatement\n"; } } @@ -307,7 +369,7 @@ VisibleModule::latexShowDecls(ostream& s, const char* indent, Index index, bool if (UserLevelRewritingContext::interrupted()) return; const Vector& dec = opDecls[i].getDomainAndRange(); - s << "\\par" << indent << "\\maudeKeyword{op} $"; + s << "\\par$" << indent << "\\maudeKeyword{op}\\maudeSpace"; if (nrArgs == 0) { if (Token::auxProperty(id) == Token::AUX_STRUCTURED_SORT) @@ -317,10 +379,11 @@ VisibleModule::latexShowDecls(ostream& s, const char* indent, Index index, bool s << "\\maudeHasSort\\maudeSpace"; } else - s << latexPrettyOp(id) << "\\maudeHasSort"; - - for (Index j = 0; j < nrArgs; ++j) - s << (j == 0 ? "" : "\\maudeSpace") << latexType(dec[j]); + { + s << latexPrettyOp(id) << "\\maudeHasSort"; + for (Index j = 0; j < nrArgs; ++j) + s << (j == 0 ? "" : "\\maudeSpace") << latexType(dec[j]); + } s << "\\maudeFunction" << latexType(dec[nrArgs]); latexShowAttributes(s, symbol, i); s << "$\\maudeEndStatement\n"; @@ -343,7 +406,7 @@ VisibleModule::latexShowOps(ostream& s, const char* indent, bool all) void VisibleModule::latexShowPolymorphDecl(ostream& s, const char* indent, Index index) { - s << "\\par" << indent << "\\maudeKeyword{op} $"; + s << "\\par$" << indent << "\\maudeKeyword{op}\\maudeSpace"; const Vector& domainAndRange = getPolymorphDomainAndRange(index); int nrArgs = domainAndRange.length() - 1; int id = getPolymorphName(index).code(); @@ -356,15 +419,16 @@ VisibleModule::latexShowPolymorphDecl(ostream& s, const char* indent, Index inde s << "\\maudeHasSort\\maudeSpace"; } else - s << latexPrettyOp(id) << "\\maudeHasSort"; - - for (int i = 0; i < nrArgs; ++i) { - s << (i == 0 ? "" : "\\maudeSpace"); - if (Sort* sort = domainAndRange[i]) - s << latexType(sort); - else - s << "\\maudeSort{Universal}"; + s << latexPrettyOp(id) << "\\maudeHasSort"; + for (int i = 0; i < nrArgs; ++i) + { + s << (i == 0 ? "" : "\\maudeSpace"); + if (Sort* sort = domainAndRange[i]) + s << latexType(sort); + else + s << "\\maudeSort{Universal}"; + } } s << "\\maudeFunction"; if (Sort* sort = domainAndRange[nrArgs]) @@ -427,12 +491,12 @@ VisibleModule::latexShowModule(ostream& s, bool all) latexShowSubsorts(s, all); latexShowPolymorphs(s, "\\maudeIndent", all); latexShowOps(s, "\\maudeIndent", all); - latexShowVars(s); + latexShowVars(s, "\\maudeIndent"); latexShowMbs(s, "\\maudeIndent", all); latexShowEqs(s, "\\maudeIndent", all); latexShowRls(s, "\\maudeIndent", all); - //showStrats(s, true, all); - //showSds(s, true, all); + latexShowStrats(s, "\\maudeIndent", all); + latexShowSds(s, "\\maudeIndent", all); if (UserLevelRewritingContext::interrupted()) return; s << "\\par\\maudeKeyword{" << moduleEndString(getModuleType()) << "}\n"; @@ -445,7 +509,8 @@ VisibleModule::latexShowSortsAndSubsorts(ostream& s) const Index nrUserSorts = getNrUserSorts(); if (nrUserSorts == 0) return; - s << "\\par\n\\begin{tabular}{@{}ll}\n"; + s << "\\LTpre=0em\\LTpost=0em\n"; + s << "\\par\n\\begin{longtable}[l]{@{}ll}\n"; for (Index i = 0; i < nrUserSorts; i++) { if (UserLevelRewritingContext::interrupted()) @@ -472,7 +537,7 @@ VisibleModule::latexShowSortsAndSubsorts(ostream& s) const Index nrComparableSorts = nrSubsorts + nrSupersorts; if (nrComparableSorts > 0) { - s << "\\maudeKeyword{subsort" << pluralize(nrComparableSorts) << "}"; + s << "$\\maudeKeyword{subsort" << pluralize(nrComparableSorts) << "}"; if (nrSubsorts > 0) { for (Index j = nrComponentSorts - 1; j > index ; --j) @@ -494,11 +559,11 @@ VisibleModule::latexShowSortsAndSubsorts(ostream& s) const s << "\\maudeSpace" << latexType(sort2); } } - s << "\\maudeEndStatement"; + s << "$\\maudeEndStatement"; } s << "\\\\\n"; } - s << "\\end{tabular}\n"; + s << "\\end{longtable}\n"; } void @@ -555,7 +620,7 @@ VisibleModule::latexShowAttributes(ostream& s, Symbol* symbol, Index opDeclIndex s << "\\maudeKeyword{id:}\\maudeSpace"; Term* id = safeCast(BinarySymbol*, symbol)->getIdentity(); if (id != 0) - latexPrettyPrint(s, id, UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, id); } if (st.hasFlag(SymbolType::IDEM)) { @@ -744,7 +809,7 @@ VisibleModule::latexShowAttributes(ostream& s, Symbol* symbol, Index opDeclIndex { s << "\\newline\\maudeKeyword{term-hook}\\maudeSpace" << "\\maudeSymbolic{" << Token::latexName(purposes[i]) << "}\\maudeSpace\\maudeLeftParen"; - latexPrettyPrint(s, terms[i], UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, terms[i]); s << "\\maudeRightParen\n"; } } @@ -778,7 +843,7 @@ VisibleModule::latexShowPolymorphAttributes(ostream& s, int index) s << "\\maudeKeyword{id:}\\maudeSpace"; Term* id = getPolymorphIdentity(index); if (id != 0) - latexPrettyPrint(s, id, UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, id); } if (st.hasFlag(SymbolType::IDEM)) s << "\\maudeSpace\\maudeKeyword{idem}"; @@ -939,10 +1004,60 @@ VisibleModule::latexShowPolymorphAttributes(ostream& s, int index) { s << "\\newline\\maudeKeyword{term-hook}\\maudeSpace" << "\\maudeSymbolic{" << Token::latexName(purpose) << "}\\maudeSpace\\maudeLeftParen"; - latexPrettyPrint(s, term, UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); + latexPrettyPrint(s, term); s << "\\maudeRightParen\n"; } } s << "\\maudeRightParen"; } } + +void +VisibleModule::latexShowKinds(ostream& s) const +{ + const char* sep = ""; + s << "\\LTpre=0em\\LTpost=0em\n"; + for (const ConnectedComponent* c : getConnectedComponents()) + { + s << sep << "\\par\\begin{longtable}[l]{rl}\n\\multicolumn{2}{@{}l}{" << latexType(c->sort(Sort::KIND)); + sep = "\\vspace{1.5ex}\n"; + if (c->errorFree()) + s << "\\maudeSpace\\maudeNormal{(error free)}"; + s << "\\maudePunctuation{:}}"; + int nrSorts = c->nrSorts(); + for (int j = 1; j < nrSorts; ++j) + s << "\\\\\n\\maudeBigIndent\\maudeNumber{" << j << "} & " << latexSort(c->sort(j)) << ""; + s << "\n\\end{longtable}\n"; + } +} + +void +VisibleModule::latexShowSummary(ostream& s) +{ + int nrNonterminals; + int nrTerminals; + int nrProductions; + getParserStats(nrNonterminals, nrTerminals, nrProductions); + + s << "\\par\\maudeResponse{Grammar:}\n" << + "\\par\\maudeBigIndent\\maudeNormal{nonterminals: }\\maudeNumber{" << nrNonterminals << + "}\n\\par\\maudeBigIndent\\maudeNormal{terminals: }\\maudeNumber{" << nrTerminals << + "}\n\\par\\maudeBigIndent\\maudeNormal{productions: }\\maudeNumber{" << nrProductions << + "}\\linebreak\n"; + + Index nrKinds = getConnectedComponents().size(); + + s << "\\par\\maudeResponse{Term rewriting system:}\n" << + "\\par\\maudeBigIndent\\maudeNormal{kinds: }\\maudeNumber{" << nrKinds << + "}\n\\par\\maudeBigIndent\\maudeNormal{sorts: }\\maudeNumber{" << getSorts().size() - nrKinds << + "}\n\\par\\maudeBigIndent\\maudeNormal{user symbols: }\\maudeNumber{" << getNrUserSymbols() << + "}\n\\par\\maudeBigIndent\\maudeNormal{total symbols: }\\maudeNumber{" << getSymbols().size() << + "}\n\\par\\maudeBigIndent\\maudeNormal{polymorphic operators: }\\maudeNumber{" << getNrPolymorphs() << + + "}\n\\par\\maudeBigIndent\\maudeNormal{membership axioms: }\\maudeNumber{" << getSortConstraints().size() << + "}\n\\par\\maudeBigIndent\\maudeNormal{equations: }\\maudeNumber{" << getEquations().size() << + "}\n\\par\\maudeBigIndent\\maudeNormal{rules: }\\maudeNumber{" << getRules().size() << + "}\n\\par\\maudeBigIndent\\maudeNormal{strategies: }\\maudeNumber{" << getStrategies().size() << + "}\n\\par\\maudeBigIndent\\maudeNormal{strategy definitions: }\\maudeNumber{" << getStrategyDefinitions().size() << + "}\n"; +} diff --git a/src/Mixfix/latexRenaming.cc b/src/Mixfix/latexRenaming.cc index a4da9f9d..b93532ae 100644 --- a/src/Mixfix/latexRenaming.cc +++ b/src/Mixfix/latexRenaming.cc @@ -66,13 +66,11 @@ Renaming::latexRenaming(const char* sep, result += sep; result += "\\maudeKeyword{attr}\\maudeSpace"; result += Token::latexIdentifier(a.fromAttr.code()); - /* FIXME if (!(a.type.empty())) { - s << " : "; - printRenamingType(s, a.type); + result += "\\maudeHasSort"; + result += latexRenamingType(a.type, fromModule); } - */ result += "\\maudeSpace\\maudeKeyword{to}\\maudeSpace"; result += Token::latexIdentifier(a.toAttr.code()); sep = sep2; @@ -195,24 +193,26 @@ Renaming::latexRenaming(const char* sep, result += "}"; sep = sep2; } -#if 0 - // FIXME for (auto sm : stratMapIndex) { - s << sep << "strat " << Token::name(sm->first); + result += sep; + result += "\\maudeKeyword{strat}\\maudeSpace"; + result += Token::latexIdentifier(sm->first); if (!sm->second.types.empty()) { - s << " :"; + result += "\\maudeHasSort"; for (const IdSet& t : sm->second.types) { - s << ' '; - printRenamingType(s, t); + result += latexRenamingType(t, fromModule); + result += "\\maudeSpace"; } } + else + result += "\\maudeSpace"; Assert(sm->second.name != NONE && sm->second.expr == 0, "renamings with strat->expr mappings are not printable"); - s << " to " << Token::name(sm->second.name); + result += "\\maudeKeyword{to}\\maudeSpace"; + result += Token::latexIdentifier(sm->second.name); sep = sep2; } -#endif return result; } diff --git a/src/Mixfix/latexResult.cc b/src/Mixfix/latexResult.cc new file mode 100644 index 00000000..028ef56b --- /dev/null +++ b/src/Mixfix/latexResult.cc @@ -0,0 +1,271 @@ +/* + + This file is part of the Maude 3 interpreter. + + Copyright 2023 SRI International, Menlo Park, CA 94025, USA. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public 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 printing results. +// + +void +MaudeLatexBuffer::generateStats(RewritingContext& context, + int64_t cpuTime, + int64_t realTime, + bool showTiming, + bool showBreakdown, + int64_t nrStates) +{ + // + // Rewrites. + // + Int64 nrRewrites = context.getTotalCount(); + output << "\\par"; + if (nrStates != NONE) + output << "\\maudeResponse{states:} \\maudeNumber{" << nrStates << "}\\maudeSpace\\maudeSpace"; + output << "\\maudeResponse{rewrites:} \\maudeNumber{" << nrRewrites << "}\n"; + // + // Timing. + // + if (showTiming) + { + output << " \\maudeResponse{in} \\maudeNumber{" << cpuTime / 1000 << + "} \\maudeResponse{ms cpu} \\maudePunctuation{(}\\maudeNumber{" << + realTime / 1000 << "} \\maudeResponse{ms real}\\maudePunctuation{)} \\maudePunctuation{(}\\maudeNumber{"; + if (cpuTime > 0) + output << (1000000 * nrRewrites) / cpuTime; + else + output << "\\textasciitilde"; + output << "} \\maudeResponse{rewrites/second}\\maudePunctuation{)}\n"; + } + // + // Break down of rewrites. + // + if (showBreakdown) + { + output << "\\par\\maudeResponse{mb applications:} \\maudeNumber{" << context.getMbCount() << "}\n" << + "\\hspace{0.5em}\\maudeResponse{equational rewrites:} \\maudeNumber{" << context.getEqCount() << "}\n" << + "\\hspace{0.5em}\\maudeResponse{rule rewrites:} \\maudeNumber{" << context.getRlCount() << "}\n" << + "\\hspace{0.5em}\\maudeResponse{variant narrowing steps:} \\maudeNumber{" << context.getVariantNarrowingCount() << "}\n" << + "\\hspace{0.5em}\\maudeResponse{narrowing steps:} \\maudeNumber{" << context.getNarrowingCount() << "}\n"; + } +} + +void +MaudeLatexBuffer::generateNonResult(RewritingContext& context, + const string& message, + int64_t cpuTime, + int64_t realTime, + bool showStats, + bool showTiming, + bool showBreakdown) +{ + if (needNewline) + output << "\\newline"; + output << "\\par\\maudeResponse{" << message << "}\n"; + if (showStats) + generateStats(context, cpuTime, realTime, showTiming, showBreakdown); + needNewline = false; +} + +void +MaudeLatexBuffer::generateResult(RewritingContext& context, + DagNode* result, + int64_t cpuTime, + int64_t realTime, + bool showStats, + bool showTiming, + bool showBreakdown) +{ + if (showStats) + generateStats(context, cpuTime, realTime, showTiming, showBreakdown); + output << "\\par\\maudeResponse{result}\n"; + generateType(result->getSort()); + output << "\\maudePunctuation{:}$\\maudeSpace\n"; + MixfixModule::latexPrintDagNode(output, result); + output << "$\n"; +} + +void +MaudeLatexBuffer::generateSearchNonResult(RewriteSequenceSearch* state, + const string& message, + int64_t cpuTime, + int64_t realTime, + bool showStats, + bool showTiming, + bool showBreakdown) +{ + if (needNewline) + output << "\\newline"; + output << "\\par\\maudeResponse{" << message << "}\n"; + if (showStats) + generateStats(*(state->getContext()), cpuTime, realTime, showTiming, showBreakdown, state->getNrStates()); + needNewline = false; +} + +void +MaudeLatexBuffer::generateSearchResult(RewriteSequenceSearch* state, + int64_t solutionNr, + int64_t cpuTime, + int64_t realTime, + bool showStats, + bool showTiming, + bool showBreakdown) +{ + if (needNewline) + output << "\\newline"; + output << "\\par\\maudeResponse{Solution}\\maudeSpace\\maudeNumber{" << solutionNr << + "}\\maudeSpace\\maudePunctuation{(}\\maudeResponse{state}\\maudeSpace\\maudeNumber{" << + state->getStateNr() << "}\\maudePunctuation{)}\n"; + if (showStats) + generateStats(*(state->getContext()), cpuTime, realTime, showTiming, showBreakdown, state->getNrStates()); + needNewline = true; +} + +void +MaudeLatexBuffer::generateSearchPath(const RewriteSequenceSearch* graph, + const Vector& steps, + int stateNr, + bool showCommand, + bool showRule) +{ + const char* command = (showRule ? "show path" : "show path state" ); + // + // Print comment. + // + output << "\\begin{comment}\n%\n% " << command << " " << stateNr << " .\n%\n\\end{comment}\n"; + // + // Print latex version of command. + // + output << "\\begin{maudeResultParagraph}\n"; + if (showCommand) + output << "\\par\\maudeKeyword{" << command << "}\\maudeSpace\\maudeNumber{" << stateNr << "}\\maudeEndCommand\\newline\n"; + // + // Print latex version of path. + // + const VisibleModule* m = safeCastNonNull(graph->getStateDag(0)->symbol()->getModule()); + for (Index i = steps.size() - 1; i >= 0; --i) + { + int sn = steps[i]; + if (sn != 0) // is this the initial state? + { + Rule* rule = graph->getStateRule(sn); + if (showRule) + { + output << "\\par$\\maudePathLeft"; + m->latexPrintRule(output, nullptr, rule); + output << "\\maudePathRight$\n"; + } + else + { + int label = rule->getLabel().id(); + if (label != NONE) + output <<"\\par$\\maudePathWithLabel{\\maudeLabel{" << Token::latexName(label) << "}}$\n"; + else + output <<"\\par$\\maudePathWithoutLabel$\n"; + } + } + DagNode* d = graph->getStateDag(sn); + output << "\\par\\maudeResponse{state}\\maudeSpace\\maudeNumber{" << sn << "}\\maudePunctuation{,}\\maudeSpace"; + generateType(d->getSort()); + output << "\\maudePunctuation{:}$\\maudeSpace\n"; + MixfixModule::latexPrintDagNode(output, d); + output << "$\n"; + } + output <<"\\end{maudeResultParagraph}\n%\n% End of show path\n%\n"; +} + +void +MaudeLatexBuffer::generateSearchPathLabels(const RewriteSequenceSearch* graph, + const Vector& steps, + int stateNr, + bool showCommand) +{ + // + // Print comment. + // + output << "\\begin{comment}\n%\n% show path labels " << stateNr << " .\n%\n\\end{comment}\n"; + // + // Print latex version of command. + // + output << "\\begin{maudeResultParagraph}\n"; + if (showCommand) + output << "\\par\\maudeKeyword{show path labels}\\maudeSpace\\maudeNumber{" << stateNr << "}\\maudeEndCommand\\newline\n"; + // + // Print latex version of labels. + // + Index nrStates = steps.size(); + if (nrStates < 2) + output << "\\par\\maudeResponse{Empty path.}\n"; + else + { + for (Index i = nrStates - 2; i >= 0; --i) // skip the initial state + { + const int label = graph->getStateRule(steps[i])->getLabel().id(); + if (label == NONE) + output << "\\par\\maudeMisc{(unlabeled rule)}\n"; + else + output << "\\par\\maudeLabel{" << Token::latexName(label) << "}\n"; + } + } + output <<"\\end{maudeResultParagraph}\n%\n% End of show path labels\n%\n"; +} + +void +MaudeLatexBuffer::generateSearchGraph(const RewriteSequenceSearch* graph, bool showCommand) +{ + output << "\\begin{comment}\n%\n% show graph .\n%\n\\end{comment}\n"; + // + // Print latex version of command. + // + output << "\\begin{maudeResultParagraph}\n"; + if (showCommand) + output << "\\par\\maudeKeyword{show graph}\\maudeEndCommand\\newline\n"; + // + // Print latex version of graph. + // + const VisibleModule* m = safeCastNonNull(graph->getStateDag(0)->symbol()->getModule()); + int nrStates = graph->getNrStates(); + for (int i = 0; i < nrStates; ++i) + { + if (i != 0) + output << "\\newline\n"; + DagNode* d = graph->getStateDag(i); + output << "\\par\\maudeResponse{state}\\maudeSpace\\maudeNumber{" << i << "}\\maudePunctuation{,}\\maudeSpace"; + generateType(d->getSort()); + output << "\\maudePunctuation{:}$\\maudeSpace\n"; + MixfixModule::latexPrintDagNode(output, d); + output << "$\n"; + + int arcNr = 0; + for (auto& j : graph->getStateFwdArcs(i)) + { + output << "\\par$\\maudeResponse{arc}\\maudeSpace\\maudeNumber{" << arcNr << + "}\\maudeArcArrow\\maudeResponse{state}\\maudeSpace\\maudeNumber{" << j.first << "}$\n"; + for (Rule* k : j.second) + { + output << "$\\maudeSpace\\maudeLeftParen"; + m->latexPrintRule(output, nullptr, k); + output << "\\maudeRightParen$\n"; + } + ++arcNr; + } + } + output <<"\\end{maudeResultParagraph}\n%\n% End of show graph\n%\n"; +} diff --git a/src/Mixfix/latexStrategyPrint.cc b/src/Mixfix/latexStrategyPrint.cc new file mode 100644 index 00000000..8ea0d607 --- /dev/null +++ b/src/Mixfix/latexStrategyPrint.cc @@ -0,0 +1,247 @@ +/* + + This file is part of the Maude 3 interpreter. + + Copyright 2023 SRI International, Menlo Park, CA 94025, USA. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +*/ + +// +// Strategy* -> ostream& LaTeX pretty printer. +// + +bool +VisibleModule::latexPrintStrategy(ostream& s, StrategyExpression* strategy, int requiredPrec) const +{ + bool needParen = false; + + if (TrivialStrategy* t = dynamic_cast(strategy)) + s << "\\maudeKeyword{" << (t->getResult() ? "idle" : "fail") << "}"; + else if (OneStrategy* o = dynamic_cast(strategy)) + { + s << "\\maudeKeyword{one}\\maudeLeftParen("; + (void) latexPrintStrategy(s, o->getStrategy()); + s << "\\maudeRightParen"; + } + else if (ApplicationStrategy* a = dynamic_cast(strategy)) + { + bool top = a->getTop(); + if (top) + s << "\\maudeKeyword{top}\\maudeLeftParen("; + int label = a->getLabel(); + if (label == NONE) + s << "\\maudeKeyword{all}"; + else + { + s <<"\\maudeLabel{" << Token::latexName(label) << "}"; + const Vector& variables = a->getVariables(); + if (!variables.empty()) + { + const Vector& values = a->getValues(); + s << "\\maudeLeftBracket"; + Index nrAssignments = variables.size(); + for (Index i = 0; i < nrAssignments; ++i) + { + if (i != 0) + s << "\\maudeComma\\maudeSpace"; + latexPrettyPrint(s, variables[i]); + s << "\\maudeStratAssign"; + latexPrettyPrint(s, values[i].getTerm()); + } + s << "\\maudeRightBracket"; + } + const Vector& strategies = a->getStrategies(); + if (!strategies.empty()) + { + s << "\\maudeLeftBrace"; + Index nrStrategies = strategies.size(); + for (Index i = 0; i < nrStrategies; ++i) + { + if (i != 0) + s << "\\maudeComma\\maudeSpace"; + (void) latexPrintStrategy(s, strategies[i]); + } + s << "\\maudeRightBrace"; + } + } + if (top) + s << "\\maudeRightParen"; + } + else if (ConcatenationStrategy* c = dynamic_cast(strategy)) + { + needParen = requiredPrec < STRAT_SEQ_PREC; + if (needParen) + s << "\\maudeLeftParen"; + const Vector& strategies = c->getStrategies(); + Index nrStrategies = strategies.size(); + for (Index i = 0; i < nrStrategies; ++i) + { + if (i != 0) + s << "\\maudeStratConcat"; + (void) latexPrintStrategy(s, strategies[i], STRAT_SEQ_PREC); + } + } + else if (UnionStrategy* c = dynamic_cast(strategy)) + { + needParen = requiredPrec < STRAT_UNION_PREC; + if (needParen) + s << "\\maudeLeftParen"; + const Vector& strategies = c->getStrategies(); + Index nrStrategies = strategies.size(); + for (Index i = 0; i < nrStrategies; ++i) + { + if (i != 0) + s << "\\maudeStratUnion"; + (void) latexPrintStrategy(s, strategies[i], STRAT_UNION_PREC); + } + } + else if (IterationStrategy* i = dynamic_cast(strategy)) + { + if (latexPrintStrategy(s, i->getStrategy(), 0)) + s << "\\maudeSpace"; + s << (i->getZeroAllowed() ? "\\maudeStratStar" : "\\maudeStratPlus"); + } + + + else if (BranchStrategy* b = dynamic_cast(strategy)) + { + switch (b->getSuccessAction()) + { + case BranchStrategy::FAIL: + { + Assert(b->getFailureAction() == BranchStrategy::IDLE && + b->getSuccessStrategy() == 0 && + b->getFailureStrategy() == 0, "unknown branch strategy"); + s << "\\maudeKeyword{not}\\maudeLeftParen"; + (void) latexPrintStrategy(s, b->getInitialStrategy()); + s << "\\maudeRightParen"; + break; + } + case BranchStrategy::IDLE: + { + Assert(b->getFailureAction() == BranchStrategy::FAIL && + b->getSuccessStrategy() == 0 && + b->getFailureStrategy() == 0, "unknown branch strategy"); + s << "\\maudeKeyword{test}\\maudeLeftParen"; + (void) latexPrintStrategy(s, b->getInitialStrategy()); + s << "\\maudeRightParen"; + break; + } + case BranchStrategy::PASS_THRU: + { + if (b->getFailureAction() == BranchStrategy::IDLE) + { + Assert(b->getSuccessStrategy() == 0 && b->getFailureStrategy() == 0, "unknown branch strategy"); + s << "\\maudeKeyword{try}\\maudeLeftParen"; + (void) latexPrintStrategy(s, b->getInitialStrategy()); + s << "\\maudeRightParen"; + } + else + { + Assert(b->getFailureAction() == BranchStrategy::NEW_STRATEGY && + b->getSuccessStrategy() == 0, "unknown branch strategy"); + needParen = requiredPrec < STRAT_ORELSE_PREC; + if (needParen) + s << "\\maudeLeftParen"; + (void) latexPrintStrategy(s, b->getInitialStrategy(), STRAT_ORELSE_PREC); + s << "\\maudeSpace\\maudeKeyword{or-else}\\maudeSpace"; + (void) latexPrintStrategy(s, b->getFailureStrategy(), STRAT_ORELSE_PREC); + } + break; + } + case BranchStrategy::NEW_STRATEGY: + { + Assert(b->getFailureAction() == BranchStrategy::NEW_STRATEGY, "unknown branch strategy"); + needParen = requiredPrec < STRAT_BRANCH_PREC; + if (needParen) + s << "\\maudeLeftParen"; + (void) latexPrintStrategy(s, b->getInitialStrategy(), STRAT_BRANCH_PREC); + s << "\\maudeStratQuery"; + (void) latexPrintStrategy(s, b->getSuccessStrategy(), STRAT_BRANCH_PREC); + s << "\\maudeStratColon"; + (void) latexPrintStrategy(s, b->getFailureStrategy(), STRAT_BRANCH_PREC); + break; + } + case BranchStrategy::ITERATE: + { + Assert(b->getFailureAction() == BranchStrategy::IDLE && + b->getSuccessStrategy() == 0 && + b->getFailureStrategy() == 0, "unknown branch strategy"); + if (latexPrintStrategy(s, b->getInitialStrategy(), 0)) + s << "\\maudeSpace"; + s << "\\maudeStratBang"; + break; + } + default: + CantHappen("bad success action"); + } + } + else if (TestStrategy* t = dynamic_cast(strategy)) + { + needParen = requiredPrec < STRAT_TEST_PREC; + if (needParen) + s << "\\maudeLeftParen"; + s << "\\maudeKeyword{"; + int depth = t->getDepth(); + if (depth >= 0) + s << (depth == 0 ? 'x' : 'a'); + s << "match}\\maudeSpace"; + latexPrettyPrint(s, t->getPatternTerm()); + const Vector& condition = t->getCondition(); + if (!condition.empty()) + { + s << "\\maudeSpace\\maudeKeyword{such that}\\maudeSpace"; + latexPrintCondition(s, condition); + } + } + else if (SubtermStrategy* t = dynamic_cast(strategy)) + { + needParen = requiredPrec < STRAT_REW_PREC; + if (needParen) + s << "\\maudeLeftParen"; + s << "\\maudeKeyword{"; + int depth = t->getDepth(); + if (depth >= 0) + s << (depth == 0 ? 'x' : 'a'); + s << "matchrew}\\maudeSpace"; + latexPrettyPrint(s, t->getPatternTerm()); + const Vector& condition = t->getCondition(); + if (!condition.empty()) + { + s << "\\maudeSpace\\maudeKeyword{such that}\\maudeSpace"; + latexPrintCondition(s, condition); + } + const Vector& subterms = t->getSubterms(); + const Vector& strategies = t->getStrategies(); + Index nrSubterms = subterms.size(); + for (Index i = 0; i < nrSubterms; ++i) + { + s << ((i == 0) ? "\\maudeSpace\\maudeKeyword{by}\\maudeSpace" : "\\maudeComma"); + latexPrettyPrint(s, subterms[i]); + s << "\\maudeSpace\\maudeKeyword{using}\\maudeSpace"; + (void) latexPrintStrategy(s, strategies[i], STRAT_USING_PREC - 1); + } + } + else if (CallStrategy* t = dynamic_cast(strategy)) + latexPrintStrategyTerm(s, t->getStrategy(), t->getTerm()); + if (needParen) + { + s << "\\maudeRightParen"; + return false; + } + return true; +} diff --git a/src/Mixfix/latexTermPrint.cc b/src/Mixfix/latexTermPrint.cc index ad6eae3c..5281be93 100644 --- a/src/Mixfix/latexTermPrint.cc +++ b/src/Mixfix/latexTermPrint.cc @@ -23,34 +23,6 @@ // // Term* -> ostream& LaTeX pretty printer. // -#if 0 -void -MixfixModule::latexPrettyPrint(ostream& s, Terms* term) -{ - if (dagNode == 0) - { - s << "\\maudeMisc{(null DagNode*)}"; - return; - } - MixfixModule* module = static_cast(dagNode->symbol()->getModule()); - if (interpreter.getPrintFlag(Interpreter::PRINT_GRAPH)) - /*module->latexGraphPrint(s, dagNode)*/; - else - { - globalIndent = 0; - s << "$"; - MixfixModule::ColoringInfo coloringInfo; - if (interpreter.getPrintFlag(Interpreter::PRINT_COLOR)) - { - MixfixModule::computeGraphStatus(dagNode, coloringInfo.visited, coloringInfo.statusVec); - coloringInfo.reducedAbove = false; - coloringInfo.reducedDirectlyAbove = false; - } - module->latexPrettyPrint(s, coloringInfo, dagNode, UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); - s << "$"; - } -} -#endif void MixfixModule::latexPrettyPrint(ostream& s, Term* term) @@ -60,6 +32,24 @@ MixfixModule::latexPrettyPrint(ostream& s, Term* term) module->latexPrettyPrint(s, term, UNBOUNDED, UNBOUNDED, 0, UNBOUNDED, 0, false); } +void +MixfixModule::latexPrintStrategyTerm(ostream& s, RewriteStrategy* rs, Term* term) const +{ + s << Token::latexIdentifier(rs->id()); + if (rs->arity() > 0 || ruleLabels.find(rs->id()) != ruleLabels.end()) + { + s << "\\maudeLeftParen"; + const char* sep = ""; + for (ArgumentIterator it(*term); it.valid(); it.next()) + { + s << sep; + latexPrettyPrint(s, it.argument()); + sep = "\\maudeComma"; + } + s << "\\maudeRightParen"; + } +} + const char* MixfixModule::latexComputeColor(SymbolType st) { diff --git a/src/Mixfix/latexViewPrint.cc b/src/Mixfix/latexViewPrint.cc index 60a87094..194776c3 100644 --- a/src/Mixfix/latexViewPrint.cc +++ b/src/Mixfix/latexViewPrint.cc @@ -74,12 +74,15 @@ SyntacticView::latexShowProcessedView(ostream& s) MixfixModule::latexPrettyPrint(s, i.second.second); s << "$\\maudeEndStatement\n"; } - - /* FIXME for (const auto& j : getStratExprMap()) - s << " strat " << j.second.call << " to expr " << j.second.value << " .\n"; - */ - + { + const VisibleModule* vm = safeCastNonNull(toModule); + s << "\\par\\maudeIndent\\maudeKeyword{strat} $"; + vm->latexPrintStrategy(s, j.second.call); + s << "\\maudeSpace\\maudeKeyword{to expr}\\maudeSpace"; + vm->latexPrintStrategy(s, j.second.value); + s << "$\\maudeEndStatement\n"; + } s << "\\par\\maudeKeyword{endv}\n"; // // Restore original variable aliases. Check that we didn't generate parsers. diff --git a/src/Mixfix/maudeLatexBuffer.cc b/src/Mixfix/maudeLatexBuffer.cc index a7e1f806..bad09e96 100644 --- a/src/Mixfix/maudeLatexBuffer.cc +++ b/src/Mixfix/maudeLatexBuffer.cc @@ -80,6 +80,7 @@ #include "rewriteConditionFragment.hh" #include "rewriteSequenceSearch.hh" #include "pattern.hh" +#include "narrowingSequenceSearch3.hh" // strategy language class definitions #include "strategyLanguage.hh" @@ -101,12 +102,18 @@ #include "quotedIdentifierSymbol.hh" #include "quotedIdentifierTerm.hh" #include "quotedIdentifierDagNode.hh" -#include "mixfixModule.hh" +#include "visibleModule.hh" +#include "interpreter.hh" #include "maudeLatexBuffer.hh" +// our stuff +#include "latexCommand.cc" +#include "latexResult.cc" + MaudeLatexBuffer::MaudeLatexBuffer(const char* fileName) : output(fileName) { + needNewline = false; output << "\\documentclass{article}\n"; output << "\\usepackage[top=30pt,bottom=50pt,left=30pt,right=30pt]{geometry}\n"; output << "\\usepackage{maude}\n"; @@ -115,7 +122,7 @@ MaudeLatexBuffer::MaudeLatexBuffer(const char* fileName) MaudeLatexBuffer::~MaudeLatexBuffer() { - output << "\\end{document}\n"; + output << pendingClose << "\\end{document}\n"; } void @@ -131,12 +138,6 @@ MaudeLatexBuffer::generateBanner(const char* date, const char* time, time_t seco output << "\\end{maudeBanner}\n"; } -void -MaudeLatexBuffer::generateDag(DagNode* dagNode) -{ - MixfixModule::latexPrettyPrint(output, dagNode); -} - void MaudeLatexBuffer::generateModuleName(Module* module) { @@ -144,71 +145,12 @@ MaudeLatexBuffer::generateModuleName(Module* module) } void -MaudeLatexBuffer::generateModifiers(Module* module, Int64 number, Int64 number2) -{ - if (number != NONE || number2 != NONE) - { - output << "["; - if (number != NONE) - output << "\\maudeNumber{" << number << "}"; - if (number2 != NONE) - output << ", \\maudeNumber{" << number2 << "}"; - output << "] "; - } - output << "\\maudeKeyword{in} \\maudeModule{" << Token::latexName(module->id()) << - "} \\maudePunctuation{:}\n"; -} - -void -MaudeLatexBuffer::generateResult(RewritingContext& context, - const Timer& timer, - bool showStats, - bool showTiming, - bool showBreakdown) -{ - if (showStats) - generateStats(context, timer, showTiming, showBreakdown); - output << "\\par\\maudeResponse{result}\n"; - generateType(context.root()->getSort()); - output << "\\maudePunctuation{:}\n"; - generateDag(context.root()); - output << "\n\\end{maudeResultParagraph}\n"; -} - -void -MaudeLatexBuffer::generateStats(RewritingContext& context, - const Timer& timer, - bool showTiming, - bool showBreakdown) -{ - Int64 nrRewrites = context.getTotalCount(); - output << "\\par\\maudeResponse{rewrites:} \\maudeNumber{" << nrRewrites << "}"; - Int64 real; - Int64 virt; - Int64 prof; - if (showTiming && timer.getTimes(real, virt, prof)) - generateTiming(nrRewrites, prof, real); - if (showBreakdown) - { - output << "\\par\\maudeResponse{mb applications:} \\maudeNumber{" << context.getMbCount() << "}\n" << - "\\hspace{0.5em}\\maudeResponse{equational rewrites:} \\maudeNumber{" << context.getEqCount() << "}\n" << - "\\hspace{0.5em}\\maudeResponse{rule rewrites:} \\maudeNumber{" << context.getRlCount() << "}\n" << - "\\hspace{0.5em}\\maudeResponse{variant narrowing steps:} \\maudeNumber{" << context.getVariantNarrowingCount() << "}\n" << - "\\hspace{0.5em}\\maudeResponse{narrowing steps:} \\maudeNumber{" << context.getNarrowingCount() << "}\n"; - } -} - -void -MaudeLatexBuffer::generateTiming(Int64 nrRewrites, Int64 cpu, Int64 real) +MaudeLatexBuffer::generateSolutionNr(int64_t solutionNr) { - output << " \\maudeResponse{in} \\maudeNumber{" << cpu / 1000 << - "} \\maudeResponse{ms cpu} \\maudePunctuation{(}\\maudeNumber{" << - real / 100 << "} \\maudeResponse{ms real}\\maudePunctuation{)} \\maudePunctuation{(}\\maudeNumber{"; - if (cpu > 0) - output << (1000000 * nrRewrites) / cpu; - else - output << "\\textasciitilde"; - output << "} \\maudeResponse{rewrites/second}\\maudePunctuation{)}\n"; + if (needNewline) + output << "\\newline"; + output << "\\par\\maudeResponse{Solution }\\maudeNumber{" << solutionNr << "}\n"; + needNewline = true; } void @@ -222,64 +164,80 @@ MaudeLatexBuffer::generateType(Sort* sort) output << "$" << MixfixModule::latexType(sort) << "$"; } - void -MaudeLatexBuffer::generateCommand(const string command, DagNode* subject, Int64 number, Int64 number2) +MaudeLatexBuffer::generateSubstitution(const Substitution& substitution, + const VariableInfo& varInfo, + const NatSet& ignoredIndices) { - Module* module = subject->symbol()->getModule(); - - Tty::blockEscapeSequences(); - output << "\\begin{maudeResultParagraph}\n\\begin{comment}\n " << command << " "; - safeCastNonNull(module)->printModifiers(output, number, number2); - output << subject << " .\n\\end{comment}\n"; - Tty::unblockEscapeSequences(); - - output << "\\par\\maudeKeyword{" << command << "} "; - if (number != NONE || number2 != NONE) + int nrVars = varInfo.getNrRealVariables(); + bool printedVariable = false; + for (int i = 0; i < nrVars; ++i) { - output << "\\maudePunctuation{[}"; - if (number != NONE) - output << "\\maudeNumber{" << number << "}"; - if (number2 != NONE) - output << "\\maudePunctuation{,} \\maudeNumber{" << number2 << "}"; - output << "\\maudePunctuation{]} "; + if (ignoredIndices.contains(i)) + continue; + + Term* v = varInfo.index2Variable(i); + DagNode* d = substitution.value(i); + Assert(v != 0, "null variable"); + + output << "\\par$"; + MixfixModule::latexPrettyPrint(output, v); + output << "\\maudeIsAssigned"; + if (d == 0) + output << "\\maudeMisc{(unbound)}\n"; + else + MixfixModule::latexPrintDagNode(output, d); + output << "$\n"; + printedVariable = true; } - output << "\\maudeKeyword{in} \\maudeModule{" << Token::latexName(module->id()) << - "} \\maudePunctuation{:}\n"; - generateDag(subject); - output << " \\maudePunctuation{.}\n"; -} - -void -MaudeLatexBuffer::generateReduce(DagNode* subject) -{ - generateCommand("reduce", subject); + if (!printedVariable) + output << "\\par\\maudeMisc{empty substitution}\n"; } void -MaudeLatexBuffer::generateRewrite(DagNode* subject, Int64 limit) +MaudeLatexBuffer::generateSubstitution(const Substitution& substitution, + const NarrowingVariableInfo& varInfo) { - generateCommand("rewrite", subject, limit); + int nrVariables = substitution.nrFragileBindings(); + for (int i = 0; i < nrVariables; ++i) + { + DagNode* v = varInfo.index2Variable(i); + DagNode* b = substitution.value(i); + output << "\\par$"; + MixfixModule::latexPrintDagNode(output, v); + output << "\\maudeIsAssigned"; + MixfixModule::latexPrintDagNode(output, b); + output << "$\n"; + } } void -MaudeLatexBuffer::generateFrewrite(DagNode* subject, Int64 limit, Int64 gas) +MaudeLatexBuffer::generateSubstitution(const Vector& substitution, + const NarrowingVariableInfo& variableInfo) { - generateCommand("frewrite", subject, limit, gas); - + Index nrVariables = substitution.size(); + for (Index i = 0; i < nrVariables; ++i) + { + DagNode* v = variableInfo.index2Variable(i); + DagNode* b = substitution[i]; + output << "\\par$"; + MixfixModule::latexPrintDagNode(output, v); + output << "\\maudeIsAssigned"; + MixfixModule::latexPrintDagNode(output, b); + output << "$\n"; + } } void -MaudeLatexBuffer::generateErewrite(DagNode* subject, Int64 limit, Int64 gas) +MaudeLatexBuffer::generateWarning(const char* message) { - generateCommand("erewrite", subject, limit, gas); + output << "\\par\\color{red}\\maudeResponse{Warning: }\\color{black}\\maudeMisc{" << message << "}\n"; } void -MaudeLatexBuffer::generateContinue(Int64 limit) +MaudeLatexBuffer::generateState(DagNode* stateDag) { - Tty::blockEscapeSequences(); - output << "\\begin{maudeResultParagraph}\n\\begin{comment}\n continue " << limit << " .\n\\end{comment}\n"; - Tty::unblockEscapeSequences(); - output << "\\par\\maudeKeyword{continue} \\maudeNumber{" << limit << "} \\maudePunctuation{.}\n"; + output << "\\par$\\maudeResponse{state:}\\maudeSpace"; + MixfixModule::latexPrintDagNode(output, stateDag); + output << "$\n"; } diff --git a/src/Mixfix/maudeLatexBuffer.hh b/src/Mixfix/maudeLatexBuffer.hh index d213b74d..bd63dcbc 100644 --- a/src/Mixfix/maudeLatexBuffer.hh +++ b/src/Mixfix/maudeLatexBuffer.hh @@ -25,6 +25,7 @@ // #ifndef _maudeLatexBuffer_hh_ #define _maudeLatexBuffer_hh_ +#include "interpreter.hh" class MaudeLatexBuffer { @@ -37,35 +38,103 @@ public: ostream& getStream(); void generateBanner(const char* date, const char* time, time_t seconds); - void generateDag(DagNode* dag); + void generateHeading(const char* message); void generateModuleName(Module* module); - - void generateModifiers(Module* module, Int64 number = NONE, Int64 number2 = NONE); - - void generateCommand(const string command, DagNode* subject, Int64 number = NONE, Int64 number2 = NONE); - - void generateReduce(DagNode* subject); - void generateContinue(Int64 limit); - void generateRewrite(DagNode* subject, Int64 limit); - void generateFrewrite(DagNode* subject, Int64 limit, Int64 gas); - void generateErewrite(DagNode* subject, Int64 limit, Int64 gas); - + void generateState(DagNode* stateDag); + // + // Functions to start latex for commands. + // + void generateCommand(bool showCommand, + const string& command, + DagNode* subject, + Int64 number = NONE, + Int64 number2 = NONE, + StrategyExpression* strategy = 0); + void generateSearch(bool showCommand, + Interpreter::SearchKind searchKind, + DagNode* subject, + int searchType, + Term* target, + const Vector& condition, + int variantFlags, + int64_t limit, + int64_t depth, + bool debug); + void generateContinue(bool showCommand, Int64 limit, bool debug); + void generateShow(bool showCommand, const string& command, Module* module); + void generateShow(bool showCommand, const string& command, View* module); + // + // Functions to print results. + // + void generateSolutionNr(int64_t solutionNr); + void generateStats(RewritingContext& context, + int64_t cpuTime, + int64_t realTime, + bool showTiming, + bool showBreakdown, + int64_t nrStates = NONE); void generateResult(RewritingContext& context, - const Timer& timer, + DagNode* result, + int64_t cpuTime, + int64_t realTime, bool showStats, bool showTiming, bool showBreakdown); + void generateNonResult(RewritingContext& context, + const string& message, + int64_t cpuTime, + int64_t realTime, + bool showStats, + bool showTiming, + bool showBreakdown); + void generateSearchNonResult(RewriteSequenceSearch* state, + const string& message, + int64_t cpuTime, + int64_t realTime, + bool showStats, + bool showTiming, + bool showBreakdown); + void generateSearchResult(RewriteSequenceSearch* state, + int64_t solutionNr, + int64_t cpuTime, + int64_t realTime, + bool showStats, + bool showTiming, + bool showBreakdown); + // + // Commands for interogating a search graph. + // + void generateSearchPath(const RewriteSequenceSearch* graph, + const Vector& steps, + int stateNr, + bool showCommand, + bool showRule); + void generateSearchPathLabels(const RewriteSequenceSearch* graph, + const Vector& steps, + int stateNr, + bool showCommand); + void generateSearchGraph(const RewriteSequenceSearch* graph, bool showCommand); + // + // Three different representations of substitutions. + // + void generateSubstitution(const Substitution& substitution, + const VariableInfo& varInfo, + const NatSet& ignoredIndices = NatSet()); + void generateSubstitution(const Substitution& substitution, + const NarrowingVariableInfo& varInfo); + void generateSubstitution(const Vector& substitution, + const NarrowingVariableInfo& variableInfo); + + + void generateWarning(const char* message); + void cleanUp(); - void generateStats(RewritingContext& context, - const Timer& timer, - bool showTiming, - bool showBreakdown); - - void generateTiming(Int64 nrRewrites, Int64 cpu, Int64 real); +private: void generateType(Sort* sort); -private: ofstream output; + string pendingClose; + bool needNewline; }; inline ostream& @@ -74,4 +143,17 @@ MaudeLatexBuffer::getStream() return output; } +inline void +MaudeLatexBuffer::cleanUp() +{ + output << pendingClose; + pendingClose.clear(); +} + +inline void +MaudeLatexBuffer::generateHeading(const char* message) +{ + output << "\\par\\maudeResponse{" << message << "}\n"; +} + #endif diff --git a/src/Mixfix/mixfix.hh b/src/Mixfix/mixfix.hh index 019803d4..89073fe0 100644 --- a/src/Mixfix/mixfix.hh +++ b/src/Mixfix/mixfix.hh @@ -73,6 +73,7 @@ class ParameterDatabase; class ObjectConstructorSymbol; class StatementTransformer; class MaudeLatexBuffer; +class CommutativeDecomposeEqualitySymbol; // // Support for quantifying just active computations (rather than diff --git a/src/Mixfix/mixfixModule.cc b/src/Mixfix/mixfixModule.cc index 34cf6a75..b6f3baf2 100644 --- a/src/Mixfix/mixfixModule.cc +++ b/src/Mixfix/mixfixModule.cc @@ -165,6 +165,7 @@ #include "userLevelRewritingContext.hh" #include "freshVariableSource.hh" #include "objectConstructorSymbol.hh" +#include "commutativeDecomposeEqualitySymbol.hh" #include "importModule.hh" #include "interpreter.hh" @@ -206,6 +207,7 @@ MixfixModule::nonTerminal(const Sort* sort, NonTerminalType type) #include "latexCommon.cc" #include "latexTermPrint.cc" #include "latexDagNodePrint.cc" +//#include "latexStrategyPrint.cc" #include "makeGrammar.cc" #include "doParse.cc" #include "entry.cc" diff --git a/src/Mixfix/mixfixModule.hh b/src/Mixfix/mixfixModule.hh index a7902c22..c087c777 100644 --- a/src/Mixfix/mixfixModule.hh +++ b/src/Mixfix/mixfixModule.hh @@ -200,7 +200,8 @@ public: ModuleType getModuleType() const; static const char* moduleTypeString(ModuleType type); static const char* moduleEndString(ModuleType type); - SymbolType getSymbolType(Symbol* symbol) const; + SymbolType getSymbolType(const Symbol* symbol) const; + int getPolymorphIndex(const Symbol* symbol) const; int getPrec(const Symbol* symbol) const; void getGather(const Symbol* symbol, Vector& gather) const; const Vector& getFormat(const Symbol* symbol) const; @@ -295,6 +296,7 @@ public: // static void latexPrettyPrint(ostream& s, DagNode* dagNode); static void latexPrettyPrint(ostream& s, Term* term); + static void latexPrintDagNode(ostream& s, DagNode* dagNode); // // Misc. // @@ -924,6 +926,7 @@ private: void latexHandleQuotedIdentifier(ostream& s, Term* term, bool rangeKnown, const char* color) const; void latexHandleVariable(ostream& s, Term* term, bool rangeKnown, const char* color) const; void latexHandleSMT_Number(ostream& s, Term* term, bool rangeKnown, const char* color); + protected: void latexPrettyPrint(ostream& s, Term* term, @@ -933,6 +936,8 @@ protected: int rightCapture, const ConnectedComponent* rightCaptureComponent, bool rangeKnown); + void latexPrintStrategyTerm(ostream& s, RewriteStrategy* rs, Term* term) const; + private: // // Member functions for DagNode* -> LaTeX pretty printer. @@ -994,13 +999,24 @@ private: }; inline SymbolType -MixfixModule::getSymbolType(Symbol* symbol) const +MixfixModule::getSymbolType(const Symbol* symbol) const { Assert(symbol->getModule() == this, "symbol " << symbol << " belongs to " << symbol->getModule() << " and not " << this); return symbolInfo[symbol->getIndexWithinModule()].symbolType; } +inline int +MixfixModule::getPolymorphIndex(const Symbol* symbol) const +{ + // + // If symbol is an instantiation of a polymorph, return its index or else return NONE. + // + Assert(symbol->getModule() == this, "symbol " << symbol << + " belongs to " << symbol->getModule() << " and not " << this); + return symbolInfo[symbol->getIndexWithinModule()].polymorphIndex; +} + inline Token MixfixModule::getPolymorphName(int index) const { diff --git a/src/Mixfix/narrowing.cc b/src/Mixfix/narrowing.cc index b9201879..408ae98e 100644 --- a/src/Mixfix/narrowing.cc +++ b/src/Mixfix/narrowing.cc @@ -2,7 +2,7 @@ This file is part of the Maude 3 interpreter. - Copyright 2017 SRI International, Menlo Park, CA 94025, USA. + Copyright 2017-2023 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -39,25 +39,52 @@ Interpreter::doNarrowing(Timer& timer, bool result = state->findNextMatch(); if (UserLevelRewritingContext::aborted()) break; + Int64 real = 0; + Int64 virt = 0; + Int64 prof = 0; + bool showTiming = getFlag(SHOW_TIMING) && timer.getTimes(real, virt, prof); if (!result) { - cout << ((solutionCount == 0) ? "\nNo solution.\n" : "\nNo more solutions.\n"); - printStats(timer, *context, getFlag(SHOW_TIMING)); + const char* reply = (solutionCount == 0) ? "No solution." : "No more solutions."; + cout << "\n" << reply << endl; + printStats(*context, prof, real, showTiming); if (state->isIncomplete()) IssueWarning("Some solutions may have been missed due to incomplete unification algorithm(s)."); + if (latexBuffer) + { + latexBuffer->generateNonResult(*context, + reply, + prof, + real, + getFlag(SHOW_STATS), + showTiming, + getFlag(SHOW_BREAKDOWN)); + if (state->isIncomplete()) + latexBuffer->generateWarning("Some solutions may have been missed due to incomplete unification algorithm(s)."); + } break; } ++solutionCount; cout << "\nSolution " << solutionCount << "\n"; - printStats(timer, *context, getFlag(SHOW_TIMING)); + printStats(*context, prof, real, showTiming); DagNode* d = state->getStateDag(); cout << "state: " << d << endl; UserLevelRewritingContext::printSubstitution(*(state->getSubstitution()), *variableInfo); + if (latexBuffer) + { + latexBuffer->generateSolutionNr(solutionCount); + if (getFlag(SHOW_STATS)) + latexBuffer->generateStats(*context, prof, real, showTiming, getFlag(SHOW_BREAKDOWN)); + latexBuffer->generateState(d); + latexBuffer->generateSubstitution(*(state->getSubstitution()), *variableInfo); + } } QUANTIFY_STOP(); + if (latexBuffer) + latexBuffer->cleanUp(); clearContinueInfo(); // just in case debugger left info if (i == limit) { @@ -92,6 +119,8 @@ Interpreter::narrowingCont(Int64 limit, bool debug) savedState = 0; savedModule = 0; continueFunc = 0; + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); if (debug) UserLevelRewritingContext::setDebug(); @@ -108,6 +137,8 @@ Interpreter::vuNarrowingCont(Int64 limit, bool debug) savedState = 0; savedModule = 0; continueFunc = 0; + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); if (debug) UserLevelRewritingContext::setDebug(); @@ -116,7 +147,6 @@ Interpreter::vuNarrowingCont(Int64 limit, bool debug) doVuNarrowing(timer, fm, state, savedSolutionCount, limit); } - void Interpreter::doVuNarrowing(Timer& timer, VisibleModule* module, @@ -131,18 +161,35 @@ Interpreter::doVuNarrowing(Timer& timer, bool result = state->findNextUnifier(); if (UserLevelRewritingContext::aborted()) break; + Int64 real = 0; + Int64 virt = 0; + Int64 prof = 0; + bool showTiming = getFlag(SHOW_TIMING) && timer.getTimes(real, virt, prof); if (!result) { - cout << ((solutionCount == 0) ? "\nNo solution.\n" : "\nNo more solutions.\n"); - printStats(timer, *context, getFlag(SHOW_TIMING)); + const char* reply = (solutionCount == 0) ? "No solution." : "No more solutions."; + cout << "\n" << reply << endl; + printStats(*context, prof, real, showTiming); if (state->isIncomplete()) IssueWarning("Some solutions may have been missed due to incomplete unification algorithm(s)."); + if (latexBuffer) + { + latexBuffer->generateNonResult(*context, + reply, + prof, + real, + getFlag(SHOW_STATS), + showTiming, + getFlag(SHOW_BREAKDOWN)); + if (state->isIncomplete()) + latexBuffer->generateWarning("Some solutions may have been missed due to incomplete unification algorithm(s)."); + } break; } ++solutionCount; cout << "\nSolution " << solutionCount << "\n"; - printStats(timer, *context, getFlag(SHOW_TIMING)); + printStats(*context, prof, real, showTiming); DagNode* stateDag; int variableFamily; @@ -154,9 +201,22 @@ Interpreter::doVuNarrowing(Timer& timer, UserLevelRewritingContext::printSubstitution(*accumulatedSubstitution, state->getInitialVariableInfo()); cout << "variant unifier:" << endl; UserLevelRewritingContext::printSubstitution(*(state->getUnifier()), state->getUnifierVariableInfo()); + if (latexBuffer) + { + latexBuffer->generateSolutionNr(solutionCount); + if (getFlag(SHOW_STATS)) + latexBuffer->generateStats(*context, prof, real, showTiming, getFlag(SHOW_BREAKDOWN)); + latexBuffer->generateState(stateDag); + latexBuffer->generateHeading("accumulated substitution:"); + latexBuffer->generateSubstitution(*accumulatedSubstitution, state->getInitialVariableInfo()); + latexBuffer->generateHeading("variant unifier:"); + latexBuffer->generateSubstitution(*(state->getUnifier()), state->getUnifierVariableInfo()); + } } QUANTIFY_STOP(); + if (latexBuffer) + latexBuffer->cleanUp(); clearContinueInfo(); // just in case debugger left info if (i == limit) // possible to continue { diff --git a/src/Mixfix/search.cc b/src/Mixfix/search.cc index fed83574..8619d3ad 100644 --- a/src/Mixfix/search.cc +++ b/src/Mixfix/search.cc @@ -157,7 +157,8 @@ Interpreter::search(const Vector& bubble, DagNode* subjectDag = makeDag(initial); static const char* searchTypeSymbol[] = { "=>1", "=>+", "=>*", "=>!" }; - if (getFlag(SHOW_COMMAND)) + bool showCommand = getFlag(SHOW_COMMAND); + if (showCommand) { static const char* searchKindName[] = { "search", "narrow", "xg-narrow", @@ -195,6 +196,19 @@ Interpreter::search(const Vector& bubble, if (xmlBuffer != 0) xmlBuffer->generateSearch(subjectDag, pattern, searchTypeSymbol[searchType], limit, depth); // does this work for narrowing? } + if (latexBuffer != 0) + { + latexBuffer->generateSearch(showCommand, + searchKind, + subjectDag, + searchType, + target, + condition, + variantFlags, + limit, + depth, + debug); + } startUsingModule(fm); if (debug) @@ -284,9 +298,14 @@ Interpreter::doSearching(Timer& timer, bool result = state->findNextMatch(); if (UserLevelRewritingContext::aborted()) break; // HACK: Is this safe - shouldn't we destroy context? + Int64 real = 0; + Int64 virt = 0; + Int64 prof = 0; + bool showTiming = getFlag(SHOW_TIMING) && timer.getTimes(real, virt, prof); if (!result) { - cout << ((solutionCount == 0) ? "\nNo solution.\n" : "\nNo more solutions.\n"); + const char* reply = (solutionCount == 0) ? "No solution." : "No more solutions."; + cout << "\n" << reply << endl; printSearchTiming(timer, state); if (xmlBuffer != 0) { @@ -297,6 +316,16 @@ Interpreter::doSearching(Timer& timer, getFlag(SHOW_TIMING), getFlag(SHOW_BREAKDOWN)); } + if (latexBuffer != 0) + { + latexBuffer->generateSearchNonResult(state, + reply, + prof, + real, + getFlag(SHOW_STATS), + showTiming, + getFlag(SHOW_BREAKDOWN)); + } break; } @@ -313,9 +342,21 @@ Interpreter::doSearching(Timer& timer, getFlag(SHOW_TIMING), getFlag(SHOW_BREAKDOWN)); } + if (latexBuffer != 0) + { + latexBuffer->generateSearchResult(state, + solutionCount, + prof, + real, + getFlag(SHOW_STATS), + showTiming, + getFlag(SHOW_BREAKDOWN)); + latexBuffer->generateSubstitution(*(state->getSubstitution()), *variableInfo); + } } QUANTIFY_STOP(); - + if (latexBuffer) + latexBuffer->cleanUp(); clearContinueInfo(); // just in case debugger left info // // We always save these things even if we can't continue @@ -347,6 +388,8 @@ Interpreter::searchCont(Int64 limit, bool debug) continueFunc = 0; if (xmlBuffer != 0 && getFlag(SHOW_COMMAND)) xmlBuffer->generateContinue("search", fm, limit); + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); if (debug) UserLevelRewritingContext::setDebug(); @@ -396,6 +439,14 @@ Interpreter::showSearchPath(int stateNr, bool showRule) DagNode* d = savedRewriteSequenceSearch->getStateDag(sn); cout << "state " << sn << ", " << d->getSort() << ": " << d << '\n'; } + if (latexBuffer) + { + latexBuffer->generateSearchPath(savedRewriteSequenceSearch, + steps, + stateNr, + getFlag(SHOW_COMMAND), + showRule); + } if (xmlBuffer != 0) xmlBuffer->generateSearchPath(savedRewriteSequenceSearch, stateNr); } @@ -432,6 +483,13 @@ Interpreter::showSearchPathLabels(int stateNr) cout << &label << '\n'; } } + if (latexBuffer) + { + latexBuffer->generateSearchPathLabels(savedRewriteSequenceSearch, + steps, + stateNr, + getFlag(SHOW_COMMAND)); + } } void @@ -468,4 +526,6 @@ Interpreter::showSearchGraph() } if (xmlBuffer != 0) xmlBuffer->generateSearchGraph(savedRewriteSequenceSearch); + if (latexBuffer) + latexBuffer->generateSearchGraph(savedRewriteSequenceSearch, getFlag(SHOW_COMMAND)); } diff --git a/src/Mixfix/specialSymbolTypes.cc b/src/Mixfix/specialSymbolTypes.cc index 2c0823fe..797a18c4 100644 --- a/src/Mixfix/specialSymbolTypes.cc +++ b/src/Mixfix/specialSymbolTypes.cc @@ -32,6 +32,7 @@ MACRO(SystemFalse, SymbolType::SYSTEM_FALSE) MACRO(BranchSymbol, SymbolType::BRANCH_SYMBOL) MACRO(EqualitySymbol, SymbolType::EQUALITY_SYMBOL) + MACRO(CommutativeDecomposeEqualitySymbol, SymbolType::COMMUTATIVE_DECOMPOSE_EQUALITY_SYMBOL) MACRO(FloatSymbol, SymbolType::FLOAT) MACRO(FloatOpSymbol, SymbolType::FLOAT_OP) MACRO(StringSymbol, SymbolType::STRING) diff --git a/src/Mixfix/srewrite.cc b/src/Mixfix/srewrite.cc index e6ecf034..4c26d994 100644 --- a/src/Mixfix/srewrite.cc +++ b/src/Mixfix/srewrite.cc @@ -2,7 +2,7 @@ This file is part of the Maude 3 interpreter. - Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. + Copyright 1997-2023 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,8 @@ Interpreter::sRewrite(const Vector& subjectAndStrategy, Int64 limit, bool DagNode* subjectDag = makeDag(subject); - if (getFlag(SHOW_COMMAND)) + bool showCommand = getFlag(SHOW_COMMAND); + if (showCommand) { UserLevelRewritingContext::beginCommand(); if (debug) @@ -58,11 +59,16 @@ Interpreter::sRewrite(const Vector& subjectAndStrategy, Int64 limit, bool } if (xmlBuffer != 0) xmlBuffer->generateSRewrite(subjectDag, strategy, limit, depthSearch); - + if (latexBuffer != 0) + { + string command = depthSearch ? "dsrewrite" : "srewrite"; + if (debug) + command = "debug " + command; + latexBuffer->generateCommand(showCommand, command, subjectDag, limit, depthSearch, strategy); + } + startUsingModule(fm); - strategy->process(); - if (debug) UserLevelRewritingContext::setDebug(); @@ -101,12 +107,26 @@ Interpreter::doStrategicSearch(Timer& timer, DagNode* d = state->findNextSolution(); if (context->traceAbort()) break; + Int64 real = 0; + Int64 virt = 0; + Int64 prof = 0; + bool showTiming = getFlag(SHOW_TIMING) && timer.getTimes(real, virt, prof); if (d == 0) { - cout << endl << (solutionCount > 0 - ? "No more solutions." : "No solution.") << endl; + const char* reply = (solutionCount > 0 ? "No more solutions." : "No solution."); + cout << "\n" << reply << endl; if (getFlag(SHOW_STATS)) - printStats(timer, *context, getFlag(SHOW_TIMING)); + printStats(*context, prof, real, showTiming); + if (latexBuffer != 0) + { + latexBuffer->generateNonResult(*context, + reply, + prof, + real, + getFlag(SHOW_STATS), + showTiming, + getFlag(SHOW_BREAKDOWN)); + } break; } @@ -117,13 +137,26 @@ Interpreter::doStrategicSearch(Timer& timer, cout << "result " << d->getSort() << ": " << d << '\n'; if (xmlBuffer != 0) { - xmlBuffer->generateResult(*context, + xmlBuffer->generateResult(*context, // FIXME: result not necessarily in context timer, getFlag(SHOW_STATS), getFlag(SHOW_TIMING), getFlag(SHOW_BREAKDOWN)); } + if (latexBuffer != 0) + { + latexBuffer->generateSolutionNr(solutionCount); + latexBuffer->generateResult(*context, + d, + prof, + real, + getFlag(SHOW_STATS), + showTiming, + getFlag(SHOW_BREAKDOWN)); + } } + if (latexBuffer) + latexBuffer->cleanUp(); clearContinueInfo(); // just in case debugger left info if (i == limit) { @@ -163,7 +196,8 @@ Interpreter::sRewriteCont(Int64 limit, bool debug) UserLevelRewritingContext::setDebug(); if (xmlBuffer != 0 && getFlag(SHOW_COMMAND)) xmlBuffer->generateContinue("srewrite", fm, limit); - + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); Timer timer(getFlag(SHOW_TIMING)); doStrategicSearch(timer, fm, state, savedSolutionCount, limit, false); } @@ -181,7 +215,8 @@ Interpreter::dsRewriteCont(Int64 limit, bool debug) UserLevelRewritingContext::setDebug(); if (xmlBuffer != 0 && getFlag(SHOW_COMMAND)) xmlBuffer->generateContinue("dsrewrite", fm, limit); - + if (latexBuffer) + latexBuffer->generateContinue(getFlag(SHOW_COMMAND), limit, debug); Timer timer(getFlag(SHOW_TIMING)); doStrategicSearch(timer, fm, state, savedSolutionCount, limit, true); } diff --git a/src/Mixfix/strategyPrint.cc b/src/Mixfix/strategyPrint.cc index 10545163..875f9a51 100644 --- a/src/Mixfix/strategyPrint.cc +++ b/src/Mixfix/strategyPrint.cc @@ -36,7 +36,6 @@ operator<<(ostream& s, StrategyExpression* strategy) return s; } - bool MixfixModule::prettyPrint(ostream& s, StrategyExpression* strategy, int requiredPrec) { diff --git a/src/Mixfix/symbolType.hh b/src/Mixfix/symbolType.hh index 97b327e7..af1bb278 100644 --- a/src/Mixfix/symbolType.hh +++ b/src/Mixfix/symbolType.hh @@ -58,6 +58,8 @@ public: // BRANCH_SYMBOL, EQUALITY_SYMBOL, + DECOMPOSE_EQUALITY_SYMBOL, + COMMUTATIVE_DECOMPOSE_EQUALITY_SYMBOL, FLOAT_OP, STRING_OP, QUOTED_IDENTIFIER, @@ -259,7 +261,7 @@ inline bool SymbolType::nonAlgebraic() const { // - // These symbols with these types store nonalebraic "hidden" data. + // These symbols with these types store nonalgebraic "hidden" data. // int t = getBasicType(); return t == STRING || t == FLOAT || t == QUOTED_IDENTIFIER; diff --git a/src/Mixfix/syntacticView.cc b/src/Mixfix/syntacticView.cc index d30eb4ce..d533e412 100644 --- a/src/Mixfix/syntacticView.cc +++ b/src/Mixfix/syntacticView.cc @@ -57,8 +57,9 @@ #include "interpreter.hh" #include "mixfixParser.hh" #include "syntacticView.hh" - #include "visibleModule.hh" + +// our stuff #include "latexViewPrint.cc" SyntacticView::SyntacticView(Token viewName, Interpreter* owner) diff --git a/src/Mixfix/visibleModule.cc b/src/Mixfix/visibleModule.cc index 7e98b240..1fe2d8fe 100644 --- a/src/Mixfix/visibleModule.cc +++ b/src/Mixfix/visibleModule.cc @@ -34,6 +34,7 @@ #include "variable.hh" #include "strategyLanguage.hh" #include "higher.hh" +#include "strategyLanguage.hh" #include "mixfix.hh" // interface class definitions @@ -54,11 +55,25 @@ #include "assignmentConditionFragment.hh" #include "rewriteConditionFragment.hh" +// strategy language class definitions +#include "trivialStrategy.hh" +#include "applicationStrategy.hh" +#include "concatenationStrategy.hh" +#include "unionStrategy.hh" +#include "iterationStrategy.hh" +#include "branchStrategy.hh" +#include "testStrategy.hh" +#include "subtermStrategy.hh" +#include "callStrategy.hh" +#include "oneStrategy.hh" + // front end class definitions #include "userLevelRewritingContext.hh" #include "visibleModule.hh" +// our stuff #include "latexModulePrint.cc" +#include "latexStrategyPrint.cc" VisibleModule::VisibleModule(int name, ModuleType moduleType, Interpreter* owner) : ImportModule(name, moduleType), diff --git a/src/Mixfix/visibleModule.hh b/src/Mixfix/visibleModule.hh index 4709abfe..6fef8f54 100644 --- a/src/Mixfix/visibleModule.hh +++ b/src/Mixfix/visibleModule.hh @@ -50,14 +50,23 @@ public: void showStrats(ostream& s, bool indent, bool all) const; void showSds(ostream& s, bool indent, bool all) const; - void latexShowOps(ostream& s, const char* indent, bool all); - void latexShowPolymorphs(ostream& s, const char* indent, bool all); + void latexShowSummary(ostream& s); + void latexShowKinds(ostream& s) const; void latexShowSortsAndSubsorts(ostream& s) const; - void latexShowMbs(ostream& s, const char* indent, bool all); - void latexShowEqs(ostream& s, const char* indent, bool all); - void latexShowRls(ostream& s, const char* indent, bool all); void latexShowModule(ostream& s, bool all); - + void latexShowPolymorphs(ostream& s, const char* indent, bool all); + void latexShowOps(ostream& s, const char* indent, bool all); + void latexShowVars(ostream& s, const char* indent) const; + void latexShowMbs(ostream& s, const char* indent, bool all) const; + void latexShowEqs(ostream& s, const char* indent, bool all) const; + void latexShowRls(ostream& s, const char* indent, bool all) const; + void latexShowStrats(ostream& s, const char* indent, bool all); + void latexShowSds(ostream& s, const char* indent, bool all); + + void latexPrintRule(ostream& s, const char* indent, const Rule* rl) const; + bool latexPrintStrategy(ostream& s, StrategyExpression* strategy, int requiredPrec = UNBOUNDED) const; + + static void latexPrintCondition(ostream& s, const Vector& condition); static void latexPrintModuleName(ostream& s, Module* module); private: @@ -74,12 +83,8 @@ private: void latexShowDecls(ostream& s, const char* indent, Index index, bool all); void latexShowPolymorphDecl(ostream& s, const char* indent, Index index); - void latexShowVars(ostream& s) const; - void latexPrintConditionFragment(ostream& s, const ConditionFragment* c); - void latexPrintCondition(ostream& s, const Vector& condition); - void latexPrintCondition(ostream& s, const PreEquation* pe); - void latexPrintAttributes(ostream& s, + static void latexPrintAttributes(ostream& s, const PreEquation* pe, int metadata, const PrintAttribute* printAttribute, @@ -87,13 +92,17 @@ private: bool variant = false, bool narrowing = false); - void latexPrintMembershipAxiom(ostream& s, const char* indent, const SortConstraint* mb); - void latexPrintEquation(ostream& s, const char* indent, const Equation* eq); - void latexPrintRule(ostream& s, const char* indent, const Rule* rl); + void latexPrintMembershipAxiom(ostream& s, const char* indent, const SortConstraint* mb) const; + void latexPrintEquation(ostream& s, const char* indent, const Equation* eq) const; + void latexPrintStrategyDecl(ostream& s, const char* indent, const RewriteStrategy* rs); + void latexPrintStrategyDefinition(ostream& s, const char* indent, const StrategyDefinition* e); + void latexShowImports(ostream& s) const; void latexShowAttributes(ostream& s, Symbol* symbol, Index opDeclIndex); void latexShowPolymorphAttributes(ostream& s, int index); + static void latexPrintConditionFragment(ostream& s, const ConditionFragment* c); + static void latexPrintCondition(ostream& s, const PreEquation* pe); static void latexPrintViewName(ostream& s, View* view); Interpreter* const owner; diff --git a/src/NA_Theory/ChangeLog b/src/NA_Theory/ChangeLog index 2b141368..680f2985 100644 --- a/src/NA_Theory/ChangeLog +++ b/src/NA_Theory/ChangeLog @@ -1,3 +1,11 @@ +2023-07-24 Steven Eker + + * NA_Symbol.cc (NA_Symbol::determineGround): added + + * NA_Symbol.hh (class NA_Symbol): added decl for determineGround() + +===================================Maude151=========================================== + 2017-02-17 Steven Eker * NA_DagNode.cc (stackArguments): deleted diff --git a/src/NA_Theory/Makefile.in b/src/NA_Theory/Makefile.in index 4f56586b..3ce886f4 100644 --- a/src/NA_Theory/Makefile.in +++ b/src/NA_Theory/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -199,6 +199,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -207,10 +208,12 @@ 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@ diff --git a/src/NA_Theory/NA_Symbol.cc b/src/NA_Theory/NA_Symbol.cc index 4301a87d..b9d0d8e2 100644 --- a/src/NA_Theory/NA_Symbol.cc +++ b/src/NA_Theory/NA_Symbol.cc @@ -82,6 +82,13 @@ NA_Symbol::isStable() const return true; } +bool +NA_Symbol::determineGround(DagNode* dagNode) +{ + dagNode->setGround(); + return true; +} + // // Hash cons code. // diff --git a/src/NA_Theory/NA_Symbol.hh b/src/NA_Theory/NA_Symbol.hh index f8249de7..558df504 100644 --- a/src/NA_Theory/NA_Symbol.hh +++ b/src/NA_Theory/NA_Symbol.hh @@ -38,6 +38,7 @@ public: void computeBaseSort(DagNode* subject); void normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context); bool isStable() const; + bool determineGround(DagNode* dagNode); // // Hash cons stuff. // diff --git a/src/ObjectSystem/Makefile.in b/src/ObjectSystem/Makefile.in index 2ee50bad..32cf0fb9 100644 --- a/src/ObjectSystem/Makefile.in +++ b/src/ObjectSystem/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -212,6 +212,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -220,10 +221,12 @@ 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@ diff --git a/src/Parser/Makefile.in b/src/Parser/Makefile.in index 174feff9..241b86b6 100644 --- a/src/Parser/Makefile.in +++ b/src/Parser/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -191,6 +191,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -199,10 +200,12 @@ 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@ diff --git a/src/SMT/Makefile.in b/src/SMT/Makefile.in index 5d2a3b07..690a08cd 100644 --- a/src/SMT/Makefile.in +++ b/src/SMT/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -203,6 +203,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -211,10 +212,12 @@ 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@ diff --git a/src/S_Theory/ChangeLog b/src/S_Theory/ChangeLog index bce26872..19be80f5 100755 --- a/src/S_Theory/ChangeLog +++ b/src/S_Theory/ChangeLog @@ -1,3 +1,11 @@ +2023-07-24 Steven Eker + + * S_Symbol.cc (S_Symbol::determineGround): added + + * S_Symbol.hh (class S_Symbol): added decl for determineGround() + +===================================Maude151=========================================== + 2021-09-21 Steven Eker * S_ExtensionInfo.cc (S_ExtensionInfo::copy): take const arg diff --git a/src/S_Theory/Makefile.in b/src/S_Theory/Makefile.in index 7c9ccef2..2e6e3332 100644 --- a/src/S_Theory/Makefile.in +++ b/src/S_Theory/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -207,6 +207,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -215,10 +216,12 @@ 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@ diff --git a/src/S_Theory/S_DagNode.cc b/src/S_Theory/S_DagNode.cc index d624a051..59d7d754 100644 --- a/src/S_Theory/S_DagNode.cc +++ b/src/S_Theory/S_DagNode.cc @@ -375,4 +375,3 @@ S_DagNode::instantiateWithCopies2(const Substitution& substitution, const Vector } return 0; } - diff --git a/src/S_Theory/S_Symbol.cc b/src/S_Theory/S_Symbol.cc index f58d4007..fdad6cdf 100755 --- a/src/S_Theory/S_Symbol.cc +++ b/src/S_Theory/S_Symbol.cc @@ -332,6 +332,16 @@ S_Symbol::termify(DagNode* dagNode) return new S_Term(this, d->getNumber(), a->symbol()->termify(a)); } +bool +S_Symbol::determineGround(DagNode* dagNode) +{ + S_DagNode* d = safeCastNonNull(dagNode); + if (!(d->getArgument()->determineGround())) + return false; + dagNode->setGround(); + return true; +} + // // Unification code. // diff --git a/src/S_Theory/S_Symbol.hh b/src/S_Theory/S_Symbol.hh index 90c719b0..28e0a612 100755 --- a/src/S_Theory/S_Symbol.hh +++ b/src/S_Theory/S_Symbol.hh @@ -47,6 +47,7 @@ public: bool respectFrozen, bool eagerContext); Term* termify(DagNode* dagNode); + bool determineGround(DagNode* dagNode); // // Member function overiding default handling. // diff --git a/src/StrategyLanguage/Makefile.in b/src/StrategyLanguage/Makefile.in index 244be0e8..0467a252 100644 --- a/src/StrategyLanguage/Makefile.in +++ b/src/StrategyLanguage/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -249,6 +249,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -257,10 +258,12 @@ 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@ diff --git a/src/Temporal/Makefile.in b/src/Temporal/Makefile.in index 29478ac6..63a2dc2d 100644 --- a/src/Temporal/Makefile.in +++ b/src/Temporal/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -203,6 +203,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -211,10 +212,12 @@ 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@ diff --git a/src/Utility/ChangeLog b/src/Utility/ChangeLog index 5c38ccdf..04217e63 100644 --- a/src/Utility/ChangeLog +++ b/src/Utility/ChangeLog @@ -1,3 +1,7 @@ +2023-08-04 Steven Eker + + * timer.cc: added comments + 2023-07-14 Steven Eker * natSet.hh (NatSet::containsSmall): return int_fast8_t to avoid diff --git a/src/Utility/Makefile.in b/src/Utility/Makefile.in index e0949adb..2b4b7ef7 100644 --- a/src/Utility/Makefile.in +++ b/src/Utility/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -236,6 +236,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -244,10 +245,12 @@ 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@ diff --git a/src/Utility/timer.cc b/src/Utility/timer.cc index 26826bed..84ac3dbb 100644 --- a/src/Utility/timer.cc +++ b/src/Utility/timer.cc @@ -2,7 +2,7 @@ This file is part of the Maude 3 interpreter. - Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. + Copyright 1997-2023 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,8 +34,7 @@ bool Timer::osTimersStarted = false; local_inline Int64 -Timer::calculateMicroseconds(const itimerval& startTime, - const itimerval& stopTime) +Timer::calculateMicroseconds(const itimerval& startTime, const itimerval& stopTime) { const Int64 M = 1000000; Int64 usec = startTime.it_value.tv_usec - stopTime.it_value.tv_usec + @@ -48,6 +47,8 @@ Timer::calculateMicroseconds(const itimerval& startTime, void Timer::startOsTimers() { + // + // We let the OS timers run continuously and just sample them. // // It would be nice to keep track of cycles for correct handling of // very long time intervals, but this seems hard without introducing @@ -88,6 +89,9 @@ Timer::start() { if (!osTimersStarted) startOsTimers(); + // + // We get new start times. + // running = true; getitimer(ITIMER_REAL, &realStartTime); getitimer(ITIMER_VIRTUAL, &virtStartTime); @@ -102,6 +106,9 @@ Timer::stop() { if (running && valid) { + // + // We accumulate the microseconds since last start(). + // itimerval realStopTime; itimerval virtStopTime; itimerval profStopTime; @@ -122,6 +129,9 @@ Timer::getTimes(Int64& real, Int64& virt, Int64& prof) const { if (valid) { + // + // We return the accumulated times plus any time since last start() if we are running. + // real = realAcc; virt = virtAcc; prof = profAcc; diff --git a/src/Utility/timer.hh b/src/Utility/timer.hh index a9961239..cdc87eb6 100644 --- a/src/Utility/timer.hh +++ b/src/Utility/timer.hh @@ -44,8 +44,7 @@ private: }; static void startOsTimers(); - static Int64 calculateMicroseconds(const itimerval& startTime, - const itimerval& stopTime); + static Int64 calculateMicroseconds(const itimerval& startTime, const itimerval& stopTime); static bool osTimersStarted; diff --git a/src/Variable/ChangeLog b/src/Variable/ChangeLog index df092c0e..f00117dd 100755 --- a/src/Variable/ChangeLog +++ b/src/Variable/ChangeLog @@ -1,3 +1,11 @@ +2023-07-24 Steven Eker + + * variableSymbol.cc (VariableSymbol::determineGround): added + + * variableSymbol.hh (class VariableSymbol): added decl for determineGround() + +===================================Maude151=========================================== + 2023-02-20 Steven Eker * variableTerm.cc (VariableTerm::deepCopy2): honor preserveVariableIndices() diff --git a/src/Variable/Makefile.in b/src/Variable/Makefile.in index a51dfb0c..7483347e 100644 --- a/src/Variable/Makefile.in +++ b/src/Variable/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -197,6 +197,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -205,10 +206,12 @@ 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@ diff --git a/src/Variable/variableSymbol.cc b/src/Variable/variableSymbol.cc index c3d96575..87ba3417 100644 --- a/src/Variable/variableSymbol.cc +++ b/src/Variable/variableSymbol.cc @@ -121,6 +121,12 @@ VariableSymbol::isStable() const return false; } +bool +VariableSymbol::determineGround(DagNode* /* dagNode */) +{ + return false; +} + // // Hash cons code. // diff --git a/src/Variable/variableSymbol.hh b/src/Variable/variableSymbol.hh index 93302fe1..ef34fa81 100644 --- a/src/Variable/variableSymbol.hh +++ b/src/Variable/variableSymbol.hh @@ -53,6 +53,7 @@ public: Vector& outputBdds); bool isStable() const; + bool determineGround(DagNode* dagNode); // // Hash cons stuff. // diff --git a/tests/BuiltIn/Makefile.in b/tests/BuiltIn/Makefile.in index e37aaca3..3b305053 100644 --- a/tests/BuiltIn/Makefile.in +++ b/tests/BuiltIn/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -300,7 +300,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -341,6 +340,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -349,10 +349,12 @@ 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@ @@ -602,7 +604,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff --git a/tests/BuiltIn/counters.expected b/tests/BuiltIn/counters.expected index da8ebc93..45369acf 100644 --- a/tests/BuiltIn/counters.expected +++ b/tests/BuiltIn/counters.expected @@ -74,7 +74,7 @@ rewrite in FOO : a . rewrites: 1 result Foo: b ========================================== -rewrite in COUNTER-TEST3 : f(4) . +debug rewrite in COUNTER-TEST3 : f(4) . *********** equation eq f(s N) = counter f(N) . N --> 3 @@ -124,7 +124,7 @@ result Zero: 0 rewrites: 9 result List: 0 1 1 2 ========================================== -frewrite in COUNTER-TEST3 : f(4) . +debug frewrite in COUNTER-TEST3 : f(4) . *********** equation eq f(s N) = counter f(N) . N --> 3 diff --git a/tests/Corner/Makefile.in b/tests/Corner/Makefile.in index e599cd9a..b8d2a6e8 100644 --- a/tests/Corner/Makefile.in +++ b/tests/Corner/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -300,7 +300,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -341,6 +340,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -349,10 +349,12 @@ 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@ @@ -611,7 +613,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff --git a/tests/Corner/badRenaming.expected b/tests/Corner/badRenaming.expected index dcb3950b..00b92e5a 100644 --- a/tests/Corner/badRenaming.expected +++ b/tests/Corner/badRenaming.expected @@ -34,6 +34,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -198,6 +199,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -364,6 +366,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -530,6 +533,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -713,6 +717,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -895,6 +900,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -1063,6 +1069,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -1244,6 +1251,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -1425,6 +1433,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -1608,6 +1617,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -1791,6 +1801,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT diff --git a/tests/Corner/badView.expected b/tests/Corner/badView.expected index 49cbcbee..f8246400 100644 --- a/tests/Corner/badView.expected +++ b/tests/Corner/badView.expected @@ -128,6 +128,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -337,6 +338,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -548,6 +550,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -753,6 +756,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT diff --git a/tests/Makefile.in b/tests/Makefile.in index df020de9..81899df1 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -195,6 +195,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -203,10 +204,12 @@ 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@ diff --git a/tests/Meta/Makefile.in b/tests/Meta/Makefile.in index 719821bf..574e9814 100644 --- a/tests/Meta/Makefile.in +++ b/tests/Meta/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -300,7 +300,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -341,6 +340,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -349,10 +349,12 @@ 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@ @@ -823,7 +825,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff --git a/tests/Misc/Makefile.am b/tests/Misc/Makefile.am index c2a44759..06219792 100755 --- a/tests/Misc/Makefile.am +++ b/tests/Misc/Makefile.am @@ -39,7 +39,8 @@ TESTS = \ pconst3 \ pconst4 \ parameterizedConstant \ - pconst5 + pconst5 \ + initialEqualityPredicate MAUDE_FILES = \ directoryTest.maude \ @@ -82,7 +83,8 @@ MAUDE_FILES = \ pconst3.maude \ pconst4.maude \ parameterizedConstant.maude \ - pconst5.maude + pconst5.maude \ + initialEqualityPredicate.maude RESULT_FILES = \ directoryTest.expected \ @@ -125,6 +127,7 @@ RESULT_FILES = \ pconst3.expected \ pconst4.expected \ parameterizedConstant.expected \ - pconst5.expected + pconst5.expected \ + initialEqualityPredicate.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) diff --git a/tests/Misc/Makefile.in b/tests/Misc/Makefile.in index 3984dda9..0cc92cde 100644 --- a/tests/Misc/Makefile.in +++ b/tests/Misc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -300,7 +300,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -341,6 +340,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -349,10 +349,12 @@ 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@ @@ -474,7 +476,8 @@ TESTS = \ pconst3 \ pconst4 \ parameterizedConstant \ - pconst5 + pconst5 \ + initialEqualityPredicate MAUDE_FILES = \ directoryTest.maude \ @@ -517,7 +520,8 @@ MAUDE_FILES = \ pconst3.maude \ pconst4.maude \ parameterizedConstant.maude \ - pconst5.maude + pconst5.maude \ + initialEqualityPredicate.maude RESULT_FILES = \ directoryTest.expected \ @@ -560,7 +564,8 @@ RESULT_FILES = \ pconst3.expected \ pconst4.expected \ parameterizedConstant.expected \ - pconst5.expected + pconst5.expected \ + initialEqualityPredicate.expected EXTRA_DIST = $(TESTS) $(MAUDE_FILES) $(RESULT_FILES) all: all-am @@ -710,7 +715,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1031,6 +1036,13 @@ pconst5.log: pconst5 --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +initialEqualityPredicate.log: initialEqualityPredicate + @p='initialEqualityPredicate'; \ + b='initialEqualityPredicate'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ diff --git a/tests/Misc/debug.expected b/tests/Misc/debug.expected index 8ea5e721..4aba7a7f 100644 --- a/tests/Misc/debug.expected +++ b/tests/Misc/debug.expected @@ -1,13 +1,13 @@ ========================================== -reduce in BAR : a . +debug reduce in BAR : a . ========================================== -reduce in BAR : a . +debug reduce in BAR : a . rewrites: 2 result Bar: c rewrites: 2 result Bar: c ========================================== -reduce in META-LEVEL : metaReduce(['BAR], 'a.Bar) . +debug reduce in META-LEVEL : metaReduce(['BAR], 'a.Bar) . *********** equation eq [Q:Qid] = sth Q:Qid is including Q:Qid . diff --git a/tests/Misc/initialEqualityPredicate b/tests/Misc/initialEqualityPredicate new file mode 100755 index 00000000..4b06ff2b --- /dev/null +++ b/tests/Misc/initialEqualityPredicate @@ -0,0 +1,10 @@ +#!/bin/sh + +MAUDE_LIB=$srcdir/../../src/Main +export MAUDE_LIB + +../../src/Main/maude \ + < $srcdir/initialEqualityPredicate.maude -no-banner -no-advise \ + > initialEqualityPredicate.out 2>&1 + +diff $srcdir/initialEqualityPredicate.expected initialEqualityPredicate.out > /dev/null 2>&1 diff --git a/tests/Misc/initialEqualityPredicate.expected b/tests/Misc/initialEqualityPredicate.expected new file mode 100644 index 00000000..ceea7246 --- /dev/null +++ b/tests/Misc/initialEqualityPredicate.expected @@ -0,0 +1,79 @@ +========================================== +reduce in DECOMPOSE : X .=. X . +rewrites: 1 +result Bool: true +========================================== +reduce in DECOMPOSE : X .=. Y . +rewrites: 0 +result Bool: X .=. Y +========================================== +reduce in DECOMPOSE : f(X, Y) .=. f(Y, Z) . +rewrites: 1 +result Bool: Z .=. Y and X .=. Y +========================================== +reduce in DECOMPOSE : f(X, Y) .=. f(Y, X) . +rewrites: 2 +result Bool: X .=. Y +========================================== +reduce in DECOMPOSE : X .=. f(X, Y) . +rewrites: 1 +result Bool: false +========================================== +reduce in DECOMPOSE : f(X, Y) .=. f(f(X, Y), Z) . +rewrites: 3 +result Bool: false +========================================== +reduce in DECOMPOSE : f(X, Y) .=. g(W, Z) . +rewrites: 1 +result Bool: false +========================================== +reduce in DECOMPOSE : h(X, Y) .=. h(W, Z) . +rewrites: 1 +result Bool: Z .=. Y and X .=. W +========================================== +reduce in DECOMPOSE : h(X, Y) .=. h(Y, X) . +rewrites: 2 +result Bool: X .=. Y +========================================== +reduce in DECOMPOSE : h(X, Y) .=. i(W, Z) . +rewrites: 1 +result Bool: false +========================================== +reduce in DECOMPOSE : f(X, Y) .=. b(Z, W) . +rewrites: 0 +result Bool: f(X, Y) .=. b(Z, W) +========================================== +reduce in DECOMPOSE : s^40(X) .=. s^100(X) . +rewrites: 2 +result Bool: false +========================================== +reduce in DECOMPOSE : s^40(Y) .=. s^100(X) . +rewrites: 1 +result Bool: Y .=. s^60(X) +========================================== +reduce in DECOMPOSE : s^10(X) .=. s^10(Y) . +rewrites: 1 +result Bool: X .=. Y +========================================== +reduce in DECOMPOSE : c(A, B) .=. c(X, Y) . +rewrites: 2 +result Bool: A .=. X and B .=. Y xor A .=. Y and B .=. X xor A .=. X and A .=. + Y and B .=. X and B .=. Y +========================================== +reduce in DECOMPOSE : c(A, X) .=. c(X, Y) . +rewrites: 4 +result Bool: A .=. X and X .=. Y xor A .=. X and A .=. Y and X .=. Y xor A .=. + Y +========================================== +reduce in DECOMPOSE : c(Z, c(X, Y)) .=. c(X, Y) . +rewrites: 1 +result Bool: false +========================================== +reduce in DECOMPOSE : c(f(C, D), g(A, B)) .=. c(f(X, Y), g(W, Z)) . +rewrites: 10 +result Bool: A .=. W and B .=. Z and C .=. X and Y .=. D +========================================== +reduce in DECOMPOSE : c(f(A, B), f(C, D)) .=. c(f(X, Y), g(W, Z)) . +rewrites: 11 +result Bool: false +Bye. diff --git a/tests/Misc/initialEqualityPredicate.maude b/tests/Misc/initialEqualityPredicate.maude new file mode 100644 index 00000000..7ad8a9bd --- /dev/null +++ b/tests/Misc/initialEqualityPredicate.maude @@ -0,0 +1,45 @@ +set show timing off . +set show advisories off . + +fmod DECOMPOSE is + inc INITIAL-EQUALITY-PREDICATE . + sorts Nat String . + op 0 : -> Nat . + ops f g : Nat Nat -> Nat [ctor] . + ops h i : Nat Nat -> String [ctor] . + op c : Nat Nat -> Nat [ctor comm] . + ops b : Nat Nat -> Nat [assoc comm id: 0] . + op s : Nat -> Nat [iter ctor] . + vars W X Y Z : Nat . + vars A B C D : Nat . +endfm + +red X .=. X . +red X .=. Y . + +*** free +red f(X, Y) .=. f(Y, Z) . +red f(X, Y) .=. f(Y, X) . +red f(X, Y) .=. X . +red f(f(X, Y), Z) .=. f(X, Y) . +red f(X, Y) .=. g(W, Z) . +red h(X, Y) .=. h(W, Z) . +red h(X, Y) .=. h(Y, X) . +red h(X, Y) .=. i(W, Z) . + +*** dissimilar collapse symbol +red f(X, Y) .=. b(W, Z) . + +*** iter +red s^100(X) .=. s^40(X) . +red s^100(X) .=. s^40(Y) . +red s^10(X) .=. s^10(Y) . + +*** commutative +red c(X, Y) .=. c(A, B) . +red c(X, Y) .=. c(A, X) . +red c(c(X, Y), Z) .=. c(X, Y) . + +*** compound +red c(f(X, Y), g(W, Z)) .=. c(g(A, B), f(C, D)) . +red c(f(X, Y), g(W, Z)) .=. c(f(A, B), f(C, D)) . diff --git a/tests/Misc/parameterization.expected b/tests/Misc/parameterization.expected index b6e42682..00534563 100644 --- a/tests/Misc/parameterization.expected +++ b/tests/Misc/parameterization.expected @@ -552,6 +552,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -1260,6 +1261,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -1972,6 +1974,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -2277,6 +2280,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT diff --git a/tests/Misc/parameterizedView.expected b/tests/Misc/parameterizedView.expected index 5016ff98..4441e0a7 100644 --- a/tests/Misc/parameterizedView.expected +++ b/tests/Misc/parameterizedView.expected @@ -88,6 +88,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT diff --git a/tests/Misc/renaming.expected b/tests/Misc/renaming.expected index aa1b90d9..6d0dedae 100644 --- a/tests/Misc/renaming.expected +++ b/tests/Misc/renaming.expected @@ -269,6 +269,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT diff --git a/tests/ObjectOriented/Makefile.in b/tests/ObjectOriented/Makefile.in index 6a613444..817d58da 100644 --- a/tests/ObjectOriented/Makefile.in +++ b/tests/ObjectOriented/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -300,7 +300,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -341,6 +340,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -349,10 +349,12 @@ 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@ @@ -617,7 +619,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff --git a/tests/ResolvedBugs/Makefile.in b/tests/ResolvedBugs/Makefile.in index cb81283a..f78c589e 100644 --- a/tests/ResolvedBugs/Makefile.in +++ b/tests/ResolvedBugs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -300,7 +300,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -341,6 +340,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -349,10 +349,12 @@ 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@ @@ -785,7 +787,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff --git a/tests/ResolvedBugs/moduleOrphanedByViewFebruary2023.expected b/tests/ResolvedBugs/moduleOrphanedByViewFebruary2023.expected index bdbc0aa1..a078452b 100644 --- a/tests/ResolvedBugs/moduleOrphanedByViewFebruary2023.expected +++ b/tests/ResolvedBugs/moduleOrphanedByViewFebruary2023.expected @@ -3,6 +3,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -155,6 +156,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT diff --git a/tests/ResolvedBugs/orphanedViewInstantiationFebruary2023.expected b/tests/ResolvedBugs/orphanedViewInstantiationFebruary2023.expected index 987f3d7b..acfc0a12 100644 --- a/tests/ResolvedBugs/orphanedViewInstantiationFebruary2023.expected +++ b/tests/ResolvedBugs/orphanedViewInstantiationFebruary2023.expected @@ -3,6 +3,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT @@ -195,6 +196,7 @@ fmod TRUTH-VALUE fmod BOOL-OPS fmod TRUTH fmod EXT-BOOL +fmod INITIAL-EQUALITY-PREDICATE fmod NAT fmod INT fmod RAT diff --git a/tests/StrategyLanguage/Makefile.in b/tests/StrategyLanguage/Makefile.in index cb399416..4a4295fa 100644 --- a/tests/StrategyLanguage/Makefile.in +++ b/tests/StrategyLanguage/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -300,7 +300,6 @@ am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` -AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -341,6 +340,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -349,10 +349,12 @@ 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@ @@ -599,7 +601,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \