complement-svn Mailing List for Complement (Page 17)
Status: Pre-Alpha
Brought to you by:
complement
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(61) |
Nov
(76) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(33) |
Feb
(41) |
Mar
(16) |
Apr
|
May
(22) |
Jun
(14) |
Jul
(64) |
Aug
(60) |
Sep
(35) |
Oct
(34) |
Nov
(10) |
Dec
(5) |
2008 |
Jan
(4) |
Feb
(24) |
Mar
(10) |
Apr
(30) |
May
(15) |
Jun
(50) |
Jul
(20) |
Aug
(7) |
Sep
(8) |
Oct
(10) |
Nov
|
Dec
|
From: <com...@us...> - 2007-05-31 18:37:15
|
Revision: 1578 http://svn.sourceforge.net/complement/?rev=1578&view=rev Author: complement Date: 2007-05-31 11:37:14 -0700 (Thu, 31 May 2007) Log Message: ----------- use STLport's variant Modified Paths: -------------- trunk/complement/explore/Makefiles/gmake/windows/lib.mak Modified: trunk/complement/explore/Makefiles/gmake/windows/lib.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/windows/lib.mak 2007-05-31 16:12:06 UTC (rev 1577) +++ trunk/complement/explore/Makefiles/gmake/windows/lib.mak 2007-05-31 18:37:14 UTC (rev 1578) @@ -1,20 +1,42 @@ -# -*- makefile -*- Time-stamp: <03/07/15 18:23:04 ptr> +# -*- makefile -*- Time-stamp: <07/05/31 08:56:06 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 # Petr Ovtchenkov # +# Copyright (c) 2006, 2007 +# Francois Dumont +# # Portion Copyright (c) 1999-2001 # Parallel Graphics Ltd. # # Licensed under the Academic Free License version 3.0 # -RELEASE_SUFFIX := r +ifeq (gcc, $(COMPILER_NAME)) +LIB_PREFIX := lib +endif + +LIB_PREFIX ?= +ifneq (bcc, $(COMPILER_NAME)) +DBG_SUFFIX := g +else DBG_SUFFIX := d +endif STLDBG_SUFFIX := stl${DBG_SUFFIX} +ifdef STLP_BUILD_FORCE_STATIC_RUNTIME +LIB_TYPE := _x +else +LIB_TYPE := +endif +ifdef STLP_BUILD_LIB_MOTIF +LIB_SUFFIX := _$(STLP_BUILD_LIB_MOTIF).${MAJOR}.${MINOR} +else +LIB_SUFFIX := .${MAJOR}.${MINOR} +endif + # Shared libraries: -SO_NAME_BASE := ${LIBNAME}_${RELEASE_SUFFIX}${MAJOR}${MINOR} +SO_NAME_BASE := $(LIB_PREFIX)${LIBNAME}${LIB_TYPE}${LIB_SUFFIX} SO_NAME := ${SO_NAME_BASE}.$(SO) LIB_NAME := ${SO_NAME_BASE}.$(LIB) EXP_NAME := ${SO_NAME_BASE}.$(EXP) @@ -23,7 +45,7 @@ LIB_NAME_OUT := $(OUTPUT_DIR)/${LIB_NAME} EXP_NAME_OUT := $(OUTPUT_DIR)/${EXP_NAME} -SO_NAME_DBG_BASE := ${LIBNAME}_${DBG_SUFFIX}${MAJOR}${MINOR} +SO_NAME_DBG_BASE := $(LIB_PREFIX)${LIBNAME}${DBG_SUFFIX}${LIB_TYPE}${LIB_SUFFIX} SO_NAME_DBG := ${SO_NAME_DBG_BASE}.$(SO) LIB_NAME_DBG := ${SO_NAME_DBG_BASE}.$(LIB) EXP_NAME_DBG := ${SO_NAME_DBG_BASE}.$(EXP) @@ -32,7 +54,7 @@ LIB_NAME_OUT_DBG := $(OUTPUT_DIR_DBG)/${LIB_NAME_DBG} EXP_NAME_OUT_DBG := $(OUTPUT_DIR_DBG)/${EXP_NAME_DBG} -SO_NAME_STLDBG_BASE := ${LIBNAME}_${STLDBG_SUFFIX}${MAJOR}${MINOR} +SO_NAME_STLDBG_BASE := $(LIB_PREFIX)${LIBNAME}${STLDBG_SUFFIX}${LIB_TYPE}${LIB_SUFFIX} SO_NAME_STLDBG := ${SO_NAME_STLDBG_BASE}.$(SO) LIB_NAME_STLDBG := ${SO_NAME_STLDBG_BASE}.$(LIB) EXP_NAME_STLDBG := ${SO_NAME_STLDBG_BASE}.$(EXP) @@ -42,11 +64,27 @@ EXP_NAME_OUT_STLDBG := $(OUTPUT_DIR_STLDBG)/${EXP_NAME_STLDBG} # Static libraries: -A_NAME := ${SO_NAME_BASE}_static.$(ARCH) +ifeq (gcc, $(COMPILER_NAME)) +A_LIB_TYPE := +else +ifdef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +A_LIB_TYPE := _statix +else +A_LIB_TYPE := _static +endif +endif + +ifdef STLP_BUILD_LIB_MOTIF +LIB_A_SUFFIX := _$(STLP_BUILD_LIB_MOTIF) +else +LIB_A_SUFFIX := +endif + +A_NAME := $(LIB_PREFIX)${LIBNAME}${A_LIB_TYPE}${LIB_A_SUFFIX}.$(ARCH) A_NAME_OUT := $(OUTPUT_DIR_A)/$(A_NAME) -A_NAME_DBG := ${SO_NAME_DBG_BASE}_static.$(ARCH) +A_NAME_DBG := $(LIB_PREFIX)${LIBNAME}${DBG_SUFFIX}${A_LIB_TYPE}${LIB_A_SUFFIX}.${ARCH} A_NAME_OUT_DBG := $(OUTPUT_DIR_A_DBG)/$(A_NAME_DBG) -A_NAME_STLDBG := ${SO_NAME_STLDBG_BASE}_static.$(ARCH) +A_NAME_STLDBG := ${LIB_PREFIX}${LIBNAME}${STLDBG_SUFFIX}${A_LIB_TYPE}${LIB_A_SUFFIX}.${ARCH} A_NAME_OUT_STLDBG := $(OUTPUT_DIR_A_STLDBG)/$(A_NAME_STLDBG) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-31 16:12:11
|
Revision: 1577 http://svn.sourceforge.net/complement/?rev=1577&view=rev Author: complement Date: 2007-05-31 09:12:06 -0700 (Thu, 31 May 2007) Log Message: ----------- dev Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.h Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-31 04:45:23 UTC (rev 1576) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-31 16:12:06 UTC (rev 1577) @@ -23,6 +23,45 @@ typedef uint32_t group_type; typedef std::hash_map<oid_type, vtime_unit_type> vtime_type; +template <class _InputIter1, class _InputIter2, class _OutputIter, + class _Compare> +_OutputIter vt_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Equal __equal, _Aggregate __aggr ) +{ + + while ( __first1 != __last1 ) { + _InputIter1 __cur1 = __first1; + for ( ; __cur1 != __last1, ++__cur1 ) { + if ( __equal(*__cur1, *__first2) ) { + __aggr( __cur1, __first2, __result ); + ++__first2; + break; + } + ++__result; + } + if ( __cur1 == __last1 ) { + + } + } + + while (__first1 != __last1 && __first2 != __last2) { + if (__comp(*__first1, *__first2)) { + *__result = *__first1; + ++__first1; + } else if (__comp(*__first2, *__first1)) { + *__result = *__first2; + ++__first2; + } else { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + // typedef std::pair<oid_type, vtime_unit_type> vtime_proc_type; // typedef std::list<vtime_proc_type> vtime_type; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-31 04:45:26
|
Revision: 1576 http://svn.sourceforge.net/complement/?rev=1576&view=rev Author: complement Date: 2007-05-30 21:45:23 -0700 (Wed, 30 May 2007) Log Message: ----------- remove bogus OSNAME cygming, replace one by normal windows; BCC and DMC compilers from STLport; HP's aCC options as in STLport Removed Paths: ------------- trunk/complement/explore/Makefiles/gmake/windows/sysid.mak Deleted: trunk/complement/explore/Makefiles/gmake/windows/sysid.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/windows/sysid.mak 2007-05-31 04:34:01 UTC (rev 1575) +++ trunk/complement/explore/Makefiles/gmake/windows/sysid.mak 2007-05-31 04:45:23 UTC (rev 1576) @@ -1,18 +0,0 @@ -# Time-stamp: <03/07/15 12:45:30 ptr> -# $Id$ - -OSNAME := windows -OSREALNAME := mingw -BUILD_OSNAME := windows -BUILD_OSREALNAME := mingw - -OSREL = -M_ARCH = i386 -P_ARCH = i386 -NODENAME = unknown -SYSVER = -USER = unknown - -BUILD_SYSTEM = -BUILD_DATE = - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-31 04:34:04
|
Revision: 1575 http://svn.sourceforge.net/complement/?rev=1575&view=rev Author: complement Date: 2007-05-30 21:34:01 -0700 (Wed, 30 May 2007) Log Message: ----------- remove bogus OSNAME cygming, replace one by normal windows; BCC and DMC compilers from STLport; HP's aCC options as in STLport Modified Paths: -------------- trunk/complement/explore/Makefiles/ChangeLog trunk/complement/explore/Makefiles/gmake/aCC.mak trunk/complement/explore/Makefiles/gmake/app/gcc.mak trunk/complement/explore/Makefiles/gmake/gcc.mak trunk/complement/explore/Makefiles/gmake/hp-ux/sys.mak trunk/complement/explore/Makefiles/gmake/hp-ux/targetsys.mak trunk/complement/explore/Makefiles/gmake/lib/aCC.mak trunk/complement/explore/Makefiles/gmake/lib/clean.mak trunk/complement/explore/Makefiles/gmake/lib/gcc.mak trunk/complement/explore/Makefiles/gmake/sysid.mak trunk/complement/explore/Makefiles/gmake/targets.mak trunk/complement/explore/Makefiles/gmake/windows/rules-install-so.mak trunk/complement/explore/Makefiles/gmake/windows/rules-so.mak trunk/complement/explore/Makefiles/gmake/windows/sys.mak trunk/complement/explore/Makefiles/gmake/windows/targetsys.mak Added Paths: ----------- trunk/complement/explore/Makefiles/gmake/app/bcc.mak trunk/complement/explore/Makefiles/gmake/app/dmc.mak trunk/complement/explore/Makefiles/gmake/bcc.mak trunk/complement/explore/Makefiles/gmake/dmc.mak trunk/complement/explore/Makefiles/gmake/lib/bcc.mak trunk/complement/explore/Makefiles/gmake/lib/dmc.mak Removed Paths: ------------- trunk/complement/explore/Makefiles/gmake/cygming/ Modified: trunk/complement/explore/Makefiles/ChangeLog =================================================================== --- trunk/complement/explore/Makefiles/ChangeLog 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/ChangeLog 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,3 +1,20 @@ +2007-05-31 Petr Ovtchenkov <pt...@is...> + + * gmake/app/gcc.mak, gmake/targets.mak, gmake/windows/rules-so.mak: + remove bogus OSNAME cygming, replace one by normal windows; + + * gmake/gcc.mak, gmake/lib/gcc.mak, gmake/sysid.mak: ditto; + + * gmake/windows/rules-install-so.mak, gmake/windows/sys.mak: ditto; + + * gmake/windows/targetsys.mak: ditto; + + * gmake/cygming: removed; use windows instead; + + * dmc.mak, bcc.mak: included from STLport; + + * aCC.mak: use options from STLport, it's more fresh. + 2007-03-08 Petr Ovtchenkov <pt...@is...> * make.mak: removed, make except GNU make can't work due to top.mak; Modified: trunk/complement/explore/Makefiles/gmake/aCC.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/aCC.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/aCC.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# Time-stamp: <06/11/10 15:54:03 ptr> +# Time-stamp: <07/05/31 01:07:37 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 # Petr Ovtchenkov @@ -9,8 +9,6 @@ # Licensed under the Academic Free License version 3.0 # -INCLUDES := - ifndef _FORCE_CXX CXX := aCC else @@ -23,13 +21,12 @@ CC := $_FORCE_CC endif -CXX_VERSION := $(shell ${CXX} --version | grep ${CXX} | awk '{ print $$3; }') +CXX_VERSION := $(shell ${CXX} --version 2>&1 | grep ${CXX} | awk '{ print $$6; }') ifeq ($(CXX_VERSION),) CXX_VERSION := $(shell ${CXX} --version) endif -CXX_VERSION_MAJOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$1; }') -CXX_VERSION_MINOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$2; }') -CXX_VERSION_PATCH := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$3; }') +CXX_VERSION_MAJOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$2; }') +CXX_VERSION_MINOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$3; }') DEFS ?= OPT ?= @@ -39,8 +36,8 @@ LINK_OUTPUT_OPTION = ${OUTPUT_OPTION} CPPFLAGS = $(DEFS) $(INCLUDES) -CFLAGS = -Aa -z $(OPT) -CXXFLAGS = -Aa -z $(OPT) +CFLAGS = -Aa +z $(OPT) +CXXFLAGS = -Aa +z -mt $(OPT) CDEPFLAGS = -E +Md CCDEPFLAGS = -E +Md @@ -65,7 +62,7 @@ #stldbg-static-dep : OPT += -g #stldbg-shared-dep : OPT += -g -OPT += +Onolimit +W495,749 +OPT += +W495,749,2186,2191,2340,2430,2550 # dependency output parser (dependencies collector) Added: trunk/complement/explore/Makefiles/gmake/app/bcc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/app/bcc.mak (rev 0) +++ trunk/complement/explore/Makefiles/gmake/app/bcc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -0,0 +1,38 @@ +# -*- Makefile -*- Time-stamp: <07/05/31 01:05:40 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# + +OPT += -tWC -w-par + +LDFLAGS += -ap -Tpe -w -w-dup + +START_OBJ = c0x32.obj + +install-dbg-shared: install-dbg-shared-tds +install-stldbg-shared: install-stldbg-shared-tds + +install-dbg-static: install-dbg-static-tds +install-stldbg-static: install-stldbg-static-tds + +install-dbg-shared-tds: + $(INSTALL_EXE) $(subst /,\,$(OUTPUT_DIR_DBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_DBG)/) + +install-stldbg-shared-tds: + $(INSTALL_EXE) $(subst /,\,$(OUTPUT_DIR_STLDBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_STLDBG)/) + +install-dbg-static-tds: + $(INSTALL_EXE) $(subst /,\,$(OUTPUT_DIR_DBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_DBG)/) + +install-stldbg-static-tds: + $(INSTALL_EXE) $(subst /,\,$(OUTPUT_DIR_STLDBG)/${PRGNAME}.tds $(INSTALL_BIN_DIR_STLDBG)/) + Added: trunk/complement/explore/Makefiles/gmake/app/dmc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/app/dmc.mak (rev 0) +++ trunk/complement/explore/Makefiles/gmake/app/dmc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -0,0 +1,80 @@ +# -*- Makefile -*- Time-stamp: <07/05/31 01:05:57 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# + +CXXFLAGS += -w6 -w7 -w18 + +stldbg-shared : CXXFLAGS += -HP50 +stldbg-static : CXXFLAGS += -HP50 + +OPT += -WA + +release-shared: LDFLAGS += +release-static: LDFLAGS += +dbg-shared : LDFLAGS += /CODEVIEW/NOCVPACK +dbg-static : LDFLAGS += /CODEVIEW/NOCVPACK +stldbg-shared : LDFLAGS += /CODEVIEW/NOCVPACK +stldbg-static : LDFLAGS += /CODEVIEW/NOCVPACK + +# workaround for stl/config/_auto_link.h +STL_LIBNAME = stlport +DBG_SUFFIX := g +STLDBG_SUFFIX := stlg + +ifdef STLP_BUILD_LIB_MOTIF +LIB_SUFFIX := _$(STLP_BUILD_LIB_MOTIF).${LIBMAJOR}.${LIBMINOR} +else +LIB_SUFFIX := .${LIBMAJOR}.${LIBMINOR} +endif + +# Shared libraries: +ifdef STLP_BUILD_FORCE_STATIC_RUNTIME +LIB_TYPE := _x +else +LIB_TYPE := +endif + +LIB_NAME := $(LIB_PREFIX)${STL_LIBNAME}${LIB_TYPE}${LIB_SUFFIX}.$(LIB) +LIB_NAME_DBG := $(LIB_PREFIX)${STL_LIBNAME}${DBG_SUFFIX}${LIB_TYPE}${LIB_SUFFIX}.$(LIB) +LIB_NAME_STLDBG := $(LIB_PREFIX)${STL_LIBNAME}${STLDBG_SUFFIX}${LIB_TYPE}${LIB_SUFFIX}.$(LIB) + +# Static libraries: +ifdef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +A_LIB_TYPE := _statix +else +A_LIB_TYPE := _static +endif + +A_NAME := $(LIB_PREFIX)${STL_LIBNAME}${A_LIB_TYPE}${LIB_SUFFIX}.$(ARCH) +A_NAME_DBG := $(LIB_PREFIX)${STL_LIBNAME}${DBG_SUFFIX}${A_LIB_TYPE}${LIB_SUFFIX}.${ARCH} +A_NAME_STLDBG := ${LIB_PREFIX}${STL_LIBNAME}${STLDBG_SUFFIX}${A_LIB_TYPE}${LIB_SUFFIX}.${ARCH} + +ifndef STLP_BUILD_FORCE_STATIC_RUNTIME +release-shared : LDLIBS += $(CURDIR)\..\..\..\lib\$(LIB_NAME) +dbg-shared : LDLIBS += $(CURDIR)\..\..\..\lib\$(LIB_NAME_DBG) +stldbg-shared : LDLIBS += $(CURDIR)\..\..\..\lib\$(LIB_NAME_STLDBG) +else +release-shared : LDLIBS += $(CURDIR)\..\..\..\lib\$(A_NAME) +dbg-shared : LDLIBS += $(CURDIR)\..\..\..\lib\$(A_NAME_DBG) +stldbg-shared : LDLIBS += $(CURDIR)\..\..\..\lib\$(A_NAME_STLDBG) +endif +ifndef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +release-static : LDLIBS += $(CURDIR)\..\..\..\lib\$(A_NAME) +dbg-static : LDLIBS += $(CURDIR)\..\..\..\lib\$(A_NAME_DBG) +stldbg-static : LDLIBS += $(CURDIR)\..\..\..\lib\$(A_NAME_STLDBG) +else +release-static : LDLIBS += $(CURDIR)\..\..\..\lib\$(LIB_NAME) +dbg-static : LDLIBS += $(CURDIR)\..\..\..\lib\$(LIB_NAME_DBG) +stldbg-static : LDLIBS += $(CURDIR)\..\..\..\lib\$(LIB_NAME_STLDBG) +endif + Modified: trunk/complement/explore/Makefiles/gmake/app/gcc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/app/gcc.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/app/gcc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# -*- Makefile -*- Time-stamp: <07/03/08 21:23:42 ptr> +# -*- Makefile -*- Time-stamp: <07/05/30 23:54:39 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005-2007 # Petr Ovtchenkov @@ -55,7 +55,11 @@ ifeq ($(OSNAME),sunos) _USE_NOSTDLIB := 1 endif + +ifeq ($(OSNAME),darwin) +_USE_NOSTDLIB := 1 endif +endif ifndef WITHOUT_STLPORT LDSEARCH += -L${STLPORT_LIB_DIR} @@ -67,14 +71,6 @@ stldbg-shared: STLPORT_LIB = -lstlportstlg stldbg-static: STLPORT_LIB = -Wl,-Bstatic -lstlportstlg -Wl,-Bdynamic - -ifeq ($(OSNAME),cygming) -LIB_VERSION = ${LIBMAJOR}.${LIBMINOR} -release-shared : STLPORT_LIB = -lstlport.${LIB_VERSION} -dbg-shared : STLPORT_LIB = -lstlportg.${LIB_VERSION} -stldbg-shared : STLPORT_LIB = -lstlportstlg.${LIB_VERSION} -endif - ifeq ($(OSNAME),windows) LIB_VERSION = ${LIBMAJOR}.${LIBMINOR} release-shared : STLPORT_LIB = -lstlport.${LIB_VERSION} @@ -132,6 +128,12 @@ END_OBJ := $(shell for o in crtend.o crtn.o; do ${CXX} -print-file-name=$$o; done) STDLIBS = ${STLPORT_LIB} ${_LGCC_S} -lpthread -lc -lm endif +ifeq ($(OSNAME),darwin) +START_OBJ := -lcrt1.o -lcrt2.o +END_OBJ := +STDLIBS = ${STLPORT_LIB} ${_LGCC_S} -lc -lm -lsupc++ +#LDFLAGS += -dynamic +endif LDFLAGS += -nostdlib # endif else Added: trunk/complement/explore/Makefiles/gmake/bcc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/bcc.mak (rev 0) +++ trunk/complement/explore/Makefiles/gmake/bcc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -0,0 +1,175 @@ +# Time-stamp: <07/05/31 01:03:15 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# + +ALL_TAGS = all-static all-shared +ifdef LIBNAME +INSTALL_TAGS = install-static install-shared +else +INSTALL_TAGS = install-shared +endif + +CXX := bcc32 +CC := bcc32 +RC := brcc32 + +DEFS ?= +OPT ?= + +CFLAGS = -q -ff +CXXFLAGS = -q -ff + +OPT += -w-ccc -w-rch -w-ngu -w-inl -w-eff + +# release-shared : OPT += -w-inl + +ifdef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +release-static : OPT += -tWR +dbg-static : OPT += -tWR +stldbg-static : OPT += -tWR +endif + +ifndef STLP_BUILD_FORCE_STATIC_RUNTIME +release-shared : OPT += -tWR +dbg-shared : OPT += -tWR +stldbg-shared : OPT += -tWR +endif + +ifdef STLP_BUILD_NO_RTTI +OPT += -RT- +endif + +ifndef STLP_BUILD_NO_THREAD +OPT += -tWM +endif + +#Add Windows target. +ifndef STLP_BUILD_WINDOWS_95 +WINVER=0x0410 +else +WINVER=0x0400 +endif +release-shared: DEFS += -DWINVER=$(WINVER) +dbg-shared: DEFS += -DWINVER=$(WINVER) +stldbg-shared: DEFS += -DWINVER=$(WINVER) +release-static: DEFS += -DWINVER=$(WINVER) +dbg-static: DEFS += -DWINVER=$(WINVER) +stldbg-static: DEFS += -DWINVER=$(WINVER) + +OUTPUT_OPTION = -o$@ +LINK_OUTPUT_OPTION = $@ +CPPFLAGS = $(DEFS) $(OPT) $(INCLUDES) + +CDEPFLAGS = -E -M +CCDEPFLAGS = -E -M +RCFLAGS = -32 -r -i${STLPORT_INCLUDE_DIR} -dCOMP=bcc + +release-shared : RCFLAGS += -dBUILD_INFOS="-O2 -vi-" +dbg-shared : RCFLAGS += -dBUILD=d -dBUILD_INFOS="-R -v -y -D_DEBUG" +stldbg-shared : RCFLAGS += -dBUILD=stld -dBUILD_INFOS="-R -v -y -D_DEBUG -D_STLP_DEBUG" +RC_OUTPUT_OPTION = -fo$@ + +COMPILE.rc = ${RC} ${RCFLAGS} +LINK.cc = ilink32 $(subst /,\,$(LDFLAGS)) + +LDFLAGS += -ap -D -Gn -Gi + +dbg-static : DEFS += -D_DEBUG +dbg-shared : DEFS += -D_DEBUG +stldbg-static : DEFS += -D_DEBUG +stldbg-shared : DEFS += -D_DEBUG + +# STLport DEBUG mode specific defines +stldbg-static : DEFS += -D_STLP_DEBUG +stldbg-shared : DEFS += -D_STLP_DEBUG +stldbg-static-dep : DEFS += -D_STLP_DEBUG +stldbg-shared-dep : DEFS += -D_STLP_DEBUG + +# optimization and debug compiler flags +release-static : OPT += -O2 -vi- +release-shared : OPT += -O2 -vi- + +dbg-static : OPT += -R -v -y +dbg-shared : OPT += -R -v -y +stldbg-static : OPT += -R -v -y +stldbg-shared : OPT += -R -v -y + +LDLIBS += import32.lib kernel32.lib +ifndef STLP_BUILD_NO_THREAD +ifndef STLP_BUILD_FORCE_STATIC_RUNTIME +release-shared : LDLIBS += cw32mti.lib +dbg-shared : LDLIBS += cw32mti.lib +stldbg-shared : LDLIBS += cw32mti.lib +else +release-shared : LDLIBS += cw32mt.lib +dbg-shared : LDLIBS += cw32mt.lib +stldbg-shared : LDLIBS += cw32mt.lib +endif +ifndef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +release-static : LDLIBS += cw32mt.lib +dbg-static : LDLIBS += cw32mt.lib +stldbg-static : LDLIBS += cw32mt.lib +else +release-static : LDLIBS += cw32mti.lib +dbg-static : LDLIBS += cw32mti.lib +stldbg-static : LDLIBS += cw32mti.lib +endif +else +ifndef STLP_BUILD_FORCE_STATIC_RUNTIME +release-shared : LDLIBS += cw32i.lib +dbg-shared : LDLIBS += cw32i.lib +stldbg-shared : LDLIBS += cw32i.lib +else +release-shared : LDLIBS += cw32.lib +dbg-shared : LDLIBS += cw32.lib +stldbg-shared : LDLIBS += cw32.lib +endif +ifndef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +release-static : LDLIBS += cw32.lib +dbg-static : LDLIBS += cw32.lib +stldbg-static : LDLIBS += cw32.lib +else +release-static : LDLIBS += cw32i.lib +dbg-static : LDLIBS += cw32i.lib +stldbg-static : LDLIBS += cw32i.lib +endif +endif + +ifndef LIBNAME +ifdef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +release-static: DEFS += -D_STLP_USE_STATIC_LIB +dbg-static: DEFS += -D_STLP_USE_STATIC_LIB +stldbg-static: DEFS += -D_STLP_USE_STATIC_LIB +endif +ifdef STLP_BUILD_FORCE_STATIC_RUNTIME +release-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB +dbg-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB +stldbg-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB +endif +endif + +# map output option (see build/Makefiles/gmake/dmc.mak) + +MAP_OUTPUT_OPTION = + +# dependency output parser (dependencies collector) + +DP_OUTPUT_DIR = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR)/\1.o $@ : |g' > $@; \ + [ -s $@ ] || rm -f $@ + +DP_OUTPUT_DIR_DBG = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR_DBG)/\1.o $@ : |g' > $@; \ + [ -s $@ ] || rm -f $@ + +DP_OUTPUT_DIR_STLDBG = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR_STLDBG)/\1.o $@ : |g' > $@; \ + [ -s $@ ] || rm -f $@ + Added: trunk/complement/explore/Makefiles/gmake/dmc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/dmc.mak (rev 0) +++ trunk/complement/explore/Makefiles/gmake/dmc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -0,0 +1,145 @@ +# Time-stamp: <07/05/31 01:03:50 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# + +ALL_TAGS = all-static all-shared +ifdef LIBNAME +INSTALL_TAGS = install-static install-shared +endif + +CXX := dmc +CC := dmc +RC := rcc + +DEFS ?= +OPT ?= + +CFLAGS = -Ae -C -p -3 -w6 -w12 +CXXFLAGS = -Ae -C -p -3 -w12 + +DEFS += -DSTRICT + +ifdef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +release-static : OPT += -ND +dbg-static : OPT += -ND +stldbg-static : OPT += -ND +endif + +ifndef STLP_BUILD_FORCE_STATIC_RUNTIME +release-shared : OPT += -ND +dbg-shared : OPT += -ND +stldbg-shared : OPT += -ND +endif + +ifndef STLP_BUILD_NO_RTTI +OPT += -Ar +endif + +#Add Windows target. +ifndef STLP_BUILD_WINDOWS_95 +WINVER=0x0410 +else +WINVER=0x0400 +endif +release-shared: DEFS += -DWINVER=$(WINVER) +dbg-shared: DEFS += -DWINVER=$(WINVER) +stldbg-shared: DEFS += -DWINVER=$(WINVER) +release-static: DEFS += -DWINVER=$(WINVER) +dbg-static: DEFS += -DWINVER=$(WINVER) +stldbg-static: DEFS += -DWINVER=$(WINVER) + +OUTPUT_OPTION = -o$@ +LINK_OUTPUT_OPTION = $(subst /,\,$@) +CPPFLAGS = $(DEFS) $(OPT) $(INCLUDES) + +CDEPFLAGS = -E -M +CCDEPFLAGS = -E -M +RCFLAGS = -32 -I${STLPORT_INCLUDE_DIR} -DCOMP=dmc + +release-shared : RCFLAGS += -DBUILD=r -DBUILD_INFOS="-o" +dbg-shared : RCFLAGS += -DBUILD=g -DBUILD_INFOS="-gl -D_DEBUG" +stldbg-shared : RCFLAGS += -DBUILD=stlg -DBUILD_INFOS="-gl -D_STLP_DEBUG" +RC_OUTPUT_OPTION = $(OUTPUT_OPTION) + +COMPILE.rc = ${RC} ${RCFLAGS} +LINK.cc = dm_link $(LDFLAGS) + +LDLIBS += user32.lib kernel32.lib + +# STLport DEBUG mode specific defines +dbg-static : DEFS += -D_DEBUG +dbg-shared : DEFS += -D_DEBUG +stldbg-static : DEFS += -D_DEBUG +stldbg-shared : DEFS += -D_DEBUG +dbg-static-dep : DEFS += -D_DEBUG +dbg-shared-dep : DEFS += -D_DEBUG +stldbg-static : DEFS += -D_STLP_DEBUG +stldbg-shared : DEFS += -D_STLP_DEBUG +stldbg-static-dep : DEFS += -D_STLP_DEBUG +stldbg-shared-dep : DEFS += -D_STLP_DEBUG + +# optimization and debug compiler flags +release-static : OPT += -o +release-shared : OPT += -o +dbg-static : OPT += -gl +dbg-shared : OPT += -gl +stldbg-static : OPT += -gl +stldbg-shared : OPT += -gl + +release-static : OPT += -D_MT +dbg-static : OPT += -D_MT +stldbg-static : OPT += -D_MT + +release-static : AR += -p128 +dbg-static : AR += -p512 +stldbg-static : AR += -p512 + +ifndef LIBNAME +ifdef STLP_BUILD_FORCE_DYNAMIC_RUNTIME +release-static: DEFS += -D_STLP_USE_STATIC_LIB +dbg-static: DEFS += -D_STLP_USE_STATIC_LIB +stldbg-static: DEFS += -D_STLP_USE_STATIC_LIB +endif +ifdef STLP_BUILD_FORCE_STATIC_RUNTIME +release-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB +dbg-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB +stldbg-shared: DEFS += -D_STLP_USE_DYNAMIC_LIB +endif +endif + +# map output option (move map files to output dir) + +ifdef LIBNAME +release-shared: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR))\$(SO_NAME_BASE).map +dbg-shared: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR_DBG))\$(SO_NAME_DBG_BASE).map +stldbg-shared: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR_STLDBG))\$(SO_NAME_STLDBG_BASE).map +else +release-shared: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR))\$(PRGNAME).map +release-static: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR))\$(PRGNAME).map +dbg-shared: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR_DBG))\$(PRGNAME).map +dbg-static: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR_DBG))\$(PRGNAME).map +stldbg-shared: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR_STLDBG))\$(PRGNAME).map +stldbg-static: MAP_OUTPUT_OPTION = $(subst /,\,$(OUTPUT_DIR_STLDBG))\$(PRGNAME).map +endif + +# dependency output parser (dependencies collector) + +DP_OUTPUT_DIR = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR)/\1.o $@ : |g' > $@; \ + [ -s $@ ] || rm -f $@ + +DP_OUTPUT_DIR_DBG = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR_DBG)/\1.o $@ : |g' > $@; \ + [ -s $@ ] || rm -f $@ + +DP_OUTPUT_DIR_STLDBG = | sed 's|\($*\)\.o[ :]*|$(OUTPUT_DIR_STLDBG)/\1.o $@ : |g' > $@; \ + [ -s $@ ] || rm -f $@ + Modified: trunk/complement/explore/Makefiles/gmake/gcc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/gcc.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/gcc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# Time-stamp: <06/11/10 15:53:35 ptr> +# Time-stamp: <07/05/31 01:25:52 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 # Petr Ovtchenkov @@ -21,7 +21,7 @@ CC := $_FORCE_CC endif -ifeq ($(OSNAME), cygming) +ifeq ($(OSNAME), windows) RC := windres endif @@ -37,7 +37,13 @@ CXX_VERSION_MAJOR := $(shell ${CXX} -dumpversion | awk 'BEGIN { FS = "."; } { print $1; }') CXX_VERSION_MINOR := $(shell ${CXX} -dumpversion | awk 'BEGIN { FS = "."; } { print $2; }') CXX_VERSION_PATCH := $(shell ${CXX} -dumpversion | awk 'BEGIN { FS = "."; } { print $3; }') +# This is to differentiate Apple-builded compiler from original +# compiler (it's has different behaviour) +ifneq ("$(shell ${CXX} -v 2>&1 | grep Apple)", "") +GCC_APPLE_CC := 1 +endif else +ifneq ($(OSNAME), windows) CXX_VERSION := $(shell ${CXX} --version | grep GCC | awk '{ print $$3; }') ifeq ($(CXX_VERSION),) @@ -49,6 +55,7 @@ CXX_VERSION_MINOR := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$2; }') CXX_VERSION_PATCH := $(shell echo ${CXX_VERSION} | awk 'BEGIN { FS = "."; } { print $$3; }') endif +endif DEFS ?= OPT ?= @@ -63,12 +70,13 @@ LINK_OUTPUT_OPTION = ${OUTPUT_OPTION} CPPFLAGS = $(DEFS) $(INCLUDES) -ifeq ($(OSNAME), cygming) -release-shared : RCFLAGS = --include-dir=${STLPORT_INCLUDE_DIR} -DCOMP=gcc -DBUILD=r -DBUILD_INFOS="-O2" --output-format coff -dbg-shared : RCFLAGS = --include-dir=${STLPORT_INCLUDE_DIR} -DCOMP=gcc -DBUILD=d -DBUILD_INFOS="-g" --output-format coff -stldbg-shared : RCFLAGS = --include-dir=${STLPORT_INCLUDE_DIR} -DCOMP=gcc -DBUILD=stld -DBUILD_INFOS="-g -D_STLP_DEBUG" --output-format coff +ifeq ($(OSNAME), windows) +RCFLAGS = --include-dir=${STLPORT_INCLUDE_DIR} --output-format coff -DCOMP=gcc +release-shared : RCFLAGS += -DBUILD_INFOS=-O2 +dbg-shared : RCFLAGS += -DBUILD=g -DBUILD_INFOS=-g +stldbg-shared : RCFLAGS += -DBUILD=stlg -DBUILD_INFOS="-g -D_STLP_DEBUG" RC_OUTPUT_OPTION = -o $@ -CXXFLAGS = -Wall -Wsign-promo -fexceptions -fident +CXXFLAGS = -Wall -Wsign-promo -Wcast-qual -fexceptions -fident ifeq ($(OSREALNAME), mingw) CCFLAGS += -mthreads CFLAGS += -mthreads @@ -80,21 +88,22 @@ CFLAGS += $(OPT) CXXFLAGS += $(OPT) COMPILE.rc = $(RC) $(RCFLAGS) + +#Add Windows target. +ifdef STLP_BUILD_WINDOWS_95 +WINVER=0x0400 +else +WINVER=0x0410 endif -ifeq ($(OSNAME), windows) -release-shared : RCFLAGS = --include-dir=${STLPORT_INCLUDE_DIR} -DCOMP=gcc -DBUILD=r -DBUILD_INFOS="-O2" --output-format coff -dbg-shared : RCFLAGS = --include-dir=${STLPORT_INCLUDE_DIR} -DCOMP=gcc -DBUILD=d -DBUILD_INFOS="-g" --output-format coff -stldbg-shared : RCFLAGS = --include-dir=${STLPORT_INCLUDE_DIR} -DCOMP=gcc -DBUILD=stld -DBUILD_INFOS="-g -D_STLP_DEBUG" --output-format coff -RC_OUTPUT_OPTION = -o $@ -CXXFLAGS = -Wall -Wsign-promo -fexceptions -fident -CCFLAGS += -mthreads -CFLAGS += -mthreads -CXXFLAGS += -mthreads -CCFLAGS += $(OPT) -CFLAGS += $(OPT) -CXXFLAGS += $(OPT) -COMPILE.rc = $(RC) $(RCFLAGS) +release-static : DEFS += -D_STLP_USE_STATIC_LIB -DWINVER=$(WINVER) +dbg-static : DEFS += -D_DEBUG -D_STLP_USE_STATIC_LIB -DWINVER=$(WINVER) +stldbg-static : DEFS += -D_DEBUG -D_STLP_USE_STATIC_LIB -DWINVER=$(WINVER) + +release-shared: DEFS += -DWINVER=$(WINVER) +dbg-shared : DEFS += -D_DEBUG -DWINVER=$(WINVER) +stldbg-shared : DEFS += -D_DEBUG -DWINVER=$(WINVER) + endif ifeq ($(OSNAME),sunos) @@ -159,15 +168,11 @@ endif # Required for correct order of static objects dtors calls: -ifneq ($(OSNAME),cygming) -ifneq ($(OSNAME),windows) -ifneq ($(OSNAME),darwin) +ifeq ("$(findstring $(OSNAME),darwin windows)","") ifneq ($(CXX_VERSION_MAJOR),2) CXXFLAGS += -fuse-cxa-atexit endif endif -endif -endif # Code should be ready for this option #ifneq ($(OSNAME),windows) Modified: trunk/complement/explore/Makefiles/gmake/hp-ux/sys.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/hp-ux/sys.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/hp-ux/sys.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,10 +1,21 @@ -# Time-stamp: <05/09/09 21:12:16 ptr> -# $Id$ +# Time-stamp: <07/05/31 00:47:11 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# -INSTALL := $$HOME/bin/install-sh +INSTALL := cp -INSTALL_SO := ${INSTALL} -c -m 0755 -INSTALL_A := ${INSTALL} -c -m 0644 -INSTALL_EXE := ${INSTALL} -c -m 0755 +INSTALL_SO := ${INSTALL} +INSTALL_A := ${INSTALL} +INSTALL_EXE := ${INSTALL} EXT_TEST := /usr/bin/test Modified: trunk/complement/explore/Makefiles/gmake/hp-ux/targetsys.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/hp-ux/targetsys.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/hp-ux/targetsys.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,5 +1,13 @@ -# Time-stamp: <05/09/09 21:05:18 ptr> -# $Id$ +# Time-stamp: <07/05/31 00:48:27 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# SO := sl Modified: trunk/complement/explore/Makefiles/gmake/lib/aCC.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/lib/aCC.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/lib/aCC.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# -*- makefile -*- Time-stamp: <07/03/08 21:38:16 ptr> +# -*- makefile -*- Time-stamp: <07/05/31 00:50:40 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005-2007 # Petr Ovtchenkov @@ -9,6 +9,6 @@ # Licensed under the Academic Free License version 3.0 # -dbg-shared: LDFLAGS += -shared -Wl,-C20 -Wl,-dynamic -Wl,+h$(SO_NAME_DBGxx) ${LDSEARCH} -stldbg-shared: LDFLAGS += -shared -Wl,-C20 -Wl,-dynamic -Wl,+h$(SO_NAME_STLDBGxx) ${LDSEARCH} -release-shared: LDFLAGS += -shared -Wl,-C20 -Wl,-dynamic -Wl,+h$(SO_NAMExx) ${LDSEARCH} +dbg-shared: LDFLAGS += -b +nostl -Wl,+h$(SO_NAME_DBGxx) ${LDSEARCH} +stldbg-shared: LDFLAGS += -b +nostl -Wl,+h$(SO_NAME_STLDBGxx) ${LDSEARCH} +release-shared: LDFLAGS += -b +nostl -Wl,+h$(SO_NAMExx) ${LDSEARCH} Added: trunk/complement/explore/Makefiles/gmake/lib/bcc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/lib/bcc.mak (rev 0) +++ trunk/complement/explore/Makefiles/gmake/lib/bcc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -0,0 +1,35 @@ +# -*- makefile -*- Time-stamp: <07/05/31 01:29:22 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# + +release-shared : OPT += -tWD +dbg-shared : OPT += -tWD +stldbg-shared : OPT += -tWD + +release-shared : LDFLAGS += -Tpd -V4.00 -w -w-dup +dbg-shared : LDFLAGS += -Tpd -V4.00 -v -w -w-dup +stldbg-shared : LDFLAGS += -Tpd -V4.00 -v -w -w-dup + +START_OBJ := c0d32.obj + +install-dbg-shared: install-dbg-shared-tds +install-stldbg-shared: install-stldbg-shared-tds + +TDS_LIBNAME_DBG := $(LIB_PREFIX)${LIBNAME}${DBG_SUFFIX}${LIB_TYPE}${LIB_SUFFIX}.tds +TDS_LIBNAME_STLDBG := $(LIB_PREFIX)${LIBNAME}${STLDBG_SUFFIX}${LIB_TYPE}${LIB_SUFFIX}.tds + +install-dbg-shared-tds: + $(INSTALL_SO) $(subst /,\,$(OUTPUT_DIR_DBG)/${TDS_LIBNAME_DBG} $(INSTALL_BIN_DIR)/) + +install-stldbg-shared-tds: + $(INSTALL_SO) $(subst /,\,$(OUTPUT_DIR_STLDBG)/${TDS_LIBNAME_STLDBG} $(INSTALL_BIN_DIR)/) Modified: trunk/complement/explore/Makefiles/gmake/lib/clean.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/lib/clean.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/lib/clean.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# -*- makefile -*- Time-stamp: <06/11/17 00:39:31 ptr> +# -*- makefile -*- Time-stamp: <07/05/30 23:55:47 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 # Petr Ovtchenkov @@ -26,7 +26,7 @@ @-rm -f $${$(1)_A_NAME_OUT} @-rm -f $${$(1)_A_NAME_OUT_DBG} @-rm -f $${$(1)_A_NAME_OUT_STLDBG} -ifeq ($(OSNAME), cygming) +ifeq ($(OSNAME), windows) @-rm -f $${$(1)_LIB_NAME_OUT} @-rm -f $${$(1)_LIB_NAME_OUT_DBG} @-rm -f $${$(1)_LIB_NAME_OUT_STLDBG} @@ -73,7 +73,7 @@ @-rm -f ${A_NAME_OUT} @-rm -f ${A_NAME_OUT_DBG} @-rm -f ${A_NAME_OUT_STLDBG} -ifeq ($(OSNAME), cygming) +ifeq ($(OSNAME), windows) @-rm -f ${LIB_NAME_OUT} @-rm -f ${LIB_NAME_OUT_DBG} @-rm -f ${LIB_NAME_OUT_STLDBG} Added: trunk/complement/explore/Makefiles/gmake/lib/dmc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/lib/dmc.mak (rev 0) +++ trunk/complement/explore/Makefiles/gmake/lib/dmc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -0,0 +1,25 @@ +# -*- makefile -*- Time-stamp: <07/05/31 01:29:36 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# + +release-shared: OPT += -WD +dbg-shared: OPT += -WD +stldbg-shared: OPT += -WD + +release-shared: LDFLAGS += /IMPLIB:$(subst /,\,$(OUTPUT_DIR))\$(SO_NAME_BASE).lib +dbg-shared: LDFLAGS += /CODEVIEW/IMPLIB:$(subst /,\,$(OUTPUT_DIR_DBG))\$(SO_NAME_DBG_BASE).lib +stldbg-shared: LDFLAGS += /CODEVIEW/IMPLIB:$(subst /,\,$(OUTPUT_DIR_STLDBG))\$(SO_NAME_STLDBG_BASE).lib + +DEF_OPTION = $(subst /,\,$(OUTPUT_DIR))\$(SO_NAME_BASE).def +DEF_OPTION_DBG = $(subst /,\,$(OUTPUT_DIR_DBG))\$(SO_NAME_DBG_BASE).def +DEF_OPTION_STLDBG = $(subst /,\,$(OUTPUT_DIR_STLDBG))\$(SO_NAME_STLDBG_BASE).def Modified: trunk/complement/explore/Makefiles/gmake/lib/gcc.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/lib/gcc.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/lib/gcc.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# -*- makefile -*- Time-stamp: <07/03/08 21:26:20 ptr> +# -*- makefile -*- Time-stamp: <07/05/31 00:55:13 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005-2007 # Petr Ovtchenkov @@ -14,7 +14,9 @@ # tag with assignment fail, but work assignment for all tags # (really that more correct). +ifneq ($(OSNAME), windows) OPT += -fPIC +endif ifndef NOT_USE_NOSTDLIB @@ -62,7 +64,11 @@ ifeq ($(OSNAME),sunos) _USE_NOSTDLIB := 1 endif + +ifeq ($(OSNAME),darwin) +_USE_NOSTDLIB := 1 endif +endif ifndef WITHOUT_STLPORT LDSEARCH += -L${STLPORT_LIB_DIR} @@ -71,13 +77,6 @@ dbg-shared: STLPORT_LIB = -lstlportg stldbg-shared: STLPORT_LIB = -lstlportstlg -ifeq ($(OSNAME),cygming) -LIB_VERSION = ${LIBMAJOR}.${LIBMINOR} -release-shared : STLPORT_LIB = -lstlport.${LIB_VERSION} -dbg-shared : STLPORT_LIB = -lstlportg.${LIB_VERSION} -stldbg-shared : STLPORT_LIB = -lstlportstlg.${LIB_VERSION} -endif - ifeq ($(OSNAME),windows) LIB_VERSION = ${LIBMAJOR}.${LIBMINOR} release-shared : STLPORT_LIB = -lstlport.${LIB_VERSION} @@ -139,6 +138,16 @@ END_OBJ := $(shell for o in crtend.o crtn.o; do ${CXX} -print-file-name=$$o; done) STDLIBS := ${STLPORT_LIB} ${_LGCC_S} -lpthread -lc -lm -lrt endif +ifeq ($(OSNAME),darwin) +START_OBJ := +END_OBJ := +ifdef GCC_APPLE_CC +STDLIBS := ${STLPORT_LIB} -lgcc -lc -lm +else +LDFLAGS += -single_module +STDLIBS := ${STLPORT_LIB} ${_LGCC_S} -lc -lm +endif +endif #END_A_OBJ := $(shell for o in crtn.o; do ${CXX} -print-file-name=$$o; done) NOSTDLIB := -nostdlib # endif @@ -151,9 +160,9 @@ endif ifeq ($(OSNAME),hp-ux) -dbg-shared: LDFLAGS += -shared -Wl,-C20 -Wl,-dynamic -Wl,+h$(SO_NAME_DBGxx) ${LDSEARCH} -stldbg-shared: LDFLAGS += -shared -Wl,-C20 -Wl,-dynamic -Wl,+h$(SO_NAME_STLDBGxx) ${LDSEARCH} -release-shared: LDFLAGS += -shared -Wl,-C20 -Wl,-dynamic -Wl,+h$(SO_NAMExx) ${LDSEARCH} +dbg-shared: LDFLAGS += -shared -Wl,-dynamic -Wl,+h$(SO_NAME_DBGxx) ${LDSEARCH} +stldbg-shared: LDFLAGS += -shared -Wl,-dynamic -Wl,+h$(SO_NAME_STLDBGxx) ${LDSEARCH} +release-shared: LDFLAGS += -shared -Wl,-dynamic -Wl,+h$(SO_NAMExx) ${LDSEARCH} endif ifeq ($(OSNAME),sunos) @@ -174,11 +183,10 @@ release-static: LDFLAGS += ${LDSEARCH} endif -ifeq ($(OSNAME),cygming) -OPT := -dbg-shared: LDFLAGS += -shared -Wl,--out-implib=${LIB_NAME_OUT_DBG},--export-all-symbols,--disable-auto-import -stldbg-shared: LDFLAGS += -shared -Wl,--out-implib=${LIB_NAME_OUT_STLDBG},--export-all-symbols -release-shared: LDFLAGS += -shared -Wl,--out-implib=${LIB_NAME_OUT},--export-all-symbols +ifeq ($(OSNAME),windows) +dbg-shared: LDFLAGS += -shared -Wl,--out-implib=${LIB_NAME_OUT_DBG},--enable-auto-image-base +stldbg-shared: LDFLAGS += -shared -Wl,--out-implib=${LIB_NAME_OUT_STLDBG},--enable-auto-image-base +release-shared: LDFLAGS += -shared -Wl,--out-implib=${LIB_NAME_OUT},--enable-auto-image-base dbg-static: LDFLAGS += -static ${LDSEARCH} stldbg-static: LDFLAGS += -static ${LDSEARCH} release-static: LDFLAGS += -static ${LDSEARCH} @@ -197,9 +205,9 @@ CURRENT_VERSION := ${MAJOR}.${MINOR}.${PATCH} COMPATIBILITY_VERSION := $(CURRENT_VERSION) -dbg-shared: LDFLAGS += -dynamiclib -compatibility_version $(COMPATIBILITY_VERSION) -current_version $(CURRENT_VERSION) -install_name $(SO_NAME_DBGxx) -Wl ${LDSEARCH} -stldbg-shared: LDFLAGS += -dynamiclib -compatibility_version $(COMPATIBILITY_VERSION) -current_version $(CURRENT_VERSION) -install_name $(SO_NAME_STLDBGxx) -Wl ${LDSEARCH} -release-shared: LDFLAGS += -dynamiclib -compatibility_version $(COMPATIBILITY_VERSION) -current_version $(CURRENT_VERSION) -install_name $(SO_NAMExx) -Wl ${LDSEARCH} +dbg-shared: LDFLAGS += -dynamic -dynamiclib -compatibility_version $(COMPATIBILITY_VERSION) -current_version $(CURRENT_VERSION) -install_name $(SO_NAME_DBGxx) ${LDSEARCH} ${NOSTDLIB} +stldbg-shared: LDFLAGS += -dynamic -dynamiclib -compatibility_version $(COMPATIBILITY_VERSION) -current_version $(CURRENT_VERSION) -install_name $(SO_NAME_STLDBGxx) ${LDSEARCH} ${NOSTDLIB} +release-shared: LDFLAGS += -dynamic -dynamiclib -compatibility_version $(COMPATIBILITY_VERSION) -current_version $(CURRENT_VERSION) -install_name $(SO_NAMExx) ${LDSEARCH} ${NOSTDLIB} dbg-static: LDFLAGS += -staticlib ${LDSEARCH} stldbg-static: LDFLAGS += -staticlib ${LDSEARCH} release-static: LDFLAGS += -staticlib ${LDSEARCH} Modified: trunk/complement/explore/Makefiles/gmake/sysid.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/sysid.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/sysid.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# Time-stamp: <07/03/08 21:43:48 ptr> +# Time-stamp: <07/05/30 23:51:19 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005-2007 # Petr Ovtchenkov @@ -17,12 +17,12 @@ # RedHat use nonstandard options for uname at least in cygwin, # macro should be overwritten: ifeq (cygwin,$(findstring cygwin,$(OSNAME))) -OSNAME := cygming +OSNAME := windows OSREALNAME := $(shell uname -o | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',-') endif ifeq (mingw,$(findstring mingw,$(OSNAME))) -OSNAME := cygming +OSNAME := windows OSREALNAME := mingw endif @@ -61,12 +61,12 @@ # RedHat use nonstandard options for uname at least in cygwin, # macro should be overwritten: ifeq (cygwin,$(findstring cygwin,$(BUILD_OSNAME))) -BUILD_OSNAME := cygming +BUILD_OSNAME := windows BUILD_OSREALNAME := $(shell uname -o | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',-') endif ifeq (mingw,$(findstring mingw,$(BUILD_OSNAME))) -BUILD_OSNAME := cygming +BUILD_OSNAME := windows BUILD_OSREALNAME := mingw endif Modified: trunk/complement/explore/Makefiles/gmake/targets.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/targets.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/targets.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,4 @@ -# Time-stamp: <06/11/17 10:29:59 ptr> +# Time-stamp: <07/05/30 23:59:42 ptr> # # Copyright (c) 1997-1999, 2002, 2003, 2005, 2006 # Petr Ovtchenkov @@ -46,7 +46,7 @@ # if sources disposed in several dirs, calculate appropriate rules DIRS_UNIQUE_SRC := $(dir $(SRC_CPP) $(SRC_CC) $(SRC_CXX) $(SRC_C) $(SRC_S) ) -ifeq (${OSNAME},cygming) +ifeq (${OSNAME},windows) DIRS_UNIQUE_SRC := ${DIRS_UNIQUE_SRC} $(dir $(SRC_RC) ) endif DIRS_UNIQUE_SRC := $(sort $(DIRS_UNIQUE_SRC) $(PRGS_DIR_SRC)) @@ -111,7 +111,7 @@ $(call rule_o,_A_STLDBG,$(1)) endif endif -ifeq ($(OSNAME),cygming) +ifeq ($(OSNAME),windows) $(call rule_rc,,$(1)) $(call rule_rc,_DBG,$(1)) ifndef WITHOUT_STLPORT @@ -123,7 +123,7 @@ $(foreach dir,$(DIRS_UNIQUE_SRC),$(eval $(call rules_,$(dir)))) ALLBASE := $(basename $(notdir $(SRC_CC) $(SRC_CPP) $(SRC_CXX) $(SRC_C) $(SRC_S))) -ifeq (${OSNAME},cygming) +ifeq (${OSNAME},windows) RCBASE += $(basename $(notdir $(SRC_RC))) endif Modified: trunk/complement/explore/Makefiles/gmake/windows/rules-install-so.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/windows/rules-install-so.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/windows/rules-install-so.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,5 +1,16 @@ -# -*- makefile -*- Time-stamp: <03/07/15 18:26:22 ptr> -# $Id$ +# -*- makefile -*- Time-stamp: <07/05/31 00:12:45 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# INSTALL_TAGS ?= install-shared Modified: trunk/complement/explore/Makefiles/gmake/windows/rules-so.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/windows/rules-so.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/windows/rules-so.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,5 +1,16 @@ -# -*- makefile -*- Time-stamp: <03/10/27 18:15:05 ptr> -# $Id$ +# -*- makefile -*- Time-stamp: <07/05/31 00:13:32 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# # Shared libraries tags Modified: trunk/complement/explore/Makefiles/gmake/windows/sys.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/windows/sys.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/windows/sys.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,11 +1,31 @@ -# Time-stamp: <05/09/09 21:12:38 ptr> -# $Id$ +# Time-stamp: <07/05/31 00:10:23 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# RC := windres + +ifeq ($(OSREALNAME),cygwin) +INSTALL := install + +INSTALL_SO := ${INSTALL} -m 0755 +INSTALL_A := ${INSTALL} -m 0644 +INSTALL_EXE := ${INSTALL} -m 0755 +else INSTALL := copy INSTALL_SO := ${INSTALL} INSTALL_A := ${INSTALL} INSTALL_EXE := ${INSTALL} +endif EXT_TEST := test Modified: trunk/complement/explore/Makefiles/gmake/windows/targetsys.mak =================================================================== --- trunk/complement/explore/Makefiles/gmake/windows/targetsys.mak 2007-05-30 11:35:35 UTC (rev 1574) +++ trunk/complement/explore/Makefiles/gmake/windows/targetsys.mak 2007-05-31 04:34:01 UTC (rev 1575) @@ -1,4 +1,51 @@ -# Time-stamp: <05/09/09 21:03:45 ptr> -# $Id$ +# Time-stamp: <07/05/31 00:07:23 ptr> +# +# Copyright (c) 1997-1999, 2002, 2003, 2005-2007 +# Petr Ovtchenkov +# +# Copyright (c) 2006, 2007 +# Francois Dumont +# +# Portion Copyright (c) 1999-2001 +# Parallel Graphics Ltd. +# +# Licensed under the Academic Free License version 3.0 +# -include $(SRCROOT)/Makefiles/gmake/cygming/targetsys.mak +CC ?= gcc +CXX ?= g++ + +# shared library: +SO := dll +ifeq (gcc,$(COMPILER_NAME)) +LIB := dll.a +else +LIB := lib +endif + +EXP := exp +# executable: +EXE := .exe + +# static library extention: +ifeq (dmc,$(COMPILER_NAME)) +ARCH := lib +AR := dm_lib -n +AR_INS_R := -c +AR_EXTR := -x +AR_OUT = $(subst /,\,$@) +else +ifeq (bcc,$(COMPILER_NAME)) +ARCH := lib +AR := tlib +AR_INS_R := + +AR_EXTR := * +AR_OUT = $(subst /,\,$@) +else +ARCH := a +AR := ar +AR_INS_R := -rs +AR_EXTR := -x +AR_OUT = $@ +endif +endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-30 11:35:37
|
Revision: 1574 http://svn.sourceforge.net/complement/?rev=1574&view=rev Author: complement Date: 2007-05-30 04:35:35 -0700 (Wed, 30 May 2007) Log Message: ----------- what about of destructors order of auto objects? Added Paths: ----------- trunk/complement/explore/inquiry/AuTTL/ trunk/complement/explore/inquiry/AuTTL/Makefile trunk/complement/explore/inquiry/AuTTL/Makefile.inc trunk/complement/explore/inquiry/AuTTL/test.cc trunk/complement/explore/inquiry/AuTerm-order/ trunk/complement/explore/inquiry/AuTerm-order/Makefile trunk/complement/explore/inquiry/AuTerm-order/Makefile.inc trunk/complement/explore/inquiry/AuTerm-order/test.cc Property changes on: trunk/complement/explore/inquiry/AuTTL ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/inquiry/AuTTL/Makefile =================================================================== --- trunk/complement/explore/inquiry/AuTTL/Makefile (rev 0) +++ trunk/complement/explore/inquiry/AuTTL/Makefile 2007-05-30 11:35:35 UTC (rev 1574) @@ -0,0 +1,10 @@ +# -*- Makefile -*- Time-stamp: <03/07/09 18:08:47 ptr> + +SRCROOT := ../.. +COMPILER_NAME := gcc + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + +#CXXFLAGS += -fuse-cxa-atexit +# LDFLAGS += -Wl,-rpath=${STLPORT_LIB_DIR} Added: trunk/complement/explore/inquiry/AuTTL/Makefile.inc =================================================================== --- trunk/complement/explore/inquiry/AuTTL/Makefile.inc (rev 0) +++ trunk/complement/explore/inquiry/AuTTL/Makefile.inc 2007-05-30 11:35:35 UTC (rev 1574) @@ -0,0 +1,4 @@ +# -*- makefile -*- Time-stamp: <02/07/14 14:03:13 ptr> + +PRGNAME = test +SRC_CC = test.cc Added: trunk/complement/explore/inquiry/AuTTL/test.cc =================================================================== --- trunk/complement/explore/inquiry/AuTTL/test.cc (rev 0) +++ trunk/complement/explore/inquiry/AuTTL/test.cc 2007-05-30 11:35:35 UTC (rev 1574) @@ -0,0 +1,69 @@ +#include <iostream> + +using namespace std; + +class Obj +{ + public: + + Obj( int _v ) : + v( _v ) + { cerr << "Obj(" << v << ")" << endl; } + + Obj& operator=( const Obj& o ) + { cerr << "=(" << o.v << ")" << endl; /* v = o.v; */ } + + Obj( const Obj& o ) + { v = o.v; cerr << "O(Obj" << o.v << ")" << endl; } + + ~Obj() + { cerr << "~Obj(" << v << ")" << endl; } + + int v; +}; + +Obj f() +{ + Obj v(1); + const Obj& v2 = v; + + return v2; +} + +const Obj& g() // ill-formed! +{ + Obj v(2); + const Obj& v3 = v; // <--- + + return v3; // <--- +} + +Obj h() +{ + Obj v(4); + Obj v2(5); + + return v2; +} + +int main() +{ + { + Obj v0( 0 ); + + v0 = f(); + } + { + Obj v1( 3 ); + + v1 = g(); + } + { + Obj v2( 6 ); + + v2 = h(); + } + + return 0; +} + Property changes on: trunk/complement/explore/inquiry/AuTerm-order ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/inquiry/AuTerm-order/Makefile =================================================================== --- trunk/complement/explore/inquiry/AuTerm-order/Makefile (rev 0) +++ trunk/complement/explore/inquiry/AuTerm-order/Makefile 2007-05-30 11:35:35 UTC (rev 1574) @@ -0,0 +1,10 @@ +# -*- Makefile -*- Time-stamp: <03/07/09 18:08:47 ptr> + +SRCROOT := ../.. +COMPILER_NAME := gcc + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + +#CXXFLAGS += -fuse-cxa-atexit +# LDFLAGS += -Wl,-rpath=${STLPORT_LIB_DIR} Added: trunk/complement/explore/inquiry/AuTerm-order/Makefile.inc =================================================================== --- trunk/complement/explore/inquiry/AuTerm-order/Makefile.inc (rev 0) +++ trunk/complement/explore/inquiry/AuTerm-order/Makefile.inc 2007-05-30 11:35:35 UTC (rev 1574) @@ -0,0 +1,4 @@ +# -*- makefile -*- Time-stamp: <02/07/14 14:03:13 ptr> + +PRGNAME = test +SRC_CC = test.cc Added: trunk/complement/explore/inquiry/AuTerm-order/test.cc =================================================================== --- trunk/complement/explore/inquiry/AuTerm-order/test.cc (rev 0) +++ trunk/complement/explore/inquiry/AuTerm-order/test.cc 2007-05-30 11:35:35 UTC (rev 1574) @@ -0,0 +1,44 @@ +#include <iostream> + +using namespace std; + +class Obj +{ + public: + + Obj( int _v ) : + v( _v ) + { cerr << "Obj(" << v << ")" << endl; } + + Obj& operator=( const Obj& o ) + { v = o.v; cerr << "=(" << o.v << ")" << endl; } + + Obj( const Obj& o ) + { v = o.v; cerr << "O(Obj" << o.v << ")" << endl; } + + ~Obj() + { cerr << "~Obj(" << v << ")" << endl; } + + int v; + static int q; +}; + +int Obj::q; + +Obj f() +{ + Obj v1(1); + Obj v2(2); + + return v2; +} + +int main() +{ + Obj v0( 0 ); + + v0 = f(); + + return 0; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-29 16:50:33
|
Revision: 1573 http://svn.sourceforge.net/complement/?rev=1573&view=rev Author: complement Date: 2007-05-29 09:50:29 -0700 (Tue, 29 May 2007) Log Message: ----------- development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-28 17:45:58 UTC (rev 1572) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-29 16:50:29 UTC (rev 1573) @@ -331,7 +331,7 @@ return vt; } -vtime& vtime::operator += ( const vtime_proc_type& t ) +vtime& vtime::operator +=( const vtime_proc_type& t ) { vtime_type::iterator i = vt.begin(); @@ -419,60 +419,28 @@ for ( ; gr != ge; ++gr ) { // over all groups if ( gr->first == mgrp ) { -#if 0 - comp( vt, mgrp, ev.src() ); - comp( vt, mgrp, ev.src() ); - - for ( gvtime_type::const_iterator my_gi = vt.begin(); my_gi != vt.end(); ++my_gi ) { - if ( my_gi->first == mgrp ) { - vtime_type vt_tmp = my_gi->second.vt + gr->second.vt; - for (vtime_type::const_iterator i = vt_tmp.begin(); i != vt_tmp.end(); ++i ) { - if ( i->first == ev.src() ) { - vtime_type::const_iterator j = my_gi->second.vt.begin(); - for ( ; j != my_gi->second.vt.end(); ++j ) { - if ( i->first == j->first ) { - if ( i->second != j->second + 1) { - return false; - } - break; - } + if ( comp( lvt, mgrp, ev.src() ) + 1 != comp( ev.value().gvt.gvt, mgrp, ev.src() ) ) { + return false; + } + for ( gvtime_type::const_iterator i = lvt.begin(); i != lvt.end(); ++i ) { + if ( mgrp == i->first ) { + for ( vtime_type::const_iterator j = ) { + } + } + } + } else { + for ( gvtime_type::const_iterator i = lvt.begin(); i != lvt.end(); ++i ) { + if ( gr->first == i->first ) { + vtime vt_tmp = i->second + gr->second; + for ( gvtime_type::const_iterator j = vt.begin(); j != vt.end(); ++j ) { + if ( i->first == j->first ) { + if ( !(vt_tmp <= j->second) ) { + return false; } - if ( j == my_gi->second.vt.end() ) { - if ( i->second != 1 ) { - return false; - } - } - } else { - if ( ) { - } } } - vtime_type vt_null; - vt_null += make_pair( ev.src(), 1 ); } } - // vtime_group_type vt_tmp = vt + *gr; - // vtime_type vt_tmp = last_vt[ev.value().grp] + gr->second.vt; -#endif - -#if 0 - vtime_type::const_iterator i = vt_tmp.begin(); - if ( vt[mgrp].empty() ) { - vtime vt_null; - vt_null += make_pair( ev.src(), 1 ); - cerr << vt_tmp << vt_null.vt; - return vt_tmp == vt_null.vt; - } else { - vtime_type::const_iterator j = vt[mgrp].begin(); - } -#endif - } else { -#if 0 - vtime_type vt_tmp = last_vt[mgrp] + gr->second.vt; - if ( !(vt_tmp <= vt[mgrp] )) { - return false; - } -#endif } } Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-28 17:45:58 UTC (rev 1572) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-29 16:50:29 UTC (rev 1573) @@ -6,6 +6,7 @@ #include <algorithm> #include <list> #include <vector> +#include <hash_map> #include <iterator> #include <istream> @@ -20,41 +21,11 @@ typedef stem::addr_type oid_type; typedef unsigned vtime_unit_type; typedef uint32_t group_type; -typedef std::pair<oid_type, vtime_unit_type> vtime_proc_type; -typedef std::list<vtime_proc_type> vtime_type; +typedef std::hash_map<oid_type, vtime_unit_type> vtime_type; -inline bool uorder( const vtime_proc_type& l, const vtime_proc_type& r ) -{ - return l.first < r.first; -} +// typedef std::pair<oid_type, vtime_unit_type> vtime_proc_type; +// typedef std::list<vtime_proc_type> vtime_type; -inline bool operator <( const vtime_proc_type& l, const vtime_proc_type& r ) -{ - if ( l.first == r.first ) { - return l.second < r.second; - } - - throw std::invalid_argument( "uncomparable vtime" ); -} - -inline bool operator <=( const vtime_proc_type& l, const vtime_proc_type& r ) -{ - if ( l.first == r.first ) { - return l.second <= r.second; - } - - throw std::invalid_argument( "uncomparable vtime" ); -} - -inline bool operator ==( const vtime_proc_type& l, const vtime_proc_type& r ) -{ - if ( l.first == r.first ) { - return l.second == r.second; - } - - throw std::invalid_argument( "uncomparable vtime" ); -} - bool operator <=( const vtime_type& l, const vtime_type& r ); vtime_type operator -( const vtime_type& l, const vtime_type& r ); vtime_type operator +( const vtime_type& l, const vtime_type& r ); @@ -113,8 +84,9 @@ vtime_type vt; }; -typedef std::pair<group_type, vtime> vtime_group_type; -typedef std::list<vtime_group_type> gvtime_type; +// typedef std::pair<group_type, vtime> vtime_group_type; +// typedef std::list<vtime_group_type> gvtime_type; +typedef std::hash_map<group_type, vtime_type> gvtime_type; vtime_unit_type comp( const gvtime_type&, group_type, oid_type ); gvtime_type& operator +=( gvtime_type&, const vtime_group_type& ); @@ -188,6 +160,7 @@ }; // vtime_type vt[n_groups]; + gvtime_type lvt; gvtime_type vt; // vtime_type last_vt[n_groups]; // gvtime_type last_vt; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-28 17:45:59
|
Revision: 1572 http://svn.sourceforge.net/complement/?rev=1572&view=rev Author: complement Date: 2007-05-28 10:45:58 -0700 (Mon, 28 May 2007) Log Message: ----------- development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-24 17:15:39 UTC (rev 1571) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-28 17:45:58 UTC (rev 1572) @@ -347,7 +347,7 @@ return *this; } -gvtime& gvtime::operator +=( const vtime_group_type& t ) +gvtime_type& operator +=( gvtime_type& gvt, const vtime_group_type& t ) { gvtime_type::iterator i = gvt.begin(); @@ -356,13 +356,41 @@ break; } else if ( i->first == t.first ) { i->second += t.second; - return *this; + return gvt; } } gvt.insert( i, t ); + return gvt; +} + +gvtime& gvtime::operator +=( const vtime_group_type& t ) +{ + gvt += t; return *this; } +vtime_unit_type comp( const gvtime_type& gvt, group_type g, oid_type p ) +{ + gvtime_type::const_iterator k = gvt.begin(); + for ( ; k != gvt.end(); ++k ) { + if ( k->first == g ) { + for ( vtime_type::const_iterator i = k->second.vt.begin(); i != k->second.vt.end(); ++i ) { + if ( i->first == p ) { + return i->second; // found (p_i, t) in g_k + } else if ( i->first > p ) { + return 0; // pair sorted, so no pair required (p_i, t) expected more + } + } + return 0; // no pair (p_i, * ) + } else if ( k->first > g ) { // groups sorted, so no required group expected more + return 0; + } + } + + return 0; +} + + void Proc::mess( const stem::Event_base<VTmess>& ev ) { cout << ev.value().mess << endl; @@ -375,7 +403,7 @@ gvtime_type::const_iterator gr = ev.value().gvt.gvt.begin(); gvtime_type::const_iterator ge = ev.value().gvt.gvt.end(); for ( ; gr != ge; ++gr ) { // over all groups - vt[gr->first] = max( vt[gr->first], vt[gr->first] + gr->second.vt ); + // vt[gr->first] = max( vt[gr->first], vt[gr->first] + gr->second.vt ); } } } @@ -391,8 +419,43 @@ for ( ; gr != ge; ++gr ) { // over all groups if ( gr->first == mgrp ) { - vtime_type vt_tmp = last_vt[ev.value().grp] + gr->second.vt; +#if 0 + comp( vt, mgrp, ev.src() ); + comp( vt, mgrp, ev.src() ); + for ( gvtime_type::const_iterator my_gi = vt.begin(); my_gi != vt.end(); ++my_gi ) { + if ( my_gi->first == mgrp ) { + vtime_type vt_tmp = my_gi->second.vt + gr->second.vt; + for (vtime_type::const_iterator i = vt_tmp.begin(); i != vt_tmp.end(); ++i ) { + if ( i->first == ev.src() ) { + vtime_type::const_iterator j = my_gi->second.vt.begin(); + for ( ; j != my_gi->second.vt.end(); ++j ) { + if ( i->first == j->first ) { + if ( i->second != j->second + 1) { + return false; + } + break; + } + } + if ( j == my_gi->second.vt.end() ) { + if ( i->second != 1 ) { + return false; + } + } + } else { + if ( ) { + } + } + } + vtime_type vt_null; + vt_null += make_pair( ev.src(), 1 ); + } + } + // vtime_group_type vt_tmp = vt + *gr; + // vtime_type vt_tmp = last_vt[ev.value().grp] + gr->second.vt; +#endif + +#if 0 vtime_type::const_iterator i = vt_tmp.begin(); if ( vt[mgrp].empty() ) { vtime vt_null; @@ -402,11 +465,14 @@ } else { vtime_type::const_iterator j = vt[mgrp].begin(); } +#endif } else { +#if 0 vtime_type vt_tmp = last_vt[mgrp] + gr->second.vt; if ( !(vt_tmp <= vt[mgrp] )) { return false; } +#endif } } Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-24 17:15:39 UTC (rev 1571) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-28 17:45:58 UTC (rev 1572) @@ -116,6 +116,9 @@ typedef std::pair<group_type, vtime> vtime_group_type; typedef std::list<vtime_group_type> gvtime_type; +vtime_unit_type comp( const gvtime_type&, group_type, oid_type ); +gvtime_type& operator +=( gvtime_type&, const vtime_group_type& ); + struct gvtime : public stem::__pack_base { @@ -184,8 +187,10 @@ n_groups }; - vtime_type vt[n_groups]; - vtime_type last_vt[n_groups]; + // vtime_type vt[n_groups]; + gvtime_type vt; + // vtime_type last_vt[n_groups]; + // gvtime_type last_vt; DECLARE_RESPONSE_TABLE( Proc, stem::EventHandler ); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-24 17:15:46
|
Revision: 1571 http://svn.sourceforge.net/complement/?rev=1571&view=rev Author: complement Date: 2007-05-24 10:15:39 -0700 (Thu, 24 May 2007) Log Message: ----------- development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime_main.cc Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-24 07:09:05 UTC (rev 1570) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-24 17:15:39 UTC (rev 1571) @@ -370,6 +370,14 @@ cout << ev.value().gvt.gvt << endl; cout << order_correct( ev ) << endl; + + if ( order_correct( ev ) ) { + gvtime_type::const_iterator gr = ev.value().gvt.gvt.begin(); + gvtime_type::const_iterator ge = ev.value().gvt.gvt.end(); + for ( ; gr != ge; ++gr ) { // over all groups + vt[gr->first] = max( vt[gr->first], vt[gr->first] + gr->second.vt ); + } + } } bool Proc::order_correct( const stem::Event_base<VTmess>& ev ) Modified: trunk/complement/explore/test/virtual_time/vtime_main.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-24 07:09:05 UTC (rev 1570) +++ trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-24 17:15:39 UTC (rev 1571) @@ -27,7 +27,7 @@ vtime_group_type gvt; gvt.first = 0; // group - gvt.second += make_pair( 101, 1 ); + gvt.second += make_pair( 100, 1 ); mess.value().mess = "Hello!"; mess.value().grp = 0; @@ -35,6 +35,11 @@ m1.Send( mess ); + mess.value().gvt += gvt; + + mess.value().mess = "How are you?"; + m1.Send( mess ); + cnd.wait(); return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-24 07:09:08
|
Revision: 1570 http://svn.sourceforge.net/complement/?rev=1570&view=rev Author: complement Date: 2007-05-24 00:09:05 -0700 (Thu, 24 May 2007) Log Message: ----------- fix return Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-23 15:26:04 UTC (rev 1569) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-24 07:09:05 UTC (rev 1570) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/05/17 23:30:42 ptr> +// -*- C++ -*- Time-stamp: <07/05/24 10:24:22 ptr> #include "vtime.h" @@ -415,7 +415,7 @@ ostream& operator <<( ostream& o, const vt::vtime_proc_type& v ) { - o << "(" << v.first << "," << v.second << ")\n"; + return o << "(" << v.first << "," << v.second << ")\n"; } ostream& operator <<( ostream& o, const vt::vtime_type& v ) @@ -424,7 +424,7 @@ for ( vt::vtime_type::const_iterator i = v.begin(); i != v.end(); ++i ) { o << *i; } - o << "]\n"; + return o << "]\n"; } ostream& operator <<( ostream& o, const vt::vtime_group_type& v ) @@ -438,7 +438,7 @@ for ( vt::gvtime_type::const_iterator i = v.begin(); i != v.end(); ++i ) { o << *i; } - o << "}\n"; + return o << "}\n"; } } // namespace std This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-23 15:26:11
|
Revision: 1569 http://svn.sourceforge.net/complement/?rev=1569&view=rev Author: complement Date: 2007-05-23 08:26:04 -0700 (Wed, 23 May 2007) Log Message: ----------- development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h trunk/complement/explore/test/virtual_time/vtime_main.cc Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-22 15:05:03 UTC (rev 1568) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-23 15:26:04 UTC (rev 1569) @@ -104,24 +104,28 @@ void VTmess::pack( std::ostream& s ) const { gvt.pack( s ); + __pack( s, grp ); __pack( s, mess ); } void VTmess::net_pack( std::ostream& s ) const { gvt.net_pack( s ); + __net_pack( s, grp ); __net_pack( s, mess ); } void VTmess::unpack( std::istream& s ) { gvt.unpack( s ); + __unpack( s, grp ); __unpack( s, mess ); } void VTmess::net_unpack( std::istream& s ) { gvt.net_unpack( s ); + __net_unpack( s, grp ); __net_unpack( s, mess ); } @@ -226,6 +230,12 @@ ++i; ++j; } + if ( i != l.end() ) { + while ( j != r.end() && j->first < i->first ) { + vt.push_back( make_pair( j->first, j->second ) ); + ++j; + } + } } while ( i != l.end() ) { @@ -240,6 +250,46 @@ return vt; } +vtime_type& operator +=( vtime_type& l, const vtime_type& r ) +{ + if ( r.empty() ) { + return l; + } + + if ( l.empty() ) { + l = r; + return l; + } + + vtime_type::iterator i = l.begin(); + vtime_type::const_iterator j = r.begin(); + + while ( i != l.end() && j != r.end() ) { + while ( i != l.end() && i->first < j->first ) { + ++i; + } + + while ( i != l.end() && j != r.end() && i->first == j->first ) { + i->second += j->second; + ++i; + ++j; + } + + while ( i != l.end() && j != r.end() && j->first < i->first ) { + l.insert( i, make_pair( j->first, j->second ) ); + ++i; + ++j; + } + } + + while ( j != r.end() ) { + l.push_back( make_pair( j->first, j->second ) ); + ++j; + } + + return l; +} + // template <> vtime_type max( const vtime_type& l, const vtime_type& r ) { @@ -281,62 +331,78 @@ return vt; } +vtime& vtime::operator += ( const vtime_proc_type& t ) +{ + vtime_type::iterator i = vt.begin(); + + for ( ; i != vt.end(); ++i ) { + if ( i->first > t.first ) { + break; + } else if ( i->first == t.first ) { + i->second += t.second; + return *this; + } + } + vt.insert( i, t ); + return *this; +} + +gvtime& gvtime::operator +=( const vtime_group_type& t ) +{ + gvtime_type::iterator i = gvt.begin(); + + for ( ; i != gvt.end(); ++i ) { + if ( i->first > t.first ) { + break; + } else if ( i->first == t.first ) { + i->second += t.second; + return *this; + } + } + gvt.insert( i, t ); + return *this; +} + void Proc::mess( const stem::Event_base<VTmess>& ev ) { cout << ev.value().mess << endl; + + cout << ev.value().gvt.gvt << endl; + + cout << order_correct( ev ) << endl; } bool Proc::order_correct( const stem::Event_base<VTmess>& ev ) { - // assume here first_group - gvtime_type::const_iterator gr = ev.value().gvt.gvt.begin(); gvtime_type::const_iterator ge = ev.value().gvt.gvt.end(); - for ( ; gr != ge; ++gr ) { - if ( gr->first == first_group ) { - vtime_type vt_tmp = last_vt[first_group] + gr->second.vt; + bool fine = false; - vtime_type::const_iterator i = vt_tmp.begin(); - vtime_type::const_iterator j = vt[first_group].begin(); + group_type mgrp = ev.value().grp; - while ( i != vt_tmp.end() && j != vt[first_group].end() ) { - if ( i->first < j->first ) { - return false; // really protocol fail: group member was lost - } - - while ( i->first == j->first && i != vt_tmp.end() && j != vt[first_group].end() ) { - if ( i->first == self_id() ) { - if ( i->second != (j->second + 1) ) { - return false; - } - } else { - if ( i->second > j->second ) { - return false; - } - } - ++i; - ++j; - } + for ( ; gr != ge; ++gr ) { // over all groups + if ( gr->first == mgrp ) { + vtime_type vt_tmp = last_vt[ev.value().grp] + gr->second.vt; - if ( i != vt_tmp.end() ) { - return false; // really protocol fail: group member lost - } - - while ( j != vt[first_group].end() ) { - if ( j->first == self_id() && j->second != 1 ) { - return false; - } - ++j; - } + vtime_type::const_iterator i = vt_tmp.begin(); + if ( vt[mgrp].empty() ) { + vtime vt_null; + vt_null += make_pair( ev.src(), 1 ); + cerr << vt_tmp << vt_null.vt; + return vt_tmp == vt_null.vt; + } else { + vtime_type::const_iterator j = vt[mgrp].begin(); } } else { - vtime_type vt_tmp = last_vt[second_group] + gr->second.vt; - if ( !(vt_tmp <= vt[second_group] )) { + vtime_type vt_tmp = last_vt[mgrp] + gr->second.vt; + if ( !(vt_tmp <= vt[mgrp] )) { return false; } } } + + return fine; } DEFINE_RESPONSE_TABLE( Proc ) @@ -344,3 +410,36 @@ END_RESPONSE_TABLE } // namespace vt + +namespace std { + +ostream& operator <<( ostream& o, const vt::vtime_proc_type& v ) +{ + o << "(" << v.first << "," << v.second << ")\n"; +} + +ostream& operator <<( ostream& o, const vt::vtime_type& v ) +{ + o << "[\n"; + for ( vt::vtime_type::const_iterator i = v.begin(); i != v.end(); ++i ) { + o << *i; + } + o << "]\n"; +} + +ostream& operator <<( ostream& o, const vt::vtime_group_type& v ) +{ + o << v.first << ": " << v.second.vt; +} + +ostream& operator <<( ostream& o, const vt::gvtime_type& v ) +{ + o << "{\n"; + for ( vt::gvtime_type::const_iterator i = v.begin(); i != v.end(); ++i ) { + o << *i; + } + o << "}\n"; +} + +} // namespace std + Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-22 15:05:03 UTC (rev 1568) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-23 15:26:04 UTC (rev 1569) @@ -17,9 +17,10 @@ namespace vt { +typedef stem::addr_type oid_type; typedef unsigned vtime_unit_type; typedef uint32_t group_type; -typedef std::pair<stem::addr_type, vtime_unit_type> vtime_proc_type; +typedef std::pair<oid_type, vtime_unit_type> vtime_proc_type; typedef std::list<vtime_proc_type> vtime_type; inline bool uorder( const vtime_proc_type& l, const vtime_proc_type& r ) @@ -57,6 +58,7 @@ bool operator <=( const vtime_type& l, const vtime_type& r ); vtime_type operator -( const vtime_type& l, const vtime_type& r ); vtime_type operator +( const vtime_type& l, const vtime_type& r ); +vtime_type& operator +=( vtime_type& l, const vtime_type& r ); vtime_type max( const vtime_type& l, const vtime_type& r ); @@ -73,10 +75,41 @@ vtime( const vtime& _vt ) : vt( _vt.vt.begin(), _vt.vt.end() ) { } + vtime( const vtime_type& _vt ) : + vt( _vt.begin(), _vt.end() ) + { } vtime& operator =( const vtime& _vt ) - { vt.clear(); std::copy( _vt.vt.begin(), _vt.vt.end(), std::back_insert_iterator<vtime_type>(vt) ); } + { + vt.clear(); + std::copy( _vt.vt.begin(), _vt.vt.end(), std::back_insert_iterator<vtime_type>(vt) ); + } + bool operator ==( const vtime& r ) const + { return vt == r.vt; } + + bool operator <=( const vtime& r ) const + { return vt <= r.vt; } + + vtime operator -( const vtime& r ) const + { return vtime( vt - r.vt ); } + + vtime operator +( const vtime& r ) const + { return vtime( vt + r.vt ); } + + vtime& operator +=( const vtime_type& t ) + { + vt += t; + return *this; + } + vtime& operator +=( const vtime& t ) + { + vt += t.vt; + return *this; + } + + vtime& operator +=( const vtime_proc_type& ); + vtime_type vt; }; @@ -98,8 +131,13 @@ { } gvtime& operator =( const gvtime& _gvt ) - { gvt.clear(); std::copy( _gvt.gvt.begin(), _gvt.gvt.end(), std::back_insert_iterator<gvtime_type>(gvt) ); } + { + gvt.clear(); + std::copy( _gvt.gvt.begin(), _gvt.gvt.end(), std::back_insert_iterator<gvtime_type>(gvt) ); + } + gvtime& operator +=( const vtime_group_type& ); + gvtime_type gvt; }; @@ -119,6 +157,7 @@ { } gvtime gvt; + group_type grp; std::string mess; }; @@ -155,4 +194,13 @@ } // namespace vt +namespace std { + +ostream& operator <<( ostream&, const vt::vtime_proc_type& ); +ostream& operator <<( ostream&, const vt::vtime_type& ); +ostream& operator <<( ostream&, const vt::vtime_group_type& ); +ostream& operator <<( ostream&, const vt::gvtime_type& ); + +} // namespace std + #endif // __vtime_h Modified: trunk/complement/explore/test/virtual_time/vtime_main.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-22 15:05:03 UTC (rev 1568) +++ trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-23 15:26:04 UTC (rev 1569) @@ -23,7 +23,15 @@ stem::Event_base<VTmess> mess( MESS ); mess.dest( 101 ); + + vtime_group_type gvt; + + gvt.first = 0; // group + gvt.second += make_pair( 101, 1 ); + mess.value().mess = "Hello!"; + mess.value().grp = 0; + mess.value().gvt += gvt; m1.Send( mess ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-22 15:05:07
|
Revision: 1568 http://svn.sourceforge.net/complement/?rev=1568&view=rev Author: complement Date: 2007-05-22 08:05:03 -0700 (Tue, 22 May 2007) Log Message: ----------- development; tests Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h Added Paths: ----------- trunk/complement/explore/test/virtual_time/test/ trunk/complement/explore/test/virtual_time/test/Makefile trunk/complement/explore/test/virtual_time/test/Makefile.inc trunk/complement/explore/test/virtual_time/test/unit_test.cc Property changes on: trunk/complement/explore/test/virtual_time/test ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/test/virtual_time/test/Makefile =================================================================== --- trunk/complement/explore/test/virtual_time/test/Makefile (rev 0) +++ trunk/complement/explore/test/virtual_time/test/Makefile 2007-05-22 15:05:03 UTC (rev 1568) @@ -0,0 +1,38 @@ +# -*- Makefile -*- Time-stamp: <07/02/21 15:30:59 ptr> + +SRCROOT := ../../.. +COMPILER_NAME := gcc +# ALL_TAGS := install-release-shared install-dbg-shared +# CoMT_DIR := ../../external/complement/explore + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + +# DEFS += -DUNIT_TEST +INCLUDES += -I${CoMT_INCLUDE_DIR} -I${BOOST_INCLUDE_DIR} -I.. + +LDFLAGS += -L${INSTALL_LIB_DIR} -Wl,-rpath=${INSTALL_LIB_DIR} + +release-shared: PROJECT_LIBS = -lxmt -lsockios -lstem -lboost_regex -lboost_test_utf -lboost_fs +dbg-shared: PROJECT_LIBS = -lxmtg -lsockiosg -lstemg -lboost_regexg -lboost_test_utfg -lboost_fsg +stldbg-shared: PROJECT_LIBS = -lxmtstlg -lsockiosstlg -lstemstlg -lboost_regexstlg -lboost_test_utfstlg -lboost_fsstlg + +LDLIBS = ${PROJECT_LIBS} + +check: all-shared + ${OUTPUT_DIR}/${PRGNAME} || exit 1 + ${OUTPUT_DIR_DBG}/${PRGNAME} || exit 1 +ifndef WITHOUT_STLPORT + ${OUTPUT_DIR_STLDBG}/${PRGNAME} || exit 1; +endif + +check-release-shared: release-shared + ${OUTPUT_DIR}/${PRGNAME} || exit 1 + +check-dbg-shared: dbg-shared + ${OUTPUT_DIR_DBG}/${PRGNAME} || exit 1 + +ifndef WITHOUT_STLPORT +check-stldbg-shared: stldbg-shared + ${OUTPUT_DIR_STLDBG}/${PRGNAME} || exit 1 +endif Added: trunk/complement/explore/test/virtual_time/test/Makefile.inc =================================================================== --- trunk/complement/explore/test/virtual_time/test/Makefile.inc (rev 0) +++ trunk/complement/explore/test/virtual_time/test/Makefile.inc 2007-05-22 15:05:03 UTC (rev 1568) @@ -0,0 +1,8 @@ +# -*- Makefile -*- + +PRGNAME = ut_vtime + +SRC_CC = ../vtime.cc \ + unit_test.cc + + Added: trunk/complement/explore/test/virtual_time/test/unit_test.cc =================================================================== --- trunk/complement/explore/test/virtual_time/test/unit_test.cc (rev 0) +++ trunk/complement/explore/test/virtual_time/test/unit_test.cc 2007-05-22 15:05:03 UTC (rev 1568) @@ -0,0 +1,244 @@ +// -*- C++ -*- Time-stamp: <07/03/07 16:38:24 ptr> + +#include <boost/test/unit_test.hpp> + +#include <boost/lexical_cast.hpp> + +#include <string> +#include <iostream> + +#include <vtime.h> + +using namespace boost::unit_test_framework; +using namespace vt; +using namespace std; + +struct vtime_operations +{ + void vt_compare(); + void vt_add(); + void vt_diff(); + void vt_max(); +}; + +void vtime_operations::vt_compare() +{ + vtime_type vt1; + vtime_type vt2; + + vt1.push_back( make_pair( 1, 1 ) ); + vt1.push_back( make_pair( 2, 1 ) ); + + vt2.push_back( make_pair( 1, 1 ) ); + vt2.push_back( make_pair( 2, 1 ) ); + + BOOST_CHECK( vt1 == vt2 ); + BOOST_CHECK( vt1 <= vt2 ); + BOOST_CHECK( vt2 <= vt1 ); + + vt2.push_back( make_pair( 3, 1 ) ); + + BOOST_CHECK( !(vt1 == vt2) ); + BOOST_CHECK( vt1 <= vt2 ); + BOOST_CHECK( !(vt2 <= vt1) ); + + vt1.clear(); + vt2.clear(); + + vt1.push_back( make_pair( 1, 1 ) ); + + vt2.push_back( make_pair( 1, 1 ) ); + vt2.push_back( make_pair( 3, 1 ) ); + + BOOST_CHECK( !(vt1 == vt2) ); + BOOST_CHECK( vt1 <= vt2 ); + BOOST_CHECK( !(vt2 <= vt1) ); + + vt1.push_back( make_pair( 2, 1 ) ); + + BOOST_CHECK( !(vt1 <= vt2) ); + BOOST_CHECK( !(vt2 <= vt1) ); +} + +void vtime_operations::vt_add() +{ + vtime_type vt1; + vtime_type vt2; + vtime_type vt3; + vtime_type vt4; + + vt1.push_back( make_pair( 1, 1 ) ); + vt1.push_back( make_pair( 2, 1 ) ); + + vt3 = vt1 + vt2; + + BOOST_CHECK( vt1 == vt3 ); + + vt2.push_back( make_pair( 2, 1 ) ); + + vt3 = vt1 + vt2; + + vt4.push_back( make_pair( 1, 1 ) ); + vt4.push_back( make_pair( 2, 2 ) ); + + BOOST_CHECK( vt3 == vt4 ); + + vt4.clear(); + + vt2.push_back( make_pair( 3, 1 ) ); + + vt3 = vt1 + vt2; + + vt4.push_back( make_pair( 1, 1 ) ); + vt4.push_back( make_pair( 2, 2 ) ); + vt4.push_back( make_pair( 3, 1 ) ); + + BOOST_CHECK( vt3 == vt4 ); +} + +void vtime_operations::vt_diff() +{ + vtime_type vt1; + vtime_type vt2; + vtime_type vt3; + vtime_type vt4; + + vt1.push_back( make_pair( 1, 1 ) ); + vt1.push_back( make_pair( 2, 1 ) ); + + vt3 = vt1 - vt2; + + BOOST_CHECK( vt1 == vt3 ); + + vt2.push_back( make_pair( 1, 1 ) ); + + vt3 = vt1 - vt2; + + vt4.push_back( make_pair( 2, 1 ) ); + + BOOST_CHECK( vt3 == vt4 ); + + vt2.push_back( make_pair( 2, 1 ) ); + + vt4.clear(); + + vt3 = vt1 - vt2; + + BOOST_CHECK( vt3 == vt4 ); + + vt2.clear(); + + vt2.push_back( make_pair( 3, 1 ) ); + + try { + vt3 = vt1 - vt2; + BOOST_CHECK( false ); + } + catch ( const std::range_error& err ) { + BOOST_CHECK( true ); + } + + vt2.clear(); + + vt2.push_back( make_pair( 2, 2 ) ); + + try { + vt3 = vt1 - vt2; + BOOST_CHECK( false ); + } + catch ( const std::range_error& err ) { + BOOST_CHECK( true ); + } +} + +void vtime_operations::vt_max() +{ + vtime_type vt1; + vtime_type vt2; + vtime_type vt3; + vtime_type vt4; + + vt1.push_back( make_pair( 1, 1 ) ); + vt1.push_back( make_pair( 2, 1 ) ); + + vt3 = vt::max( vt1, vt2 ); + + BOOST_CHECK( vt3 == vt1 ); + + vt2.push_back( make_pair( 1, 1 ) ); + + vt3 = vt::max( vt1, vt2 ); + + BOOST_CHECK( vt3 == vt1 ); + + vt2.push_back( make_pair( 2, 1 ) ); + + vt3 = vt::max( vt1, vt2 ); + + BOOST_CHECK( vt3 == vt1 ); + + vt2.push_back( make_pair( 3, 1 ) ); + + vt3 = vt::max( vt1, vt2 ); + + vt4.push_back( make_pair( 1, 1 ) ); + vt4.push_back( make_pair( 2, 1 ) ); + vt4.push_back( make_pair( 3, 1 ) ); + + BOOST_CHECK( vt3 == vt4 ); + + vt2.clear(); + + vt2.push_back( make_pair( 1, 1 ) ); + vt2.push_back( make_pair( 2, 2 ) ); + + vt4.clear(); + + vt3 = vt::max( vt1, vt2 ); + + vt4.push_back( make_pair( 1, 1 ) ); + vt4.push_back( make_pair( 2, 2 ) ); + + BOOST_CHECK( vt3 == vt4 ); + + vt2.push_back( make_pair( 3, 4 ) ); + + vt3 = vt::max( vt1, vt2 ); + + vt4.push_back( make_pair( 3, 4 ) ); + + BOOST_CHECK( vt3 == vt4 ); +} + +struct vtime_test_suite : + public boost::unit_test_framework::test_suite +{ + vtime_test_suite(); +}; + +vtime_test_suite::vtime_test_suite() : + test_suite( "vtime test suite" ) +{ + boost::shared_ptr<vtime_operations> vt_op_instance( new vtime_operations() ); + + test_case *vt_compare_tc = BOOST_CLASS_TEST_CASE( &vtime_operations::vt_compare, vt_op_instance ); + test_case *vt_add_tc = BOOST_CLASS_TEST_CASE( &vtime_operations::vt_add, vt_op_instance ); + test_case *vt_diff_tc = BOOST_CLASS_TEST_CASE( &vtime_operations::vt_diff, vt_op_instance ); + test_case *vt_max_tc = BOOST_CLASS_TEST_CASE( &vtime_operations::vt_max, vt_op_instance ); + + // long_msg_tc->depends_on( init_tc ); + + add( vt_compare_tc ); + add( vt_add_tc ); + add( vt_diff_tc ); + add( vt_max_tc ); + // add( service_tc ); +} + +test_suite *init_unit_test_suite( int argc, char **argv ) +{ + test_suite *ts = BOOST_TEST_SUITE( "vtime test" ); + ts->add( new vtime_test_suite() ); + + return ts; +} Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-21 13:50:00 UTC (rev 1567) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-22 15:05:03 UTC (rev 1568) @@ -142,7 +142,7 @@ if ( i->first < j->first ) { // v <= 0 --- false return false; } - while ( i->first > j->first && j != r.end() ) { // 0 <= v --- true + while ( j != r.end() && i->first > j->first ) { // 0 <= v --- true ++j; } @@ -173,12 +173,12 @@ vtime_type::const_iterator j = r.begin(); while ( i != l.end() && j != r.end() ) { - while ( i->first < j->first && i != l.end() ) { + while ( i != l.end() && i->first < j->first ) { vt.push_back( make_pair( i->first, i->second ) ); ++i; } - while ( i->first == j->first && i != l.end() && j != r.end() ) { + while ( i != l.end() && j != r.end() && i->first == j->first ) { if ( i->second < j->second ) { throw range_error( "vtime different: right value grater then left" ); } else if ( i->second > j->second ) { @@ -216,12 +216,12 @@ vtime_type::const_iterator j = r.begin(); while ( i != l.end() && j != r.end() ) { - while ( i->first < j->first && i != l.end() ) { + while ( i != l.end() && i->first < j->first ) { vt.push_back( make_pair( i->first, i->second ) ); ++i; } - while ( i->first == j->first && i != l.end() && j != r.end() ) { + while ( i != l.end() && j != r.end() && i->first == j->first ) { vt.push_back( make_pair( i->first, i->second + j->second ) ); ++i; ++j; @@ -232,7 +232,7 @@ vt.push_back( make_pair( i->first, i->second ) ); ++i; } - while ( j != l.end() ) { + while ( j != r.end() ) { vt.push_back( make_pair( j->first, j->second ) ); ++j; } @@ -258,13 +258,13 @@ vtime_type::const_iterator j = r.begin(); while ( i != l.end() && j != r.end() ) { - while ( i->first < j->first && i != l.end() ) { + while ( i != l.end() && i->first < j->first ) { vt.push_back( make_pair( i->first, i->second ) ); ++i; } - while ( i->first == j->first && i != l.end() && j != r.end() ) { - vt.push_back( make_pair( i->first, max( i->second, j->second ) ) ); + while ( i != l.end() && j != r.end() && i->first == j->first ) { + vt.push_back( make_pair( i->first, std::max( i->second, j->second ) ) ); ++i; ++j; } @@ -273,7 +273,7 @@ vt.push_back( make_pair( i->first, i->second ) ); ++i; } - while ( j != l.end() ) { + while ( j != r.end() ) { vt.push_back( make_pair( j->first, j->second ) ); ++j; } @@ -286,16 +286,16 @@ cout << ev.value().mess << endl; } -bool order_correct( const stem::Event_base<VTmess>& ev ) +bool Proc::order_correct( const stem::Event_base<VTmess>& ev ) { // assume here first_group - gvtime_type::const_iterator gr = ev.value().gvt.begin(); - gvtime_type::const_iterator ge = ev.value().gvt.end(); + gvtime_type::const_iterator gr = ev.value().gvt.gvt.begin(); + gvtime_type::const_iterator ge = ev.value().gvt.gvt.end(); - for ( ; gr != ge; ++i ) { + for ( ; gr != ge; ++gr ) { if ( gr->first == first_group ) { - vtime_type vt_tmp = last_vt[first_group] + gr->second; + vtime_type vt_tmp = last_vt[first_group] + gr->second.vt; vtime_type::const_iterator i = vt_tmp.begin(); vtime_type::const_iterator j = vt[first_group].begin(); @@ -331,7 +331,7 @@ } } } else { - vtime_type vt_tmp = last_vt[second_group] + gr->second; + vtime_type vt_tmp = last_vt[second_group] + gr->second.vt; if ( !(vt_tmp <= vt[second_group] )) { return false; } Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-21 13:50:00 UTC (rev 1567) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-22 15:05:03 UTC (rev 1568) @@ -54,49 +54,10 @@ throw std::invalid_argument( "uncomparable vtime" ); } - -#if 0 -bool operator <=( const vtime_type& l, const vtime_type& r ) -{ - if ( l.size() == 0 ) { // 0 always less or equal of anything - return true; - } - - bool result = true; - vtime_type::const_iterator i = l.begin(); - vtime_type::const_iterator j = r.begin(); - - while ( j->first < i->first && j != r.end() ) { - ++j; - } - - if ( j == r.end() ) { // note, that i != l.end() here! - return false; - } - - for ( ; i != l.end() && j != r.end(); ) { - if ( i->second > j->second ) { - } - - if ( i->first < j->first ) { - ++i; - } else if ( i->first == j->first ) { - if ( i->second > j->second ) { - return false; - } - } else { - ++j; - } - } -} -#endif - - bool operator <=( const vtime_type& l, const vtime_type& r ); vtime_type operator -( const vtime_type& l, const vtime_type& r ); vtime_type operator +( const vtime_type& l, const vtime_type& r ); -template <> vtime_type max( const vtime_type& l, const vtime_type& r ); struct vtime : @@ -184,8 +145,8 @@ n_groups }; - std::vector<vtime_type> vt[n_groups]; - std::vector<vtime_type> last_vt[n_groups]; + vtime_type vt[n_groups]; + vtime_type last_vt[n_groups]; DECLARE_RESPONSE_TABLE( Proc, stem::EventHandler ); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-21 13:50:03
|
Revision: 1567 http://svn.sourceforge.net/complement/?rev=1567&view=rev Author: complement Date: 2007-05-21 06:50:00 -0700 (Mon, 21 May 2007) Log Message: ----------- developement Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-18 15:35:04 UTC (rev 1566) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-21 13:50:00 UTC (rev 1567) @@ -125,6 +125,43 @@ __net_unpack( s, mess ); } +bool operator <=( const vtime_type& l, const vtime_type& r ) +{ + if ( r.empty() ) { + return l.empty(); + } + + if ( l.empty() ) { + return true; + } + + vtime_type::const_iterator i = l.begin(); + vtime_type::const_iterator j = r.begin(); + + while ( i != l.end() && j != r.end() ) { + if ( i->first < j->first ) { // v <= 0 --- false + return false; + } + while ( i->first > j->first && j != r.end() ) { // 0 <= v --- true + ++j; + } + + while ( i != l.end() && j != r.end() && i->first == j->first ) { + if ( i->second > j->second ) { + return false; + } + ++i; + ++j; + } + } + + if ( i == l.end() ) { + return true; + } + + return false; +} + vtime_type operator -( const vtime_type& l, const vtime_type& r ) { if ( r.empty() ) { @@ -144,8 +181,9 @@ while ( i->first == j->first && i != l.end() && j != r.end() ) { if ( i->second < j->second ) { throw range_error( "vtime different: right value grater then left" ); + } else if ( i->second > j->second ) { + vt.push_back( make_pair( i->first, i->second - j->second ) ); } - vt.push_back( make_pair( i->first, i->second - j->second ) ); ++i; ++j; } @@ -157,18 +195,150 @@ while ( i != l.end() ) { vt.push_back( make_pair( i->first, i->second ) ); - ++i; + ++i; } return vt; } +vtime_type operator +( const vtime_type& l, const vtime_type& r ) +{ + if ( r.empty() ) { + return l; + } + if ( l.empty() ) { + return r; + } + + vtime_type vt; + vtime_type::const_iterator i = l.begin(); + vtime_type::const_iterator j = r.begin(); + + while ( i != l.end() && j != r.end() ) { + while ( i->first < j->first && i != l.end() ) { + vt.push_back( make_pair( i->first, i->second ) ); + ++i; + } + + while ( i->first == j->first && i != l.end() && j != r.end() ) { + vt.push_back( make_pair( i->first, i->second + j->second ) ); + ++i; + ++j; + } + } + + while ( i != l.end() ) { + vt.push_back( make_pair( i->first, i->second ) ); + ++i; + } + while ( j != l.end() ) { + vt.push_back( make_pair( j->first, j->second ) ); + ++j; + } + + return vt; +} + +// template <> +vtime_type max( const vtime_type& l, const vtime_type& r ) +{ + if ( l.empty() ) { + return r; + } + + if ( r.empty() ) { + return l; + } + + // here l and r non-empty + + vtime_type vt; + vtime_type::const_iterator i = l.begin(); + vtime_type::const_iterator j = r.begin(); + + while ( i != l.end() && j != r.end() ) { + while ( i->first < j->first && i != l.end() ) { + vt.push_back( make_pair( i->first, i->second ) ); + ++i; + } + + while ( i->first == j->first && i != l.end() && j != r.end() ) { + vt.push_back( make_pair( i->first, max( i->second, j->second ) ) ); + ++i; + ++j; + } + } + while ( i != l.end() ) { + vt.push_back( make_pair( i->first, i->second ) ); + ++i; + } + while ( j != l.end() ) { + vt.push_back( make_pair( j->first, j->second ) ); + ++j; + } + + return vt; +} + void Proc::mess( const stem::Event_base<VTmess>& ev ) { cout << ev.value().mess << endl; } +bool order_correct( const stem::Event_base<VTmess>& ev ) +{ + // assume here first_group + + gvtime_type::const_iterator gr = ev.value().gvt.begin(); + gvtime_type::const_iterator ge = ev.value().gvt.end(); + + for ( ; gr != ge; ++i ) { + if ( gr->first == first_group ) { + vtime_type vt_tmp = last_vt[first_group] + gr->second; + + vtime_type::const_iterator i = vt_tmp.begin(); + vtime_type::const_iterator j = vt[first_group].begin(); + + while ( i != vt_tmp.end() && j != vt[first_group].end() ) { + if ( i->first < j->first ) { + return false; // really protocol fail: group member was lost + } + + while ( i->first == j->first && i != vt_tmp.end() && j != vt[first_group].end() ) { + if ( i->first == self_id() ) { + if ( i->second != (j->second + 1) ) { + return false; + } + } else { + if ( i->second > j->second ) { + return false; + } + } + ++i; + ++j; + } + + if ( i != vt_tmp.end() ) { + return false; // really protocol fail: group member lost + } + + while ( j != vt[first_group].end() ) { + if ( j->first == self_id() && j->second != 1 ) { + return false; + } + ++j; + } + } + } else { + vtime_type vt_tmp = last_vt[second_group] + gr->second; + if ( !(vt_tmp <= vt[second_group] )) { + return false; + } + } + } +} + DEFINE_RESPONSE_TABLE( Proc ) EV_Event_base_T_( ST_NULL, MESS, mess, VTmess ) END_RESPONSE_TABLE Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-18 15:35:04 UTC (rev 1566) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-21 13:50:00 UTC (rev 1567) @@ -92,8 +92,13 @@ #endif +bool operator <=( const vtime_type& l, const vtime_type& r ); vtime_type operator -( const vtime_type& l, const vtime_type& r ); +vtime_type operator +( const vtime_type& l, const vtime_type& r ); +template <> +vtime_type max( const vtime_type& l, const vtime_type& r ); + struct vtime : public stem::__pack_base { @@ -171,13 +176,16 @@ private: + bool order_correct( const stem::Event_base<VTmess>& ); + enum vtgroup { first_group, second_group, n_groups }; - std::vector<vtime> vt[n_groups]; + std::vector<vtime_type> vt[n_groups]; + std::vector<vtime_type> last_vt[n_groups]; DECLARE_RESPONSE_TABLE( Proc, stem::EventHandler ); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-18 15:35:07
|
Revision: 1566 http://svn.sourceforge.net/complement/?rev=1566&view=rev Author: complement Date: 2007-05-18 08:35:04 -0700 (Fri, 18 May 2007) Log Message: ----------- changes in 1.34 Modified Paths: -------------- trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile.inc Modified: trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile =================================================================== --- trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile 2007-05-18 15:34:06 UTC (rev 1565) +++ trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile 2007-05-18 15:35:04 UTC (rev 1566) @@ -10,10 +10,10 @@ LDFLAGS += -L${INSTALL_LIB_DIR} -Wl,-rpath=${INSTALL_LIB_DIR}:${STLPORT_LIB_DIR} -release-shared: LDLIBS = -lboost_test_tem -lboost_fs -dbg-shared: LDLIBS = -lboost_test_temg -lboost_fsg +release-shared: LDLIBS = -lboost_fs +dbg-shared: LDLIBS = -lboost_fsg ifndef WITHOUT_STLPORT -stldbg-shared: LDLIBS = -lboost_test_temstlg -lboost_fsstlg +stldbg-shared: LDLIBS = -lboost_fsstlg endif check: all @@ -26,25 +26,25 @@ ${OUTPUT_DIR_STLDBG}/$$p || exit 1; \ done endif - rm -rf ./xx fstream_test_?foo + rm -rf ./xx fstream_test_?foo fsream_test* fstream_test_* foo boo $$'\xE2\x9E\x80' check-release-shared: release-shared for p in ${PRGNAME} ${PRGNAMES}; do \ ${OUTPUT_DIR}/$$p || exit 1; \ done - rm -rf ./xx fstream_test_?foo + rm -rf ./xx fstream_test_?foo fsream_test* fstream_test_* foo boo $$'\xE2\x9E\x80' check-dbg-shared: dbg-shared for p in ${PRGNAME} ${PRGNAMES}; do \ ${OUTPUT_DIR_DBG}/$$p || exit 1; \ done - rm -rf ./xx fstream_test_?foo + rm -rf ./xx fstream_test_?foo fsream_test* fstream_test_* foo boo $$'\xE2\x9E\x80' ifndef WITHOUT_STLPORT check-stldbg-shared: stldbg-shared for p in ${PRGNAME} ${PRGNAMES}; do \ ${OUTPUT_DIR_STLDBG}/$$p || exit 1; \ done - rm -rf ./xx fstream_test_?foo + rm -rf ./xx fstream_test_?foo fsream_test* fstream_test_* foo boo $$'\xE2\x9E\x80' endif Modified: trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile.inc 2007-05-18 15:34:06 UTC (rev 1565) +++ trunk/complement/extern/custom/boost/libs/filesystem/test/Makefile.inc 2007-05-18 15:35:04 UTC (rev 1566) @@ -2,11 +2,11 @@ BOOST_FS_SRC = ${BOOST_INCLUDE_DIR}/libs/filesystem/test PRGNAME = path_test -PRGNAMES = default_name_check_test operations_test fstream_test convenience_test +PRGNAMES = operations_test fstream_test convenience_test wide_test # large_file_support_test SRC_CPP = ${BOOST_FS_SRC}/path_test.cpp -default_name_check_test_SRC_CPP = ${BOOST_FS_SRC}/default_name_check_test.cpp operations_test_SRC_CPP = ${BOOST_FS_SRC}/operations_test.cpp fstream_test_SRC_CPP = ${BOOST_FS_SRC}/fstream_test.cpp convenience_test_SRC_CPP = ${BOOST_FS_SRC}/convenience_test.cpp # large_file_support_test_SRC_CPP = ${BOOST_FS_SRC}/large_file_support_test.cpp +wide_test_SRC_CPP = ${BOOST_FS_SRC}/wide_test.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-18 15:34:09
|
Revision: 1565 http://svn.sourceforge.net/complement/?rev=1565&view=rev Author: complement Date: 2007-05-18 08:34:06 -0700 (Fri, 18 May 2007) Log Message: ----------- development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h trunk/complement/explore/test/virtual_time/vtime_main.cc Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-18 07:19:24 UTC (rev 1564) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-18 15:34:06 UTC (rev 1565) @@ -2,6 +2,7 @@ #include "vtime.h" +#include <iostream> #include <stdint.h> namespace vt { @@ -58,6 +59,72 @@ } } +void gvtime::pack( std::ostream& s ) const +{ + __pack( s, static_cast<uint8_t>(gvt.size()) ); + for ( gvtime_type::const_iterator i = gvt.begin(); i != gvt.end(); ++i ) { + __pack( s, i->first ); + i->second.pack( s ); + } +} + +void gvtime::net_pack( std::ostream& s ) const +{ + __net_pack( s, static_cast<uint8_t>(gvt.size()) ); + for ( gvtime_type::const_iterator i = gvt.begin(); i != gvt.end(); ++i ) { + __net_pack( s, i->first ); + i->second.net_pack( s ); + } +} + +void gvtime::unpack( std::istream& s ) +{ + gvt.clear(); + uint8_t n; + __unpack( s, n ); + while ( n-- > 0 ) { + gvt.push_back( vtime_group_type() ); + __unpack( s, gvt.back().first ); + gvt.back().second.unpack( s ); + } +} + +void gvtime::net_unpack( std::istream& s ) +{ + gvt.clear(); + uint8_t n; + __net_unpack( s, n ); + while ( n-- > 0 ) { + gvt.push_back( vtime_group_type() ); + __net_unpack( s, gvt.back().first ); + gvt.back().second.net_unpack( s ); + } +} + +void VTmess::pack( std::ostream& s ) const +{ + gvt.pack( s ); + __pack( s, mess ); +} + +void VTmess::net_pack( std::ostream& s ) const +{ + gvt.net_pack( s ); + __net_pack( s, mess ); +} + +void VTmess::unpack( std::istream& s ) +{ + gvt.unpack( s ); + __unpack( s, mess ); +} + +void VTmess::net_unpack( std::istream& s ) +{ + gvt.net_unpack( s ); + __net_unpack( s, mess ); +} + vtime_type operator -( const vtime_type& l, const vtime_type& r ) { if ( r.empty() ) { @@ -97,12 +164,13 @@ } -void Proc::mess( const stem::Event_base<vtime>& ev ) +void Proc::mess( const stem::Event_base<VTmess>& ev ) { + cout << ev.value().mess << endl; } DEFINE_RESPONSE_TABLE( Proc ) - EV_Event_base_T_( ST_NULL, MESS, mess, vtime ) + EV_Event_base_T_( ST_NULL, MESS, mess, VTmess ) END_RESPONSE_TABLE } // namespace vt Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-18 07:19:24 UTC (rev 1564) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-18 15:34:06 UTC (rev 1565) @@ -5,6 +5,8 @@ #include <algorithm> #include <list> +#include <vector> +#include <iterator> #include <istream> #include <ostream> @@ -16,6 +18,7 @@ namespace vt { typedef unsigned vtime_unit_type; +typedef uint32_t group_type; typedef std::pair<stem::addr_type, vtime_unit_type> vtime_proc_type; typedef std::list<vtime_proc_type> vtime_type; @@ -106,11 +109,54 @@ { } vtime& operator =( const vtime& _vt ) - { vt.clear(); } + { vt.clear(); std::copy( _vt.vt.begin(), _vt.vt.end(), std::back_insert_iterator<vtime_type>(vt) ); } vtime_type vt; }; +typedef std::pair<group_type, vtime> vtime_group_type; +typedef std::list<vtime_group_type> gvtime_type; + +struct gvtime : + public stem::__pack_base +{ + void pack( std::ostream& s ) const; + void net_pack( std::ostream& s ) const; + void unpack( std::istream& s ); + void net_unpack( std::istream& s ); + + gvtime() + { } + gvtime( const gvtime& _gvt ) : + gvt( _gvt.gvt.begin(), _gvt.gvt.end() ) + { } + + gvtime& operator =( const gvtime& _gvt ) + { gvt.clear(); std::copy( _gvt.gvt.begin(), _gvt.gvt.end(), std::back_insert_iterator<gvtime_type>(gvt) ); } + + gvtime_type gvt; +}; + +struct VTmess : + public stem::__pack_base +{ + void pack( std::ostream& s ) const; + void net_pack( std::ostream& s ) const; + void unpack( std::istream& s ); + void net_unpack( std::istream& s ); + + VTmess() + { } + VTmess( const VTmess& _gvt ) : + gvt( _gvt.gvt ), + mess( _gvt.mess ) + { } + + gvtime gvt; + std::string mess; +}; + + class Proc : public stem::EventHandler { @@ -121,9 +167,18 @@ stem::EventHandler( id ) { } - void mess( const stem::Event_base<vtime>& ); + void mess( const stem::Event_base<VTmess>& ); private: + + enum vtgroup { + first_group, + second_group, + n_groups + }; + + std::vector<vtime> vt[n_groups]; + DECLARE_RESPONSE_TABLE( Proc, stem::EventHandler ); }; Modified: trunk/complement/explore/test/virtual_time/vtime_main.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-18 07:19:24 UTC (rev 1564) +++ trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-18 15:34:06 UTC (rev 1565) @@ -20,6 +20,13 @@ Proc r1( 102 ); Proc r3( 103 ); + stem::Event_base<VTmess> mess( MESS ); + + mess.dest( 101 ); + mess.value().mess = "Hello!"; + + m1.Send( mess ); + cnd.wait(); return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-18 07:19:25
|
Revision: 1564 http://svn.sourceforge.net/complement/?rev=1564&view=rev Author: complement Date: 2007-05-18 00:19:24 -0700 (Fri, 18 May 2007) Log Message: ----------- initial doc for 'exam' project Added Paths: ----------- trunk/complement/explore/app/exam/ trunk/complement/explore/app/exam/doc/ trunk/complement/explore/app/exam/doc/requirements/ trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex trunk/complement/explore/app/exam/doc/requirements/Vision.tex trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig trunk/complement/explore/app/exam/doc/requirements/p1.fig trunk/complement/explore/app/exam/doc/requirements/p2.fig trunk/complement/explore/app/exam/doc/requirements/p3.fig trunk/complement/explore/app/exam/doc/requirements/p4.fig trunk/complement/explore/app/exam/doc/requirements/p5.fig trunk/complement/explore/app/exam/doc/requirements/rup.sty Property changes on: trunk/complement/explore/app/exam/doc/requirements ___________________________________________________________________ Name: svn:ignore + *.log *.out *.dvi *.toc *.0 *.mps *.mp *.mpx *.bak *.aux *.pdf *.pdf_t Added: trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/UseCaseSpec.tex 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,311 @@ +% -*- LaTeX -*- + +\documentclass[a4paper,twoside]{article} + +% \usepackage[koi8-r]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[pdftex]{graphics} +\usepackage{pslatex} +% \usepackage[dvips,final]{epsfig} +% \usepackage{cm-super} +\usepackage[colorlinks,urlcolor=blue]{hyperref} +\usepackage{url} + +\usepackage{rup} +%% Define a new 'leo' style for the package that will use a smaller font. +\makeatletter +\def\url@leostyle{% + \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}} +\makeatother +%% Now actually use the newly defined style. +\urlstyle{leo} + + +\version{0.1} +\title{Use Case Specification: ``Unit Test Framework''} + +\project{Exam} + +\RevHistory{2007--03--08 & 1.0 & Initial document & Petr Ovtchenkov \cr \hline} + +\begin{document} + +\maketitle +% toc +\tableofcontents + +\section{Unit Test Framework} + +% [The following template is provided for a Use-Case +% Specification, which contains the textual properties of the use case. +% This document is used with a requirements management tool, such as Rational +% RequisitePro, for specifying and marking the requirements within the use case +% properties] + +% [The diagrams of the use case can be developed in a visual +% modeling tool, such as Rational Rose. A use-case report (with all +% properties) may be generated with Rational SoDA. For more information, see the tool mentors in the Rational +% Unified Process.] + +\subsection{Brief Description} + +% [The description should briefly convey the role and purpose +% of the use case. A single paragraph +% should suffice for this description.] + +Unit test framework should provide a matched set of components for writing +test programs, grouping tests into test cases and test suites, +monitoring and controlling their runtime execution. Unit test framework +should be convenient for testing programs and set of programs that implement +services and client--server technologies (the set of intercommunicating programs, many +control flows). + +\section{Flow of Events} + +\subsection{Basic Flow} + +% [This use case starts when the actor does something. An actor always initiates use Cases. The use case should describe what the actor +% does and what the system does in response. +% It should be phrased in the form of a dialog between the actor and the +% system. +% +% The use case should describe what happens inside the system, +% but not how or why. If information is +% exchanged, be specific about what is passed back and forth. For example, it is not very illuminating to +% say that the Actor enters customer information. It is better to say the Actor +% enters the customer's name and address. +% A Glossary of Terms is often useful to keep the complexity of the use +% case manageable---you +% may want to define things like customer information there to keep the use case +% from drowning in details. +% +% Simple alternatives may be presented within the text of the +% use case. If it only takes a few +% sentences to describe what happens when there is an alternative, do it directly +% within the \textbf{Flow of Events} section. +% If the alternative flows are more complex, use a separate section to +% describe it. For example, an \textbf{Alternative Flow} +% subsection explains how to describe more complex alternatives. +% +% A picture is sometimes worth a thousand words, though there +% is no substitute for clean, clear prose. +% If it improves clarity, feel free to paste graphical depictions of user +% interfaces, process flows or other figures into the use case. If a flow chart is useful to present a +% complex decision process, by all means use it! +% Similarly for state-dependent behavior, a state-transition diagram often +% clarifies the behavior of a system better than pages upon pages of text. Use the right presentation medium for your +% problem, but be wary of using terminology, notations or figures that your +% audience may not understand. Remember +% that your purpose is to clarify, not obscure.] + +The test suite with single control flow. It notify about start of test suite, +run tests within this test suite (in the order following from tests dependency +graph), report about checks of conditions (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{SingleFlow}). + +\begin{figure} + \begin{center} +% \input intercessor-time.pstex_t +% \input p1.pdf_t +% \scalebox{0.8}{\includegraphics{p1.pdf}} + \includegraphics{p1.mps} + \end{center} + \caption{The test case with single control flow.\label{SingleFlow}} +\end{figure} + + +\subsection{Alternative Flows} + +\subsubsection{Test suite for interactive program} + +% [More complex alternatives should be described in a separate +% section, which is referred to in the \textbf{Basic Flow} subsection +% of \textbf{Flow of Events} section. Think of the +% \textbf{Alternative Flow}> subsections like alternative behavior---each +% alternative flow +% represents alternative behavior, many times because of exceptions that occur in +% the main flow. They may be as long as +% necessary to describe the events associated with the alternative behavior. When an alternative flow ends, the events of +% the main flow of events are resumed unless otherwise stated.] + +The test suite with single control flow. It notify about start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{InteractiveSingleFlow}). +During execution of the test suite, it require interaction with: it print +messages onto terminal and expect input from terminal. + +\begin{figure} + \begin{center} + \includegraphics{p5.mps} + \end{center} + \caption{The test case with single control flow; test suite is + interactive, it print some message to terminal and expect input + from terminal.\label{InteractiveSingleFlow}} +\end{figure} + +This use-case reflect test suite for interactive part of program. + +\subsubsection{Multi-threaded test suite} + +% [There may be, and most likely will be, a number of +% alternative flows in a use case. Keep +% each alternative separate to improve clarity. +% Using alternative flows improves the readability of the use case, as +% well as preventing use cases from being decomposed into hierarchies of use +% cases. Keep in mind that use cases are +% just textual descriptions, and their main purpose is to document the behavior +% of a system in a clear, concise, and understandable way.] + +The test suite with more then one control flow. It register start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{ThreadedFlow}). +Test control flow is splitted into few threads. + +\begin{figure} + \begin{center} + \includegraphics{p2.mps} + \end{center} + \caption{The test case with few control flows, single process.\label{ThreadedFlow}} +\end{figure} + +This use-case reflect test suite for multi-threaded program, such as server, +that provide some kind of service. + +\subsubsection{Test suite with fork} + +The test suite with more then one control flow. It register start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{ForkedFlow}). +Some tests of the test suite forked into several processes. + +\begin{figure} + \begin{center} + \includegraphics{p4.mps} + \end{center} + \caption{The test case with few control flows, process forked.\label{ForkedFlow}} +\end{figure} + +This use-case reflect test suite for daemons and client-server interaction. + +\subsubsection{Test suite with process intercommunication} + +The test suite with more then one control flow. It register start of test suite, +run tests within this test suite (in the order, described by tests dependency +graph), print conditions report (verbosity depends upon log level), and print the resulting summary of the test suite (see fig.\ref{IntercomProcesses}). +Some tests of the test suite forked into several processes. + +\begin{figure} + \begin{center} + \includegraphics{p3.mps} + \end{center} + \caption{The test case with few control flows, intercommunicated processes.\label{IntercomProcesses}} +\end{figure} + +This use-case reflect test suite for daemons and client-server interaction. + +\section{Special Requirements} + +% [A special requirement is typically a non-functional +% requirement that is specific to a use case, but is not easily or naturally +% specified in the text of the use case's event flow. Examples of special +% requirements include legal and regulatory requirements, application standards, +% and quality attributes of the system to be built including usability, +% reliability, performance or supportability requirements. Additionally, other +% requirements---such +% as operating systems and environments, compatibility requirements, and design +% constraints---should be captured in this section.] + +\subsection{Suitable for debugging} + +\begin{figure} + \begin{center} + \includegraphics{debug-focus.mps} + \end{center} + \caption{Development application: functionality implementation cycle.\label{DevCycle}} +\end{figure} + +Unit tests not only instrument of QA (see fig.~\ref{DevCycle}). +Unit tests written +in parallel with functionality implementation,\footnote{as assume XP technique} +provide a good practice ground +for debugging. Implementation of special test cases for debugging +after detection problem in unit test isn't a good idea by financial (time and other resources) reasons. +Even more: in non-trivial cases not evident, what was wrong: +either incorrect functionality imlementation, or test, or even +specification. Developer should has a chance to debug program +keeping in mind as main functionality, as unit test logic. + +Due to this unit test framework intended for testing services, and services +often has own logic of signal processing, the unit test framework +should not (at least by default) intervenes into signal catching. +This also concern fatal errors with dumping core: dumping core ``as is'' +is more preferable way (useful for post-mortal debugging) then nice report +``you test died'' with unuseful stack. + +\subsection{Output from few control flows} + +Unit test suite should provide reasonable output as for tests +with single control flow, as for multi-threaded and multi-process tests. + +Unit test suite should provide reasonable output for test +with console output and input, i.e. split prints from interaction with user +from prints about failed conditions. + +\subsection{Integrable} + +To be light-weight, easy integrable into other tools and scripts. + +\subsection{Tests dependency\label{TestDependency}} + +Tests run order should be determined from tests dependency graph. + +\subsection{Tests grouping} + +The ability of grouping tests is desirable: +\begin{itemize} + \item single function tests + \item class (group of tests) with initialization and finalization. +\end{itemize} + +\subsection{Report format} + +Unit test framework should provide few levels of output verbosity, and +few formats of reports (plain text, xml/html). + +\subsection{Test timeout} + +Due to deadlock (or other conditions, leads to stalled test) may occur, +it would be nice if monitoring program abort such test after specified timeout, +and continue other tests (taken into account tests dependencies, section~\ref{TestDependency}). + +% \section{Pre-Conditions} + +% [A pre-condition of a use case is the state of the system +% that must be present prior to a use case being performed.] + +% \subsection{Pre-condition One} + +% \section{Post-Conditions} + +% [A post-condition of a use case is a list of possible states +% the system can be in immediately after a use case has finished.] + +% \subsection{Post-condition One} + +\section{Extension Points} + +% [Extension points of the use case.] + +\subsection{Remote testing} + +% [Definition of the location of the extension point in the +% flow of events.] + +Test suite monitoring may be performed from remote host. This also useful +if test suite allow monitoring a few (intercommunicating) processes, that +run on different hosts. + +\subsection{Performance Mesure} + +Unit tests may be used for performance measure of key technology solutions. + +\end{document} Added: trunk/complement/explore/app/exam/doc/requirements/Vision.tex =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/Vision.tex (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/Vision.tex 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,791 @@ +% -*- LaTeX -*- +% $Id: Vision.tex,v 1.2 2002/11/04 13:38:30 ptr Exp $ + +\documentclass[a4paper,twoside]{article} + +\usepackage{rup} + +\title{Vision} +\project{Virtual Manual} +% \RevHistory{dd/mmmm/yyyy & x.x & & \cr \hline} +\begin{document} + +\maketitle + +\section{Introduction} + +[The purpose of this document is to collect, +analyze, and define high-level needs and features of the +``System Name''. It focuses on the capabilities needed by the +stakeholders, and the target users, and \textbf{why} these needs exist. +The details of how the +``System Name'' fulfils these +needs are detailed in the use-case and supplementary specifications.] + +[The introduction of the \textbf{Vision} document should provide + an overview of the +entire document. It should include the purpose, scope, definitions, acronyms, +abbreviations, references, and overview of this \textbf{Vision} document.] + +\subsection{Purpose} + +[Specify the purpose of this \textbf{Vision} document.] + +\subsection{Scope} + +[A brief description of the scope of this \textbf{Vision} +document; what Project(s) it is associated with, and anything else that is +affected or influenced by this document.] + +\subsection{Definitions, Acronyms and Abbreviations} + +[This subsection should provide the +definitions of all terms, acronyms, and abbreviations required to properly +interpret the \textbf{Vision} document. This information may +be provided by +reference to the project Glossary.] + +\subsection{References} + +[This subsection should provide a complete +list of all documents referenced elsewhere in the \textbf{Vision} +document. Each document should be identified by title, +report number (if applicable), date, and publishing organization. +Specify the sources from which the +references can be obtained. This information may be provided by reference to an +appendix or to another document.] + +\subsection{Overview} + +[This subsection should describe what the +rest of the \textbf{Vision} document contains and explain how the document is +organized.] + +\section{Positioning} + +\subsection{Business Opportunity} + +[Briefly describe the business opportunity being met by this +project.] + +\subsection{Problem Statement} + +[Provide a statement summarizing the problem being solved by +this project. The following format may be used:] + +\begin{center} +\begin{minipage}[t]{2in} +\textit{The problem of} +\end{minipage} +\begin{minipage}[t]{4in} +[describe the problem] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{affects} +\end{minipage} +\begin{minipage}[t]{4in} +[the stakeholders affected by the problem] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{the impact of which is} +\end{minipage} +\begin{minipage}[t]{4in} +[what is the impact of the problem] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{a successful solution would be} +\end{minipage} +\begin{minipage}[t]{4in} +[list some key benefits of a successful solution] +\end{minipage} + +\end{center} + +\subsection{Product Position Statement} + +[Provide an overall statement summarizing at the highest +level, the unique position the product intends to fill in the marketplace. The +following format may be used:] +\begin{center} +\begin{minipage}[t]{2in} +\textit{For} +\end{minipage} +\begin{minipage}[t]{4in} +[target customer] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{Who} +\end{minipage} +\begin{minipage}[t]{4in} +[statement of the need or opportunity] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{The (product name) is a} +\end{minipage} +\begin{minipage}[t]{4in} +[product category] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{That} +\end{minipage} +\begin{minipage}[t]{4in} +[statement of key benefit; that is---compelling reason to buy] +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{Unlike} +\end{minipage} +\begin{minipage}[t]{4in} +[primary competitive alternative] (text manuals, electronic text-only +manuals, electonic 2D illustrated manuals with hyper references) +\end{minipage} +\\[1em] +\begin{minipage}[t]{2in} +\textit{Our product} +\end{minipage} +\begin{minipage}[t]{4in} +[statement of primary differentiation] +\end{minipage} +\end{center} + +[A product position statement communicates the intent of the +application and the importance of the project to all concerned personnel.] + +\section{Stakeholder and User Descriptions} + +[To effectively +provide products and services that meet your stakeholders and users' real +needs, it is necessary to identify and involve all of the stakeholders as part +of the Requirements Modeling process. +You must also identify the users of the system and ensure that the +stakeholder community adequately represents them. This section provides a profile of the stakeholders and users +involved in the project and the key problems that they perceive to be addressed +by the proposed solution. It does not +describe their specific requests or requirements as these are captured in a +separate stakeholder requests artifact. +Instead it provides the background and justification for why the +requirements are needed.] + +\subsection{Market Demographics} + +[Summarize the key +market demographics that motivate your product decisions. Describe and position +target market segments. Estimate the market's size and growth by using the +number of potential users, or the amount of money your customers spend trying +to meet needs that your product or enhancement would fulfill. Review major industry +trends and technologies. Answer these strategic questions: + +\begin{itemize} + \item What is your organization's reputation +in these markets? + + \item What would you like it to be? + + \item How does this product or service support your goals? +\end{itemize} + +] + +\subsection{Stakeholder Summary} + +[Present a summary list of all the identified stakeholders.] + +\begin{center} +\begin{minipage}[t]{1.2in} +\centering \textbf{Name} +\end{minipage} +\begin{minipage}[t]{2in} +\centering \textbf{Represents} +\end{minipage} +\begin{minipage}[t]{2in} +\centering \textbf{Role} +\end{minipage}\nopagebreak +\\[1em] +\begin{minipage}[t]{1.2in} +Name the stakeholder type. +\end{minipage} +\begin{minipage}[t]{2in} +Briefly describe what they represent with respect to the development. +\end{minipage} +\hskip 1ex +\begin{minipage}[t]{2in} + [Briefly describe the role they are playing in the development. + For example, Ensure this] +\end{minipage} +\end{center} + +\subsection{User Summary} + +[Present a summary list of all the identified users.] + +\begin{center} +\begin{minipage}[t]{1.2in} +\centering\textbf{Name} +\end{minipage} +\begin{minipage}[t]{2in} +\centering\textbf{Description} +\end{minipage} +\hskip 1ex +\begin{minipage}[t]{2in} +\centering\textbf{Stakeholder} +\end{minipage} +\\[1em] +\begin{minipage}[t]{1.2in} + Name the user type +\end{minipage} +\begin{minipage}[t]{2in} +[Briefly describe what they represent with respect to the system.] +\end{minipage} +\hskip 1ex +\begin{minipage}[t]{2in} +[List how the user is represented by the stakeholders. + For example, Represented by Stakeholder 1.1] +\end{minipage} +\end{center} + + +\subsection{User Environment} + +[Detail the working +environment of the target user. Here are some suggestions: +\begin{itemize} + \item Number of people +involved in completing the task? Is this changing? + \item How long is a task + cycle? Amount of time spent in each activity? Is this changing? + \item Any unique environmental constraints: mobile, outdoors, + in-flight, etc.? + \item Which systems platforms are in use today? Future platforms? + \item What other applications are in use? Does your application + need to integrate with them? + \item This is where extracts from the Business Model could + be included to outline the task and workers involved etc.] +\end{itemize} + + +\subsection{Stakeholder Profiles} + +[Describe each +stakeholder in the system here by filling in the following table for each +stakeholder. Remember stakeholder types +can be as divergent as users, strategy departments and technical +developers. A thorough profile should +cover the following topics for each type of stakeholder:] + +\subsubsection{``Stakeholder Name''} + +\begin{center} +\begin{minipage}[t]{2in} +Representative +\end{minipage} +\begin{minipage}[t]{4in} +[Who is the stakeholder representative to the project? (optional if documented elsewhere.) + What we want here is names.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Description +\end{minipage} +\begin{minipage}[t]{4in} +[Brief description of the stakeholder type.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Type +\end{minipage} +\begin{minipage}[t]{4in} +[Qualify the stakeholder's expertise, technical background, and degree of + sophistication---that is, guru, business, expert, casual user, etc.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Responsibilities +\end{minipage} +\begin{minipage}[t]{4in} +[List the stakeholder's key responsibilities with regards to the system being + developed that is, their interest as a stakeholder.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Success Criteria +\end{minipage} +\begin{minipage}[t]{4in} +[How does the stakeholder define success? How is the stakeholder rewarded?] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Involvement +\end{minipage} +\begin{minipage}[t]{4in} +[How the stakeholder is involved in the project? Relate where possible + to RUP workers that is, Requirements Reviewer etc.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Deliverables +\end{minipage} +\begin{minipage}[t]{4in} +[Are there any additional deliverables required by the stakeholder? + These could be project deliverables or outputs from the system under development.] +\end{minipage} +\\[1ex] %-------------------------------- +\begin{minipage}[t]{2in} +Comments / Issues +\end{minipage} +\begin{minipage}[t]{4in} +[Problems that interfere with success and any other relevant information go here.] +\end{minipage} +\end{center} + +\subsection{User Profiles} + +[Describe each +unique user of the system here by filling in the following table for each user +type. Remember user types can be as +divergent as gurus and novices. For example, a guru might need a sophisticated, +flexible tool with cross-platform support, while a novice might need a tool +that is easy to use and user-friendly. A thorough profile should cover the +following topics for each type of user:]</p> + +\subsubsection{``User Name''} +\begin{center} +\begin{minipage}[t]{2in} +Representative +\end{minipage} +\begin{minipage}[t]{4in} +[Who is the user representative to the project? (optional if documented + elsewhere.) This often refers to the Stakeholder that represents the set of users, + for example, Stakeholder: Stakeholder1.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Description +\end{minipage} +\begin{minipage}[t]{4in} +[A brief description of the user type.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Type +\end{minipage} +\begin{minipage}[t]{4in} +[Qualify the user's expertise, technical background, and degree +of sophistication that is, guru, casual user, etc.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Responsibilities +\end{minipage} +\begin{minipage}[t]{4in} +[List the user's key responsibilities with regards to the system + being developed that is, captures details, produces + reports, coordinates work, etc.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Success Criteria +\end{minipage} +\begin{minipage}[t]{4in} +[How does the user define success? How is the user rewarded?] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Involvement +\end{minipage} +\begin{minipage}[t]{4in} +[How the user is involved in the project? + Relate where possible to RUP workers that is, + Requirements Reviewer, etc.] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Deliverables +\end{minipage} +\begin{minipage}[t]{4in} +[Are there any deliverables the user produces and, if so, for whom?] +\end{minipage} +\\[1em] % ---------------------------------------- +\begin{minipage}[t]{2in} +Comments / Issues +\end{minipage} +\begin{minipage}[t]{4in} +[Problems that interfere with success and any other relevant + information go here. These would include trends that make the + user's job easier or harder.] +\end{minipage} +\end{center} + +\subsection{Key Stakeholder / User Needs} + +[List the key +problems with existing solutions as perceived by the stakeholder. Clarify the +following issues for each problem: + +\begin{itemize} + \item What are the reasons for this problem? + \item How is it solved now? + \item What solutions does the stakeholder want?] +\end{itemize} + +[It is important to +understand the \textbf{relative} importance the stakeholder or user places on +solving each problem. Ranking and cumulative voting techniques indicate +problems that \textbf{must} be solved versus issues they would + like addressed. + +Fill in the +following table --- if using ReqPro to capture the Needs, this could be an +extract or report from that tool.] + +\begin{tabular}{c|c|c|c|c} + Need & Priority & Concerns & Current Solution & Proposed Solutions \\ + Broadcast messages \\ +\end{tabular} + + +\subsection{Alternatives and Competition} + +[Identify +alternatives the stakeholder perceives as available. These can include buying a +competitor's product, building a homegrown solution or simply maintaining the +status quo. List any known competitive choices that exist, or may become +available. Include the major strengths and weaknesses of each competitor as +perceived by the stakeholder.] + +\subsubsection{``aCompetitor''} + +\subsubsection{``anotherCompetitor''} + +\section{Product Overview} + +[This section provides a high level view of the product +capabilities, interfaces to other applications, and systems configurations. +This section usually consists of three subsections, as follows: +\begin{itemize} + \item Product perspective + \item Product functions + \item Assumptions and dependencies] +\end{itemize} + +\subsection{Product Perspective} + +[This subsection of the <b>Vision</b> document should put the +product in perspective to other related products and the user's environment. If +the product is independent and totally self-contained, state it here. If the +product is a component of a larger system, then this subsection should relate +how these systems interact and should identify the relevant interfaces between +the systems. One easy way to display the major components of the larger system, +interconnections, and external interfaces is via a block diagram.] + +\subsection{Summary of Capabilities} + +[Summarize the major benefits and features the product will +provide. For example, a <b>Vision</b> document for a customer support system +may use this part to address problem documentation, routing, and status +reporting without mentioning the amount of detail each of these functions requires. + +Organize the functions so the list is understandable to the +customer or to anyone else reading the document for the first time. A simple +table listing the key benefits and their supporting features might suffice. For +example:] + +\begin{center} +Customer Support System \\[2ex] +\begin{tabular}{p{2in}|p{3in}} + Customer Benefit & Supporting Features \\ +\hline +New support staff can quickly get up to speed. & +Knowledge base assists support personnel in quickly +identifying known fixes and workarounds \\ +\hline +Customer satisfaction is improved because nothing falls through the cracks. & +Problems are uniquely itemized, classified and tracked throughout +the resolution process. Automatic notification occurs for any aging issues.\\ +\hline +Management can identify problem areas and gauge staff workload.& +Trend and distribution reports allow high level review of problem status.\\ +\hline +Distributed support teams can work together to solve problems. & +Replication server allows current database information to be shared +across the enterprise\\ +\hline +Customers can help themselves, lowering support costs and improving +response time. & +Knowledge base can be made available over the Internet. Includes +hypertext search capabilities and graphical query engine +\end{tabular} +\end{center} + + +\subsection{Assumptions and Dependencies} + +[List each of the factors that affects the features stated in +the <b>Vision</b> document. List assumptions that, if changed, will alter the +\textbf{Vision} +document. For example, an assumption may state that a specific operating +system will be available for the hardware designated for the software product. +If the operating system is not available, the \textbf{Vision} document + will need to change.] + +\subsection{Cost and Pricing} + +[For products sold to external customers and for many in-house + applications, cost and pricing issues can directly impact the +applications definition and implementation. In this section, record any cost +and pricing constraints that are relevant. For example, distribution costs, (\# +of diskettes, \# CD-ROMs, CD mastering) or other cost of goods sold constraints +(manuals, packaging) may be material to the projects success, or irrelevant, +depending on the nature of the application.] + +\subsection{Licensing and Installation} + +[Licensing and installation issues can also directly impact +the development effort. For example, the need to support serializing, password +security or network licensing will create additional requirements of the system +that must be considered in the development effort. + +Installation requirements may also affect coding, or create +the need for separate installation software.] + +\section{Product Features} + +[List and briefly describe the product features. Features are +the high-level capabilities of the system that are necessary to deliver +benefits to the users. Each feature is an externally desired service that +typically requires a series of inputs to achieve the desired result. For +example, a feature of a problem tracking system might be the ability to provide +trending reports. As the use-case model takes shape, update the description to +refer to the use cases. + +Because the \textbf{Vision} document is reviewed by a wide +variety of involved personnel, the level of detail should be general enough for +everyone to understand. However, enough detail should be available to provide +the team with the information they need to create a use-case model. + +To effectively manage application complexity, we recommend +for any new system, or an increment to an existing system, capabilities are +abstracted to a high enough level so 25--99 features result. These features +provide the fundamental basis for product definition, scope management, and +project management. Each feature will be expanded in greater detail in the use-case +model. + +Throughout this section, each feature should be externally +perceivable by users, operators or other external systems. These features +should include a description of functionality and any relevant usability issues +that must be addressed. The following guidelines apply: + + Avoid design. Keep feature +descriptions at a general level. Focus on capabilities needed and why, (not +how)\xA0 they should be implemented + + If you are using the Requisite +toolkit, all should be selected as requirements of type for easy reference and +tracking.] + +\subsection{``aFeature''} + +\subsection{``anotherFeature''} + +\section{Constraints} + +[Note any design constraints, external constraints or other +dependencies.] + +\section{Quality Ranges} + +[Define the quality ranges for performance, robustness, fault +tolerance, usability, and similar characteristics that are not captured in the +Feature Set.] + +\section{Precedence and Priority} + +[Define the priority of the different system features.] + +\section{Other Product Requirements} + +[At a high-level, list applicable standards, hardware or +platform requirements, performance requirements, and environmental +requirements.] + +\subsection{Applicable Standards} + +[List all standards with which the product must comply. These +can include legal and regulatory (FDA, UCC) communications standards (TCP/IP, +ISDN), platform compliance standards (Windows, Unix, etc.), and quality and +safety standards (UL, ISO, CMM).] + +\subsection{System Requirements} + +[Define any system requirements necessary to support the +application. These can include the supported host operating systems and network +platforms, configurations, memory, peripherals, and companion software.] + +\subsection{Performance Requirements} + +[Use this section to detail performance requirements. +Performance issues can include such items as user load factors, bandwidth or +communication capacity, throughput, accuracy, and reliability or response times +under a variety of loading conditions.] + +\subsection{Environmental Requirements} + +[Detail environmental requirements as needed. For hardware- +based systems, environmental issues can include temperature, shock, humidity, +radiation, etc. For software applications, environmental factors can include +usage conditions, user environment, resource availability, maintenance issues, +and error handling, and recovery.] + +\section{Documentation Requirements} + +[This section describes the documentation that must be +developed to support successful application deployment.] + +\subsection{User Manual} + +[Describe the purpose and contents of the User Manual. +Discuss desired length, level of detail, need for index, glossary of terms, +tutorial vs. reference manual strategy, etc. Formatting and printing constraints +should also be identified.] + +\subsection{On-line Help} + +[Many applications provide an on-line help system to assist +the user. The nature of these systems is unique to application development as +they combine aspects of programming (hyperlinks, etc) with aspects of technical +writing (organization, presentation). Many have found the development of +on-line help system is a project within a project that benefits from up-front +scope management and planning activity.] + +\subsection{Installation Guides, Configuration, Read Me File} + +[A document that includes installation instructions and +configuration guidelines is important to a full solution offering. Also, a Read +Me file is typically included as a standard component. The Read Me can include +a What's New With This Release section, and a discussion of +compatibility issues with earlier releases. Most users also appreciate +documentation defining any known bugs and workarounds in the Read Me file.] + +\subsection{Labeling and Packaging} + +[Today's state of the art applications provide a consistent +look and feel that begins with product packaging and manifests through +installation menus, splash screens, help systems, GUI dialogs, etc. This +section defines the needs and types of labeling to be incorporated into the +code. Examples include copyright and patent notices, corporate logos, +standardized icons and other graphic elements, etc.] + +\section{Appendix 1 - Feature Attributes} + +[Features should be given attributes that can be used to +evaluate, track, prioritize, and manage the product items proposed for +implementation. All requirement types and attributes should be outlined in the +Requirements Management Plan, however you may wish to list and briefly +describes the attributes for features that have been chosen. Following +subsections represent a set of suggested feature attributes.] + +\subsection{Status} + +[Set after negotiation and review by the project management +team. Tracks progress during definition of the project baseline.] + +\begin{tabular}{l|p{4in}} +Proposed & +[Used to describe features that are under discussion but + have not yet been reviewed and accepted by the ``official channel'', + such as a working group consisting of representatives from the project team, + product management and user or customer community.]\\ +Approved & +[Capabilities that are deemed useful and feasible and have + been approved for implementation by the official channel.] \\ +Incorporated & +[Features incorporated into the product baseline at a specific point + in time.] +\end{tabular} + +\subsection{Benefit} + +[Set by Marketing, the product manager or the business +analyst. All requirements are not created equal. Ranking requirements by their +relative benefit to the end user opens a dialogue with customers, analysts and +members of the development team. Used in managing scope and determining +development priority.] + +\begin{tabular}{l|p{3in}} +Critical & +[Essential features. Failure to implement means the system + will not meet customer needs. All critical features must be implemented in + the release or the schedule will slip.]\\ +Important & +[Features important to the effectiveness and efficiency of + the system for most applications. The functionality cannot be easily provided + in some other way. Lack of inclusion of an important feature may affect + customer or user satisfaction, or even revenue, but release will not be + delayed due to lack of any important feature.]\\ +Useful & +[Features that are useful in less typical applications, will + be used less frequently, or for which reasonably efficient workarounds can be + achieved. No significant revenue or customer satisfaction impact can be + expected if such an item is not included in a release.]\\ +\end{tabular} + +\subsection{Effort} + +[Set by the development team. Because some features require +more time and resources than others, estimating the number of team or +person-weeks, lines of code required or function points, for example, is the +best way to gauge complexity and set expectations of what can and cannot be +accomplished in a given time frame. Used in managing scope and determining +development priority.] + +\subsection{Risk} + +[Set by development team based on the probability the project +will experience undesirable events, such as cost overruns, schedule delays or +even cancellation. Most project managers find categorizing risks as high, +medium, and low sufficient, although finer gradations are possible. Risk can +often be assessed indirectly by measuring the uncertainty (range) of the +projects teams schedule estimate.] + +\subsection{Stability} + +[Set by analyst and development team based on the probability +the feature will change or the team's understanding of the feature will change. +Used to help establish development priorities and determine those items for +which additional elicitation is the appropriate next action.] + +\subsection{Target Release} + +[Records the intended product version in which the feature +will first appear. This field can be used to allocate features from a +\textbf{Vision} document into a particular baseline release. + When combined with the status +field, your team can propose, record and discuss various features of the +release without committing them to development. Only features whose Status is +set to Incorporated and whose Target Release is defined will be implemented. +When scope management occurs, the Target Release Version Number can be +increased so the item will remain in the \textbf{Vision} document but will be +scheduled for a later release.] + +\subsection{Assigned To} + +[In many projects, features will be assigned to ``feature +teams'' responsible for further elicitation, writing the software +requirements and implementation. This simple pull down list will help everyone +on the project team better understand responsibilities.] + +\subsection{Reason} + +[This text field is used to track the source of the requested +feature. Requirements exist for specific reasons. This field records an +explanation or a reference to an explanation. For example, the reference might +be to a page and line number of a product requirement specification, or to a +minute marker on a video of an important customer interview.] + + +\end{document} Added: trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/debug-focus.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,58 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +1 1 0 1 0 31 52 -1 20 0.000 1 0.0000 2775 3000 675 375 2775 3000 3450 3000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2625 825 2025 825 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 825 2025 1275 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 3075 825 2400 1200 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2025 1500 1425 2100 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2325 1500 2775 2100 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2775 2400 2775 2925 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 1200 2100 675 1575 1050 900 + 0.000 1.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 60.00 120.00 + 2025 600 2625 600 + 0.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 7 + 0 0 1.00 60.00 120.00 + 2925 3225 3150 3825 4125 3525 4275 1875 4200 300 3450 225 + 3300 600 + 0.000 1.000 1.000 1.000 1.000 1.000 0.000 +3 0 0 1 0 7 52 -1 -1 0.000 0 1 0 7 + 0 0 1.00 60.00 120.00 + 2550 3225 2550 3750 675 3600 -300 2550 -450 225 900 225 + 975 525 + 0.000 1.000 1.000 1.000 1.000 1.000 0.000 +4 1 0 50 -1 4 10 0.0000 0 150 900 2175 1425 Running Test\001 +4 1 0 50 -1 4 10 0.0000 0 150 825 3225 750 Writing Test\001 +4 1 0 50 -1 4 10 0.0000 0 120 885 1425 2325 Test Success\001 +4 1 0 50 -1 4 10 0.0000 0 120 555 2775 2325 Test Fail\001 +4 1 0 50 -1 4 10 0.0000 0 150 750 2775 3075 Debugging\001 +4 1 0 50 -1 4 10 0.0000 0 150 1800 975 750 Implementing functionality\001 Added: trunk/complement/explore/app/exam/doc/requirements/p1.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p1.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p1.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,29 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 Added: trunk/complement/explore/app/exam/doc/requirements/p2.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p2.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p2.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,42 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 0 0 1.00 60.00 120.00 + 1500 1125 3600 1125 3600 1350 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 1350 3750 1350 3750 2250 3450 2250 3450 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1575 4125 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 0 0 1.00 60.00 120.00 + 3600 2250 3600 2400 1500 2400 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 2400 1350 start thread\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 4200 1650 Condition report\001 Added: trunk/complement/explore/app/exam/doc/requirements/p3.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p3.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p3.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,56 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1350 4125 1350 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 1350 3750 1350 3750 2625 3450 2625 3450 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 2625 4125 2625 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3600 450 3600 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3600 2625 3600 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2175 1875 2175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 2175 4125 2175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 1500 1800 3450 1800 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 4200 1425 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 4200 2700 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 2250 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 4200 2250 Condition report\001 +4 1 0 50 -1 4 10 0.0000 0 120 1350 2475 1650 Intercommunication\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 1350 300 Process 1\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 3600 300 Process 2\001 Added: trunk/complement/explore/app/exam/doc/requirements/p4.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p4.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p4.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,52 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 0 0 1.00 60.00 120.00 + 1500 1125 3600 1125 3600 1350 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3450 1350 3750 1350 3750 2250 3450 2250 3450 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1575 4125 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 1350 4125 1350 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3750 2250 4125 2250 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3600 2250 3600 3375 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 285 2400 1350 fork\001 +4 0 0 50 -1 4 10 0.0000 0 150 1170 4200 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 4200 1425 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 4200 2325 Success/Fail\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 1350 375 Process 1\001 +4 1 0 50 -1 4 10 0.0000 0 120 690 3600 975 Process 2\001 Added: trunk/complement/explore/app/exam/doc/requirements/p5.fig =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/p5.fig (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/p5.fig 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,37 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 975 1500 975 1500 2925 1200 2925 1200 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 975 1875 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 1575 1875 1575 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1500 2925 1875 2925 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 450 1350 975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1350 2925 1350 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2 + 0 0 1.00 60.00 120.00 + 825 1650 1200 1650 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 825 1950 1200 1950 +4 0 0 50 -1 4 10 0.0000 0 150 1170 1950 1650 Condition report\001 +4 0 0 50 -1 4 10 0.0000 0 120 825 1950 3000 Success/Fail\001 +4 0 0 50 -1 4 10 0.0000 0 120 360 1950 1050 Start\001 +4 2 0 50 -1 4 10 0.0000 0 150 480 750 1725 Output\001 +4 2 0 50 -1 4 10 0.0000 0 150 360 750 2025 Input\001 Added: trunk/complement/explore/app/exam/doc/requirements/rup.sty =================================================================== --- trunk/complement/explore/app/exam/doc/requirements/rup.sty (rev 0) +++ trunk/complement/explore/app/exam/doc/requirements/rup.sty 2007-05-18 07:19:24 UTC (rev 1564) @@ -0,0 +1,149 @@ +% -*- LaTeX -*- +% $Id: rup.sty,v 1.1 2002/11/04 10:53:08 ptr Exp $ + +\makeatletter + +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesClass{rup}[2002/10/24 v0.1 RUP document class] + +\newcommand\version[1]{\gdef\@version{#1}} +\gdef\@version{1{.}0} +\newcommand\project[1]{\gdef\@project{#1}} +\gdef\@project{Project Name} +\newcommand\RevHistory[1]{\gdef\@revhistory{#1}} +\gdef\@revhistory{dd/mmmm/yyyy & x.x & & \cr \hline} + +% \setlength\parsep{5\p@ \@plus \p@} +% \setlength\parsep{5em} +% \parindent 0em +\setlength\parskip{5pt plus 1pt minus 1pt} +\setlength\parindent{0pt} +% \setlength\parsep{1em} + +\if@titlepage + \renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + \null\vfil + \vskip 60\p@ + \begin{flushright}% + {\LARGE \@title \par}% + \vskip 3em% + {\large + \lineskip .75em% + \begin{tabular}[t]{c}% + \@author + \end{tabular}\par% + }% + \vskip 1.5em% + {\large \@date \par}% % Set date in \large size. + \end{flushright}\par + \@thanks + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } +\else + \renewcommand\maketitle{\par + \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \newpage + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax + } + \def\@maketitle{% + \newpage + \null + \vskip 2em% + \begin{flushright}% + \let \footnote \thanks + {\LARGE \@project \par} + \vskip 1.5em% + {\LARGE \@title \par}% + \vskip 1.5em% + {\Large Version \@version \par} + \vskip 4em% + {\large Revision History + \vskip 1em% + \lineskip 0.5em% + {\small\fontfamily{cmss}\selectfont + \begin{tabular}{|c|c|p{1.5in}|p{1.2in}|} + \hline + Date & Version & Description & Author \\ + \hline + \@revhistory + % <dd/mmm/yy> & <x.x> & & \\ + % \hline + \end{tabular} + } +% \begin{tabular}[t]{c}% +% \@author +% \end{tabular}\par + }% +% \vskip 1em% +% {\large \@date}% + \end{flushright}% + \par + \vskip 1.5em% + } +\fi + +\renewenvironment{thebibliography}[1] + {\list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} + +\makeatother + +\RequirePackage{vmargin} +\setmarginsrb{1in}{1in}{1in}{1in}{30pt}{36pt}{40pt}{36pt} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-18 07:12:36
|
Revision: 1563 http://svn.sourceforge.net/complement/?rev=1563&view=rev Author: complement Date: 2007-05-18 00:12:34 -0700 (Fri, 18 May 2007) Log Message: ----------- development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-18 07:12:09 UTC (rev 1562) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-18 07:12:34 UTC (rev 1563) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/03/07 15:53:23 ptr> +// -*- C++ -*- Time-stamp: <07/05/17 23:30:42 ptr> #include "vtime.h" @@ -58,6 +58,45 @@ } } +vtime_type operator -( const vtime_type& l, const vtime_type& r ) +{ + if ( r.empty() ) { + return l; + } + + vtime_type vt; + vtime_type::const_iterator i = l.begin(); + vtime_type::const_iterator j = r.begin(); + + while ( i != l.end() && j != r.end() ) { + while ( i->first < j->first && i != l.end() ) { + vt.push_back( make_pair( i->first, i->second ) ); + ++i; + } + + while ( i->first == j->first && i != l.end() && j != r.end() ) { + if ( i->second < j->second ) { + throw range_error( "vtime different: right value grater then left" ); + } + vt.push_back( make_pair( i->first, i->second - j->second ) ); + ++i; + ++j; + } + } + + if ( i == l.end() && j != r.end() ) { + throw range_error( "vtime different: right value grater then left" ); + } + + while ( i != l.end() ) { + vt.push_back( make_pair( i->first, i->second ) ); + ++i; + } + + return vt; +} + + void Proc::mess( const stem::Event_base<vtime>& ev ) { } Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-18 07:12:09 UTC (rev 1562) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-18 07:12:34 UTC (rev 1563) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/03/06 19:23:37 ptr> +// -*- C++ -*- Time-stamp: <07/05/18 00:26:00 ptr> #ifndef __vtime_h #define __vtime_h @@ -19,13 +19,18 @@ typedef std::pair<stem::addr_type, vtime_unit_type> vtime_proc_type; typedef std::list<vtime_proc_type> vtime_type; +inline bool uorder( const vtime_proc_type& l, const vtime_proc_type& r ) +{ + return l.first < r.first; +} + inline bool operator <( const vtime_proc_type& l, const vtime_proc_type& r ) { if ( l.first == r.first ) { return l.second < r.second; } - throw std::invalid_argument( "uncomparable" ); + throw std::invalid_argument( "uncomparable vtime" ); } inline bool operator <=( const vtime_proc_type& l, const vtime_proc_type& r ) @@ -34,7 +39,7 @@ return l.second <= r.second; } - throw std::invalid_argument( "uncomparable" ); + throw std::invalid_argument( "uncomparable vtime" ); } inline bool operator ==( const vtime_proc_type& l, const vtime_proc_type& r ) @@ -43,10 +48,49 @@ return l.second == r.second; } - throw std::invalid_argument( "uncomparable" ); + throw std::invalid_argument( "uncomparable vtime" ); } +#if 0 +bool operator <=( const vtime_type& l, const vtime_type& r ) +{ + if ( l.size() == 0 ) { // 0 always less or equal of anything + return true; + } + + bool result = true; + vtime_type::const_iterator i = l.begin(); + vtime_type::const_iterator j = r.begin(); + + while ( j->first < i->first && j != r.end() ) { + ++j; + } + + if ( j == r.end() ) { // note, that i != l.end() here! + return false; + } + + for ( ; i != l.end() && j != r.end(); ) { + if ( i->second > j->second ) { + } + + if ( i->first < j->first ) { + ++i; + } else if ( i->first == j->first ) { + if ( i->second > j->second ) { + return false; + } + } else { + ++j; + } + } +} +#endif + + +vtime_type operator -( const vtime_type& l, const vtime_type& r ); + struct vtime : public stem::__pack_base { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-18 07:12:11
|
Revision: 1562 http://svn.sourceforge.net/complement/?rev=1562&view=rev Author: complement Date: 2007-05-18 00:12:09 -0700 (Fri, 18 May 2007) Log Message: ----------- remove test_exec_mon, looks like it not more in usage in 1.34 Modified Paths: -------------- trunk/complement/extern/custom/boost/libs/Makefile Modified: trunk/complement/extern/custom/boost/libs/Makefile =================================================================== --- trunk/complement/extern/custom/boost/libs/Makefile 2007-05-17 16:26:50 UTC (rev 1561) +++ trunk/complement/extern/custom/boost/libs/Makefile 2007-05-18 07:12:09 UTC (rev 1562) @@ -8,7 +8,7 @@ SRCROOT := ../../../../explore SUBDIRS := date_time filesystem program_options regex serialization \ - test/unit_test_framework test/test_exec_mon test/prg_exec_mon \ + test/unit_test_framework test/prg_exec_mon \ thread include ${SRCROOT}/Makefiles/gmake/subdirs.mak This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-17 16:26:53
|
Revision: 1561 http://svn.sourceforge.net/complement/?rev=1561&view=rev Author: complement Date: 2007-05-17 09:26:50 -0700 (Thu, 17 May 2007) Log Message: ----------- just development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/Makefile.inc trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h trunk/complement/explore/test/virtual_time/vtime_main.cc Modified: trunk/complement/explore/test/virtual_time/Makefile.inc =================================================================== --- trunk/complement/explore/test/virtual_time/Makefile.inc 2007-05-17 09:15:59 UTC (rev 1560) +++ trunk/complement/explore/test/virtual_time/Makefile.inc 2007-05-17 16:26:50 UTC (rev 1561) @@ -1,4 +1,4 @@ # -*- makefile -*- Time-stamp: <06/10/10 15:22:33 ptr> PRGNAME = vtime -SRC_CC = vtime_main.cc +SRC_CC = vtime_main.cc vtime.cc Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-17 09:15:59 UTC (rev 1560) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-17 16:26:50 UTC (rev 1561) @@ -2,15 +2,68 @@ #include "vtime.h" +#include <stdint.h> + namespace vt { -void Proc::mess( const stem::Event_base<>& ev ) +using namespace std; +using namespace xmt; +using namespace stem; + +void vtime::pack( std::ostream& s ) const { + __pack( s, static_cast<uint8_t>(vt.size()) ); + for ( vtime_type::const_iterator i = vt.begin(); i != vt.end(); ++i ) { + __pack( s, i->first ); + __pack( s, i->second ); + } } +void vtime::net_pack( std::ostream& s ) const +{ + __net_pack( s, static_cast<uint8_t>(vt.size()) ); + for ( vtime_type::const_iterator i = vt.begin(); i != vt.end(); ++i ) { + __net_pack( s, i->first ); + __net_pack( s, i->second ); + } +} + +void vtime::unpack( std::istream& s ) +{ + vt.clear(); + uint8_t n; + __unpack( s, n ); + while ( n-- > 0 ) { + vtime_proc_type v; + + __unpack( s, v.first ); + __unpack( s, v.second ); + + vt.push_back( v ); + } +} + +void vtime::net_unpack( std::istream& s ) +{ + vt.clear(); + uint8_t n; + __net_unpack( s, n ); + while ( n-- > 0 ) { + vtime_proc_type v; + + __net_unpack( s, v.first ); + __net_unpack( s, v.second ); + + vt.push_back( v ); + } +} + +void Proc::mess( const stem::Event_base<vtime>& ev ) +{ +} + DEFINE_RESPONSE_TABLE( Proc ) - EV_Event_base_T_( ST_NULL, MESS, mess, intr::httprq ) + EV_Event_base_T_( ST_NULL, MESS, mess, vtime ) END_RESPONSE_TABLE } // namespace vt - Modified: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h 2007-05-17 09:15:59 UTC (rev 1560) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-17 16:26:50 UTC (rev 1561) @@ -3,12 +3,71 @@ #ifndef __vtime_h #define __vtime_h +#include <algorithm> +#include <list> + +#include <istream> +#include <ostream> +#include <stdexcept> + #include <stem/Event.h> #include <stem/EventHandler.h> namespace vt { -class Proc +typedef unsigned vtime_unit_type; +typedef std::pair<stem::addr_type, vtime_unit_type> vtime_proc_type; +typedef std::list<vtime_proc_type> vtime_type; + +inline bool operator <( const vtime_proc_type& l, const vtime_proc_type& r ) +{ + if ( l.first == r.first ) { + return l.second < r.second; + } + + throw std::invalid_argument( "uncomparable" ); +} + +inline bool operator <=( const vtime_proc_type& l, const vtime_proc_type& r ) +{ + if ( l.first == r.first ) { + return l.second <= r.second; + } + + throw std::invalid_argument( "uncomparable" ); +} + +inline bool operator ==( const vtime_proc_type& l, const vtime_proc_type& r ) +{ + if ( l.first == r.first ) { + return l.second == r.second; + } + + throw std::invalid_argument( "uncomparable" ); +} + + +struct vtime : + public stem::__pack_base +{ + void pack( std::ostream& s ) const; + void net_pack( std::ostream& s ) const; + void unpack( std::istream& s ); + void net_unpack( std::istream& s ); + + vtime() + { } + vtime( const vtime& _vt ) : + vt( _vt.vt.begin(), _vt.vt.end() ) + { } + + vtime& operator =( const vtime& _vt ) + { vt.clear(); } + + vtime_type vt; +}; + +class Proc : public stem::EventHandler { public: @@ -18,7 +77,7 @@ stem::EventHandler( id ) { } - void mess( const stem::Event_base<>& ); + void mess( const stem::Event_base<vtime>& ); private: DECLARE_RESPONSE_TABLE( Proc, stem::EventHandler ); Modified: trunk/complement/explore/test/virtual_time/vtime_main.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-17 09:15:59 UTC (rev 1560) +++ trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-17 16:26:50 UTC (rev 1561) @@ -1,13 +1,27 @@ #include <iostream> +#include <mt/xmt.h> #include "vtime.h" using namespace std; +using namespace xmt; +using namespace vt; int main() { + Condition cnd; + + cnd.set(false); + cerr << "Hello, world!" << endl; + Proc m1( 100 ); + Proc m2( 101 ); + Proc r1( 102 ); + Proc r3( 103 ); + + cnd.wait(); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-17 09:16:02
|
Revision: 1560 http://svn.sourceforge.net/complement/?rev=1560&view=rev Author: complement Date: 2007-05-17 02:15:59 -0700 (Thu, 17 May 2007) Log Message: ----------- add present state Modified Paths: -------------- trunk/WWW/explore/Complement/History.shtml Modified: trunk/WWW/explore/Complement/History.shtml =================================================================== --- trunk/WWW/explore/Complement/History.shtml 2007-05-16 14:19:38 UTC (rev 1559) +++ trunk/WWW/explore/Complement/History.shtml 2007-05-17 09:15:59 UTC (rev 1560) @@ -77,6 +77,16 @@ Now project became really public under the name 'complement' on <a href="http://sourceforge.net">SourceForge</a>. </p> + +<h2 class="lheader">Complement</h2> + +<p> +I'm discover that components of project has own value, and provide good vertical +structure. Project was splitted into few sub-projects: multi-threading and related +inter-process communication (xmt), network communication (sockios) and event-driven +state machine (StEM). See <a href="index.shtml">Complement project homepage</a>. +</p> + </div> <!--#include file="foot.shtml" --> <!-- Created: Thu Nov 28 14:57:17 MSD 2002 --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-16 14:19:39
|
Revision: 1559 http://svn.sourceforge.net/complement/?rev=1559&view=rev Author: complement Date: 2007-05-16 07:19:38 -0700 (Wed, 16 May 2007) Log Message: ----------- start of Virtual Time (Virtual Synchrony) explore Added Paths: ----------- trunk/complement/explore/test/virtual_time/ trunk/complement/explore/test/virtual_time/Makefile trunk/complement/explore/test/virtual_time/Makefile.inc trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime.h trunk/complement/explore/test/virtual_time/vtime_main.cc Property changes on: trunk/complement/explore/test/virtual_time ___________________________________________________________________ Name: svn:ignore + obj Added: trunk/complement/explore/test/virtual_time/Makefile =================================================================== --- trunk/complement/explore/test/virtual_time/Makefile (rev 0) +++ trunk/complement/explore/test/virtual_time/Makefile 2007-05-16 14:19:38 UTC (rev 1559) @@ -0,0 +1,22 @@ +# -*- Makefile -*- Time-stamp: <07/02/07 12:28:46 ptr> + +SRCROOT := ../.. +COMPILER_NAME := gcc + +include Makefile.inc +include ${SRCROOT}/Makefiles/top.mak + +INCLUDES += -I$(SRCROOT)/include -I$(BOOST_INCLUDE_DIR) + +LIBMT_DIR = ${CoMT_DIR}/lib/mt +LIBSOCK_DIR = ${CoMT_DIR}/lib/sockios +LIBSTEM_DIR = ${CoMT_DIR}/lib/stem + +LDSEARCH += -L${CoMT_LIB_DIR} -Wl,--rpath=${CoMT_LIB_DIR} + +release-shared : LDLIBS = -lxmt -lsockios -lstem +stldbg-shared : LDLIBS = -lxmtstlg -lsockiosstlg -lstemstlg +dbg-shared : LDLIBS = -lxmtg -lsockiosg -lstemg + +# dbg-shared: DEFS += -DDEBUG + Added: trunk/complement/explore/test/virtual_time/Makefile.inc =================================================================== --- trunk/complement/explore/test/virtual_time/Makefile.inc (rev 0) +++ trunk/complement/explore/test/virtual_time/Makefile.inc 2007-05-16 14:19:38 UTC (rev 1559) @@ -0,0 +1,4 @@ +# -*- makefile -*- Time-stamp: <06/10/10 15:22:33 ptr> + +PRGNAME = vtime +SRC_CC = vtime_main.cc Added: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc (rev 0) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-16 14:19:38 UTC (rev 1559) @@ -0,0 +1,16 @@ +// -*- C++ -*- Time-stamp: <07/03/07 15:53:23 ptr> + +#include "vtime.h" + +namespace vt { + +void Proc::mess( const stem::Event_base<>& ev ) +{ +} + +DEFINE_RESPONSE_TABLE( Proc ) + EV_Event_base_T_( ST_NULL, MESS, mess, intr::httprq ) +END_RESPONSE_TABLE + +} // namespace vt + Added: trunk/complement/explore/test/virtual_time/vtime.h =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.h (rev 0) +++ trunk/complement/explore/test/virtual_time/vtime.h 2007-05-16 14:19:38 UTC (rev 1559) @@ -0,0 +1,31 @@ +// -*- C++ -*- Time-stamp: <07/03/06 19:23:37 ptr> + +#ifndef __vtime_h +#define __vtime_h + +#include <stem/Event.h> +#include <stem/EventHandler.h> + +namespace vt { + +class Proc + public stem::EventHandler +{ + public: + Proc() + { } + Proc( stem::addr_type id ) : + stem::EventHandler( id ) + { } + + void mess( const stem::Event_base<>& ); + + private: + DECLARE_RESPONSE_TABLE( Proc, stem::EventHandler ); +}; + +#define MESS 0x300 + +} // namespace vt + +#endif // __vtime_h Added: trunk/complement/explore/test/virtual_time/vtime_main.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime_main.cc (rev 0) +++ trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-16 14:19:38 UTC (rev 1559) @@ -0,0 +1,13 @@ +#include <iostream> + +#include "vtime.h" + +using namespace std; + +int main() +{ + cerr << "Hello, world!" << endl; + + return 0; +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-16 09:51:46
|
Revision: 1558 http://svn.sourceforge.net/complement/?rev=1558&view=rev Author: complement Date: 2007-05-16 02:51:44 -0700 (Wed, 16 May 2007) Log Message: ----------- enhance help messages Modified Paths: -------------- trunk/complement/explore/configure Modified: trunk/complement/explore/configure =================================================================== --- trunk/complement/explore/configure 2007-05-16 09:50:21 UTC (rev 1557) +++ trunk/complement/explore/configure 2007-05-16 09:51:44 UTC (rev 1558) @@ -40,19 +40,17 @@ with --disable-shared, static libraries will be used in any case) --clean remove custom settings (file ${configmak}) and use default values - --with-cxx=<name> use <name> as C++ compiler - --with-cc=<name> use <name> as C compiler + --with-cxx=<name> use <name> as C++ compiler (use --target= for cross-compilation) + --with-cc=<name> use <name> as C compiler (use --target= for cross-compilation) --use-compiler-family=<name> use compiler family; one of: - gcc GNU compilers + gcc GNU compilers (default) icc Intel compilers - aCC HP\'s aCC compilers - CC SunPro\'s CC compilers - - default is 'gcc' family - --without-debug don\'t build debug variant - --without-stldebug don\'t build STLport\'s STLP_DEBUG mode + aCC HP's aCC compilers + CC SunPro's CC compilers + --without-debug don't build debug variant + --without-stldebug don't build STLport's STLP_DEBUG mode --enable-static build static - --disable-shared don\'t build shared + --disable-shared don't build shared EOF } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-05-16 09:50:27
|
Revision: 1557 http://svn.sourceforge.net/complement/?rev=1557&view=rev Author: complement Date: 2007-05-16 02:50:21 -0700 (Wed, 16 May 2007) Log Message: ----------- boost 1.34.0 Modified Paths: -------------- trunk/complement/extern/custom/boost/libs/date_time/Makefile.inc trunk/complement/extern/custom/boost/libs/filesystem/Makefile.inc trunk/complement/extern/custom/boost/libs/program_options/Makefile.inc trunk/complement/extern/custom/boost/libs/regex/Makefile.inc trunk/complement/extern/custom/boost/libs/serialization/Makefile.inc trunk/complement/extern/custom/boost/libs/test/prg_exec_mon/Makefile.inc trunk/complement/extern/custom/boost/libs/test/test_exec_mon/Makefile.inc trunk/complement/extern/custom/boost/libs/test/unit_test_framework/Makefile.inc trunk/complement/extern/custom/boost/libs/thread/Makefile.inc Modified: trunk/complement/extern/custom/boost/libs/date_time/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/date_time/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/date_time/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -3,8 +3,8 @@ BOOST_SRC = ${BOOST_INCLUDE_DIR}/libs/date_time/src LIBNAME = boost_dt MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = ${BOOST_SRC}/gregorian/greg_month.cpp \ ${BOOST_SRC}/gregorian/greg_weekday.cpp \ ${BOOST_SRC}/gregorian/date_generators.cpp Modified: trunk/complement/extern/custom/boost/libs/filesystem/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/filesystem/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/filesystem/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -4,6 +4,6 @@ #BOOST_FS_SRC = src LIBNAME = boost_fs MAJOR = 1 -MINOR = 33 -PATCH = 1 -SRC_CPP = ${BOOST_FS_SRC}/convenience.cpp ${BOOST_FS_SRC}/exception.cpp ${BOOST_FS_SRC}/operations_posix_windows.cpp ${BOOST_FS_SRC}/path_posix_windows.cpp +MINOR = 34 +PATCH = 0 +SRC_CPP = ${BOOST_FS_SRC}/exception.cpp ${BOOST_FS_SRC}/operations.cpp ${BOOST_FS_SRC}/path.cpp ${BOOST_FS_SRC}/portability.cpp ${BOOST_FS_SRC}/utf8_codecvt_facet.cpp Modified: trunk/complement/extern/custom/boost/libs/program_options/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/program_options/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/program_options/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -4,8 +4,8 @@ LIBNAME = boost_program_options MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = ${BOOST_SR_SRC}/cmdline.cpp \ ${BOOST_SR_SRC}/config_file.cpp \ Modified: trunk/complement/extern/custom/boost/libs/regex/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/regex/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/regex/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -3,8 +3,8 @@ BOOST_REGEX_SRC = $(BOOST_INCLUDE_DIR)/libs/regex/src LIBNAME = boost_regex MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = $(BOOST_REGEX_SRC)/c_regex_traits.cpp \ $(BOOST_REGEX_SRC)/regex_traits_defaults.cpp \ $(BOOST_REGEX_SRC)/cpp_regex_traits.cpp \ Modified: trunk/complement/extern/custom/boost/libs/serialization/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/serialization/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/serialization/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -4,8 +4,8 @@ #BOOST_SR_SRC = src LIBNAME = boost_serialization MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = ${BOOST_SR_SRC}/basic_archive.cpp \ ${BOOST_SR_SRC}/basic_archive_impl.cpp \ ${BOOST_SR_SRC}/basic_iarchive.cpp \ Modified: trunk/complement/extern/custom/boost/libs/test/prg_exec_mon/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/test/prg_exec_mon/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/test/prg_exec_mon/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -3,8 +3,8 @@ BOOST_TST_SRC = ${BOOST_INCLUDE_DIR}/libs/test/src LIBNAME = boost_test_pem MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = ${BOOST_TST_SRC}/execution_monitor.cpp \ ${BOOST_TST_SRC}/cpp_main.cpp Modified: trunk/complement/extern/custom/boost/libs/test/test_exec_mon/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/test/test_exec_mon/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/test/test_exec_mon/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -3,8 +3,8 @@ BOOST_TST_SRC = ${BOOST_INCLUDE_DIR}/libs/test/src LIBNAME = boost_test_tem MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = ${BOOST_TST_SRC}/compiler_log_formatter.cpp \ ${BOOST_TST_SRC}/execution_monitor.cpp \ ${BOOST_TST_SRC}/framework.cpp \ Modified: trunk/complement/extern/custom/boost/libs/test/unit_test_framework/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/test/unit_test_framework/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/test/unit_test_framework/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -3,8 +3,8 @@ BOOST_TST_SRC = $(BOOST_INCLUDE_DIR)/libs/test/src LIBNAME = boost_test_utf MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = $(BOOST_TST_SRC)/compiler_log_formatter.cpp \ $(BOOST_TST_SRC)/execution_monitor.cpp \ $(BOOST_TST_SRC)/framework.cpp \ Modified: trunk/complement/extern/custom/boost/libs/thread/Makefile.inc =================================================================== --- trunk/complement/extern/custom/boost/libs/thread/Makefile.inc 2007-03-12 18:34:51 UTC (rev 1556) +++ trunk/complement/extern/custom/boost/libs/thread/Makefile.inc 2007-05-16 09:50:21 UTC (rev 1557) @@ -3,8 +3,8 @@ BOOST_SRC = $(BOOST_INCLUDE_DIR)/libs/thread/src LIBNAME = boost_thread MAJOR = 1 -MINOR = 33 -PATCH = 1 +MINOR = 34 +PATCH = 0 SRC_CPP = $(BOOST_SRC)/condition.cpp \ $(BOOST_SRC)/mutex.cpp \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-03-12 18:35:02
|
Revision: 1556 http://svn.sourceforge.net/complement/?rev=1556&view=rev Author: complement Date: 2007-03-12 11:34:51 -0700 (Mon, 12 Mar 2007) Log Message: ----------- complement: stapshot 2007-03-12 Added Paths: ----------- tags/complement-20070312/ Copied: tags/complement-20070312 (from rev 1555, trunk/complement) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-03-12 18:29:17
|
Revision: 1555 http://svn.sourceforge.net/complement/?rev=1555&view=rev Author: complement Date: 2007-03-12 11:29:11 -0700 (Mon, 12 Mar 2007) Log Message: ----------- EvManager.h, EvManager.cc: trace-related locks, flags and functions moved from static to member; fix bogus bug---missed return in << operator for gaddr_type; NetTransport.cc: directly use _trflags, due to function use lock now; _EventHandler.cc: ::getpid call may give lame result after fork; use xmt::getpid; libstem: library version 4.5.0 Modified Paths: -------------- trunk/complement/explore/include/stem/EvManager.h trunk/complement/explore/lib/stem/ChangeLog trunk/complement/explore/lib/stem/EvManager.cc trunk/complement/explore/lib/stem/Makefile.inc trunk/complement/explore/lib/stem/NetTransport.cc trunk/complement/explore/lib/stem/_EventHandler.cc trunk/complement/explore/test/stem/unit_test.cc Modified: trunk/complement/explore/include/stem/EvManager.h =================================================================== --- trunk/complement/explore/include/stem/EvManager.h 2007-03-12 18:26:06 UTC (rev 1554) +++ trunk/complement/explore/include/stem/EvManager.h 2007-03-12 18:29:11 UTC (rev 1555) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/02/08 16:38:05 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 17:18:41 ptr> /* * Copyright (c) 1995-1999, 2002, 2003, 2005, 2006 @@ -163,12 +163,12 @@ __FIT_DECLSPEC void Remove( void * ); __FIT_DECLSPEC std::ostream& dump( std::ostream& ) const; - static void settrf( unsigned f ); - static void unsettrf( unsigned f ); - static void resettrf( unsigned f ); - static void cleantrf(); - static unsigned trflags(); - static void settrs( std::ostream * ); + void settrf( unsigned f ); + void unsettrf( unsigned f ); + void resettrf( unsigned f ); + void cleantrf(); + unsigned trflags() const; + void settrs( std::ostream * ); protected: bool unsafe_is_avail( addr_type id ) const @@ -256,9 +256,9 @@ xmt::Condition _cnd_queue; static std::string inv_key_str; - static xmt::Mutex _lock_tr; - static unsigned _trflags; - static std::ostream *_trs; + xmt::Mutex _lock_tr; + unsigned _trflags; + std::ostream *_trs; friend class Names; friend class NetTransportMgr; Modified: trunk/complement/explore/lib/stem/ChangeLog =================================================================== --- trunk/complement/explore/lib/stem/ChangeLog 2007-03-12 18:26:06 UTC (rev 1554) +++ trunk/complement/explore/lib/stem/ChangeLog 2007-03-12 18:29:11 UTC (rev 1555) @@ -1,3 +1,17 @@ +2007-03-12 Petr Ovtchenkov <pt...@is...> + + * EvManager.h, EvManager.cc: trace-related locks, flags and + functions moved from static to member; fix bogus bug---missed + return in << operator for gaddr_type; + + * NetTransport.cc: directly use _trflags, due to function use + lock now; + + * _EventHandler.cc: ::getpid call may give lame result after + fork; use xmt::getpid; + + * libstem: library version 4.5.0 + 2007-02-08 Petr Ovtchenkov <pt...@is...> * EvManager.h, EvManager.cc: use deque instead of queue; Modified: trunk/complement/explore/lib/stem/EvManager.cc =================================================================== --- trunk/complement/explore/lib/stem/EvManager.cc 2007-03-12 18:26:06 UTC (rev 1554) +++ trunk/complement/explore/lib/stem/EvManager.cc 2007-03-12 18:29:11 UTC (rev 1555) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/02/08 16:38:41 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 18:53:45 ptr> /* * @@ -41,9 +41,6 @@ const addr_type endextaddr = 0xbfffffff; std::string EvManager::inv_key_str( "invalid key" ); -xmt::Mutex EvManager::_lock_tr; -unsigned EvManager::_trflags = 0; -std::ostream *EvManager::_trs = 0; std::ostream& operator <<( std::ostream& s, const gaddr_type& ga ); @@ -54,7 +51,9 @@ _x_low( begextaddr ), _x_high( endextaddr ), _x_id( _x_low ), - _dispatch_stop( false ) + _dispatch_stop( false ), + _trflags( 0 ), + _trs( 0 ) { // #ifndef __hpux _cnd_queue.set( false ); @@ -82,22 +81,25 @@ EvManager& me = *reinterpret_cast<EvManager *>(p); xmt::Thread::ret_code rt; rt.iword = 0; + xmt::Mutex& lq = me._lock_queue; + queue_type& in_ev_queue = me.in_ev_queue; + queue_type& out_ev_queue = me.out_ev_queue; while ( me.not_finished() ) { - MT_LOCK( me._lock_queue ); - me.in_ev_queue.swap( me.out_ev_queue ); - MT_UNLOCK( me._lock_queue ); - while ( !me.out_ev_queue.empty() ) { - me.Send( me.out_ev_queue.front() ); - me.out_ev_queue.pop_front(); + lq.lock(); + in_ev_queue.swap( out_ev_queue ); + lq.unlock(); + while ( !out_ev_queue.empty() ) { + me.Send( out_ev_queue.front() ); + out_ev_queue.pop_front(); } - MT_LOCK( me._lock_queue ); - if ( me.in_ev_queue.empty() && me.not_finished() ) { + lq.lock(); + if ( in_ev_queue.empty() && me.not_finished() ) { me._cnd_queue.set( false ); - MT_UNLOCK( me._lock_queue ); + lq.unlock(); me._cnd_queue.try_wait(); } else { - MT_UNLOCK( me._lock_queue ); + lq.unlock(); } } @@ -344,22 +346,41 @@ } void EvManager::settrf( unsigned f ) -{ _trflags |= f; } +{ + Locker _x1( _lock_tr ); + _trflags |= f; +} void EvManager::unsettrf( unsigned f ) -{ _trflags &= (0xffffffff & ~f); } +{ + Locker _x1( _lock_tr ); + _trflags &= (0xffffffff & ~f); +} void EvManager::resettrf( unsigned f ) -{ _trflags = f; } +{ + Locker _x1( _lock_tr ); + _trflags = f; +} void EvManager::cleantrf() -{ _trflags = 0; } +{ + Locker _x1( _lock_tr ); + _trflags = 0; +} -unsigned EvManager::trflags() -{ return _trflags; } +unsigned EvManager::trflags() const +{ + Locker _x1( _lock_tr ); + return _trflags; +} + void EvManager::settrs( std::ostream *s ) -{ _trs = s; } +{ + Locker _x1( _lock_tr ); + _trs = s; +} // Remove references to remote objects, that was announced via 'channel' // (related, may be, with socket connection) @@ -658,6 +679,8 @@ << "-" << setw(8) << hex << setfill( '0' ) << ga.addr; s.flags( f ); + + return s; } __FIT_DECLSPEC std::ostream& EvManager::dump( std::ostream& s ) const @@ -666,29 +689,40 @@ s << "Local map:\n"; s << hex << showbase; - for ( local_heap_type::const_iterator i = heap.begin(); i != heap.end(); ++i ) { - s << i->first << "\t=> " << i->second << "\n"; + { + Locker lk( _lock_heap ); + + for ( local_heap_type::const_iterator i = heap.begin(); i != heap.end(); ++i ) { + s << i->first << "\t=> " << i->second << "\n"; + } } s << "\nInfo map:\n"; + { + Locker lk( _lock_iheap ); - for ( info_heap_type::const_iterator i = iheap.begin(); i != iheap.end(); ++i ) { - s << i->first << "\t=> '" << i->second << "'\n"; + for ( info_heap_type::const_iterator i = iheap.begin(); i != iheap.end(); ++i ) { + s << i->first << "\t=> '" << i->second << "'\n"; + } } - s << "\nExternal address map:\n"; - for ( ext_uuid_heap_type::const_iterator i = _ex_heap.begin(); i != _ex_heap.end(); ++i ) { - s << hex << showbase << i->first << "\t=> " << i->second << "\n"; - } + { + Locker lk( _lock_xheap ); - s << "\nUnique Id to transport map:\n"; - for ( uuid_tr_heap_type::const_iterator i = _tr_heap.begin(); i != _tr_heap.end(); ++i ) { - s << i->first << "\t=> " << hex << i->second.first << " " << i->second.second.link << " " << dec << i->second.second.metric << "\n"; - } + s << "\nExternal address map:\n"; + for ( ext_uuid_heap_type::const_iterator i = _ex_heap.begin(); i != _ex_heap.end(); ++i ) { + s << hex << showbase << i->first << "\t=> " << i->second << "\n"; + } - s << "\nTransport to Unique Id map:\n"; - for ( tr_uuid_heap_type::const_iterator i = _ch_heap.begin(); i != _ch_heap.end(); ++i ) { - s << i->first << "\t=> " << i->second << "\n"; + s << "\nUnique Id to transport map:\n"; + for ( uuid_tr_heap_type::const_iterator i = _tr_heap.begin(); i != _tr_heap.end(); ++i ) { + s << i->first << "\t=> " << hex << i->second.first << " " << i->second.second.link << " " << dec << i->second.second.metric << "\n"; + } + + s << "\nTransport to Unique Id map:\n"; + for ( tr_uuid_heap_type::const_iterator i = _ch_heap.begin(); i != _ch_heap.end(); ++i ) { + s << i->first << "\t=> " << i->second << "\n"; + } } s << endl; Modified: trunk/complement/explore/lib/stem/Makefile.inc =================================================================== --- trunk/complement/explore/lib/stem/Makefile.inc 2007-03-12 18:26:06 UTC (rev 1554) +++ trunk/complement/explore/lib/stem/Makefile.inc 2007-03-12 18:29:11 UTC (rev 1555) @@ -1,8 +1,8 @@ -# -*- Makefile -*- Time-stamp: <06/11/30 16:51:10 ptr> +# -*- Makefile -*- Time-stamp: <07/03/12 20:19:19 ptr> LIBNAME = stem MAJOR = 4 -MINOR = 4 +MINOR = 5 PATCH = 0 SRC_CC = _EventHandler.cc NetTransport.cc EvManager.cc EvPack.cc crc.cc \ Names.cc Cron.cc Modified: trunk/complement/explore/lib/stem/NetTransport.cc =================================================================== --- trunk/complement/explore/lib/stem/NetTransport.cc 2007-03-12 18:26:06 UTC (rev 1554) +++ trunk/complement/explore/lib/stem/NetTransport.cc 2007-03-12 18:29:11 UTC (rev 1555) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <06/12/13 13:38:28 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 17:25:23 ptr> /* * @@ -363,7 +363,7 @@ #ifdef __FIT_STEM_TRACE try { xmt::Locker lk(manager()->_lock_tr); - if ( manager()->_trs != 0 && manager()->_trs->good() && (manager()->trflags() & EvManager::tracenet) ) { + if ( manager()->_trs != 0 && manager()->_trs->good() && (manager()->_trflags & EvManager::tracenet) ) { *manager()->_trs << "Pid/ppid: " << xmt::getpid() << "/" << xmt::getppid() << "\n"; manager()->dump( *manager()->_trs ) << endl; } @@ -376,7 +376,7 @@ #ifdef __FIT_STEM_TRACE try { xmt::Locker lk(manager()->_lock_tr); - if ( manager()->_trs != 0 && manager()->_trs->good() && (manager()->trflags() & (EvManager::tracefault)) ) { + if ( manager()->_trs != 0 && manager()->_trs->good() && (manager()->_trflags & (EvManager::tracefault)) ) { *manager()->_trs << __FILE__ << ":" << __LINE__ << " (" << xmt::getpid() << "/" << xmt::getppid() << ") " @@ -399,7 +399,7 @@ #ifdef __FIT_STEM_TRACE try { xmt::Locker lk(manager()->_lock_tr); - if ( manager()->_trs != 0 && manager()->_trs->good() && (manager()->trflags() & (EvManager::tracenet)) ) { + if ( manager()->_trs != 0 && manager()->_trs->good() && (manager()->_trflags & (EvManager::tracenet)) ) { *manager()->_trs << __FILE__ << ":" << __LINE__ << endl; } } Modified: trunk/complement/explore/lib/stem/_EventHandler.cc =================================================================== --- trunk/complement/explore/lib/stem/_EventHandler.cc 2007-03-12 18:26:06 UTC (rev 1554) +++ trunk/complement/explore/lib/stem/_EventHandler.cc 2007-03-12 18:29:11 UTC (rev 1555) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/02/08 17:27:44 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 19:36:45 ptr> /* * Copyright (c) 1995-1999, 2002, 2003, 2005, 2006 @@ -261,7 +261,7 @@ __FIT_DECLSPEC gaddr_type EventHandler::self_glid() const { - return gaddr_type(xmt::hostid(), getpid(), _id ); + return gaddr_type(xmt::hostid(), xmt::getpid(), _id ); } } // namespace stem Modified: trunk/complement/explore/test/stem/unit_test.cc =================================================================== --- trunk/complement/explore/test/stem/unit_test.cc 2007-03-12 18:26:06 UTC (rev 1554) +++ trunk/complement/explore/test/stem/unit_test.cc 2007-03-12 18:29:11 UTC (rev 1555) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/03/09 20:43:27 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 21:20:54 ptr> /* * Copyright (c) 2002, 2003, 2006 @@ -56,10 +56,9 @@ void echo(); void echo_net(); + void net_echo(); void peer(); void boring_manager(); - void net_echo(); - void net_echo2(); static xmt::Thread::ret_code thr1( void * ); static xmt::Thread::ret_code thr1new( void * ); @@ -361,7 +360,7 @@ fcnd.set( true ); int stat; - waitpid( child.pid(), &stat, 0 ); + BOOST_CHECK( waitpid( child.pid(), &stat, 0 ) == child.pid() ); srv.close(); srv.wait(); @@ -376,6 +375,80 @@ // cerr << "Fine\n"; } +// same as echo_net(), but server in child process + +void stem_test::net_echo() +{ + try { + xmt::__Barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__Barrier<true>(); + xmt::__Condition<true>& c = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); + + c.set( false ); + + try { + xmt::fork(); + + // server part + { + std::sockmgr_stream_MP<stem::NetTransport> srv( 6995 ); + StEMecho echo( 0, "echo service"); + + // echo.manager()->settrf( stem::EvManager::tracenet | stem::EvManager::tracedispatch ); + // echo.manager()->settrs( &std::cerr ); + + BOOST_REQUIRE( srv.good() ); + c.set( true ); // ok, server listen + + b.wait(); // server may go away + + srv.close(); + srv.wait(); + } + + exit( 0 ); + } + catch ( xmt::fork_in_parent& child ) { + // client part + + stem::NetTransportMgr mgr; + // mgr.manager()->settrf( stem::EvManager::tracenet | stem::EvManager::tracedispatch | stem::EvManager::tracefault ); + // mgr.manager()->settrs( &std::cerr ); + + c.try_wait(); // wait server start + + stem::addr_type zero = mgr.open( "localhost", 6995 ); + + BOOST_REQUIRE( mgr.good() ); + BOOST_REQUIRE( zero != stem::badaddr ); + + EchoClient node; + stem::Event ev( NODE_EV_ECHO ); + ev.dest( zero ); + + ev.value() = node.mess; + node.Send( ev ); + + node.wait(); + + mgr.close(); + mgr.join(); + + b.wait(); // server may go away + + int stat; + BOOST_CHECK( waitpid( child.pid(), &stat, 0 ) == child.pid() ); + } + + (&c)->~__Condition<true>(); + shm_cnd.deallocate( &c, 1 ); + (&b)->~__Barrier<true>(); + shm_b.deallocate( &b, 1 ); + } + catch ( xmt::shm_bad_alloc& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } +} + extern "C" { static void dummy_signal_handler( int ) @@ -640,238 +713,6 @@ // ----------------- -#define EV_STU_MESS 0x801 -#define EV_STU_ECHO 0x802 - -class TestObj : - public stem::EventHandler -{ - public: - TestObj() - { } - - void reset() - { cnd.set( false ); } - - void wait() - { cnd.try_wait(); } - - const std::string& msg() const - { return m; } - - void mess( const stem::Event& ); - void echo( const stem::Event& ); - - private: - xmt::Condition cnd; - std::string m; - - DECLARE_RESPONSE_TABLE( TestObj, stem::EventHandler ); -}; - -void TestObj::mess( const stem::Event& ev ) -{ - // cerr << "hi!\n"; - m = ev.value(); - cnd.set( true ); -} - -void TestObj::echo( const stem::Event& ev ) -{ - m = ev.value(); - cnd.set( true ); -} - -DEFINE_RESPONSE_TABLE( TestObj ) - EV_EDS( ST_NULL, EV_STU_MESS, mess ) - EV_EDS( ST_NULL, EV_STU_ECHO, echo ) -END_RESPONSE_TABLE - -class EchoSrv : - public stem::EventHandler -{ - public: - EchoSrv(); - EchoSrv( stem::addr_type id ); - EchoSrv( stem::addr_type id, const char * ); - - void echo( const stem::Event& ); - - private: - DECLARE_RESPONSE_TABLE( EchoSrv, stem::EventHandler ); -}; - -EchoSrv::EchoSrv() -{ -} - -EchoSrv::EchoSrv( stem::addr_type id ) : - stem::EventHandler( id ) -{ -} - -EchoSrv::EchoSrv( stem::addr_type id, const char *info ) : - stem::EventHandler( id, info ) -{ -} - -// Unconditionally echo message - -void EchoSrv::echo( const stem::Event& ev ) -{ - cerr << __FILE__ << ":" << __LINE__ << endl; - ev.dest( ev.src() ); - Forward( ev ); -} - -DEFINE_RESPONSE_TABLE( EchoSrv ) - EV_EDS( ST_NULL, EV_STU_ECHO, echo ) -END_RESPONSE_TABLE - -void stem_test::net_echo() -{ - try { - xmt::__Barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__Barrier<true>(); - xmt::__Condition<true>& c = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); - - c.set( false ); - - try { - xmt::fork(); - - // server part - { - std::sockmgr_stream_MP<stem::NetTransport> srv( 6890 ); - EchoSrv echosrv( 0, "Echo service"); - - BOOST_REQUIRE( srv.good() ); - c.set( true ); // ok, server listen - - b.wait(); // server may go away - - srv.close(); - srv.wait(); - } - - exit( 0 ); - } - catch ( xmt::fork_in_parent& child ) { - // client part - - stem::NetTransportMgr client; - - c.try_wait(); // wait server start - - stem::addr_type a = client.open( "localhost", 6890 ); - - BOOST_REQUIRE( client.good() ); - BOOST_REQUIRE( a != stem::badaddr ); - - TestObj t1; - - t1.reset(); - - stem::Event ev( EV_STU_ECHO ); - ev.dest( a ); - - ev.value() = "echo"; - t1.Send( ev ); - - t1.wait(); - - BOOST_CHECK( t1.msg() == "echo" ); - - client.close(); - client.join(); - - b.wait(); // server may go away - - int stat; - BOOST_CHECK( waitpid( child.pid(), &stat, 0 ) == child.pid() ); - } - - (&c)->~__Condition<true>(); - shm_cnd.deallocate( &c, 1 ); - (&b)->~__Barrier<true>(); - shm_b.deallocate( &b, 1 ); - } - catch ( xmt::shm_bad_alloc& err ) { - BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); - } -} - -void stem_test::net_echo2() -{ - try { - xmt::__Barrier<true>& b = *new ( shm_b.allocate( 1 ) ) xmt::__Barrier<true>(); - xmt::__Condition<true>& c = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); - - c.set( false ); - - try { - xmt::fork(); - - // server part - { - std::sockmgr_stream_MP<stem::NetTransport> srv( 6890 ); - EchoSrv echosrv( 0, "Echo service"); - - BOOST_REQUIRE( srv.good() ); - c.set( true ); // ok, server listen - - b.wait(); // server may go away - - srv.close(); - srv.wait(); - } - - exit( 0 ); - } - catch ( xmt::fork_in_parent& child ) { - // client part - - stem::NetTransportMgr client; - - c.try_wait(); // wait server start - - stem::addr_type a = client.open( "localhost", 6890 ); - - BOOST_REQUIRE( client.good() ); - BOOST_REQUIRE( a != stem::badaddr ); - - TestObj t1; - - t1.reset(); - - stem::Event ev( EV_STU_ECHO ); - ev.dest( a ); - - ev.value() = "echo"; - t1.Send( ev ); - - t1.wait(); - - BOOST_CHECK( t1.msg() == "echo" ); - - client.close(); - client.join(); - - b.wait(); // server may go away - - int stat; - BOOST_CHECK( waitpid( child.pid(), &stat, 0 ) == child.pid() ); - } - - (&c)->~__Condition<true>(); - shm_cnd.deallocate( &c, 1 ); - (&b)->~__Barrier<true>(); - shm_b.deallocate( &b, 1 ); - } - catch ( xmt::shm_bad_alloc& err ) { - BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); - } -} - // ----------------- struct stem_test_suite : @@ -895,10 +736,9 @@ test_case *echo_tc = BOOST_CLASS_TEST_CASE( &stem_test::echo, instance ); test_case *shm_init_tc = BOOST_CLASS_TEST_CASE( &stem_test::shm_init, instance ); test_case *echo_net_tc = BOOST_CLASS_TEST_CASE( &stem_test::echo_net, instance ); + test_case *net_echo_tc = BOOST_CLASS_TEST_CASE( &stem_test::net_echo, instance ); test_case *peer_tc = BOOST_CLASS_TEST_CASE( &stem_test::peer, instance ); test_case *boring_manager_tc = BOOST_CLASS_TEST_CASE( &stem_test::boring_manager, instance ); - test_case *net_echo_tc = BOOST_CLASS_TEST_CASE( &stem_test::net_echo, instance ); - // test_case *net_echo2_tc = BOOST_CLASS_TEST_CASE( &stem_test::net_echo2, instance ); test_case *shm_finit_tc = BOOST_CLASS_TEST_CASE( &stem_test::shm_finit, instance ); basic2_tc->depends_on( basic1_tc ); @@ -911,14 +751,12 @@ echo_tc->depends_on( basic2_tc ); echo_net_tc->depends_on( shm_init_tc ); echo_net_tc->depends_on( echo_tc ); + net_echo_tc->depends_on( shm_init_tc ); + net_echo_tc->depends_on( echo_net_tc ); peer_tc->depends_on( echo_tc ); peer_tc->depends_on( shm_init_tc ); boring_manager_tc->depends_on( peer_tc ); boring_manager_tc->depends_on( shm_init_tc ); - net_echo_tc->depends_on( shm_init_tc ); - net_echo_tc->depends_on( echo_net_tc ); - // net_echo2_tc->depends_on( shm_init_tc ); - // net_echo2_tc->depends_on( net_echo_tc ); shm_finit_tc->depends_on( shm_init_tc ); add( basic1_tc ); @@ -931,10 +769,9 @@ add( echo_tc ); add( shm_init_tc ); add( echo_net_tc ); + add( net_echo_tc ); add( peer_tc ); add( boring_manager_tc ); - add( net_echo_tc ); - // add( net_echo2_tc ); add( shm_finit_tc ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <com...@us...> - 2007-03-12 18:26:13
|
Revision: 1554 http://svn.sourceforge.net/complement/?rev=1554&view=rev Author: complement Date: 2007-03-12 11:26:06 -0700 (Mon, 12 Mar 2007) Log Message: ----------- catch error (exception) here Modified Paths: -------------- trunk/complement/explore/test/mt/mt_test.cc Modified: trunk/complement/explore/test/mt/mt_test.cc =================================================================== --- trunk/complement/explore/test/mt/mt_test.cc 2007-03-12 18:25:09 UTC (rev 1553) +++ trunk/complement/explore/test/mt/mt_test.cc 2007-03-12 18:26:06 UTC (rev 1554) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <07/02/19 14:36:01 ptr> +// -*- C++ -*- Time-stamp: <07/03/12 20:39:47 ptr> /* * Copyright (c) 2006, 2007 @@ -803,12 +803,16 @@ try { xmt::fork(); - xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); - xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; - xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); - fcnd_ch.set( true ); - nm_ch.release<xmt::__Condition<true> >( ObjName ); - + try { + xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); + xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; + xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); + fcnd_ch.set( true ); + nm_ch.release<xmt::__Condition<true> >( ObjName ); + } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } exit( 0 ); } catch ( xmt::fork_in_parent& child ) { @@ -825,12 +829,17 @@ try { xmt::fork(); - xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); - xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; - xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); - fcnd_ch.set( true ); - nm_ch.release<xmt::__Condition<true> >( ObjName ); - + try { + xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); + xmt::allocator_shm<xmt::__Condition<true>,1> shm_ch; + xmt::__Condition<true>& fcnd_ch = nm_ch.named<xmt::__Condition<true> >( ObjName ); + fcnd_ch.set( true ); + nm_ch.release<xmt::__Condition<true> >( ObjName ); + } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } + exit( 0 ); } catch ( xmt::fork_in_parent& child ) { @@ -848,11 +857,16 @@ try { xmt::fork(); - xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); - xmt::allocator_shm<xmt::__Barrier<true>,1> shm_ch; - xmt::__Barrier<true>& b_ch = nm_ch.named<xmt::__Barrier<true> >( ObjName ); - b_ch.wait(); - nm_ch.release<xmt::__Barrier<true> >( ObjName ); + try { + xmt::shm_name_mgr<1>& nm_ch = seg1.name_mgr(); + xmt::allocator_shm<xmt::__Barrier<true>,1> shm_ch; + xmt::__Barrier<true>& b_ch = nm_ch.named<xmt::__Barrier<true> >( ObjName ); + b_ch.wait(); + nm_ch.release<xmt::__Barrier<true> >( ObjName ); + } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } exit( 0 ); } @@ -866,6 +880,9 @@ catch ( xmt::shm_bad_alloc& err ) { BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); } + catch ( const std::invalid_argument& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } } /* ****************************************************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |