231{
233 {
234 const char *sys_cmd=(
char *)(args->
Data());
236
237
238
239 if (strcmp(sys_cmd, "nblocks") == 0)
240 {
241 ring r;
243 {
245 {
247 }
248 else
249 {
252 }
253 }
254 else
255 {
257 {
260 }
261 r = (ring)
h->Data();
262 }
266 }
267
268 if(strcmp(sys_cmd,"version")==0)
269 {
273 }
274 else
275
276 if(strcmp(sys_cmd,"alarm")==0)
277 {
279 {
280
281
282
283 struct itimerval t,o;
284 memset(&t,0,sizeof(t));
285 t.it_value.tv_sec =(unsigned)((
unsigned long)
h->Data());
286 setitimer(ITIMER_VIRTUAL,&t,&o);
288 }
289 else
291 }
292 else
293
294 if(strcmp(sys_cmd,"cpu")==0)
295 {
296 long cpu=1;
297 #ifdef _SC_NPROCESSORS_ONLN
298 cpu=sysconf(_SC_NPROCESSORS_ONLN);
299 #elif defined(_SC_NPROCESSORS_CONF)
300 cpu=sysconf(_SC_NPROCESSORS_CONF);
301 #endif
302 res->data=(
void *)cpu;
305 }
306 else
307
308 if(strcmp(sys_cmd,"executable")==0)
309 {
311 {
318 }
320 }
321 else
322
323 if(strcmp(sys_cmd,"flatten")==0)
324 {
326 {
330 }
331 else
333 }
334 else
335
336 if(strcmp(sys_cmd,"unflatten")==0)
337 {
340 {
344 }
346 }
347 else
348
349 if(strcmp(sys_cmd,"neworder")==0)
350 {
352 {
356 }
357 else
359 }
360 else
361
362
363 if(strcmp(sys_cmd,"nc_hilb") == 0)
364 {
369 int trunDegHs=0;
371 i = (ideal)
h->Data();
372 else
373 {
374 WerrorS(
"nc_Hilb:ideal expected");
376 }
379 lV = (int)(
long)
h->Data();
380 else
381 {
382 WerrorS(
"nc_Hilb:int expected");
384 }
387 {
388 if((
int)(
long)
h->Data() == 1)
390 else if((
int)(
long)
h->Data() == 2)
395 trunDegHs = (int)(
long)
h->Data();
397 }
399 {
400 WerrorS(
"nc_Hilb:int 1,2, total degree for the truncation, and a string for printing the details are expected");
402 }
403
406 }
407 else
408
409 if(strcmp(sys_cmd,"verifyGB")==0)
410 {
412 {
413 WerrorS(
"system(\"verifyGB\",<ideal>,..) expects a commutative ring");
415 }
417 {
418 WerrorS(
"expected system(\"verifyGB\",<ideal>,..)");
420 }
421 ideal F=(ideal)
h->Data();
422 #ifdef HAVE_VSPACE
424 if (cpus>1)
426 else
427 #endif
431 }
432 else
433
434 if(strcmp(sys_cmd,"rcolon") == 0)
435 {
438 {
439 ideal
i = (ideal)
h->Data();
441 poly
w=(poly)
h->Data();
443 int lV = (int)(
long)
h->Data();
447 }
448 else
450 }
451 else
452
453
454 if(strcmp(sys_cmd,"sh")==0)
455 {
457 {
458 WerrorS(
"shell execution is disallowed in restricted mode");
460 }
464 res->data = (
void*)(
long)
system((
char*)(
h->Data()));
465 else
468 }
469 else
470
471 if(strcmp(sys_cmd,"reduce_bound")==0)
472 {
480 {
481 p = (poly)
h->CopyD();
482 }
484 {
485 pid = (ideal)
h->CopyD();
486 }
488
490 ideal q = (ideal)
h->next->CopyD();
491 int bound = (int)(
long)
h->next->next->Data();
494 else
497 }
498 else
499
500 if(strcmp(sys_cmd,"uname")==0)
501 {
505 }
506 else
507
508 if(strcmp(sys_cmd,"with")==0)
509 {
511 {
515 }
517 {
518 #define TEST_FOR(A) if(strcmp(s,A)==0) res->data=(void *)1; else
519 char *
s=(
char *)
h->Data();
521 #ifdef HAVE_DBM
523 #endif
524 #ifdef HAVE_DLD
526 #endif
527
528
529 #ifdef HAVE_READLINE
531 #endif
532 #ifdef TEST_MAC_ORDER
534 #endif
535
537 #ifdef HAVE_DYNAMIC_LOADING
539 #endif
540 #ifdef HAVE_EIGENVAL
542 #endif
543 #ifdef HAVE_GMS
545 #endif
546 #ifdef OM_NDEBUG
548 #endif
549 #ifdef SING_NDEBUG
551 #endif
552 {};
554 #undef TEST_FOR
555 }
557 }
558 else
559
560 if (strcmp(sys_cmd,"browsers")==0)
561 {
567 }
568 else
569
570 if (strcmp(sys_cmd,"pid")==0)
571 {
573 res->data=(
void *)(
long) getpid();
575 }
576 else
577
578 if (strcmp(sys_cmd,"getenv")==0)
579 {
581 {
583 const char *r=
getenv((
char *)
h->Data());
587 }
588 else
589 {
592 }
593 }
594 else
595
596 if (strcmp(sys_cmd,"setenv")==0)
597 {
598 #ifdef HAVE_SETENV
601 {
603 setenv((
char *)
h->Data(), (
char *)
h->next->Data(), 1);
607 }
608 else
609 {
611 }
612 #else
613 WerrorS(
"setenv not supported on this platform");
615 #endif
616 }
617 else
618
619 if (strcmp(sys_cmd, "Singular") == 0)
620 {
626 }
627 else
628 if (strcmp(sys_cmd, "SingularLib") == 0)
629 {
635 }
636 else
637
638 if (strstr(sys_cmd, "--") == sys_cmd)
639 {
640 if (strcmp(sys_cmd, "--") == 0)
641 {
644 }
647 {
648 Werror(
"Unknown option %s", sys_cmd);
649 WerrorS(
"Use 'system(\"--\");' for listing of available options");
651 }
652
653
655 {
658 }
660 {
662 {
664 const char *r=(
const char*)
feOptSpec[opt].value;
667 }
668 else
669 {
672 }
674 }
677 {
678 WerrorS(
"Need string or int argument to set option value");
680 }
681 const char* errormsg;
683 {
685 {
686 Werror(
"Need string argument to set value of option %s", sys_cmd);
688 }
690 if (errormsg !=
NULL)
691 Werror(
"Option '--%s=%d' %s", sys_cmd, (
int) ((
long)
h->Data()), errormsg);
692 }
693 else
694 {
696 if (errormsg !=
NULL)
697 Werror(
"Option '--%s=%s' %s", sys_cmd, (
char*)
h->Data(), errormsg);
698 }
701 }
702 else
703
704 if (strcmp(sys_cmd,"HC")==0)
705 {
709 }
710 else
711
712 if(strcmp(sys_cmd,"random")==0)
713 {
716 {
718 {
723 }
724 else
725 {
727 }
728 }
732 }
733 else
734
735 if (strcmp(sys_cmd,"denom_list")==0)
736 {
741 }
742 else
743
744 if(strcmp(sys_cmd,"complexNearZero")==0)
745 {
748 {
750 {
751 WerrorS(
"unsupported ground field!");
753 }
754 else
755 {
758 (int)((
long)(
h->next->Data())));
760 }
761 }
762 else
763 {
765 }
766 }
767 else
768
769 if(strcmp(sys_cmd,"getPrecDigits")==0)
770 {
773 {
774 WerrorS(
"unsupported ground field!");
776 }
779
780
782 }
783 else
784
785 if(strcmp(sys_cmd, "lduDecomp")==0)
786 {
789 {
792 poly
l; poly u; poly prodLU;
793 lduDecomp(aMat, pMat, lMat, dMat, uMat,
l, u, prodLU);
804 res->data = (
char *)L;
806 }
807 else
808 {
810 }
811 }
812 else
813
814 if(strcmp(sys_cmd, "lduSolve")==0)
815 {
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
836 {
838 }
840 {
843 }
848 poly
l = (poly)
h->next->next->next->next->Data();
849 poly u = (poly)
h->next->next->next->next->next->Data();
850 poly lTimesU = (poly)
h->next->next->next->next->next->next->Data();
851 matrix bVec = (
matrix)
h->next->next->next->next->next->next->next->Data();
854 {
855 Werror(
"first matrix (%d x %d) is not quadratic",
858 }
860 {
861 Werror(
"second matrix (%d x %d) is not quadratic",
864 }
866 {
867 Werror(
"third matrix (%d x %d) is not quadratic",
870 }
872 {
873 Werror(
"third matrix (%d x %d) and fourth matrix (%d x %d) %s",
875 "do not t");
877 }
879 {
880 Werror(
"fourth matrix (%d x %d) and vector (%d x 1) do not fit",
883 }
885 bVec, xVec, homogSolSpace);
886
887
888
890 if (solvable)
891 {
896 }
897 else
898 {
901 }
905 }
906 else
907
908 if (strcmp(sys_cmd, "shared") == 0)
909 {
910 #ifndef SI_COUNTEDREF_AUTOLOAD
913 #endif
916 }
917 else if (strcmp(sys_cmd, "reference") == 0)
918 {
919 #ifndef SI_COUNTEDREF_AUTOLOAD
922 #endif
925 }
926 else
927
928#ifdef HAVE_SIMPLEIPC
929 if (strcmp(sys_cmd,"semaphore")==0)
930 {
932 {
935 v=(int)(
long)
h->next->next->Data();
939 }
940 else
941 {
942 WerrorS(
"Usage: system(\"semaphore\",<cmd>,int)");
944 }
945 }
946 else
947#endif
948
949 if (strcmp(sys_cmd,"reserve")==0)
950 {
954 {
957 res->data=(
void*)(
long)
p;
959 }
961 }
962 else
963
964 if (strcmp(sys_cmd,"reservedLink")==0)
965 {
970 }
971 else
972
973 if (strcmp(sys_cmd,"install")==0)
974 {
977 {
979 (
int)(
long)
h->next->next->next->Data(),
981 }
983 }
984 else
985
986 if (strcmp(sys_cmd,"newstruct")==0)
987 {
990 {
991 int id=0;
992 char *n=(
char*)
h->Data();
994 if (id>0)
995 {
998 {
999 newstruct_desc desc=(newstruct_desc)bb->data;
1002 }
1003 else Werror(
"'%s' is not a newstruct",n);
1004 }
1005 else Werror(
"'%s' is not a blackbox object",n);
1006 }
1008 }
1009 else
1010
1011 if (strcmp(sys_cmd,"blackbox")==0)
1012 {
1015 }
1016 else
1017
1018 #if defined(HAVE_FLINT) || defined(HAVE_NTL)
1019 if (strcmp(sys_cmd, "absFact") == 0)
1020 {
1025 {
1029 int n= 0;
1036 l->m[0].data=(
void *)
f;
1038 l->m[1].data=(
void *)
v;
1040 l->m[2].data=(
void*) mipos;
1042 l->m[3].data=(
void*) (
long) n;
1043 res->data=(
void *)
l;
1045 }
1047 }
1048 else
1049 #endif
1050
1051 #ifdef HAVE_NTL
1052 if (strcmp(sys_cmd, "LLL") == 0)
1053 {
1055 {
1058 {
1061 }
1063 {
1066 }
1068 }
1070 }
1071 else
1072 #endif
1073
1074 #ifdef HAVE_FLINT
1075 #if __FLINT_RELEASE >= 20500
1076 if (strcmp(sys_cmd, "LLL_Flint") == 0)
1077 {
1079 {
1081 {
1084 {
1087 }
1089 {
1092 }
1094 }
1096 {
1097 WerrorS(
"matrix,int or bigint,int expected");
1099 }
1101 {
1102 if(((
int)((
long)(
h->next->Data())) != 0) && (
int)((
long)(
h->next->Data()) != 1))
1103 {
1104 WerrorS(
"int is different from 0, 1");
1106 }
1108 if((
long)(
h->next->Data()) == 0)
1109 {
1111 {
1114 }
1116 {
1119 }
1121 }
1122
1123 if((
long)(
h->next->Data()) == 1)
1124 {
1126 {
1129 for(
int i = 1;
i<=
m->rows();
i++)
1130 {
1133 }
1142 }
1144 {
1147 for(
int i = 1;
i<=
m->rows();
i++)
1157 }
1159 }
1160 }
1161
1162 }
1164 }
1165 else
1166 #endif
1167 #endif
1168
1169 #ifdef HAVE_PCV
1170 if(strcmp(sys_cmd,"pcvLAddL")==0)
1171 {
1173 }
1174 else
1175 if(strcmp(sys_cmd,"pcvPMulL")==0)
1176 {
1178 }
1179 else
1180 if(strcmp(sys_cmd,"pcvMinDeg")==0)
1181 {
1183 }
1184 else
1185 if(strcmp(sys_cmd,"pcvP2CV")==0)
1186 {
1188 }
1189 else
1190 if(strcmp(sys_cmd,"pcvCV2P")==0)
1191 {
1193 }
1194 else
1195 if(strcmp(sys_cmd,"pcvDim")==0)
1196 {
1198 }
1199 else
1200 if(strcmp(sys_cmd,"pcvBasis")==0)
1201 {
1203 }
1204 else
1205 #endif
1206
1207 #ifdef HAVE_EIGENVAL
1208 if(strcmp(sys_cmd,"hessenberg")==0)
1209 {
1211 }
1212 else
1213 #endif
1214
1215 #ifdef HAVE_EIGENVAL
1216 if(strcmp(sys_cmd,"eigenvals")==0)
1217 {
1219 }
1220 else
1221 #endif
1222
1223 #ifdef HAVE_EIGENVAL
1224 if(strcmp(sys_cmd,"rowelim")==0)
1225 {
1227 }
1228 else
1229 #endif
1230
1231 #ifdef HAVE_EIGENVAL
1232 if(strcmp(sys_cmd,"rowcolswap")==0)
1233 {
1235 }
1236 else
1237 #endif
1238
1239 #ifdef HAVE_GMS
1240 if(strcmp(sys_cmd,"gmsnf")==0)
1241 {
1243 }
1244 else
1245 #endif
1246
1247 if(strcmp(sys_cmd,"contributors") == 0)
1248 {
1251 "Olaf Bachmann, Michael Brickenstein, Hubert Grassmann, Kai Krueger, Victor Levandovskyy, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Mathias Schulze, Thomas Siebert, Ruediger Stobbe, Moritz Wenk, Tim Wichmann");
1253 }
1254 else
1255
1256 #ifdef HAVE_SPECTRUM
1257 if(strcmp(sys_cmd,"spectrum") == 0)
1258 {
1260 {
1263 }
1267 {
1270 }
1271 if(((
long)
h->next->Data())==1L)
1274 }
1275 else
1276
1277 if(strcmp(sys_cmd,"semic") == 0)
1278 {
1282 {
1283 if (
h->next->next==
NULL)
1285 else if (
h->next->next->Typ()==
INT_CMD)
1287 }
1289 }
1290 else
1291
1292 if(strcmp(sys_cmd,"spadd") == 0)
1293 {
1296 {
1298 }
1300 }
1301 else
1302
1303 if(strcmp(sys_cmd,"spmul") == 0)
1304 {
1307 {
1309 }
1311 }
1312 else
1313 #endif
1314
1315 #define HAVE_SHEAFCOH_TRICKS 1
1316
1317 #ifdef HAVE_SHEAFCOH_TRICKS
1318 if(strcmp(sys_cmd,"tensorModuleMult")==0)
1319 {
1321
1323 {
1324 int m = (int)( (
long)
h->Data() );
1325 ideal
M = (ideal)
h->next->Data();
1329 }
1331 }
1332 else
1333 #endif
1334
1335 #ifdef HAVE_PLURAL
1336 if (strcmp(sys_cmd, "twostd") == 0)
1337 {
1338 ideal I;
1340 {
1341 I=(ideal)
h->CopyD();
1347 }
1350 }
1351 else
1352 #endif
1353
1354 #ifdef HAVE_PLURAL
1355 if (strcmp(sys_cmd, "bracket") == 0)
1356 {
1359 {
1360 poly
p=(poly)
h->CopyD();
1362 poly q=(poly)
h->Data();
1366 }
1368 }
1369 else
1370 #endif
1371
1372 #ifdef HAVE_PLURAL
1373 if (strcmp(sys_cmd, "env")==0)
1374 {
1376 {
1377 ring r = (ring)
h->Data();
1381 }
1382 else
1383 {
1384 WerrorS(
"`system(\"env\",<ring>)` expected");
1386 }
1387 }
1388 else
1389 #endif
1390
1391 #ifdef HAVE_PLURAL
1392 if (strcmp(sys_cmd, "opp")==0)
1393 {
1395 {
1396 ring r=(ring)
h->Data();
1400 }
1401 else
1402 {
1403 WerrorS(
"`system(\"opp\",<ring>)` expected");
1405 }
1406 }
1407 else
1408 #endif
1409
1410 #ifdef HAVE_PLURAL
1411 if (strcmp(sys_cmd, "oppose")==0)
1412 {
1414 && (
h->next!=
NULL))
1415 {
1416 ring Rop = (ring)
h->Data();
1420 {
1425 }
1426 }
1427 else
1428 {
1429 WerrorS(
"`system(\"oppose\",<ring>,<poly>)` expected");
1431 }
1432 }
1433 else
1434 #endif
1435
1436
1437 #ifdef HAVE_WALK
1438 #ifdef OWNW
1439 if (strcmp(sys_cmd, "walkNextWeight") == 0)
1440 {
1445 {
1446 Werror(
"system(\"walkNextWeight\" ...) intvecs not of length %d\n",
1449 }
1450 res->data = (
void*) walkNextWeight(((
intvec*)
h->Data()),
1452 (ideal)
h->next->next->Data());
1453 if (
res->data ==
NULL ||
res->data == (
void*) 1L)
1454 {
1456 }
1457 else
1458 {
1460 }
1462 }
1463 else
1464 #endif
1465 #endif
1466
1467 #ifdef HAVE_WALK
1468 #ifdef OWNW
1469 if (strcmp(sys_cmd, "walkInitials") == 0)
1470 {
1472 {
1473 WerrorS(
"system(\"walkInitials\", ideal) expected");
1475 }
1476 res->data = (
void*) walkInitials((ideal)
h->Data());
1479 }
1480 else
1481 #endif
1482 #endif
1483
1484 #ifdef HAVE_WALK
1485 #ifdef WAIV
1486 if (strcmp(sys_cmd, "walkAddIntVec") == 0)
1487 {
1492 res->data = (
intvec*) walkAddIntVec(arg1, arg2);
1495 }
1496 else
1497 #endif
1498 #endif
1499
1500 #ifdef HAVE_WALK
1501 #ifdef MwaklNextWeight
1502 if (strcmp(sys_cmd, "MwalkNextWeight") == 0)
1503 {
1508 {
1509 Werror(
"system(\"MwalkNextWeight\" ...) intvecs not of length %d\n",
1512 }
1515 ideal arg3 = (ideal)
h->next->next->Data();
1520 }
1521 else
1522 #endif
1523 #endif
1524
1525 #ifdef HAVE_WALK
1526 if(strcmp(sys_cmd, "Mivdp") == 0)
1527 {
1529 {
1530 WerrorS(
"system(\"Mivdp\", int) expected");
1532 }
1533 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1534 {
1535 Werror(
"system(\"Mivdp\" ...) intvecs not of length %d\n",
1538 }
1539 int arg1 = (int) ((
long)(
h->Data()));
1544 }
1545 else
1546 #endif
1547
1548 #ifdef HAVE_WALK
1549 if(strcmp(sys_cmd, "Mivlp") == 0)
1550 {
1552 {
1553 WerrorS(
"system(\"Mivlp\", int) expected");
1555 }
1556 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1557 {
1558 Werror(
"system(\"Mivlp\" ...) intvecs not of length %d\n",
1561 }
1562 int arg1 = (int) ((
long)(
h->Data()));
1567 }
1568 else
1569 #endif
1570
1571 #ifdef HAVE_WALK
1572 #ifdef MpDiv
1573 if(strcmp(sys_cmd, "MpDiv") == 0)
1574 {
1577 poly arg1 = (poly)
h->Data();
1578 poly arg2 = (poly)
h->next->Data();
1579 poly
result = MpDiv(arg1, arg2);
1583 }
1584 else
1585 #endif
1586 #endif
1587
1588 #ifdef HAVE_WALK
1589 #ifdef MpMult
1590 if(strcmp(sys_cmd, "MpMult") == 0)
1591 {
1594 poly arg1 = (poly)
h->Data();
1595 poly arg2 = (poly)
h->next->Data();
1596 poly
result = MpMult(arg1, arg2);
1600 }
1601 else
1602 #endif
1603 #endif
1604
1605 #ifdef HAVE_WALK
1606 if (strcmp(sys_cmd, "MivSame") == 0)
1607 {
1610
1611
1612
1613
1614
1615
1616
1617
1618
1621
1622
1623
1624
1625
1627 res->data = (
void*)(
long)
MivSame(arg1, arg2);
1629 }
1630 else
1631 #endif
1632
1633 #ifdef HAVE_WALK
1634 if (strcmp(sys_cmd, "M3ivSame") == 0)
1635 {
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1651
1652
1653
1654
1655
1657 res->data = (
void*)(
long)
M3ivSame(arg1, arg2, arg3);
1659 }
1660 else
1661 #endif
1662
1663 #ifdef HAVE_WALK
1664 if(strcmp(sys_cmd, "MwalkInitialForm") == 0)
1665 {
1669 {
1670 Werror(
"system \"MwalkInitialForm\"...) intvec not of length %d\n",
1673 }
1674 ideal
id = (ideal)
h->Data();
1680 }
1681 else
1682 #endif
1683
1684 #ifdef HAVE_WALK
1685
1686 if(strcmp(sys_cmd, "MivMatrixOrder") == 0)
1687 {
1689 {
1690 WerrorS(
"system(\"MivMatrixOrder\",intvec) expected");
1692 }
1698 }
1699 else
1700 #endif
1701
1702 #ifdef HAVE_WALK
1703 if(strcmp(sys_cmd, "MivMatrixOrderdp") == 0)
1704 {
1706 {
1707 WerrorS(
"system(\"MivMatrixOrderdp\",intvec) expected");
1709 }
1710 int arg1 = (int) ((
long)(
h->Data()));
1715 }
1716 else
1717 #endif
1718
1719 #ifdef HAVE_WALK
1720 if(strcmp(sys_cmd, "MPertVectors") == 0)
1721 {
1724 ideal arg1 = (ideal)
h->Data();
1726 int arg3 = (int) ((
long)(
h->next->next->Data()));
1731 }
1732 else
1733 #endif
1734
1735 #ifdef HAVE_WALK
1736 if(strcmp(sys_cmd, "MPertVectorslp") == 0)
1737 {
1740 ideal arg1 = (ideal)
h->Data();
1742 int arg3 = (int) ((
long)(
h->next->next->Data()));
1747 }
1748 else
1749 #endif
1750
1751 #ifdef HAVE_WALK
1752 if(strcmp(sys_cmd, "Mfpertvector") == 0)
1753 {
1756 ideal arg1 = (ideal)
h->Data();
1762 }
1763 else
1764 #endif
1765
1766 #ifdef HAVE_WALK
1767 if(strcmp(sys_cmd, "MivUnit") == 0)
1768 {
1771 int arg1 = (int) ((
long)(
h->Data()));
1776 }
1777 else
1778 #endif
1779
1780 #ifdef HAVE_WALK
1781 if(strcmp(sys_cmd, "MivWeightOrderlp") == 0)
1782 {
1790 }
1791 else
1792 #endif
1793
1794 #ifdef HAVE_WALK
1795 if(strcmp(sys_cmd, "MivWeightOrderdp") == 0)
1796 {
1798 {
1799 WerrorS(
"system(\"MivWeightOrderdp\",intvec) expected");
1801 }
1803
1808 }
1809 else
1810 #endif
1811
1812 #ifdef HAVE_WALK
1813 if(strcmp(sys_cmd, "MivMatrixOrderlp") == 0)
1814 {
1816 {
1817 WerrorS(
"system(\"MivMatrixOrderlp\",int) expected");
1819 }
1820 int arg1 = (int) ((
long)(
h->Data()));
1825 }
1826 else
1827 #endif
1828
1829 #ifdef HAVE_WALK
1830 if (strcmp(sys_cmd, "MkInterRedNextWeight") == 0)
1831 {
1836 {
1837 Werror(
"system(\"MkInterRedNextWeight\" ...) intvecs not of length %d\n",
1840 }
1843 ideal arg3 = (ideal)
h->next->next->Data();
1848 }
1849 else
1850 #endif
1851
1852 #ifdef HAVE_WALK
1853 #ifdef MPertNextWeight
1854 if (strcmp(sys_cmd, "MPertNextWeight") == 0)
1855 {
1859 {
1860 Werror(
"system(\"MPertNextWeight\" ...) intvecs not of length %d\n",
1863 }
1865 ideal arg2 = (ideal)
h->next->Data();
1866 int arg3 = (int)
h->next->next->Data();
1871 }
1872 else
1873 #endif
1874 #endif
1875
1876 #ifdef HAVE_WALK
1877 #ifdef Mivperttarget
1878 if (strcmp(sys_cmd, "Mivperttarget") == 0)
1879 {
1882 ideal arg1 = (ideal)
h->Data();
1883 int arg2 = (int)
h->next->Data();
1888 }
1889 else
1890 #endif
1891 #endif
1892
1893 #ifdef HAVE_WALK
1894 if (strcmp(sys_cmd, "Mwalk") == 0)
1895 {
1900 {
1901 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d\n",
1904 }
1905 ideal arg1 = (ideal)
h->CopyD();
1908 ring arg4 = (ring)
h->next->next->next->Data();
1909 int arg5 = (int) (
long)
h->next->next->next->next->Data();
1910 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
1911 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3, arg4, arg5, arg6);
1915 }
1916 else
1917 #endif
1918
1919 #ifdef HAVE_WALK
1920 #ifdef MPWALK_ORIG
1921 if (strcmp(sys_cmd, "Mwalk") == 0)
1922 {
1929 {
1930 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d or %d\n",
1933 }
1934 ideal arg1 = (ideal)
h->Data();
1937 ring arg4 = (ring)
h->next->next->next->Data();
1938 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3,arg4);
1942 }
1943 else
1944 #else
1945 if (strcmp(sys_cmd, "Mpwalk") == 0)
1946 {
1951 {
1952 Werror(
"system(\"Mpwalk\" ...) intvecs not of length %d\n",
currRing->N);
1954 }
1955 ideal arg1 = (ideal)
h->Data();
1956 int arg2 = (int) (
long)
h->next->Data();
1957 int arg3 = (int) (
long)
h->next->next->Data();
1960 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
1961 int arg7 = (int) (
long)
h->next->next->next->next->next->next->Data();
1962 int arg8 = (int) (
long)
h->next->next->next->next->next->next->next->Data();
1963 ideal
result = (ideal)
Mpwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1967 }
1968 else
1969 #endif
1970 #endif
1971
1972 #ifdef HAVE_WALK
1973 if (strcmp(sys_cmd, "Mrwalk") == 0)
1974 {
1981 {
1982 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
1985 }
1986 ideal arg1 = (ideal)
h->Data();
1989 int arg4 = (int)(
long)
h->next->next->next->Data();
1990 int arg5 = (int)(
long)
h->next->next->next->next->Data();
1991 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
1992 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
1993 ideal
result = (ideal)
Mrwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1997 }
1998 else
1999 #endif
2000
2001 #ifdef HAVE_WALK
2002 if (strcmp(sys_cmd, "MAltwalk1") == 0)
2003 {
2008 {
2009 Werror(
"system(\"MAltwalk1\" ...) intvecs not of length %d\n",
2012 }
2013 ideal arg1 = (ideal)
h->Data();
2014 int arg2 = (int) ((
long)(
h->next->Data()));
2015 int arg3 = (int) ((
long)(
h->next->next->Data()));
2022 }
2023 else
2024 #endif
2025
2026 #ifdef HAVE_WALK
2027 #ifdef MFWALK_ALT
2028 if (strcmp(sys_cmd, "Mfwalk_alt") == 0)
2029 {
2034 {
2035 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2038 }
2039 ideal arg1 = (ideal)
h->Data();
2042 int arg4 = (int)
h->next->next->next->Data();
2043 ideal
result = (ideal) Mfwalk_alt(arg1, arg2, arg3, arg4);
2047 }
2048 else
2049 #endif
2050 #endif
2051
2052 #ifdef HAVE_WALK
2053 if (strcmp(sys_cmd, "Mfwalk") == 0)
2054 {
2059 {
2060 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2063 }
2064 ideal arg1 = (ideal)
h->Data();
2067 int arg4 = (int)(
long)
h->next->next->next->Data();
2068 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2069 ideal
result = (ideal)
Mfwalk(arg1, arg2, arg3, arg4, arg5);
2073 }
2074 else
2075 #endif
2076
2077 #ifdef HAVE_WALK
2078 if (strcmp(sys_cmd, "Mfrwalk") == 0)
2079 {
2082
2083
2084
2085
2086
2087
2088
2089
2094 {
2095 Werror(
"system(\"Mfrwalk\" ...) intvecs not of length %d or %d\n",
2098 }
2099
2100 ideal arg1 = (ideal)
h->Data();
2103 int arg4 = (int)(
long)
h->next->next->next->Data();
2104 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2105 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2106 ideal
result = (ideal)
Mfrwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2110 }
2111 else
2112
2113 if (strcmp(sys_cmd, "Mprwalk") == 0)
2114 {
2121 {
2122 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
2125 }
2126 ideal arg1 = (ideal)
h->Data();
2129 int arg4 = (int)(
long)
h->next->next->next->Data();
2130 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2131 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2132 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
2133 int arg8 = (int)(
long)
h->next->next->next->next->next->next->next->Data();
2134 int arg9 = (int)(
long)
h->next->next->next->next->next->next->next->next->Data();
2135 ideal
result = (ideal)
Mprwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
2139 }
2140 else
2141 #endif
2142
2143 #ifdef HAVE_WALK
2144 #ifdef TRAN_Orig
2145 if (strcmp(sys_cmd, "TranMImprovwalk") == 0)
2146 {
2151 {
2152 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2155 }
2156 ideal arg1 = (ideal)
h->Data();
2163 }
2164 else
2165 #endif
2166 #endif
2167
2168 #ifdef HAVE_WALK
2169 if (strcmp(sys_cmd, "MAltwalk2") == 0)
2170 {
2175 {
2176 Werror(
"system(\"MAltwalk2\" ...) intvecs not of length %d\n",
2179 }
2180 ideal arg1 = (ideal)
h->Data();
2187 }
2188 else
2189 #endif
2190
2191 #ifdef HAVE_WALK
2192 if (strcmp(sys_cmd, "TranMImprovwalk") == 0)
2193 {
2198 {
2199 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2202 }
2203 ideal arg1 = (ideal)
h->Data();
2206 int arg4 = (int) ((
long)(
h->next->next->next->Data()));
2211 }
2212 else
2213 #endif
2214
2215 #if 0
2216 #ifdef HAVE_WALK
2217 if (strcmp(sys_cmd, "TranMrImprovwalk") == 0)
2218 {
2222 h->next->next->next ==
NULL ||
h->next->next->next->Typ() !=
INT_CMD ||
2223 h->next->next->next ==
NULL ||
h->next->next->next->next->Typ() !=
INT_CMD ||
2224 h->next->next->next ==
NULL ||
h->next->next->next->next->next->Typ() !=
INT_CMD)
2225 {
2226 WerrorS(
"system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected");
2228 }
2231 {
2232 Werror(
"system(\"TranMrImprovwalk\" ...) intvecs not of length %d\n",
currRing->N);
2234 }
2235 ideal arg1 = (ideal)
h->Data();
2238 int arg4 = (int)(
long)
h->next->next->next->Data();
2239 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2240 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2241 ideal
result = (ideal) TranMrImprovwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2245 }
2246 else
2247 #endif
2248 #endif
2249
2250 {
2251 #ifndef MAKE_DISTRIBUTION
2253 #else
2255 #endif
2256 }
2257 }
2259}
#define BIMATELEM(M, I, J)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
void printBlackboxTypes()
list all defined type (for debugging)
static CanonicalForm bound(const CFMatrix &M)
void factoryseed(int s)
random seed initializer
matrix singntl_LLL(matrix m, const ring s)
ideal singclap_absFactorize(poly f, ideal &mipos, intvec **exps, int &numFactors, const ring r)
char * singclap_neworder(ideal I, const ring r)
gmp_complex numbers based on
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
void countedref_reference_load()
Initialize blackbox types 'reference' and 'shared', or both.
void countedref_shared_load()
matrix evRowElim(matrix M, int i, int j, int k)
matrix evHessenberg(matrix M)
matrix evSwap(matrix M, int i, int j)
lists evEigenvals(matrix M)
feOptIndex feGetOptIndex(const char *name)
const char * feSetOptValue(feOptIndex opt, char *optarg)
EXTERN_VAR struct fe_option feOptSpec[]
static char * feResource(feResourceConfig config, int warn)
void feStringAppendBrowsers(int warn)
bigintmat * singflint_LLL(bigintmat *A, bigintmat *T)
lists gmsNF(ideal p, ideal g, matrix B, int D, int K)
void HilbertSeries_OrbitData(ideal S, int lV, bool IG_CASE, bool mgrad, bool odp, int trunDegHs)
ideal RightColonOperation(ideal S, poly w, int lV)
ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing)
static BOOLEAN length(leftv result, leftv arg)
#define IMATELEM(M, I, J)
BOOLEAN spaddProc(leftv result, leftv first, leftv second)
BOOLEAN semicProc3(leftv res, leftv u, leftv v, leftv w)
BOOLEAN spectrumfProc(leftv result, leftv first)
BOOLEAN spmulProc(leftv result, leftv first, leftv second)
BOOLEAN spectrumProc(leftv result, leftv first)
BOOLEAN semicProc(leftv res, leftv u, leftv v)
poly kNFBound(ideal F, ideal Q, poly p, int bound, int syzComp, int lazyReduce)
BOOLEAN kVerify2(ideal F, ideal Q)
BOOLEAN kVerify1(ideal F, ideal Q)
poly pOppose(ring Rop_src, poly p, const ring Rop_dst)
opposes a vector p from Rop to currRing (dst!)
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
bool luSolveViaLDUDecomp(const matrix pMat, const matrix lMat, const matrix dMat, const matrix uMat, const poly l, const poly u, const poly lTimesU, const matrix bVec, matrix &xVec, matrix &H)
Solves the linear system A * x = b, where A is an (m x n)-matrix which is given by its LDU-decomposit...
void lduDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &dMat, matrix &uMat, poly &l, poly &u, poly &lTimesU)
LU-decomposition of a given (m x n)-matrix with performing only those divisions that yield zero remai...
ideal sm_UnFlatten(ideal a, int col, const ring R)
ideal sm_Flatten(ideal a, const ring R)
EXTERN_VAR size_t gmp_output_digits
bool complexNearZero(gmp_complex *c, int digits)
ideal twostd(ideal I)
Compute two-sided GB:
void newstructShow(newstruct_desc d)
BOOLEAN newstruct_set_proc(const char *bbname, const char *func, int args, procinfov pr)
char * omFindExec(const char *name, char *exec)
poly pcvP2CV(poly p, int d0, int d1)
int pcvBasis(lists b, int i, poly m, int d, int n)
int pcvDim(int d0, int d1)
lists pcvPMulL(poly p, lists l1)
poly pcvCV2P(poly cv, int d0, int d1)
lists pcvLAddL(lists l1, lists l2)
void StringSetS(const char *st)
static BOOLEAN rField_is_Ring(const ring r)
static int rBlocks(ring r)
static BOOLEAN rField_is_long_C(const ring r)
static BOOLEAN rIsNCRing(const ring r)
int simpleipc_cmd(char *cmd, int id, int v)
int ssiReservePort(int clients)
int M3ivSame(intvec *temp, intvec *u, intvec *v)
intvec * MivWeightOrderdp(intvec *ivstart)
ideal TranMImprovwalk(ideal G, intvec *curr_weight, intvec *target_tmp, int nP)
intvec * MivMatrixOrderdp(int nV)
ideal Mfwalk(ideal G, intvec *ivstart, intvec *ivtarget, int reduction, int printout)
intvec * MPertVectors(ideal G, intvec *ivtarget, int pdeg)
intvec * MivWeightOrderlp(intvec *ivstart)
ideal Mprwalk(ideal Go, intvec *orig_M, intvec *target_M, int weight_rad, int op_deg, int tp_deg, int nP, int reduction, int printout)
intvec * MivMatrixOrder(intvec *iv)
ideal MAltwalk2(ideal Go, intvec *curr_weight, intvec *target_weight)
ideal MAltwalk1(ideal Go, int op_deg, int tp_deg, intvec *curr_weight, intvec *target_weight)
ideal Mrwalk(ideal Go, intvec *orig_M, intvec *target_M, int weight_rad, int pert_deg, int reduction, int printout)
ideal Mfrwalk(ideal G, intvec *ivstart, intvec *ivtarget, int weight_rad, int reduction, int printout)
ideal Mwalk(ideal Go, intvec *orig_M, intvec *target_M, ring baseRing, int reduction, int printout)
ideal Mpwalk(ideal Go, int op_deg, int tp_deg, intvec *curr_weight, intvec *target_weight, int nP, int reduction, int printout)
int MivSame(intvec *u, intvec *v)
ideal MwalkInitialForm(ideal G, intvec *ivw)
intvec * MivMatrixOrderlp(int nV)
intvec * Mfpertvector(ideal G, intvec *ivtarget)
intvec * MPertVectorslp(ideal G, intvec *ivtarget, int pdeg)
intvec * MkInterRedNextWeight(intvec *iva, intvec *ivb, ideal G)
intvec * MwalkNextWeight(intvec *curr_weight, intvec *target_weight, ideal G)
intvec * Mivperttarget(ideal G, int ndeg)
intvec * MPertNextWeight(intvec *iva, ideal G, int deg)