[1m[4m[31m1. The GAP InterFace to other Computer Algebra Systems (CAS)[0m Warning: this file is under contruction! You can find the documentation in the ../README file. [1m[4m[31m1.1 User's manual[0m [1m[4m[31m1.1-1 IF_Interface[0m [1m[34m> IF_Interface( [0m[22m[34mconventional_CAS_name, CAS_function_name, List_of_Gap_objects[0m[1m[34m ) [0mfunction See the ../README file for the list of interfaced CASes and the [22m[34mconventional_CAS_name[0m's. [22m[34mCAS_function_name[0m is the name of the function in the interfaced CAS, and is given as a string. [22m[34mList_of_Gap_objects[0m is a list of Gap objects, O_1, O_2, ..., O_n, that will be used as arguments of [22m[34mCAS_function_name[0m (it may be empty). [22m[34mIF_Interface[0m does the following: a. converts each object O_1, O_2, ..., O_n in [22m[34mList_of_Gap_objects[0m into the corresponding object P_1, P_2, ..., P_n, of the interfaced CAS; b. sends the command CAS_function_name ( P_1, P_2, ..., P_n ) to the interfaced CAS; c. gets the output from the interfaced CAS; d. converts it to the corresponding Gap object, and returns it to the user. With the code already implemented, the interface can perform, for instance, calculation like the following from within Gap, using the function primes, omega, and nextprime, of Pari/Gp. [22m[35m--------------------------- Example ----------------------------[0m [22m[35mIF_Interface( IF_pari_gp, "primes", [10] );[0m [22m[35mIF_Interface( IF_pari_gp, "omega", [360] );[0m [22m[35mIF_Interface( IF_pari_gp, "nextprime", [119] );[0m [22m[35m------------------------------------------------------------------[0m In the following example the greatest common divisor of 1000 and 360 is calculated using each CAS. [22m[35m--------------------------- Example ----------------------------[0m [22m[35mIF_Interface( IF_asir, "igcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_cocoa, "GCD", [1000, 360] );[0m [22m[35mIF_Interface( IF_kash, "IntGcd", [1000,360] );[0m [22m[35mIF_Interface( IF_singular, "gcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_plural, "gcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_pari_gp, "gcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_gap, "GcdInt", [1000, 360] );[0m [22m[35mIF_Interface( IF_aribas, "gcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_mupad, "gcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_maple, "gcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_macaulay, "gcd", [1000, 360] );[0m [22m[35mIF_Interface( IF_mathematica, "GCD", [1000, 360] );[0m [22m[35mIF_Interface( IF_yacas, "Gcd", [1000, 360] );[0m [22m[35m------------------------------------------------------------------[0m This second example shows that it is possible to interface many CASes in the same Gap session. [22m[35m--------------------------- Example ----------------------------[0m [22m[35mgap> IF_Interface(IF_mupad, "combinat::partitions::list", [4]);[0m [22m[35m [ [ 4 ], [ 3, 1 ], [ 2, 2 ], [ 2, 1, 1 ], [ 1, 1, 1, 1 ] ][0m [22m[35m[0m [22m[35mgap> IF_Interface(IF_mupad, "combinat::tableaux::list", [[4,2]]);[0m [22m[35m [ [ [ 5, 6 ], [ 1, 2, 3, 4 ] ], [ [ 4, 6 ], [ 1, 2, 3, 5 ] ],[0m [22m[35m [ [ 3, 6 ], [ 1, 2, 4, 5 ] ], [ [ 2, 6 ], [ 1, 3, 4, 5 ] ],[0m [22m[35m [ [ 4, 5 ], [ 1, 2, 3, 6 ] ], [ [ 3, 5 ], [ 1, 2, 4, 6 ] ],[0m [22m[35m [ [ 2, 5 ], [ 1, 3, 4, 6 ] ], [ [ 3, 4 ], [ 1, 2, 5, 6 ] ],[0m [22m[35m [ [ 2, 4 ], [ 1, 3, 5, 6 ] ] ][0m [22m[35m[0m [22m[35m------------------------------------------------------------------[0m [1m[4m[31m1.1-2 InfoInterfaces[0m [1m[34m> InfoInterfaces__________________________________________________[0minfo class The following command [22m[35m--------------------------- Example ----------------------------[0m [22m[35mgap> SetInfoLevel( InfoInterfaces, 3 );[0m [22m[35m------------------------------------------------------------------[0m tells to Gap to print the input and the output of the interfaced CAS; it may be useful for debugging purposes. This debugging information is suppressed by [22m[35m--------------------------- Example ----------------------------[0m [22m[35mgap> SetInfoLevel( InfoInterfaces, 0 );[0m [22m[35m------------------------------------------------------------------[0m