Debian Codegraph @

tests/prep/0206tests/tmpexport/bnminout.sl

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Copyright (C) 2001 Svetlana Cojocaru, Victor Ufnarovski
3 %%
4 %% Bergman is distributed in the hope that it will be useful,
5 %% but WITHOUT ANY WARRANTY. No author or distributor
6 %% accepts responsibility to anyone for the consequences of using it
7 %% or for whether it serves any particular purpose or works at all,
8 %% unless (s)he says so in writing. Refer to the Bergman General
9 %% Public License for full details.
10
11 %% Everyone is granted permission to copy, modify and redistribute
12 %% bergman, but only under the conditions described in the
13 %% Bergman General Public License. A copy of this license is
14 %% supposed to have been given to you along with bergman so you
15 %% can know your rights and responsibilities. It should be in a
16 %% file named copyright. Among other things, the copyright notice
17 %% and this notice must be preserved on all copies.
18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19
20 (OFF RAISE)
21
22 % Created 2001-08-03 to compute Betti numbers for right modules /SK & VU
23
24 (GLOBAL '(NMODGEN NLMODGEN NRMODGEN bnmScInput bnmInputFile bnmOutFile
25 anresScInput ANICKRESOLUTIONOUTPUTFILE))
26
27 (ON PBSERIES)
28
29 (DE bnmScreenInput ()
30 (PROG (objtp)
31 (SETQ bnmScInput T)
32 (PRIN2 "Input the Maximum Degree you want to calculate")(TERPRI)
33 (SETMAXDEG (READ))
34 (COND ( (EQ (SETQ objtp (GETOBJECTTYPE)) 'MODULE)
35 (PRIN2 "Input the number of the module variables")(TERPRI)
36 (SETQ NMODGEN (READ)))
37 ( (EQ objtp 'TWOMODULES)
38 (PRIN2 "Input the number of the right module variables")
39 (TERPRI)
40 (SETQ NRMODGEN (READ))
41 (PRIN2 "Input the number of the left module variables")
42 (TERPRI)
43 (SETQ NLMODGEN (READ)) )
44
45 )%COND
46 (PRIN2 "Now input all ring and then all module variables.")
47 (TERPRI)
48 (COND ((EQ objtp 'TWOMODULES)
49 (PRIN2 "Right module variables should be before the left ones.")))
50 (PRIN2 "Input the ring ideal and module relations in algebraic form thus:")
51 (TERPRI) (PRIN2 " vars v1, ..., vn;") (TERPRI)
52 (PRIN2 " r1, ..., rm;") (TERPRI)
53 (PRIN2 "where v1, ..., vn are all the variables, and r1, ..., rm the relations.")
54 (TERPRI)
55 (ALGFORMINPUT) ))
56
57
58 (DE bnmCheckInput (files)
59 (COND ( (NOT (FILEP (CAR files)) )
60 (PRIN2 "***Input file must exist") (TERPRI)
61 (PRIN2 "Input data from the keyboard") (TERPRI)
62 (bnmScreenInput)
63 )
64 (T
65 (SETQ bnmInputFile (CAR files))
66 (SETQ bnmScInput NIL)
67 (DSKIN bnmInputFile)
68 )
69 )
70 )
71
72 (DE bnmCheckOutput (files )
73 (COND ( (NOT (STRINGP (CADR files)) )
74 (PRIN2 "***Incorrect output file.") (TERPRI)
75 (PRIN2 "Do you agree to use the file outf____.bn as output ?" )
76 (TERPRI)
77 (COND ( (YESP "Type Yes or No")
78 (SETQ bnmOutFile "outf____.bn")
79 (PRIN2 "outf____.bn is used as output file") (TERPRI)
80 (PRIN2 "Don't forget to rename it after calculations. " )
81 (TERPRI)
82 )
83 (T
84 (PRIN2 "No output file. Screen output") (TERPRI)
85
86 )
87 )
88 )
89 (T (SETQ bnmOutFile (CADR files)))
90 )
91 )
92
93
94
95 (DE anresScreenInput ()
96 (SETQ anresScInput T)
97 (PRIN2 "Input the Maximum Degree you want to calculate")(TERPRI)
98 (SETMAXDEG (READ))
99 (TERPRI)
100 (PRIN2 "Now input in-variables and ideal generators in algebraic form, thus:")
101 (TERPRI) (PRIN2 " vars v1, ..., vn;") (TERPRI)
102 (PRIN2 " r1, ..., rm;") (TERPRI)
103 (PRIN2 "where v1, ..., vn are the variables, and r1, ..., rm the generators.")
104 (TERPRI)
105 (ALGFORMINPUT)
106 )
107
108
109 (ON RAISE)
110
111