[sage-devel] SAT and MAXSAT in Sage
Has there been any discussion and/or consensus on how to encode boolean formulae in Sage? I, incidentally, need to solve some MAXSAT problems from Sage-generated data, and am musing about writing a proper interface to akmaxsat, see http://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.190/Mitarbeiter/kuegel/akmaxsat_1.1.tgz which has a Sage-compatible licence, by the way... Dima -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] SAT and MAXSAT in Sage
Hi, On Tuesday 01 May 2012, Dima Pasechnik wrote: Has there been any discussion and/or consensus on how to encode boolean formulae in Sage? So far the only interfaces to SAT Solvers were fire forget interfaces for Boolean polynomials. There also the logic module but I never used it. I, incidentally, need to solve some MAXSAT problems from Sage-generated data, and am musing about writing a proper interface to akmaxsat, see http://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.190/Mitarbeiter/ku egel/akmaxsat_1.1.tgz which has a Sage-compatible licence, by the way... Dima Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: SAT and MAXSAT in Sage
On 2012-05-01, Martin Albrecht martinralbre...@googlemail.com wrote: Hi, On Tuesday 01 May 2012, Dima Pasechnik wrote: Has there been any discussion and/or consensus on how to encode boolean formulae in Sage? So far the only interfaces to SAT Solvers were fire forget interfaces for Boolean polynomials. There also the logic module but I never used it. The latter (which I was not even aware about, thanks for pointing it out!) is very basic. In constructs truth tables and decides satisfiability by searching them, which makes it pretty useless for real problems. On the other hand it can parse quite complicated expressions, so it seems to be a reasonable starting point for extension. Or maybe not... Dima I, incidentally, need to solve some MAXSAT problems from Sage-generated data, and am musing about writing a proper interface to akmaxsat, see http://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.190/Mitarbeiter/ku egel/akmaxsat_1.1.tgz which has a Sage-compatible licence, by the way... Dima Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
David Kirkby david.kir...@onetel.net writes: I don't know, but I have in the past suggested William read a book on software engineering, and even suggested he buy a copy each for the main developers. I have personally bought a couple of books on the subject. http://www.amazon.co.uk/Software-Engineering-International-Ian-Sommerville/dp/0137053460/ref=sr_1_1?s=booksie=UTF8qid=1335833610sr=1-1 http://www.amazon.co.uk/Software-Engineering-A-Practitioners-Approach/dp/0071267824/ref=sr_1_3?s=booksie=UTF8qid=1335833610sr=1-3 So would you say that you recommend these books? -Keshav Join us in #sagemath on irc.freenode.net ! -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Sage developer on ebook accessibility
Dan Drake dr...@kaist.edu writes: On Fri, 27 Apr 2012 at 08:27AM -0700, kcrisman wrote: FYI - see Dan Drake's recent letter to the editor in the MAA FOCUS magazine. Page 2. http://digital.ipcprintservices.com/publication/?i=107069 This is not directly related to Sage development, but the open/non-DRM issue is certainly relevant. Good work! Here's my original version, with links: http://mathsci.kaist.ac.kr/~drake/maa_ebook_drm.html Also note that in the couple weeks since that appeared, Tor books have dropped DRM. See some of Charlie Stross's comments: http://www.antipope.org/charlie/blog-static/2012/04/more-on-drm-and-ebooks.html and his post on Amazon's ebook strategy: http://www.antipope.org/charlie/blog-static/2012/04/understanding-amazons-strategy.html The MAA exists to serve the mathematical community. I believe -- and between the evidence in my editorial and the Tor announcement, many others also believe -- that DRM ebooks don't serve the mathematical community. Thanks for the article and the links. Very interesting stuff. -Keshav Join us in #sagemath on irc.freenode.net ! -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] ld complains that cannot find -lOsiVol when doing ./sage -b test
Hello! I have reported the issue in #sagemath and I was instructed to send a mail here, too. I will insert the chat log below, as it contains the steps I took and the responses I've got. The question is: do I need to report this as an issue? My experience with sage is very limited and it may be that I've used it in a way it was not intended to be used. command is ./sage -b test output follows: -- sage: Building and installing modified Sage library files. Installing c_lib scons: `install' is up to date. Updating Cython code Executing 0 commands (using 0 threads) Time to execute 0 commands: 0.0477039813995 seconds Finished compiling Cython code (time = 0.508787155151 seconds) running install running build running build_py running build_ext building 'sage.numerical.backends.coin_backend' extension building 'sage.rings.complex_mpc' extension building 'sage.ext.interpreters.wrapper_rdf' extension building 'sage.ext.interpreters.wrapper_cdf' extension building 'sage.ext.interpreters.wrapper_rr' extension building 'sage.ext.interpreters.wrapper_py' extension building 'sage.ext.interpreters.wrapper_el' extension Executing 7 commands (using 1 thread) g++ -pthread -shared build/temp.linux-x86_64-2.6/sage/numerical/backends/coin_backend.o -L$SAGE_ROOT/local/lib -L$SAGE_ROOT/local/lib -lcsage -lcsage -lstdc++ -lCbc -lCbcSolver -lCgl -lClp -lCoinUtils -lOsiCbc -lOsiClp -lOsi -lOsiVol -lVol -lstdc++ -lntl -lpython2.6 -o build/lib.linux-x86_64-2.6/sage/numerical/backends/coin_backend.so /usr/bin/ld: cannot find -lOsiVol /usr/bin/ld: cannot find -lVol collect2: ld returned 1 exit status error: command 'g++' failed with exit status 1 sage: There was an error installing modified sage library code. Chat log (some irrelevant parts removed): [12:40] TNick Hello! I've just installed sage-4.8 from source, then I've added all optional packages using ./sage -i; I've created a new branch using ./sage -clone test, but when I switch between main and test (latter edit: using ./sage -b main and ./sage -b test) ld complains that /usr/bin/ld: cannot find -lOsiVol and -lVol [12:41] TNick those libraries are not inside SAGE_ROOT [12:42] TNick google did not revealed similar problems to use as reference [12:42] TNick and the mailing list has only one reference to Vol that is unrelated to this issue (me guesses) [12:43] TNick I'm assuming that we're talking about this library: http://liris.cnrs.fr/david.coeurjolly/Code/SimpleVol/Libvol/ [12:43] TNick because that's the only one that I've found [13:04] ppurka TNick: do you rebuild sage after switching branches? [13:05] ppurka that is, sage -b [13:06] TNick I see now that the trunk has a folder trunk/Osi/src/OsiVol @ 687 [13:06] TNick ppurka: I switch using ./sage -b main [13:07] TNick isn't that suppose to switch to and build it? [13:07] TNick I belive that the Osi thing was added after the 4.8 [13:08] TNick Oh, I'm talking nonsenses here [13:08] TNick it's not in the trunk, I was on a different project ( https://projects.coin-or.org/Osi/browser/trunk/Osi/src/OsiVol?rev=687) [13:08] TNick Ok, that was embarassing [13:08] TNick sorry about that [13:09] ppurka :) [13:09] TNick so, i've downloaded vol library and builded and now ovivol is missing [13:10] TNick I will try to download OsiVol from that location and see where this goes [13:25] TNick oh, this is bad: https://projects.coin-or.org/Osi/changeset/1615 Begin to fix up Osi v9 build. Add libOsiCommonTest, OsiUnitTest?, remove directories for OsiCbc?, OsiClp?, OsiSym?, OsiVol?. [13:36] TNick The last trunk version in Osi where the directory OsiVol is present is 1515 and that particular version of the trunk fails to compile. I shall abandon this path. [13:40] wjp I'm looking at http://trac.sagemath.org/sage_trac/ticket/12220 . You may be using cbc-2.7.5.spkg in a version of sage that's too old for it [13:42] TNick I've got the latest trunk for Osi and there is no OsiVol to be found. I will not invest further effort on that dirrection [13:43] TNick wjp: k [13:44] TNick my SAGE_ROOT/sgkg/installed [13:44] TNick has a file named cbc-2.7.5 [13:45] TNick I understand from http://trac.sagemath.org/sage_trac/ticket/12220 that this means is the new one [13:45] TNick right? [13:46] wjp yes, and the accompanying patches on that ticket were applied to sage-5.0.beta13 [13:46] TNick If i download the file from the issue and I replace mine, that would decide the problem? or I hav to rebuild it again? [13:46] wjp file? [13:46] TNick quote: Here it is : http://www.steinertriples.fr/ncohen/cbc-2.7.5.spkg; [13:47] wjp but you just said you already have that [13:47] TNick i do [13:47] TNick I just thougt [13:47] TNick that it may have teh same version number [13:47] TNick but different content [13:47] TNick silly, I know [13:48] wjp could be, but it seems more likely the cause is that your version
Re: [sage-devel] Can we develop a plan to get 100% doctest coverage?
On Monday, April 30, 2012, rjf wrote: If you said We want to assure that each command (or each software unit) has at least 1 test and asked for enforcement proposals, maybe this makes a little bit of sense. 100% coverage is not what I'd call it. What would you call it? Having people who wrote the code be the only person who tests it is not a great idea. Neither is having people who know nothing much at all about the code write a test. Does UW have a software engineering course?? Nope. RJF -- To post to this group, send an email to sage-devel@googlegroups.comjavascript:_e({}, 'cvml', 'sage-devel@googlegroups.com'); To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'sage-devel%2bunsubscr...@googlegroups.com'); For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Sage 5.0.beta14 and ARM(ubuntu)
On Mon, Apr 30, 2012 at 10:47 PM, Dima Pasechnik dimp...@gmail.com wrote: In gmane.comp.mathematics.sage.devel, you wrote: On Mon, Apr 30, 2012 at 8:00 AM, Dima Pasechnik dimp...@gmail.com wrote: On 2012-04-29, Jeroen Demeyer jdeme...@cage.ugent.be wrote: On 2012-04-28 20:44, mmarco wrote: Will some day ARM be one of the platforms oficially supported? I guess a platform can only be truly officially supported if there is a buildbot for it. If we don't test on ARM, sooner or later something will break. one can try hosting a buildbot on http://gcc.gnu.org/wiki/CompileFarm I have no idea how hard is to actually get an account there though. (And they only have ARM running Ubuntu 9.10, it seems) I can possibly buy an ARM linux box specifically for this purpose (using Sage Foundation money), or get one added to skynet, maybe. What would be the optimal ARM computer for this purpose, optimal OS, etc.? Please be as precise as possible. Thanks! it seems there is no high-power ARM box available, and it's not so easy to get something ready-to-use, with Ethernet and HD built-in. Currently the fastest available things are ARM Cortex-9 chip-based, which is a dual-core 1GHz. A standard build of Sage on such a thing takes a while (10 hours or so, using both cores). One option might be: http://trimslice.com/web/trim-slice-h-specifications (specifically, Trim-Slice H250, which has a HD built-in, something that might be better suited for our purposes, and it has Ubuntu installed.) it can be ordered directly here: http://trimslice.com/web/order-direct Otherwise one might need to buy a development board, which is probably too much trouble. On the other hand they now (released only this year) have Cortex-15 chip, which is up to quad-core and 2GHz. Thanks for researching this! So I could buy a Trim-Slice H250 for about $350, get a name assigned to it (trim.math.washington.edu)? and put it in our server room. But it will take 10 hours to build sage. Or, I could wait a few months (?) for a Cortex-15 version to come out, and it should be about the same, but take much less time to do builds. Would you volunteer to be the admin for the machine, assuming I set it up and give you root? Dima -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: problem with an old moinmoin after upgrading to 5.0.beta11
I upgraded a mac with XCode 3.? to 5.0.beta11. Running with a plain new MoinMoin wiki works perfectly. Okay, I traced down that I have to clean the cache of moinmoin (was that obvious?). Does someone know how to do that from the command line using sage? sage -wiki wiki options didn't work... Thanks, Christian -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Sage 5.0.beta14 on Ubuntu 11.10
Hello! I'm reporting here the compilation results on: Ubuntu 11.10 - 64-bit Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 CPU socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 23 Stepping: 10 CPU MHz: 1600.000 BogoMIPS: 5649.14 L1d cache: 32K L1i cache: 32K L2 cache: 3072K NUMA node0 CPU(s): 0,1 I've downloaded sage-5.0.beta14.tar and typed: export MAKE=make -j4 export SAGE_CHECK=yes make The only thing that were reported at the stderr were: setup.py:650: UserWarning: could not find dependency string included in $SAGE_ROOT/local/lib/python/site-packages/Cython/Includes/libcpp/string.pxd. I will assume it is a system C/C++ header. warnings.warn(msg+' I will assume it is a system C/C++ header.') setup.py:650: UserWarning: could not find dependency vector included in $SAGE_ROOT/local/lib/python/site-packages/Cython/Includes/libcpp/vector.pxd. I will assume it is a system C/C++ header. warnings.warn(msg+' I will assume it is a system C/C++ header.') real0m5.420s user0m2.444s sys0m0.860s *(maybe that last part should go to stdout instead of stderr) * Sage was functional at this time. Next I've installed all optional packages listed by the ./sage -optional and found that following packages were not installed (log file available on demand): TOPCOM-0.16.2.p2 ace-5.0.p0 dot2tex-2.8.7-2 fricas-1.0.9 fricasaldor-1.0.9 libcocoa-0.9930 lrs-4.2b.p1 qhull-2010.1 valgrind-3.7.0 Next, I've run ./sage --testall --long. The log ends with these lines: The following tests failed: sage -t --long -force_lib devel/sage/sage/misc/functional.py sage -t --long -force_lib devel/sage/sage/tests/startup.py sage -t --long -force_lib devel/sage/sage/calculus/test_sympy.py sage -t --long -force_lib devel/sage/sage/symbolic/expression_conversions.py sage -t --long -force_lib devel/sage/sage/symbolic/ring.pyx sage -t --long -force_lib devel/sage/sage/symbolic/constants_c.pyx sage -t --long -force_lib devel/sage/sage/symbolic/expression.pyx sage -t --long -force_lib devel/sage/sage/symbolic/constants.py sage -t --long -force_lib devel/sage/sage/symbolic/integration/integral.py sage -t --long -force_lib devel/sage/sage/symbolic/integration/external.py sage -t --long -force_lib devel/sage/sage/functions/generalized.py sage -t --long -force_lib devel/sage/sage/functions/trig.py sage -t --long -force_lib devel/sage/sage/rings/integer.pyx sage -t --long -force_lib devel/sage/sage/rings/infinity.py sage -t --long -force_lib devel/sage/sage/rings/rational.pyx One is special: sage -t --long -force_lib devel/sage/sage/tests/startup.py ** File $SAGE_ROOT/devel/sage/sage/tests/startup.py, line 13: sage: sage0('numpy' in sys.modules) Expected: False Got: True ** Other ones say the same thing: sage -t --long -force_lib devel/sage/sage/calculus/test_sympy.py ** File $SAGE_ROOT/devel/sage/sage/calculus/test_sympy.py, line 104: sage: from sympy import Symbol, cos, sympify, pprint Expected nothing Got: doctest:135: UserWarning: gmpy version is too old to use (1.03 or newer required) ** One other awkward thing that I've noticed is that some images are not shown by the tutorial inside notebook. Neither Chromium nor Firefox were smart enough despite the fact that the directive to include the image was there and the image was reachable. I shall investigate this further. Nick -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
Both of these have been tried, and niether are working. The graph here http://thales.math.uqam.ca/~labbes/blogue/2011/03/evolution-of-the-ov... seems to indicate that progress on this has slowed over the last year or so, where progress was about 4.7% per year. (I'm not actually sure I agree with his line of best fit, which would suggest to me the situation has slowed even more.) I updated my graph (and removed extrapolations...) : http://www.thales.math.uqam.ca/~labbes/blogue/2012/05/evolution-of-the-overall-doctest-coverage-of-sage/ In Sage 4.7 : 23769 out of 27833 were doctested. Undoctested : 4064. In Sage 4.8 : 24601 out of 28573 were doctested. Undoctested : 3972. During this period, the number of doctested functions increased by 832. But, the number of undoctested functions decreased only by 92. Sébasten -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
But, the number of undoctested functions decreased only by 92. Also, I believe we should stop looking at the coverage percentage between releases put rather at the number of undoctested functions. SL -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
On 05/ 1/12 08:51 PM, Sébastien Labbé wrote: But, the number of undoctested functions decreased only by 92. Well, I guess that's better than nothing, but given there are still around 4000 which are not tested, it hardly makes a dent in the problem. Also, I believe we should stop looking at the coverage percentage between releases put rather at the number of undoctested functions. SL Agreed. Otherwise, as I stated earlier, the doctest coverage will asymptotically approach 100%, even if no further doctests are added to older code. (This assumes all new functions have at least one test - which I believe is happening.) The second graph at http://www.thales.math.uqam.ca/~labbes/blogue/2012/05/evolution-of-the-overall-doctest-coverage-of-sage/ makes interesting reading. It appears that the number of untested functions dropped from 12000 to 5000 in about 18 months, but in the following 3 years, it only dropped a further 500 or so. It seems there was a period (late 2007 to early 2009) when an effort was made to reduce the number of untested functions. But that impetus has been lost. I must admit, I was not aware there were several thousand untested functions. Dave -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
Is there an easy way to find a list of undocumented functions? sage -coverage For example, cd SAGE_ROOT/devel/sage/sage/coding sage -coverage . Outputs: ag_code.py: 100% (1 of 1) binary_code.pyx: 91% (41 of 45) code_bounds.py: 100% (17 of 17) code_constructions.py: 96% (25 of 26) decoder.py: 100% (3 of 3) guava.py: 100% (3 of 3) linear_code.py: 82% (52 of 63) sd_codes.py: 20% (1 of 5) source_coding/huffman.py: 100% (9 of 9) Overall weighted coverage score: 88.1% Total number of functions: 172 We need 3 more function to get to 90% coverage. We need 11 more function to get to 95% coverage. We need 18 more function to get to 99% coverage. --- You can then do the following to see what is wrong with a given file: sage -coverage sd_codes.py -- sd_codes.py SCORE sd_codes.py: 20% (1 of 5) Missing documentation: * MS(n): * matA(n): * matId(n): * MS2(n): snip -- William Stein Professor of Mathematics University of Washington http://wstein.org Here [1] is a patch I just wrote to increase the doctest coverage of one file mentioned here (linear_code.py) to 100%. Please review! I'm going to work on the other files in that directory as I have time. [1] http://trac.sagemath.org/sage_trac/ticket/12893 -- Benjamin Jones -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
On Tue, May 01, 2012 at 09:32:19PM +0100, Dr. David Kirkby wrote: Otherwise, as I stated earlier, the doctest coverage will asymptotically approach 100%, even if no further doctests are added to older code. (This assumes all new functions have at least one test - which I believe is happening.) I definitely would love to achieve 100% test coverage (and better branch coverage, not just doctest coverage). Now, I personally would put the emphasis on encouraging the *refactoring* of the early Sage code (of course with appropriate testing), rather than just doctesting it. There is for example not much point adding a doctest on a function that is likely to be discarded in the refactoring. I don't have good ideas on how to promote refactoring or doctesting, beside rewarding (at least by a congratulation) any volunteer doing so. Cheers, Nicolas PS: by the above I mean no criticizing of early Sage code: it had to be written quickly for the project to get started, and many tools to write it nicely were just not available. -- Nicolas M. Thiéry Isil nthi...@users.sf.net http://Nicolas.Thiery.name/ -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
On Tue, May 1, 2012 at 3:15 PM, Nicolas M. Thiery nicolas.thi...@u-psud.fr wrote: On Tue, May 01, 2012 at 09:32:19PM +0100, Dr. David Kirkby wrote: Otherwise, as I stated earlier, the doctest coverage will asymptotically approach 100%, even if no further doctests are added to older code. (This assumes all new functions have at least one test - which I believe is happening.) I definitely would love to achieve 100% test coverage (and better branch coverage, not just doctest coverage). And Nicolas, I applaud you for ensuring 100% coverage of the combinat/ codebase! -- William Now, I personally would put the emphasis on encouraging the *refactoring* of the early Sage code (of course with appropriate testing), rather than just doctesting it. There is for example not much point adding a doctest on a function that is likely to be discarded in the refactoring. I don't have good ideas on how to promote refactoring or doctesting, beside rewarding (at least by a congratulation) any volunteer doing so. Cheers, Nicolas PS: by the above I mean no criticizing of early Sage code: it had to be written quickly for the project to get started, and many tools to write it nicely were just not available. -- Nicolas M. Thiéry Isil nthi...@users.sf.net http://Nicolas.Thiery.name/ -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: SAT and MAXSAT in Sage
At one point, Victor Miller, William Stein and I looked at interfacing directly to minisat, but IMO, we stopped due to a lack of a nice interface. I've tried to rewrite my SAT approach every time I solve a new problem with SAT solvers -- forcing me to rethink it every time. In general, I've gotten happier with the interface every time, and I'm fairly satisfied with this. In particular, it feels very similar to the interface for DLXCPP, the ExactCover solver in Sage. It supports any hashable variables, and most SAT solvers. I don't know anything about MAXSAT. If anybody wants to use this, I'm happy to place it in the public domain. SATPROG = '/home/boothby/minisat' class SAT: def __init__(self,clauses): self.vars = {} self.clauses = [] for c in clauses: self(*c) def __getitem__(self,k): if k in self.vars: return self.vars[k] else: r = self.vars[k] = len(self.vars)+1 return r def __call__(self,pos = (),neg = ()): clause = [` self[v]` for v in pos] clause+= [`-self[v]` for v in neg] self.clauses.append(clause) def __str__(self): s = 'p cnf %s %s\n'%(len(self.vars), len(self.clauses)) s+= ' 0\n'.join(map(' '.join, self.clauses+[''])) return s def solve(self): fn = tmp_filename() open(fn+.sat,'w').write(str(self)) os.system(%s -verb=0 %s.sat %s.sol /dev/null%(SATPROG,fn,fn)) sol = open(fn+.sol) res = sol.readline()[:-1] if res == SAT: xtovar = dict((v,k) for k,v in self.vars.iteritems()) keys = map(int,sol.readline().split(' ')[:-1]) return [xtovar[i] for i in keys if i 0], [xtovar[-i] for i in keys if i 0] else: return None def all_sols(self): sol = self.solve() while sol is not None: pos,neg = sol yield pos,neg self(pos=neg,neg=pos) sol = self.solve() Example: sage: a,b,c,d = var('a,b,c,d') sage: clauses = [ ...[ [a,b],[c] ], # a or b or not c ...[ [a,c],[b] ], # a or c or not b ...[ [c,d],[] ], # c or d ... sage: ] sage: for sol in SAT(clauses): ... pos,neg = sol ... print pos [a, d] [d] [a, c] [a, c, d] [a, b, d] [b, c] [b, c, d] [a, b, c] [a, b, c, d] On Tue, May 1, 2012 at 2:40 AM, Dima Pasechnik dimp...@gmail.com wrote: On 2012-05-01, Martin Albrecht martinralbre...@googlemail.com wrote: Hi, On Tuesday 01 May 2012, Dima Pasechnik wrote: Has there been any discussion and/or consensus on how to encode boolean formulae in Sage? So far the only interfaces to SAT Solvers were fire forget interfaces for Boolean polynomials. There also the logic module but I never used it. The latter (which I was not even aware about, thanks for pointing it out!) is very basic. In constructs truth tables and decides satisfiability by searching them, which makes it pretty useless for real problems. On the other hand it can parse quite complicated expressions, so it seems to be a reasonable starting point for extension. Or maybe not... Dima I, incidentally, need to solve some MAXSAT problems from Sage-generated data, and am musing about writing a proper interface to akmaxsat, see http://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.190/Mitarbeiter/ku egel/akmaxsat_1.1.tgz which has a Sage-compatible licence, by the way... Dima Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Can we develop a plan to get 100% doctest coverage?
On 05/ 1/12 10:33 PM, Benjamin Jones wrote: Here [1] is a patch I just wrote to increase the doctest coverage of one file mentioned here (linear_code.py) to 100%. Please review! I'm going to work on the other files in that directory as I have time. [1] http://trac.sagemath.org/sage_trac/ticket/12893 -- Benjamin Jones Great. I'm not able to review it, but hopefully someone else can. Dave -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: sagemath ppa for Ubuntu 12.04
On Fri, 27 Apr 2012 at 09:36AM -0700, Harald Schilly wrote: Hi, sounds good. I'm not too familiar with the PPAs, but this procedure also include some signatures for the deb packages, or is it necessary to get them separately? Also, if this is tested well enough I want to mention this on the linux download page. It should work well. I think it's worth mentioning on the download page. Dan -- --- Dan Drake - http://mathsci.kaist.ac.kr/~drake --- signature.asc Description: Digital signature
[sage-devel] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test
Hello Sage 4.8 came with an earlier Cbc package, 2.3-somethingorother. It included something called OsiVol. Your version of sage is trying to build with that library. The more recent Cbc package, 2.7.5, does not. It looks as if sage downloaded the newer Cbc package. An unpatched sage 4.8 does not know how to build that version of Cbc. Hence, your errors. I THINK that ticket #12220 would fix it, if you could install it; I've been running Cbc-2.7.5 on several patched versions of 4.8. But, I'm not sure you can install that patch in the state your system is in, now. It should work fine with sage 5.0. Nathann Cohen might have a better insight on what's causing this problem. john perry -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: Sage 5.0.beta14 and ARM(ubuntu)
On Tuesday, May 1, 2012 3:38:26 PM UTC, William wrote: On Mon, Apr 30, 2012 at 10:47 PM, Dima Pasechnik wrote: In gmane.comp.mathematics.sage.devel, you wrote: On Mon, Apr 30, 2012 at 8:00 AM, Dima Pasechnik wrote: On 2012-04-29, Jeroen Demeyer wrote: On 2012-04-28 20:44, mmarco wrote: Will some day ARM be one of the platforms oficially supported? I guess a platform can only be truly officially supported if there is a buildbot for it. If we don't test on ARM, sooner or later something will break. one can try hosting a buildbot on http://gcc.gnu.org/wiki/CompileFarm I have no idea how hard is to actually get an account there though. (And they only have ARM running Ubuntu 9.10, it seems) I can possibly buy an ARM linux box specifically for this purpose (using Sage Foundation money), or get one added to skynet, maybe. What would be the optimal ARM computer for this purpose, optimal OS, etc.? Please be as precise as possible. Thanks! it seems there is no high-power ARM box available, and it's not so easy to get something ready-to-use, with Ethernet and HD built-in. Currently the fastest available things are ARM Cortex-9 chip-based, which is a dual-core 1GHz. A standard build of Sage on such a thing takes a while (10 hours or so, using both cores). One option might be: http://trimslice.com/web/trim-slice-h-specifications (specifically, Trim-Slice H250, which has a HD built-in, something that might be better suited for our purposes, and it has Ubuntu installed.) it can be ordered directly here: http://trimslice.com/web/order-direct Otherwise one might need to buy a development board, which is probably too much trouble. On the other hand they now (released only this year) have Cortex-15 chip, which is up to quad-core and 2GHz. Thanks for researching this! So I could buy a Trim-Slice H250 for about $350, get a name assigned to it (trim.math.washington.edu)? and put it in our server room. But it will take 10 hours to build sage. Or, I could wait a few months (?) for a Cortex-15 version to come out, and it should be about the same, but take much less time to do builds. Would you volunteer to be the admin for the machine, assuming I set it up and give you root? Sure, I (perhaps with Keshav as a backup --- Keshav, would you mind helping?) can do the admin. I suppose 10 hours is still acceptable for a build (I expect it actually be quicker with a HD, as the solid state drive in my AC100 is kind of slow, and might take a lot of wallclock time during the build). I certainly cannot predict how often a manual intervention will be needed, but let's hope for the best. Dima -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
Re: [sage-devel] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test
Hello, John! Thank you for your answer! The problem is not me being unable to use sage (as reported in another mail I have downloaded and build sage-5.0.beta14 and it does not have this problem). I was thinking that sage 4.8, when installed and used in the way I presented it (which looks pretty standard to me) does not work well. I have only reported this in hope that it may be usefull to developers track something that looks like a bug to me and, implicitly, I was offering my help, since I have a faulty installation that has this problem and may be examined. On the other hand I was reading [sage-release] yesterday (what a fun thing to do!) and I understand that 4.8 may be a burden for you right now, with all this rush to get 5.0 out. Best regards, Nick -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org