[CoCoA logo]

CoCoALib

CoCoALib is a GPL C++ library for doing Computations in Commutative Algebra.

CoCoALib is the mathematical kernel for the completely new system CoCoA-5

Last modified: 11 Sep 2014

Following the CoCoA philosophy CoCoALib is designed to be easy and pleasant to use, so there is no need to be an expert C++ programmer, no need to understand inheritance, no need to know about memory allocation!
If you don't like programming in C++ you may use most of its features through CoCoA-5, the interactive Computer Algebra System.

Download

Please cite CoCoALib:
John Abbott and Anna Maria Bigatti
CoCoALib: a C++ library for doing Computations in Commutative Algebra.
Available at http://cocoa.dima.unige.it/cocoalib
versionnotes
0.99535 Download
4.4M
11 Sep 2014
Sources for CoCoA-5.1.1 (September release)
Main changes from 0.99535
  • Fixed bug in passing matrix as argument
  • Improvements related with CoCoA-5: manual, BuiltInFunctions, ...
  • Lots of cleaning, tidying, ...
  • redmine for 0.99535 redmine for CoCoA-5.1.1
  • 0.99534 Download
    4.4M
    01 Aug 2014
    Sources for CoCoA-5.1.1 (August pre-release)
    Main changes from 0.99534
  • Improved configuration
  • Simplified type/function names for BuiltInFunctions
  • CoCoA-5 manual: highlighted obsolete/obsolescent functions
  • Lots of cleaning, tidying, ...
  • redmine for 0.99534
  • 0.99533 Download
    4.4M
    04 Jun 2014
    Sources for CoCoA-5.1.0
    Main changes from 0.99532
  • Resolutions (naive implementation, but it works)
  • redmine for 0.99533
  • 0.99532 Download
    4.4M
    28 Mar 2014
    Sources for CoCoA-5.0.9
    Main changes from 0.9953
  • Improving Thread safety
  • Improved integration of external library Normaliz
  • Modules and functions on modules
  • More robust operations in QuotientRing
  • IdealOfPoints: optimized and general implementation
  • New function for reading polynomials from string/input
  • New function MinGens/minimalised
  • New function SquarefreeFactorization
  • Unique copy of RingQQt(n) (QQ[t[1..n]])
  • ... and much more
  • 0.99531 Download
    4.3M
    30 Oct 2013
  • redmine for 0.99531
  • 0.9953 Download
    4.3M
    19 Jun 2013
  • redmine for 0.9953
  • 0.9952 Download
    4.1M
    15 Oct 2012
    Sources for cocoa-5.0.3
    redmine CoCoALib-0.9952
    0.9951 Download
    4.0M
    30 May 2012

    redmine CoCoALib-0.9951
    0.9950 Download
    3.9M
    04 Apr 2012
    A jump in version number for a big change:
  • ZZ is now called BigInt
  • QQ is now called BigRat
  • and some more things:
    redmine CoCoALib-0.9950
  • 0.9949 Download
    3.3M
    30 Sep 2011
    This is a temporary version while getting ready for 0.9950: it is fully working, but a few files and classes still need renaming. It will updated daily (just if you cannot wait ;-) until 0.9950 is ready, then it'll disappear.
    0.9946 Download
    3.2M
    29 Jul 2011
    Version for summer holidays 2011
  • updated integration of Normaliz and Frobby
  • some minor changes and bug fixes; more details coming soon... end of August... Recently completed tasks
  • 0.9945 Download
    3.0M
    20 Jul 2011
    Version for MonICA School 2011
  • New file TmpMonomialIdeal for operations on monomial ideals (chosen automatically is gens are monomial)
  • more details coming soon Recently completed tasks
  • 0.9944 Download
    2.9M
    01 Jun 2011
    Version for CoCoASchool 2011
  • details coming soon
  • 0.9943 Download
    2.2M
    30 Mar 2011
  • ALWAYS USE LONG is the new rule for CoCoALib
    • this is an endless debate in C circles, but everyone agrees a public library should use the intersection of the signed and unsigned ranges for safety checks
    • all machine-integer arguments and return values in CoCoALib are now of type "long" (and also local variables, member fields,..)
    • added template function len(v) returning "v.size()" as "long"
    • Added ULong2Long: an inline fn to convert unsigned long into long
  • added ExternalLibs-GSL (interface for the numerical library GSL)
  • first prototype for boost search in configuration (for normaliz)
  • matrix: added x*M, det3x3, IsSymmetric, IsAntiSymmetric, IsDiagonal, TensorMat, FilledMat, NewDenseMatStdDegLex, NewDenseMatXel, NewDenseMatStdDegRevLex
  • ideal: added GBasis, operator!=
  • QQ: added CFApprox, IsOneNum; RingHom applied to QQ
  • PolyRing: added ClearDenom, IsIndet, IsIndetPosPower; removed indet(PolyRing,ZZ)
  • PPMonoid: added IsIndet, IsIndetPosPower
  • FractionField improved printing
  • RingFp..: IsGoodForXXX, IsGoodCtorArg fns to test whether a given arg is suitable as characteristic for the given type of small prime finite field (used by pseudo-ctors for RingFp, RingFpLog, RingFpDouble)
  • Added MantissaAndExponent, FloatStr
  • Improved ILogBase
  • Added IsConvertible(long&, double)

  • CoCoA-5:
  • improvements in the interpreter: more macros and template functions for easier integration of new operations
  • added IDEAL type to cocoa5
  • new functions in CoCoA-5 (see CoCoALib-functions) and futher improved manual search
  • 0.9942 Download
    2.2M
    17 Feb 2011
    Mainly working on extending cocoa-5. This showed some missing functions and minor bugs in CoCoALib.
  • new version for new files: MatrixSpecial.[CH]
  • ZZ: isqrt, iroot, IsExactIroot, IsSquare, IsPower
  • matrix: added + and -, jacobian, myIsEqual (default and optimized impl), mySetEntry/SetEntry with QQ argument; fixed SetEntry using myIsWritable
  • RingElem: added monic/myMonic, lcm/myLcm, myElim; fixed HasUniqueOwner for empty lists; improved printing of polynomials
  • added symbols(vector s)
  • fixed a minor bug in power (QQ)
  • CoCoA-5:
  • improvements in the interpreter: new macros and template functions (for arguments, and creating/reading lists) allow easier integration of new operations
  • new file CoCoALibSupplement.[CH] with "CoCoALib operations" written solely for cocoa-5.
  • added RINGHOM and MAT types to cocoa5
  • new functions in CoCoA-5 (see CoCoALib-functions) and futher improved manual search
  • 0.9941
  • Completed revision of GlobalManager (and GMPAllocator)
  • Uniformization of i/o for tests and examples: i/o is on standard C++ streams (rather than GlobalInput(), etc. to be used only for CoCoAServer)
  • Updated MemPool so user can specify on which streams to print logging info and errors (when in verbose mode).
  • Added new class RandomSource and example
  • Added ILogBase function (to ZZ & QQ).
  • About indeterminate "names":
    • new function (my)IndetsCalled
    • new RingElem constructor RingElem(ring, symbol)
    • renamed (my)IndetName into (my)IndetSymbol
    • removed spaces in indices: c[1, 2] is now printed c[1,2]
  • Changed interface to ANNOUNCE function: now it requires the ostream to passed in
  • new functions in CoCoA-5 (see CoCoALib-functions) and improved manual search
  • modified IsZeroAddMul with temporary variable (slug found with cyclotomic)
  • Frobby Dimension renamed into dimension
  • 0.9940 Download
    2.1M
    25 Nov 2010
  • GMPAllocator has been replaced by subclass GlobalManager::GMPMemMgr
  • GlobalManager: new way of specifying use of GMPAllocator (now default)
  • fixed memory management for Hilbert function (globals in GlobalManager)
  • Added new GMPAllocator example
  • Added IndetsCalled/myIndetsCalled
  • Improved interface with Normaliz, examples and more functions
  • TmpNormaliz renamed into ExternalLibs-Normaliz
  • TmpFrobby renamed into ExternalLibs-Frobby
  • ExternalLibs-Frobby: Dimension renamed into dimension
  • Added functions in CoCoA5 and CoCoALib: IndetsCalled, ZZExponents, indet(*, ZZ), IsHomog, indets, NewFractionField. monomials_forC5, support_forC5, LT_forC5, LPP_forC5, LM_forC5
  • fix for CoCoA-5 online manual
  • 0.9939 Download
    2.1M
    12 Oct 2010
  • Integration with Normaliz and examples
  • Documentation for Frobby and Normaliz (ExternalLibs)
  • test-hilbert1 fails, we know about it: it is a "controlled" memory leak we are taking care of
  • improved exception safety of ring/PPMonoid ctors
  • makefile cleaning
  • Replaced explicit recursive calls to "make" by calls to "$(MAKE)"
  • added "wildcard" for convenient compilation of non-official examples (warning: working only with gmake?)
  • renamed (Ring)DistrMPoly.html --> (Ring)DistrMPolyClean.html
  • added mySymbolValue/RingElem(R, sym), improved examples
  • Added thread safety checks
  • 0.9937 Download
    1.5M
    23 Mar 2010
  • Tests and bug fixes for ZZ
  • Added iterator classes for continued fractions
  • Add ctors for ZZ and QQ from a string
  • ex-PolyRing2.C using monomial
  • Rational coeffs in monomial
  • index.html for examples directory
  • Revised CoCoALib build system
  • New pseudo-ctors for polynomial rings
  • Multiplicative Order Modulo an Integer
  • Random machine integers
  • RingTwinFloat theory and implementation
  • 0.9936 Download
    1.5M
    10 Mar 2010
  • !!! Working version for CoCoAMonomialDays !!!
  • 0.9935 Download
    1.5M
    21 Jan 2010
  • latest RingTwinFloat code
  • fixed a bug about intersection of polynomial ideals (non-monomial)
  • .... to be completed...
  • 0.9933 Download
    1.4M
    03 Nov 2009
  • fixed server-client communication bug under Linux, needs new cocoa5.cpkg (1.03) to become effective
  • new MVT functions by Eduardo Saenz de Cabezon
  • 0.9932 Download
    1.4M
    28 Oct 2009
  • new MVT functions by Eduardo Saenz de Cabezon
  • new round/RoundDiv functions
  • new SugarDegree code used in Groebner Bases computation
  • new constructors for ideal (ideal(x1, x2), ideal(x1, x2, x3), ideal(x1, x2, x3, x4))
  • some work on server-client communication bug under Linux (possible fix found; still investigating)
  • unique implementation of myIsDivisible and myDeriv for SparsePolyRing; unique implementation of myDiv for PolyRing
  • added document about CoCoA-5 Language
  • 0.9931 Download
    1.4M
    24 Jul 2009
  • improved configuration for 32/64 bit
  • new class and example for factor
  • new class SugarDegree
  • starting new abstract class QQ
  • new files NumTheory.C/H
  • new constructors for ideals (ideal(x), ideal(gens))
  • HasUniqueOwner checks if all elements in a vector have the same owner
  • 0.9930 Download
    1.4M
    10 Jun 2009
    (during the CoCoASchool)
  • 0.9928 Download
    1.2M
    11 Feb 2009
  • Configuration for optimization/debugging using --flags=ARG
  • Configuration for linking frobby using --with-libfrobby=ARG and added tests (just to check the linking has been successful) in cocoalib and cocoa4.
  • 0.9927 Download
    1.2M
    09 Feb 2009

    Many small impovements to the server: added "-d" option for debugging, added WriteIdeal, WriteMatrix, ..
    Abstract class for sugar
    Integration with Frobby (with configuration by hand)
    0.9925 Download
    1.2M
    08 Jan 2009
    Now using MachineInteger type whenever a machine integer value is used in place of RingElem. This avoids nasty surprised when C++ silently converts signed value into unsigned (or vice versa).
    Fixed a bug in RegisterServerOps.C the server call to MayerVietorisTree.
    0.9924 Download
    1.1M
    16 Dec 2008
    Changed Makefiles for compatibility with Solaris make [make -C dir blah ==> (cd dir; make blah)]

    changes to symbol and MachineInteger
    0.9923 Download
    1.1M
    23 Nov 2008
    Version for release of cocoa-4.7.4

    Some changes for SOI and NBM...
    0.9922 Download
    1.1M
    18 Nov 2008
    Added ceil, floor ...

    Fixed ideal inheritance code for RingWeyl

    Optimized operations on monomial ideals: TidyGens, intersect
    0.9921
    8 Oct 2008
    Modified the error ID objects so that they contain (and print out) alphanumeric codes (as well as all the information which was printed out before).

    Changed the way to check the type of error in an ErrorInfo object (and herein lies the backward incompatibility). The new way should be simpler to use.
    0.9920 Download
    1.1M
    22 Sep 2008
    cocoa-4 and CoCoAServer communication has changed (you need the new cocoa5.cpkg for CoCoA-4):
    OperationCommunication allows variable number of arguments and sends the information to the server. So the function myReadArgs in RegisterServerOps.C now takes an extra argument, NumArgs.
    • added function linkability for the Frobby library
    • updated code for TmpMayerVietorisTree
    • added NBM
    0.9919 Download
    1.1M
    18 Jul 2008
    • version for CoCoA-4 pre-relese
    • improved gmp-version-check.sh
    • improved TmpMayerVietorisTree
    • cleaned up TmpFactorDir
    0.9918 Download
    1.1M
    18 Jun 2008
    • moved code for monomial ideals into TmpPPVector
    • added code TmpMayerVietorisTree for irreducible decomposition of monomial ideals by Eduardo Saenz de Cabezon
    • added stable order ideal algorithm (SOI)
    • fixed multivariate GCD, same as CoCoA-4.7.4
    • removed functions IsPositive and IsNegative for ZZ values (optimized ">0" and "<0").
    • completed implementation of adjoint by adding AdjointByDetOfMinors
    • moved fns related to matrices and PPOrderings into a new file (MatrixForOrdering.H/C), and added some matrix norms to MatrixArith
    • exponent overflow (and underflow) should now be detected when CoCoA_DEBUG is set.
    0.9915 Download
    1.1M
    12 Mar 2008
    • completed DenseUPolyRing
    • added IsIrred function for RingElem
    • changed IsHomogeneous into IsHomog
    0.9914 Download
    1.1M
    12 Feb 2008
    • improved GMP identification during configuration
    • added NumCompts function for ModuleElems
    • added useless dummy functions to utils.C and AnnaUtils.C to silence ranlib on MacOS
    0.9913 Download
    1.1M
    05 Dec 2007
    • log/myLog(pp, i) renamed into exponent/myExponent(pp, i)
    • log/myLog(poly, i) renamed into MaxExponent/myMaxExponent(poly, i)
    • return type for StdDeg/myStdDeg changed from size_t to long.
    0.9912 Download
    1.1M
    31 Oct 2007
    Source code is now "GPL-3 or later".
    0.9911 Download
    1.1M
    19 Oct 2007
    Another step in rewriting the Hilbert-Poincare code:
    • added TmpPoincare.[CH] using DenseUPolyRing instead of unipoly (the old C code)
    • modified TmpHilbert.C so that it can call the new code (HilbertNumeratorMod) as well as the old one (HilbertNumeratorMod_C).
    0.9910 Download
    1.1M
    05 Oct 2007
    • added abstract class DenseUPolyRing for representing dense univariate polynomials
    • added concrete class RingDenseUPolyClean, the cleanest implementation
    • just for testing, still horribly inefficient and incomplete
    0.9909
    September
    • mainly fixes to remove warnings with the new compiler.
    • Moreover, to get more precise information about the running CoCoAServer
      • each ServerOp includes infos about the library it is defined in
      • CoCoAServer no longer prints its own version
      • CoCoAServer prints all included libraries and their versions (or all offered operations)
      • CoCoAServer can change stat_level (Max's verbosity) at runtime
    0.9908 Download
    1.1M
    25 Jun 2007
    • RingFloat renamed to RingTwinFloat.
    0.9907 Download
    1.1M
    13 Jun 2007
    • RandomBitStream is back (complete with doc and example). [Needs GMP >= 4.2]
    0.9906 Download
    1.1M
    05 Jun 2007
    • added to symbol.H AreDistinct(syms); AreArityConsistent(syms);
    • default implementation for IamCommutative, IamIntegralDomain, IamGCDDomain, IamField, myCharacteristic in PolyRing.H/.C
    • default implementation for mySymbols in SparsePolyRing.H/.C
    • cleaned up pseudo-ctors and PushBacks
    • the function myIsValid now returns true/false (used to throw an error in case of invalid polynomial)
    • added Arri's "reuse addr" idea to SocketStream.C
    • CoCoAServer now produces a more comprehensible error if the socket cannot be opened.
    • All attempts to compute the zeroth power of zero now produce errors (previously some cases were not checked).
    • fixed benchmarks directory (and cleaned it)
    0.9905 Download
    1.1M
    31 May 2007
    • Renamed function IsUnit to IsInvertible.
    • Renamed function ndigits to NumDigits.
    • Improved the documentation in ZZ.txt.
    • Changed returned type of exponent and NumDigits.
    • Some error conditions in functions on ZZ values are now signalled using standard CoCoA error codes rather than the nonstandard one.
    • Now accepting 0 coefficient for PushBack/PushFront (fairly invasive change).
    0.9904
    21 May
    • Major change to operations between ZZ and machine integers;
    • new class MachineInteger.
    • Non-exact integer division by a negative value now gives error.
    0.9903
    15 May
      This will be the base structure of CoCoALib for the paired-libraries release. Removed from CoCoALib tree:
      • the numerical directory (and the Num***.H files)
      • from AlgebraicCore directory the files TmpBorderBasis.C, TmpFGLM.C, TmpLESystemSolver.C, TmpOrderIdeal.C (and the related .H, .txt, example and test files)

    03 May
    • Added new PPMonoid with (virtually) unlimited exponents, and improved the documentation for PPMonoids.
    • Pseudo-ctor for new PPMonoid is NewPPMonoidEvZZ
    0.9902
    27 Apr
    • Most of the code in CoCoAServer.C has migrated into AlgebraicCore.
    • New registration procedure for server operations (with documentation in doc/)
    • OperationMill renamed into ServerOp
    • Dortmund ServerOps are not checked in (but running correctly in my local version of the new structure for the libraries)
    Locations of visitors to this page