Index: sollyaIntegration-4.0/src/sollyaLibOpenIssues.txt
===================================================================
--- sollyaIntegration-4.0/src/sollyaLibOpenIssues.txt	(revision 0)
+++ sollyaIntegration-4.0/src/sollyaLibOpenIssues.txt	(revision 34)
@@ -0,0 +1,18 @@
+
+
+
+
+General ideas
+-------------
+Replace "affectation" by assignment.
+
+
+idea 1
+In the parameter lists in the header file, add a variable name: it documents
+the function as well.
+
+Typos
+-----
+
+Page 211, last paragraph:
+replace "the elements N of arg" by "the N elements of arg"
\ No newline at end of file

Property changes on: sollyaIntegration-4.0/src/sollyaLibOpenIssues.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: sollyaIntegration-4.0/src/taylorModel-01.c
===================================================================
--- sollyaIntegration-4.0/src/taylorModel-01.c	(revision 0)
+++ sollyaIntegration-4.0/src/taylorModel-01.c	(revision 34)
@@ -0,0 +1,229 @@
+/** @file taylorModel-01.c
+ * taylorModel-01: check the taylorform function.
+ *
+ * @author S.T.
+ * @date 2012-11-21
+ *
+ */
+/******************************************************************************/
+/* Headers, applying the "particular to general" convention.*/
+
+#include "pobyso4/pobyso.h"
+
+/* includes of local headers */
+
+/* includes of project headers */
+
+/* includes of system headers */
+#include <stdlib.h>
+#include <gmp.h>
+#include <sollya.h>
+#include <setjmp.h>
+#include <string.h>
+/* Other declarations */
+
+/* Internal prototypes */
+
+/* Types, constants and macros definitions */
+#define NUM_ARGS 5
+#define VARIABLE_NAME_STRING "x"
+#define RADIX 10
+/* Global variables */
+
+/* Functions */
+int
+main(int argc, char** argv)
+{
+  //jmp_buf recover;
+  sollya_obj_t functionObj      = NULL;
+  char *freeVariableName        = NULL;
+  char *functionString          = NULL;
+  char buffer[20];
+  char* endptr[1];
+  unsigned int degree           = 0;
+  double point                  = 0.0;
+  sollya_obj_t degreeSo;
+  sollya_obj_t pointSo;
+  sollya_obj_t tf;
+  sollya_obj_t *tfAsArray       = NULL;
+  int numTfElements             = 0;
+  int tfIsEndElliptic           = 0;
+  sollya_obj_t polySo;
+
+
+  /* check the command line arguments */
+  if (argc < NUM_ARGS)
+  {
+    fprintf(stderr,
+            "\n\nusage: %s functionString freeVariableName degree point\n\n",
+            argv[0]);
+    fprintf(stderr,
+            "\tfunctionString: the expression to create a node from.\n");
+    fprintf(stderr,
+            "\t\tmust be in quotes (e. g. \"cos(x)\");\n");
+    fprintf(stderr,
+            "\tfreeVariableName: the name of the free variable;\n");
+    fprintf(stderr,
+            "\t\t(e. g. x (no quotes needed));\n");
+    fprintf(stderr,
+            "\tdegree: the degree of the polynomial;\n");
+    fprintf(stderr,
+            "\tpoint: the point where the Taylor expansion is to be considered.\n");
+    fprintf(stderr,"\n\n");
+    return(1);
+  }
+
+  buffer[0] ='\0';
+
+  functionString    = argv[1];
+  freeVariableName  = argv[2];
+  if (*(argv[3]) == '-')
+    {
+      fprintf(stderr,
+              "\n\n%s: the degree (%s) can not be negative.\n",
+              argv[0],
+              argv[3]);
+      fprintf(stderr,
+              "Aborting the program.\n\n");
+      return(1);
+    }
+
+  degree = strtoul(argv[3], endptr, 10);
+  /* For a completly safe conversion *endptr must point to a 0 char value
+     (not the '0' but the '\0' char value!). */
+  if (**endptr != '\0')
+  {
+    fprintf(stderr,
+            "\n\n%s: could not safely convert the \"%s\" string into an int.\n",
+            argv[0],
+            argv[3]);
+    fprintf(stderr,
+            "Aborting the program!");
+    return(1);
+  }
+  point = strtod(argv[4], endptr);
+  /* For a completly safe conversion *endptr must point to a 0 char value
+     (not the '0' but the '\0' char value!). */
+  if (**endptr != '\0')
+  {
+    fprintf(stderr,
+            "\n\n%s: could not safely convert the \"%s\" string into double.\n",
+            argv[0],
+            argv[4]);
+    fprintf(stderr,
+            "Aborting the program!");
+    return(1);
+  }
+  /* Debug printing. */
+  fprintf(stdout,
+          "%s: function: %s\n", argv[0], functionString);
+  fprintf(stdout,
+          "%s: variable name: %s\n", argv[0], freeVariableName);
+  fprintf(stdout,
+          "%s: degree: %d\n", argv[0], degree);
+  fprintf(stdout,
+          "%s: point : %f\n", argv[0], point);
+  fprintf(stdout, "\n");
+  /* Initialize Sollya. */
+  sollya_lib_init();
+
+  /* Set the free variable name. */
+  sollya_lib_name_free_variable(freeVariableName);
+  if (strcmp(sollya_lib_get_free_variable_name(), freeVariableName))
+  {
+    fprintf(stderr, "Could not set \"%s\" as the variable name. Aborting!\n",
+                      freeVariableName);
+    sollya_lib_close();
+    return(1);
+  }
+  /* Parse the function string. */
+  functionObj = pobyso_parse_string(functionString);
+  if (sollya_lib_obj_is_error(functionObj))
+  {
+    fprintf(stderr, "%s: could not parse \"%s\". Aborting!\n", argv[0], functionString);
+    sollya_lib_close();
+    return(1);
+  }
+  sollya_lib_fprintf(stdout, "%s: function: %b\n", argv[0], functionObj );
+  pobyso_autoprint(functionObj, NULL);
+  /* Create the degree object. */
+  degreeSo = sollya_lib_constant_from_uint64(degree);
+  pobyso_autoprint(degreeSo, NULL);
+  /* Create the point object. */
+  pointSo = sollya_lib_constant_from_double(point);
+  pobyso_autoprint(pointSo, NULL);
+
+  tf = sollya_lib_taylorform(functionObj, degreeSo, pointSo, NULL);
+  pobyso_autoprint(tf, NULL);
+
+  if (sollya_lib_obj_is_list(tf))
+  {
+    fprintf(stdout, "%s: is a list.\n", argv[0]);
+  }
+  if (! sollya_lib_get_list_elements(&tfAsArray, &numTfElements, &tfIsEndElliptic, tf))
+  {
+    fprintf(stderr, "%s: convertion of tf to array failed. Aborting!\n",
+            argv[0]);
+    /* TODO: clean up. */
+    sollya_lib_close();
+    return(1);
+  }
+  fprintf(stdout, "tfAsArray address: %p\n", tfAsArray);
+  fprintf(stdout, "tf is end-elliptic: %d\n", tfIsEndElliptic);
+  polySo = tfAsArray[0];
+  fprintf(stdout, "PolySo address: %p\n", polySo);
+  fprintf(stdout, "PolySo is a function: %d\n", sollya_lib_obj_is_function(polySo));
+  pobyso_autoprint(polySo, NULL);
+  pobyso_autoprint(tf, NULL);
+
+  polySo = sollya_lib_get_object_list_head(tf);
+  //fprintf(stdout, "PolySo is a function: %d\n", sollya_lib_obj_is_function(polySo));
+  sollya_lib_clear_obj(degreeSo);
+  sollya_lib_clear_obj(functionObj);
+
+#if 0
+  fprintf(stderr, "Name of variable: %s\n", getNameOfVariable());
+  if (functionNode->nodeType == VARIABLE)
+  {
+    fprintf(stderr, "Node type is VARIABLE.\n");
+    if (getNameOfVariable != NULL)
+    {
+      if (strcmp(freeVariableName, getNameOfVariable()))
+      {
+        fprintf(stderr, "Could not parse %s. Aborting!\n", functionString);
+        finishTool();
+        return(1);
+      }
+    }
+  }
+
+  variableNode      = makeVariable();
+
+  powNode = makePow(variableNode, makeConstantDouble(3.0));
+  functionDiffNode  = differentiate(functionNode);
+  fprintf(stderr, "\tfunctionNode tree...\n");
+  fprintTree(stderr, functionNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end functionNode tree.\n");
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\tfunctionDiffNode tree...\n");
+  fprintTree(stderr,functionDiffNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end functionDiffNode tree.\n");
+  fprintf(stderr, "\n\tvariableNode tree...\n");
+  fprintTree(stderr, variableNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end variableNode tree.\n");
+  fprintf(stderr, "\n\tpowNode tree...\n");
+  fprintTree(stderr, powNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end powNode tree.\n");
+
+  free_memory(variableNode);
+  free_memory(functionNode);
+  free_memory(functionDiffNode);
+#endif
+
+  sollya_lib_close();
+  return(0);
+} /* End main */

Property changes on: sollyaIntegration-4.0/src/taylorModel-01.c
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain

Index: sollyaIntegration-4.0/src/Makefile
===================================================================
--- sollyaIntegration-4.0/src/Makefile	(revision 0)
+++ sollyaIntegration-4.0/src/Makefile	(revision 34)
@@ -0,0 +1,87 @@
+CC           = gcc
+CFLAGS       = -Wall -g -I /warehouse/storres/root/include
+LDLIB        = -L /warehouse/storres/root/lib -lsollya -lfplll -lmpfi -lmpfr -lgmp -lxml2 -lz -lstdc++ -lm -ldl   #-Wl,--verbose
+
+OBJS         = pobyso/src/pobyso.o
+INCS         = pobyso/src/pobyso.h 
+SOURCES      = $(INCS) \
+               createObj-01.c \
+               taylorModel-01.c \
+               pobyso4/pobyso.c
+
+TEST_DRIVER  = # CUnit test driver binary program
+TEST_DIR     = test
+TEST_SOURCES = $(TEST_DIR)/$(TEST_DRIVER).c \
+               # Add the suites definition sources
+
+ALL_TARGETS = createObj-01 taylorModel-01
+
+SCRATCH_PRG := $(patsubst %.c,%,$(wildcard *.c))
+SCRATCH_ALL := $(SCRATCH_PRG)
+
+LAST_ARCH_FILE = lastArch.txt
+
+ARCH := $(shell uname -m)
+
+DUMMY := $(shell touch $(LAST_ARCH_FILE))
+
+LAST_ARCH := $(shell cat $(LAST_ARCH_FILE))
+
+ifneq ($(LAST_ARCH), $(ARCH))
+  DUMMY := $(shell echo $(ARCH) > $(LAST_ARCH_FILE))
+  DUMMY := $(shell $(MAKE) clean) 
+endif
+
+ifeq (x86_64, $(ARCH))
+  CFLAGS := -m64 $(CFLAGS)
+  # LDLIB :=
+endif
+
+ifeq (ppc64, $(ARCH))
+  CFLAGS := -m64 $(CFLAGS)
+  # LDLIB :=
+endif
+
+ifeq (i686, $(ARCH))
+  # CFLAGS := $(CFLAGS)
+  # LDLIB :=
+endif
+
+# -------------------------------------------------------------------------
+
+default: all
+# Remove all implicit (suffix) rules. No need to remove pattern rules.
+# Just redefine them.
+.SUFFIXES:
+# Keep the OBJS we want to link with user code.
+.PRECIOUS: $(OBJS)
+
+all: $(ALL_TARGETS)
+test: $(TEST_DRIVER)
+
+% : %.o $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $< $(OBJS) $(LDLIB)
+
+%.o : %.c $(INCS)
+	$(CC) $(CFLAGS) -c -o $@ $<
+
+$(TEST_DRIVER) : 
+	make -C test
+	cp test/$(TEST_DRIVER) .
+# -------------------------------------------------------------------------
+
+.PHONY: clean scratch
+
+clean:
+	@rm -f $(ALL_TARGETS) $(TEST_DRIVER)
+	@rm -f *.o a.out $(OBJS)
+	@rm -f *~ *% #*#
+	@make -C $(TEST_DIR) clean
+	@make -C pobyso clean
+
+scratch: clean
+	rm -f $(SCRATCH_ALL)
+
+# Change the documentation configuration and path accordingly.
+documentation: pobyso.doxyconf $(SOURCES)
+	doxygen pobyso.doxyconf

Property changes on: sollyaIntegration-4.0/src/Makefile
___________________________________________________________________
Added: svn:executable
   + *

Index: sollyaIntegration-4.0/src/createObj-01.c
===================================================================
--- sollyaIntegration-4.0/src/createObj-01.c	(revision 0)
+++ sollyaIntegration-4.0/src/createObj-01.c	(revision 34)
@@ -0,0 +1,176 @@
+/** @file createObj-01.c
+ * CreateObj-01: create a function for an expression given on the command line.
+ *
+ * @author S.T.
+ * @date 2012-11-21
+ *
+ */
+/******************************************************************************/
+/* Headers, applying the "particular to general" convention.*/
+
+#include "pobyso4/pobyso.h"
+
+/* includes of local headers */
+
+/* includes of project headers */
+
+/* includes of system headers */
+#include <gmp.h>
+#include <sollya.h>
+#include <setjmp.h>
+#include <string.h>
+/* Other declarations */
+
+/* Internal prototypes */
+
+/* Types, constants and macros definitions */
+#define NUM_ARGS 3
+#define VARIABLE_NAME_STRING "x"
+#define RADIX 10
+/* Global variables */
+
+/* Functions */
+int
+main(int argc, char** argv)
+{
+  //jmp_buf recover;
+  sollya_obj_t functionObj      = NULL;
+  sollya_obj_t curVerbLevel     = NULL;
+  char *freeVariableName        = NULL;
+  char *functionString          = NULL;
+  char *initialFreeVariableName = NULL;
+  char buffer[20];
+
+
+  /* check the command line arguments */
+  if (argc < NUM_ARGS)
+  {
+    fprintf(stderr,
+            "\n\nusage: %s expressionString freeVariableName\n\n",
+            argv[0]);
+    fprintf(stderr,
+            "\texpressionString: the expression to create a node from.\n");
+    fprintf(stderr,
+            "\t\tmust be in quotes (e. g. \"cos(x)\");\n");
+    fprintf(stderr,
+            "\tfreeVariableName: the name of the free variable;\n");
+    fprintf(stderr,
+            "\t\t(e. g. x (no quotes needed));\n");
+    fprintf(stderr,"\n\n");
+    return(1);
+  }
+
+  buffer[0] ='\0';
+
+  functionString    = argv[1];
+  freeVariableName  = argv[2];
+
+  /* Debug printing. */
+  fprintf(stdout,
+          "%s: function: %s\n", argv[0], functionString);
+  fprintf(stdout,
+          "%s: variable name: %s\n", argv[0], freeVariableName);
+  fprintf(stdout, "\n");
+  /* Initialize Sollya. */
+  sollya_lib_init();
+
+  initialFreeVariableName = sollya_lib_get_free_variable_name();
+  if (initialFreeVariableName == NULL)
+  {
+    fprintf(stderr, "%s: could not get the name of the free variable. Aborting!\n",
+                    argv[0]);
+    sollya_lib_close();
+    return(1);
+
+  }
+
+  fprintf(stderr, "%s: name of variable (before any assignment): %s\n",
+                  argv[0],
+                  initialFreeVariableName);
+
+  /* Set the free variable name. */
+  sollya_lib_name_free_variable(freeVariableName);
+  if (strcmp(sollya_lib_get_free_variable_name(), freeVariableName))
+  {
+    fprintf(stderr, "Could not set \"%s\" as the variable name. Aborting!\n",
+                      freeVariableName);
+    sollya_lib_close();
+    return(1);
+  }
+  /* Parse the function string. */
+  pobyso_set_verbosity_off(&curVerbLevel);
+  functionObj = pobyso_parse_string(functionString);
+  if (sollya_lib_obj_is_error(functionObj))
+  {
+    fprintf(stderr, "%s: could not parse \"%s\". Aborting!\n", argv[0], functionString);
+    sollya_lib_close();
+    return(1);
+  }
+  sollya_lib_fprintf(stdout, "%s: function: %b\n", argv[0], functionObj );
+  pobyso_autoprint(functionObj, NULL);
+  sollya_lib_clear_obj(functionObj);
+
+  if (sollya_lib_obj_is_function(curVerbLevel))
+  {
+    pobyso_autoprint(curVerbLevel, NULL);
+    fprintf(stdout, " is a function.\n");
+  }
+  pobyso_autoprint(curVerbLevel, NULL);
+  pobyso_set_verbosity_to(curVerbLevel);
+  sollya_lib_clear_obj(curVerbLevel);
+
+  strncat(buffer, functionString, strlen(functionString) - 1);
+  functionObj = pobyso_parse_string(buffer);
+  if (sollya_lib_obj_is_error(functionObj))
+  {
+    fprintf(stderr, "%s: could not parse \"%s\". Aborting!\n", argv[0], functionString);
+    sollya_lib_close();
+    return(1);
+  }
+  /* Attic from previous versions. */
+#if 0
+  fprintf(stderr, "Name of variable: %s\n", getNameOfVariable());
+  if (functionNode->nodeType == VARIABLE)
+  {
+    fprintf(stderr, "Node type is VARIABLE.\n");
+    if (getNameOfVariable != NULL)
+    {
+      if (strcmp(freeVariableName, getNameOfVariable()))
+      {
+        fprintf(stderr, "Could not parse %s. Aborting!\n", functionString);
+        finishTool();
+        return(1);
+      }
+    }
+  }
+
+  variableNode      = makeVariable();
+
+  powNode = makePow(variableNode, makeConstantDouble(3.0));
+  functionDiffNode  = differentiate(functionNode);
+  fprintf(stderr, "\tfunctionNode tree...\n");
+  fprintTree(stderr, functionNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end functionNode tree.\n");
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\tfunctionDiffNode tree...\n");
+  fprintTree(stderr,functionDiffNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end functionDiffNode tree.\n");
+  fprintf(stderr, "\n\tvariableNode tree...\n");
+  fprintTree(stderr, variableNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end variableNode tree.\n");
+  fprintf(stderr, "\n\tpowNode tree...\n");
+  fprintTree(stderr, powNode);
+  fprintf(stderr, "\n");
+  fprintf(stderr, "\t...end powNode tree.\n");
+
+  free_memory(variableNode);
+  free_memory(functionNode);
+  free_memory(functionDiffNode);
+#endif
+
+  sollya_lib_close();
+  return(0);
+} /* End main */

Property changes on: sollyaIntegration-4.0/src/createObj-01.c
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain


Property changes on: sollyaIntegration-4.0/src
___________________________________________________________________
Added: svn:ignore
   + lastArch.txt


