From: <ybr...@us...> - 2009-06-22 15:17:51
|
Revision: 257 http://magnus.svn.sourceforge.net/magnus/?rev=257&view=rev Author: ybryukhov Date: 2009-06-22 15:17:45 +0000 (Mon, 22 Jun 2009) Log Message: ----------- minor changes from the times when I checked Magnus support for high exponents, all seem to be reasonable. Modified Paths: -------------- trunk/magnus/back_end/SessionManager/Makefile trunk/magnus/back_end/general/src/BlackBox.C trunk/magnus/front_end/magnus.tcl Added Paths: ----------- trunk/magnus/back_end/SessionManager/test/highExp.C Modified: trunk/magnus/back_end/SessionManager/Makefile =================================================================== --- trunk/magnus/back_end/SessionManager/Makefile 2008-06-21 15:36:54 UTC (rev 256) +++ trunk/magnus/back_end/SessionManager/Makefile 2009-06-22 15:17:45 UTC (rev 257) @@ -42,7 +42,7 @@ # If you need any extra DEFINES, put them here, taking care not to wipe # out any passed from the command line or a higher level make -override DEFINE += +override DEFINE += -fno-operator-names -D_G_NO_NRV # DEBUG: # If you set DEBUG here, this will wipe out the defaults for the Back @@ -61,7 +61,7 @@ # BACKENDCOMPONENTS is all the components of the Back End needed by # this component and its TESTS (other than the current component) -BACKENDCOMPONENTS = libg++ general Elt Matrix Polynomial Equations Group Apps Subgroup KB FSA Map Genetic NilpotentGroup AProducts GAP Todd-Coxeter Enumerators Packages SMApps +BACKENDCOMPONENTS = libg++ general Elt Matrix Polynomial Equations Map Group Apps Subgroup KB FSA Genetic NilpotentGroup AProducts GAP Todd-Coxeter Enumerators Packages SMApps # FILES: # FILES lists all source Files (without .[Cc] suffixes) which are @@ -78,7 +78,7 @@ # TESTS: # TESTS lists all source files (without .[Cc] suffixes) in test: -TESTS = debug-FEData magnus +TESTS = debug-FEData magnus highExp ###################################################################### ###################################################################### Added: trunk/magnus/back_end/SessionManager/test/highExp.C =================================================================== --- trunk/magnus/back_end/SessionManager/test/highExp.C (rev 0) +++ trunk/magnus/back_end/SessionManager/test/highExp.C 2009-06-22 15:17:45 UTC (rev 257) @@ -0,0 +1,79 @@ + +#include "FPGroup.h" +#include "global.h" + + +//#include <values.h> + +//#include "GHNConfig.h" +//#include "RandomNumbers.h" +//#include "Roulette.h" +//#include "GASubgroup.h" +//#include "Timer.h" + + +//#include "FGGroupRep.h" + +//#include "List.h" + + + +#include <iostream> +//#include <Integer.h> +//#include "Map.h" +//#include "AbelianGroup.h" +#include "Polynomial.h" +#include "Int2.h" +#include "Word.h" +#include "DArray.h" + +int main(int argc, char* argv[]) +{ + Polynomial<Int2> p1; + Polynomial<Integer> p2; + DArrayParser<Word> parser(cin); + + + Generator x(1); + Generator y(2); + Word w(x); + w *= y; + //w < "x = y^123"; + SetOf<Word> s(w); + FPGroup G(2, s); + //Chars errMsg = cin >> G; + + //cout << "hello world" << endl; +//int x =5; + + //FPGroup G(); + //G() ="<x,y;X y^2 x=y^321>"; + //WordEnumeratorProblem(G); + + + + +//VectorOf<Chars> w= 5; +//SetOf<Word> x = 4; + + + +/* + if ( errMsg.length() > 0 ) { + cout << errMsg << endl << endl; + return 1; + } + + cout << "\n\nYou entered:\n"; + cout << G << endl << endl; +*/ + +//enumerate words of G here!! +} + + + + + + + Modified: trunk/magnus/back_end/general/src/BlackBox.C =================================================================== --- trunk/magnus/back_end/general/src/BlackBox.C 2008-06-21 15:36:54 UTC (rev 256) +++ trunk/magnus/back_end/general/src/BlackBox.C 2009-06-22 15:17:45 UTC (rev 257) @@ -140,10 +140,10 @@ // Get unique names for i/o pipes. Put in P_tmpdir defined in stdio.h. - char* tmpStr = tempnam(MagnusTmp::magnusTmp(),""); + char* tmpStr = tempnam(MagnusTmp::magnusTmp(),NULL); strcpy(file_in,tmpStr); free(tmpStr); - tmpStr = tempnam(MagnusTmp::magnusTmp(),""); + tmpStr = tempnam(MagnusTmp::magnusTmp(),NULL); strcpy(file_out,tmpStr); free(tmpStr); @@ -186,6 +186,7 @@ system_command << " &"; err = system( system_command.str().c_str() ); + cerr << system_command.str().c_str() << endl; if ( err && (errno != ECHILD) ) { #ifdef DEBUG ostringstream error_msg; Modified: trunk/magnus/front_end/magnus.tcl =================================================================== --- trunk/magnus/front_end/magnus.tcl 2008-06-21 15:36:54 UTC (rev 256) +++ trunk/magnus/front_end/magnus.tcl 2009-06-22 15:17:45 UTC (rev 257) @@ -65,9 +65,9 @@ proc makeScripts {suffix_name} { global home_dir -set script_dir $home_dir/.magnus +set script_dir "$home_dir/.magnus" if { ![file exists $script_dir] } { - exec mkdir $script_dir + file mkdir $script_dir } set name "$script_dir/$suffix_name" @@ -87,7 +87,7 @@ set suffixlist [lsort -integer $suffixlist ] set i 0 while {$i<[llength $suffixlist]-9} { - exec rm -f $script_dir/$suffix_name[lindex $suffixlist $i] + file delete -force $script_dir/$suffix_name[lindex $suffixlist $i] incr i } set lastsuffix [lindex $suffixlist [expr [llength $suffixlist]-1] ] @@ -112,7 +112,7 @@ if {[info exists sessionManager]} { catch { exec kill -9 [pid $sessionManager] } } - exec rm -rf $tmp_dir + file delete -force $tmp_dir exit 1 } @@ -127,7 +127,7 @@ if {[info exists sessionManager]} { catch { exec kill -9 [pid $sessionManager] } } - exec rm -rf $tmp_dir + file delete -force $tmp_dir exit 0 } @@ -256,9 +256,9 @@ by [exec whoami] at [exec hostname]." } # Make transcript file when not debugging -set script_dir $env(HOME)/.magnus +set script_dir $home_dir/.magnus if { ![file exists $script_dir] } { - exec mkdir $script_dir + file mkdir $script_dir } if {[makeTranscript] == 1} { @@ -310,17 +310,20 @@ set tmp_dir $saveTmp.$i set i $i+1 } -exec mkdir $tmp_dir +file mkdir $tmp_dir unset saveTmp unset i # Open pipes to the session manager if {[file executable $executable]} { + regsub -all " " "$executable" "\\ " executable1 + regsub -all " " "$magnus_home" "\\ " magnus_home1 + regsub -all " " "$tmp_dir" "\\ " tmp_dir1 if {[makeTranscript] == 1} { - set sessionManager [open "| $executable $magnus_home $tmp_dir 2>./session.log" r+] + set sessionManager [open "| $executable1 $magnus_home1 $tmp_dir1 2>./session.log" r+] } else { - set sessionManager [open "| $executable $magnus_home $tmp_dir 2>/dev/tty" r+] + set sessionManager [open "| $executable1 $magnus_home1 $tmp_dir1 2>/dev/tty" r+] } #@db porting to tk4.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |