Commit 7035dea0 authored by Ralf Treinen's avatar Ralf Treinen

Imported Upstream version 1.4-17

parent 8c582537
......@@ -12,7 +12,7 @@ makefile
*.lo
*.la
/Front/parser.cpp
/Front/parser.h
/Front/parser.hpp
/Front/scanner.cpp
.libs
Examples/bdd_example
......
......@@ -162,11 +162,8 @@ struct stat_record_ {
extern struct stat_record_ stat_record[];
extern boolean table_has_been_doubled;
GNUC_INLINE unsigned lookup_cache(bdd_manager *bddm, unsigned *h,
unsigned p, unsigned q);
GNUC_INLINE void insert_cache(bdd_manager *bddm, unsigned h,
unsigned p, unsigned q, unsigned res);
void insert_cache(bdd_manager *bddm, unsigned h,
unsigned p, unsigned q, unsigned res);
void double_cache( bdd_manager *bddm,
unsigned (*result_fn)(unsigned r));
......
This diff is collapsed.
2016-03-23 (version 1.4-17)
- fixes to make gcc 6.0 happy [Thanks to Jerry James, Ralf Trainen, and Gaurav Gupta!]
- default switched from dlmalloc to built-in malloc
2015-10-04 (version 1.4-16)
- updated autotools and build files
2013-07-01 (version 1.4-15)
- fixed bug in Front/printline.cpp [Thanks to Rob Stanzel!]
- fixed memory leak in dfalib.c [Thanks to Daniel Neider!]
......
This diff is collapsed.
......@@ -73,7 +73,7 @@ unsigned prod_term_fn(unsigned p, unsigned q)
/*insert a loop for the product state (p, q) */
GNUC_INLINE void make_loop (bdd_manager *bddm, unsigned p, unsigned q) {
static GNUC_INLINE void make_loop (bdd_manager *bddm, unsigned p, unsigned q) {
int res;
res = (int)(uintptr_t) lookup_in_hash_tab(htbl, p, q);
invariant(res);
......
......@@ -108,8 +108,10 @@ int main() {
/*handle = BDD_LAST_HANDLE(bddm1);*/
/*
assert(handle == 0);
assert(BDD_ROOT(bddm1, handle) == and_2_7);
*/
/* reset all mark fields in bddm1 before an apply1 operation */
bdd_prepare_apply1(bddm1);
......
......@@ -23,3 +23,5 @@ presburger_transduction_LDADD = ../Mem/libmonamem.la ../BDD/libmonabdd.la \
presburger_analysis_SOURCES = presburger_analysis.c
presburger_analysis_LDADD = ../Mem/libmonamem.la ../BDD/libmonabdd.la \
../DFA/libmonadfa.la
examples: all
This diff is collapsed.
......@@ -163,7 +163,11 @@ AutLib::Dir::Dir(char *name, char *src, Deque<char*> *dependencies)
dirname,
(options.mode == TREE) ? ".gta" : ".dfa",
dirname);
system(t);
if (system(t)) {
cout << "Unable to create directory '" << dirname << "'\n"
<< "Execution aborted\n";
exit(-1);
}
break;
}
}
......@@ -283,5 +287,5 @@ AutLib::fileExists(char *filename)
{
// check file exists
std::ifstream s(filename);
return s != 0;
return s.good();
}
MAINTAINERCLEANFILES = makefile.in makefile
BUILT_SOURCES = parser.h
BUILT_SOURCES = scanner.cpp parser.cpp parser.hpp
AM_LFLAGS = -l
AM_YFLAGS = -d
bin_PROGRAMS = mona
......
This diff is collapsed.
......@@ -199,7 +199,7 @@ void
Usage()
{
cout << "MONA v" << VERSION << "-" << RELEASE << " for WS1S/WS2S\n"
<< "Copyright (C) 1997-2013 Aarhus University\n\n"
<< "Copyright (C) 1997-2016 Aarhus University\n\n"
<< "Usage: mona [options] <filename>\n\n"
<< "Options:\n"
<< " -w Output whole automaton\n"
......
......@@ -28,7 +28,7 @@
#include <stdio.h>
#include <string.h>
#include "untyped.h"
#include "parser.h"
#include "parser.hpp"
#include "deque.h"
#include "lib.h"
#include "printline.h"
......
......@@ -1658,9 +1658,9 @@ Predicate_Macro_Declaration::genAST(MonaAST &)
parKind = ParnameU;
break;
case pPar:
if (parKind == -1)
TypeError("Parameter type missing in declaration of '"
+ String(name->str) + "'", (*d)->pos);
// if (parKind == -1)
// TypeError("Parameter type missing in declaration of '"
// + String(name->str) + "'", (*d)->pos);
break;
}
......
This diff is collapsed.
......@@ -135,7 +135,7 @@ void insertPHT(PairHashTable *t, unsigned p, unsigned q, unsigned n)
void dumpPHT(PairHashTable *t)
{
int i;
printf("\n<--contents of pair-table at 0x%x\n", (int) t);
printf("\n<--contents of pair-table at 0x%p\n", (void*) t);
for (i = 0; i < t->size; i++) {
PairHashTableEntry *e = &t->t[i];
while (e) {
......
......@@ -2,3 +2,5 @@ MAINTAINERCLEANFILES = makefile.in makefile
bin_PROGRAMS = dfa2dot gta2dot
dfa2dot_SOURCES = dfa2dot.c dfalib.c dfalib.h bddlib.h
gta2dot_SOURCES = gta2dot.c gtalib.c gtalib.h bddlib.h
lib: all
This diff is collapsed.
#ifdef USE_MALLOC
#ifndef USE_DLMALLOC
int dl_dummy;
......
#ifndef USE_MALLOC
#ifdef USE_DLMALLOC
/*
Default header file for malloc-2.8.x, written by Doug Lea
......
This diff is collapsed.
......@@ -49,10 +49,10 @@ void mem_error()
void *mem_alloc(size_t s)
{
#ifdef USE_MALLOC
void *x = malloc(s);
#else
#ifdef USE_DLMALLOC
void *x = dlmalloc(s);
#else
void *x = malloc(s);
#endif
if (!x)
mem_error();
......@@ -64,19 +64,19 @@ void *mem_alloc(size_t s)
void mem_free(void *x)
{
#ifdef USE_MALLOC
free(x);
#else
#ifdef USE_DLMALLOC
dlfree(x);
#else
free(x);
#endif
}
void *mem_resize(void *x, size_t s)
{
#ifdef USE_MALLOC
void *y = realloc(x, s);
#else
#ifdef USE_DLMALLOC
void *y = dlrealloc(x, s);
#else
void *y = realloc(x, s);
#endif
if (!y)
mem_error();
......@@ -98,10 +98,10 @@ void mem_zero(void *x, size_t s)
unsigned int mem_allocated()
{
#ifdef USE_MALLOC
return -1;
#else
#ifdef USE_DLMALLOC
struct mallinfo m = dlmallinfo();
return (unsigned) m.uordblks+m.hblkhd;
#else
return -1;
#endif
}
......@@ -19,7 +19,7 @@
*/
#ifndef __MEM_H
#define __MEM_h
#define __MEM_H
#include <stdlib.h>
#include "gnuc.h"
......
MONA Version 1.4
Copyright (C) 1997-2013 Aarhus University.
Copyright (C) 1997-2016 Aarhus University.
[The 'Mem/dlmalloc.*' are the memory management
routines of Doug Lea (dl@cs.oswego.edu) and are
......
This diff is collapsed.
......@@ -115,6 +115,11 @@
`char[]'. */
#undef YYTEXT_POINTER
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
......
......@@ -4,7 +4,7 @@
me=ar-lib
scriptversion=2012-03-01.08; # UTC
# Copyright (C) 2010, 2012 Free Software Foundation, Inc.
# Copyright (C) 2010-2013 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# This program is free software; you can redistribute it and/or modify
......
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
This diff is collapsed.
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2012-02-10'
timestamp='2013-08-10'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
......@@ -26,11 +20,12 @@ timestamp='2012-02-10'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted GNU ChangeLog entry.
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
......@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -123,7 +116,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
......@@ -156,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze)
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
......@@ -225,6 +218,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
......@@ -253,10 +252,12 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
......@@ -267,7 +268,7 @@ case $basic_machine in
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
......@@ -285,16 +286,17 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
| or32 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
......@@ -364,13 +366,13 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| c8051-*