Ticket #60: Bugs.txt

File Bugs.txt, 2.8 KB (added by Oleksandr , 15 years ago)

some old text describing my findings, sorry if it's not clearly readable

Line 
1/**
2 * make install -> MOD/mydemo.*
3 * Usage of mydemo in Singular:
4 *  load("mydemo.so"); or LIB("mydemo.so")// Loades the module "mydemo.so" from 'MOD/' into namespace 'Mydemo'
5 *  or LIB"mydemo.so"; // does the same, but emits a 'deprecated library format' message
6 *
7 *  listvar(Mydemo); // shows all symbols in Mydemo: variables: info, version, category, procedures and ?examples?.
8 *
9 *  help Mydemo; // shows info about mydemo (content of string variable Mydemo::info).
10 *
11 *  Mydemo::proclist(); // calls procedure 'proclist' from 'Mydemo'
12 *
13 * ??????????????????????????????????????????????????????????????????????????????????
14 *
15 *  BUG0: empty '%Singular'/'%procedures' section causes a syntax error for modgen when it comes to next '%' section.
16 *  BUG1: 'info' and 'example' strings come into 'mydemo.cc' as is, that is without ending '\n\'.
17 *  BUG2: no Singular procedure 'Mydemo::testa'!!!
18 *
19 *  BUG3,4: HOW TO GET HELP OR EXAMPLE FOR A C/Singular PROCEDURE?
20 * 
21 *  for example the following commands work:
22 *    execute(Mydemo::proclist_example);
23 *    Mydemo::testa_help;               
24 *
25 *  while the following ('standard') don't:
26 *    example Mydemo::proclist;
27 *    help Mydemo::testa;
28 *
29 * ??????????????????????????????????????????????????????????????????????????????????
30 *
31 BUG5 in modgen generator: "double quotions in help and example strings are not supported!?!????"
32
33proc DoubleQuotiontsInHelpAndExample()
34" keine \"Hilfe\" :(((( " // '\"' are not currently allowed here!
35{
36  "helpme";
37  Mydemo::_helpme();
38 
39}
40example
41{
42  "EXAMPLE: "; echo = 2; // '"' are not currently allowed here!
43  Mydemo::helpme();
44}
45
46 BUG6 in modgen scanner: "parameters of type ring are not supported!?!????"
47
48none testRingParameter(ring r) // this line gives "error: parse error at end of file"
49{
50  %declaration;
51  %typecheck;
52  %return();
53}
54
55
56
57 BUG7 in modgen generator: "returning a variable is wrongly generated!"
58   
59int returnSomething(int j)
60{
61  %declaration;
62  %typecheck;
63 
64  int i = j;
65 
66  %return(i); // this line results into: "__res->data = (void *)i(j);" after generation!?!
67}
68
69
70   
71 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
72fixed bugs:
73
74
75  1. ".bin not found": replaced "strchr" by "strrchr" in search for .bin file in generated procedure "mod_init(...)".
76 
77   NOTE: one MUST specify AUBSOLUTE or relative location of ".so" file since
78     Singular have NO complete path in "currPack->libname"
79     and ".bin" file will not be searched in "MOD" directory at the moment ->>> This is a BUG7!!!
80     
81     
82  2. "jump crosses initialization": i have moved parameter type error handling to be directly after handling.     
83 
84// BUG: jump crosses initialization:
85none jumpCrosses(int j)
86{
87  %declaration;
88  %typecheck;
89 
90  int i = 0; // this line was giving "error: jump crosses initialization"
91 
92  %return();
93}
94
95
96
97     
98 *
99 **/