Trailing-Edge
-
PDP-10 Archives
-
decuslib10-06
-
43,50442/venn.lst
There are no other files named venn.lst in the archive.
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1 COMMENT OPTIONS(/-A/-D/-I/-Q);
2 COMMENT-----------------------------------------------------------------------
3
4 VENN Version 1 (c) copyright 1977 by its author, Dr. Walter Maner, Department
5 of Philosophy, Old Dominion University, Norfolk, VA. 23508. TEL: (804) 489-6517
6
7 Use of this program implies an agreement to report all program errors and
8 modifications directly to the author. A FILCOM listing of the differences
9 between the original version and the new version is the preferred vehicle.
10 Modifications must leave notices of copyright and related warnings intact.
11 In particular, the run-time program header must not be suppressed or altered.
12 Copying of this progam for use on another system IS permitted PROVIDED the
13 author is merely notified that a copy is about to be made, and for whom.
14 Failure to comply with these requests WILL CONSTITUTE A VIOLATION OF COPYRIGHT.
15
16
17 DOCUMENTATION: In addition to the internal documentation, users should
18 consult VENN.DOC.
19
20 PEAK CORE REQUIREMENT: 47+12P (30K) without OPTIONS (in other words, as is)
21 or 42+12P (27K) with OPTIONS (initial "COMMENT " deleted)
22
23 ------------------------------------------------------------------------------;
24
B1 25 BEGIN
26
27 EXTERNAL INTEGER PROCEDURE
28 trmop,
29 scanint;
30
31 EXTERNAL LONG REAL PROCEDURE
32 scanreal;
33
34 EXTERNAL REAL PROCEDURE
35 clocktime;
36
37 EXTERNAL TEXT PROCEDURE
38 conc,
39 rest,
40 upcase;
41
42 EXTERNAL PROCEDURE
43 sleep;
44
45 EXTERNAL CLASS
46 safmin;
47 COMMENT-----------------------------------------------------------------
48 This subset of the SAFEIO CLASS contains the "request" procedure body.
49 ------------------------------------------------------------------------;
50
B2 51 BEGIN
52 REF(vennterms) termlist;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-1
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
53
54 CLASS terms;
B3 55 BEGIN
56 INTEGER seed;
57
58 TEXT ARRAY
59 classterms[1:67];
60
61 TEXT PROCEDURE pickterm(index);
62 INTEGER index;
B4 63 BEGIN
64 IF index = 1 THEN pickterm:- classterms[Randint(1,42,seed)]
65 ELSE IF index = 2 THEN pickterm:- classterms[Randint(43,49,seed)]
66 ELSE IF index = 3 THEN pickterm:- classterms[Randint(50,57,seed)]
67 ELSE pickterm:- classterms[Randint(58,67,seed)];
E4 68 END;
69
70 seed:= Entier(clocktime);
71
72 classterms[1]:- Copy("TRUE PHILOSOPHERS");
73 classterms[2]:- Copy("CONFIRMED SKEPTICS");
74 classterms[3]:- Copy("SUCCESSFUL LOGICIANS");
75 classterms[4]:- Copy("SENSUOUS WOMEN");
76 classterms[5]:- Copy("SENSUOUS MEN");
77 classterms[6]:- Copy("WASHINGTON POLITICIANS");
78 classterms[7]:- Copy("DISCO DANCERS");
79 classterms[8]:- Copy("RAVING IDIOTS");
80 classterms[9]:- Copy("ABSENT-MINDED PROFESSORS");
81 classterms[10]:- Copy("GOOD LOVERS");
82 classterms[11]:- Copy("TOMATO FONDLERS");
83 classterms[12]:- Copy("CANDID PHOTOGRAPHERS");
84 classterms[13]:- Copy("PATIO GARDENERS");
85 classterms[14]:- Copy("WEE-HOUR SNACKERS");
86 classterms[15]:- Copy("BIG SPENDERS");
87 classterms[16]:- Copy("MATCHSTICK GAMBLERS");
88 classterms[17]:- Copy("SEX OBJECTS");
89 classterms[18]:- Copy("MIDNIGHT MARAUDERS");
90 classterms[19]:- Copy("MORNING-AFTER BRAGGERS");
91 classterms[20]:- Copy("BACKSEAT DRIVERS");
92 classterms[21]:- Copy("FREE LOADERS");
93 classterms[22]:- Copy("BATHTUB SAILORS");
94 classterms[23]:- Copy("MASSAGE ARTISTS");
95 classterms[24]:- Copy("COLLEGE GRADUATES");
96 classterms[25]:- Copy("SELF-STYLED EXPERTS");
97 classterms[26]:- Copy("PARTY POOPERS");
98 classterms[27]:- Copy("GARBAGE PICKERS");
99 classterms[28]:- Copy("UNSUNG HEROES");
100 classterms[29]:- Copy("INCURABLE DREAMERS");
101 classterms[30]:- Copy("BATHROOM POETS");
102 classterms[31]:- Copy("COMPULSIVE LIARS");
103 classterms[32]:- Copy("MEXICAN DENTISTS");
104 classterms[33]:- Copy("TOOTH FAIRIES");
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-2
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
105 classterms[34]:- Copy("FAST-FOOD JUNKIES");
106 classterms[35]:- Copy("DEADLY RIVALS");
107 classterms[36]:- Copy("CROP DUSTERS");
108 classterms[37]:- Copy("STREET PEDDLERS");
109 classterms[38]:- Copy("WILLING PRISONERS");
110 classterms[39]:- Copy("STRANGE BEDFELLOWS");
111 classterms[40]:- Copy("PEEPHOLE PERVERTS");
112 classterms[41]:- Copy("STAND-UP COMICS");
113 classterms[42]:- Copy("READY ROMANCERS");
114 COMMENT----------------------------------------------------------------------
115 The remaining terms, 43-67, establish a universe of discourse for the
116 heuristic search mechanism (in CLASS "counterterms") which attempts to generate
117 counterexamples to the syllogisms "makesyllogism" produces. The seven terms
118 immediately below, 43-49, are labels for (b)ig, roughly coextensive classes--
119 'B' classes for short.
120 ---------------------------------------------------------------------------;
121 classterms[43]:- Copy("LIVING THINGS");
122 classterms[44]:- Copy("CELLULAR ORGANISMS");
123 classterms[45]:- Copy("MORTAL THINGS");
124 classterms[46]:- Copy("CHROMOSOMAL CREATURES");
125 classterms[47]:- Copy("BIOLOGICAL ENTITIES");
126 classterms[48]:- Copy("BUNDLES OF PROTOPLASM");
127 classterms[49]:- Copy("FORMS OF LIFE");
128 COMMENT---------------------------------------------------------------------
129 The eight terms immediately below, 50-57, are labels for classes of (m)edium
130 extension--'M' classes for short. Any 'M' class is a proper subset of any 'B'
131 class. (At least, it is in VENN's metaphysics!)
132 ----------------------------------------------------------------------------;
133 classterms[50]:- Copy("HOMOSAPIENS");
134 classterms[51]:- Copy("RATIONAL BEINGS");
135 classterms[52]:- Copy("PROMISE MAKERS");
136 classterms[53]:- Copy("CONSCIOUS BEINGS");
137 classterms[54]:- Copy("HUMAN BEINGS");
138 classterms[55]:- Copy("PERSONS");
139 classterms[56]:- Copy("POLITICAL ANIMALS");
140 classterms[57]:- Copy("FEATHERLESS BIPEDS");
141 COMMENT--------------------------------------------------------------------
142 The ten terms below label classes which have so (l)ittle extension that
143 they are likely to be mutually exclusive--'L' classes for short. VENN also
144 regards each of them as labeling a proper subset of any 'M' class. This
145 characteristic, plus their exclusivity, figure in the success of the heuristic.
146 ---------------------------------------------------------------------------;
147 classterms[58]:- Copy("WORLD BANK DIRECTORS");
148 classterms[59]:- Copy("MULTIBILLIONAIRES");
149 classterms[60]:- Copy("NOBEL LAUREATES");
150 classterms[61]:- Copy("OLYMPIC GOLD MEDALISTS");
151 classterms[62]:- Copy("SOVIET CHESS CHAMPIONS");
152 classterms[63]:- Copy("LUNAR EXPLORERS");
153 classterms[64]:- Copy("FORMER US PRESIDENTS");
154 classterms[65]:- Copy("FIVE-YEAR-OLD BOYS");
155 classterms[66]:- Copy("FIVE-YEAR-OLD GIRLS");
156 classterms[67]:- Copy("AFRICAN HEADS OF STATE")
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-3
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E3 157 END CLA*S terms;
158
159
160 terms CLASS vennterms;
B5 161 BEGIN
162 TEXT ARRAY fallacies[1:8];
163
164 fallacies[1]:- Copy("Negative premises");
165 fallacies[2]:- Copy("Undistributed middle");
166 fallacies[3]:- Copy("+ Conclusion, - major");
167 fallacies[4]:- Copy("+ Conclusion, - minor");
168 fallacies[5]:- Copy("- Conclusion, + premises");
169 fallacies[6]:- Copy("Illicit major");
170 fallacies[7]:- Copy("Illicit minor");
171 fallacies[8]:- Copy("Existential fallacy")
E5 172 END CLA*S vennterms;
173
174 termlist:- NEW vennterms;
175 INSPECT termlist DO
B6 176 BEGIN
177
178 CLASS statement;
B7 179 BEGIN
180 TEXT type, tag, quantifier, subjectterm, copula, predicateterm, all;
181
182 PROCEDURE makestatement;
B8 183 BEGIN
184 all:- conc(tag," ",quantifier," ",subjectterm," ",copula," ",predicateterm,".")
E8 185 END;
E7 186 END CLA*S statement;
187
188 CLASS syllogism;
B9 189 BEGIN
190 REF(statement)
191 majorpremise, minorpremise, conclusion,
192 truemajorpremise, trueminorpremise, falseconclusion;
193
194 TEXT ARRAY
195 vennfillers[1:7],
196 COMMENT---------------------------------------------------------------------
197 Subscript values of "vennfillers" correspond to Venn diagram sectors. See
198 the diagram at PROCEDURE "outblankdiagram."
199 ----------------------------------------------------------------------------;
200 fallacies[1:8];
201
202 BOOLEAN ARRAY
203 fallacyflags[1:8];
204
205 TEXT
206 mood,
207 figure,
208 form,
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-4
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
209 latinname,
210 majorterm, middleterm, minorterm,
211 countermajorterm, countermiddleterm, counterminorterm,
212 truemajorpairs, trueminorpairs, falseconpairs;
213
214 BOOLEAN
215 reviewing,
216 justtesting,
217 valid,
218 swapforstar,
219 aristotelian;
220
221
222 PROCEDURE initialize;
223 COMMENT----------------------------------------------------------------
224 The default initialization of all other variables is satisfactory.
225 -----------------------------------------------------------------------;
B10 226 BEGIN
227 INTEGER i;
228
229 FOR i:= 1 STEP 1 UNTIL 8 DO fallacyflags[i]:= TRUE;
230 FOR i:= 1 STEP 1 UNTIL 7 DO vennfillers[i]:- Copy("BLANKS")
E10 231 END PR*CEDURE initialize;
232
233 PROCEDURE choose;
B11 234 BEGIN
235 majorterm:- pickterm(1);
236 middleterm:- pickterm(1);
237 minorterm:- pickterm(1);
238 IF (majorterm == middleterm OR middleterm == minorterm OR minorterm == majorterm) THEN choose
E11 239 END;
240
241 BOOLEAN PROCEDURE goodformspec;
B12 242 BEGIN
243 INTEGER i;
244 TEXT t;
245
246 goodformspec:= TRUE;
247 upcase(form);
248 IF form.Length >3 THEN
B13 249 BEGIN
250 FOR i:= 1 STEP 1 UNTIL 3 DO
B14 251 BEGIN
252 t:- form.Sub(i,1);
253 IF (t \= "?" AND t \= "A" AND t \= "E" AND t \= "I" AND t \= "O") THEN
B15 254 BEGIN
255 Outtext("Faulty type specification for proposition ");
256 Outint(i,1);
257 Outchar('.');
258 Outimage;
259 goodformspec:= FALSE
E15 260 END
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-5
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E14 261 END;
262 t:- Copy(form.Sub(form.Length,1));
263 IF (t \= "?" AND t \= "1" AND t \= "2" AND t \= "3" AND t \= "4") THEN
B16 264 BEGIN
265 outline("Figure value (last item) other than 1, 2, 3, 4 or ?.");
266 goodformspec:= FALSE
E16 267 END
E13 268 END ELSE
B17 269 BEGIN
270 outline("Specification too short...something is missing.");
271 goodformspec:= FALSE
E17 272 END;
E12 273 END PR*CEDURE goodformspec;
274
275 PROCEDURE makesyllogism;
B18 276 BEGIN
277 INTEGER i, j;
278
279 FOR i:= 1 STEP 1 UNTIL 3 DO
B19 280 BEGIN
281 IF form.Sub(i,1) = "?" THEN
B20 282 BEGIN
283 j:= Randint(1,4,seed);
284 IF j = 1 THEN form.Sub(i,1):= "A"
285 ELSE IF j = 2 THEN form.Sub(i,1):= "E"
286 ELSE IF j = 3 THEN form.Sub(i,1):= "I"
287 ELSE form.Sub(i,1):= "O"
E20 288 END
E19 289 END;
290 IF form.Sub(form.Length,1) = "?" THEN
B21 291 BEGIN
292 j:= Randint(1,4,seed);
293 IF j = 1 THEN form.Sub(form.Length,1):= "1"
294 ELSE IF j = 2 THEN form.Sub(form.Length,1):= "2"
295 ELSE IF j = 3 THEN form.Sub(form.Length,1):= "3"
296 ELSE form.Sub(form.Length,1):= "4"
E21 297 END;
298 figure:- form.Sub(form.Length,1);
299
300 majorpremise:- NEW statement;
301 INSPECT majorpremise DO
B22 302 BEGIN
303 type:- form.Sub(1,1);
304 tag:- Copy("Major Premise:");
305 IF figure = "1" OR figure = "3" THEN
B23 306 BEGIN
307 subjectterm:- middleterm;
308 predicateterm:- majorterm;
309 IF type = "A" THEN
B24 310 BEGIN
311 quantifier:- Copy("All");
312 copula:- Copy("are");
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-6
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
313 vennfillers[4]:- vennfillers[3]:- Copy("/");
314 IF aristotelian THEN vennfillers[6]:- vennfillers[7]:- Copy("?");
315 COMMENT----------------------------------------------------------------------
316 Partial set-up for filling in Venn diagram. The remaining sectors will be
317 assigned filler characters in the INSPECT "minorpremise" block. Some filler
318 characters set here may be changed later, e.g., in the event of clashes.
319 ----------------------------------------------------------------------------;
320 fallacyflags[1]:= fallacyflags[2]:= fallacyflags[3]:= FALSE;
321 COMMENT---------------------------------------------------------------------
322 Fallacy[1] "Negative Premises," fallacy[2] "Undistributed Middle," and
323 fallacy[3] "+ Conclusion, - Major" have been eliminated as possibilities at
324 this point. Other possibilities will be eliminated subsequently in the
325 INSPECT "minorpremise" block.
326 ----------------------------------------------------------------------------;
327 truemajorpairs:- Copy(" BM BL ML BB")
328 COMMENT-------------------------------------------------------------------
329 This particular Major Premise tends to be true IF (the major class, i.e., the
330 predicate class, is very (b)ig AND the middle class, i.e., the subject class,
331 is (m)edium-sized) OR (the major class is very (b)ig and the middle class is
332 very (l)ittle) OR (the major class is (m)edium-sized and the middle class is
333 (l)ittle) OR (the major class is (b)ig and the middle class is (b)ig). These
334 four character pairs represent these four possibilities. A similar comment
335 could be made about the text stored in "trueminorpairs" and "falseconpairs."
336 In each case, by convention, the middle class (if any) is represented on
337 the right. Otherwise, the order is minor class followed by major class. Note
338 too that, since "A" and "O" are contradictories, the same pair values which
339 tend to make "A" true as a premise also work to render the "O" false as a
340 conclusion. See comment about class "counterterms" for further information.
341 --------------------------------------------------------------------------;
E24 342 END
343 ELSE IF type = "E" THEN
B25 344 BEGIN
345 quantifier:- Copy("No");
346 copula:- Copy("are");
347 vennfillers[6]:- vennfillers[7]:- Copy("/");
348 IF aristotelian THEN vennfillers[3]:- vennfillers[4]:- Copy("?");
349 fallacyflags[2]:= fallacyflags[5]:= fallacyflags[6]:= FALSE;
350 truemajorpairs:- Copy(" LL")
E25 351 END
352 ELSE IF type = "I" THEN
B26 353 BEGIN
354 quantifier:- Copy("Some");
355 copula:- Copy("are");
356 vennfillers[6]:- vennfillers[7]:- Copy("?");
357 fallacyflags[1]:= fallacyflags[3]:= fallacyflags[8]:= FALSE;
358 truemajorpairs:- Copy(" BB MB LB BM MM LM BL ML")
E26 359 END
360 ELSE COMMENT type = "O";
B27 361 BEGIN
362 quantifier:- Copy("Some");
363 copula:- Copy("are not");
364 vennfillers[3]:- vennfillers[4]:- Copy("?");
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-7
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
365 fallacyflags[5]:= fallacyflags[6]:= fallacyflags[8]:= FALSE;
366 truemajorpairs:- Copy(" MB LB LM LL")
E27 367 END
E23 368 END
369 ELSE COMMENT figure = "2" OR figure = "4";
B28 370 BEGIN
371 subjectterm:- majorterm;
372 predicateterm:- middleterm;
373 IF type = "A" THEN
B29 374 BEGIN
375 quantifier:- Copy("All");
376 copula:- Copy("are");
377 vennfillers[2]:- vennfillers[5]:- Copy("/");
378 IF aristotelian THEN vennfillers[6]:- vennfillers[7]:- Copy("?");
379 fallacyflags[1]:= fallacyflags[3]:= fallacyflags[6]:= FALSE;
380 truemajorpairs:- Copy(" MB LB LM BB")
E29 381 END
382 ELSE IF type = "E" THEN
B30 383 BEGIN
384 quantifier:- Copy("No");
385 copula:- Copy("are");
386 vennfillers[6]:- vennfillers[7]:- Copy("/");
387 IF aristotelian THEN vennfillers[2]:- vennfillers[5]:- Copy("?");
388 fallacyflags[2]:= fallacyflags[5]:= fallacyflags[6]:= FALSE;
389 truemajorpairs:- Copy(" LL")
E30 390 END
391 ELSE IF type = "I" THEN
B31 392 BEGIN
393 quantifier:- Copy("Some");
394 copula:- Copy("are");
395 vennfillers[6]:- vennfillers[7]:- Copy("?");
396 fallacyflags[1]:= fallacyflags[3]:= fallacyflags[8]:= FALSE;
397 truemajorpairs:- Copy(" BB BM BL MB MM ML LB LM")
E31 398 END
399 ELSE COMMENT type = "O";
B32 400 BEGIN
401 quantifier:- Copy("Some");
402 copula:- Copy("are not");
403 vennfillers[2]:- vennfillers[5]:- Copy("?");
404 fallacyflags[2]:= fallacyflags[5]:= fallacyflags[8]:= FALSE;
405 truemajorpairs:- Copy(" BM BL ML LL")
E32 406 END
E28 407 END;
408 makestatement
E22 409 END INSP*CT majorpremise;
410
411 minorpremise:- NEW statement;
412 INSPECT minorpremise DO
B33 413 BEGIN
414 type:- form.Sub(2,1);
415 tag:- Copy("Minor Premise:");
416 IF figure = "3" OR figure = "4" THEN
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-8
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
B34 417 BEGIN
418 subjectterm:- middleterm;
419 predicateterm:- minorterm;
420 IF type = "A" THEN
B35 421 BEGIN
422 quantifier:- Copy("All");
423 copula:- Copy("are");
424 swapforstar:= FALSE;
425 IF vennfillers[3] = "?" OR vennfillers[6] = "?" THEN swapforstar:= TRUE;
426 IF vennfillers[6] = "/" THEN vennfillers[6]:- Copy("X")
427 ELSE vennfillers[6]:- Copy("\");
428 IF vennfillers[3] = "/" THEN vennfillers[3]:- Copy("X")
429 ELSE vennfillers[3]:- Copy("\");
430 IF swapforstar THEN FOR i:= 2,4,5,7 DO IF vennfillers[i] = "?" THEN vennfillers[i]:= Copy("*");
431 IF aristotelian THEN
B36 432 BEGIN
433 IF vennfillers[4] = "/" OR vennfillers[7] = "/" THEN
B37 434 BEGIN
435 IF vennfillers[4] \= "/" THEN vennfillers[4]:- Copy("*")
436 ELSE vennfillers[7]:- Copy("*")
E37 437 END
B38 438 ELSE BEGIN
439 IF vennfillers[4] = "BLANKS" THEN vennfillers[4]:- Copy("?");
440 IF vennfillers[7] = "BLANKS" THEN vennfillers[7]:- Copy("?")
E38 441 END
E36 442 END;
443 fallacyflags[1]:= fallacyflags[2]:= fallacyflags[4]:= FALSE;
444 trueminorpairs:- Copy(" BM BL ML BB")
E35 445 END
446 ELSE IF type = "E" THEN
B39 447 BEGIN
448 quantifier:- Copy("No");
449 copula:- Copy("are");
450 swapforstar:= FALSE;
451 IF vennfillers[4] = "?" OR vennfillers[7] = "?" THEN swapforstar:= TRUE;
452 IF vennfillers[4] = "/" THEN vennfillers[4]:- Copy("X")
453 ELSE vennfillers[4]:- Copy("\");
454 IF vennfillers[7] = "/" THEN vennfillers[7]:- Copy("X")
455 ELSE vennfillers[7]:- Copy("\");
456 IF swapforstar THEN FOR i:= 1,2,3,5,6 DO IF vennfillers[i] = "?" THEN vennfillers[i]:= Copy("*");
457 IF aristotelian THEN
B40 458 BEGIN
459 IF vennfillers[3] = "/" OR vennfillers[6] = "/" THEN
B41 460 BEGIN
461 IF vennfillers[3] \= "/" THEN vennfillers[3]:- Copy("*")
462 ELSE vennfillers[6]:- Copy("*")
E41 463 END
B42 464 ELSE BEGIN
465 IF vennfillers[3] = "BLANKS" THEN vennfillers[3]:- Copy("?");
466 IF vennfillers[6] = "BLANKS" THEN vennfillers[6]:- Copy("?")
E42 467 END
E40 468 END;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-9
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
469 fallacyflags[2]:= fallacyflags[5]:= fallacyflags[7]:= FALSE;
470 trueminorpairs:- Copy(" LL")
E39 471 END
472 ELSE IF type = "I" THEN
B43 473 BEGIN
474 quantifier:- Copy("Some");
475 copula:- Copy("are");
476 IF vennfillers[4] \= "/" AND vennfillers[7] \= "/" THEN vennfillers[4]:- vennfillers[7]:- Copy("?")
B44 477 ELSE BEGIN
478 IF vennfillers[4] \= "/" THEN vennfillers[4]:- Copy("*");
479 IF vennfillers[7] \= "/" THEN vennfillers[7]:- Copy("*")
E44 480 END;
481 fallacyflags[1]:= fallacyflags[4]:= fallacyflags[8]:= FALSE;
482 trueminorpairs:- Copy(" BB MB LB BM MM LM BL ML")
E43 483 END
484 ELSE COMMENT type = "O";
B45 485 BEGIN
486 quantifier:- Copy("Some");
487 copula:- Copy("are not");
488 IF vennfillers[3] \= "/" AND vennfillers[6] \= "/" THEN vennfillers[3]:- vennfillers[6]:- Copy("?")
B46 489 ELSE BEGIN
490 IF vennfillers[3] \= "/" THEN vennfillers[3]:- Copy("*");
491 IF vennfillers[6] \= "/" THEN vennfillers[6]:- Copy("*")
E46 492 END;
493 fallacyflags[5]:= fallacyflags[7]:= fallacyflags[8]:= FALSE;
494 trueminorpairs:- Copy(" MB LB LM LL")
E45 495 END
E34 496 END
497 ELSE COMMENT figure = "1" OR figure = "2";
B47 498 BEGIN
499 subjectterm:- minorterm;
500 predicateterm:- middleterm;
501 IF type = "A" THEN
B48 502 BEGIN
503 quantifier:- Copy("All");
504 copula:- Copy("are");
505 swapforstar:= FALSE;
506 IF vennfillers[1] = "?" OR vennfillers[5] = "?" THEN swapforstar:= TRUE;
507 IF vennfillers[5] = "/" THEN vennfillers[5]:- Copy("X")
508 ELSE vennfillers[5]:- Copy("\");
509 vennfillers[1]:- Copy("\");
510 IF swapforstar THEN FOR i:= 2,3,4,6,7 DO IF vennfillers[i] = "?" THEN vennfillers[i]:= Copy("*");
511 IF aristotelian THEN
B49 512 BEGIN
513 IF vennfillers[4] = "/" OR vennfillers[7] = "/" THEN
B50 514 BEGIN
515 IF vennfillers[4] \= "/" THEN vennfillers[4]:- Copy("*")
516 ELSE vennfillers[7]:- Copy("*")
E50 517 END
B51 518 ELSE BEGIN
519 IF vennfillers[4] = "BLANKS" THEN vennfillers[4]:- Copy("?");
520 IF vennfillers[7] = "BLANKS" THEN vennfillers[7]:- Copy("?")
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-10
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E51 521 END
E49 522 END;
523 fallacyflags[1]:= fallacyflags[4]:= fallacyflags[7]:= FALSE;
524 trueminorpairs:- Copy(" MB LB LM BB")
E48 525 END
526 ELSE IF type = "E" THEN
B52 527 BEGIN
528 quantifier:- Copy("No");
529 copula:- Copy("are");
530 swapforstar:= FALSE;
531 IF vennfillers[4] = "?" OR vennfillers[7] = "?" THEN swapforstar:= TRUE;
532 IF vennfillers[4] = "/" THEN vennfillers[4]:- Copy("X")
533 ELSE vennfillers[4]:- Copy("\");
534 IF vennfillers[7] = "/" THEN vennfillers[7]:- Copy("X")
535 ELSE vennfillers[7]:- Copy("\");
536 IF swapforstar THEN FOR i:= 1,2,3,5,6 DO IF vennfillers[i] = "?" THEN vennfillers[i]:= Copy("*");
537 IF aristotelian THEN
B53 538 BEGIN
539 IF vennfillers[1] = "/" OR vennfillers[5] = "/" THEN
B54 540 BEGIN
541 IF vennfillers[1] \= "/" THEN vennfillers[1]:- Copy("*")
542 ELSE vennfillers[5]:- Copy("*")
E54 543 END
B55 544 ELSE BEGIN
545 IF vennfillers[1] = "BLANKS" THEN vennfillers[1]:- Copy("?");
546 IF vennfillers[5] = "BLANKS" THEN vennfillers[5]:- Copy("?")
E55 547 END;
E53 548 END;
549 fallacyflags[2]:= fallacyflags[5]:= fallacyflags[7]:= FALSE;
550 trueminorpairs:- Copy(" LL")
E52 551 END
552 ELSE IF type = "I" THEN
B56 553 BEGIN
554 quantifier:- Copy("Some");
555 copula:- Copy("are");
556 IF vennfillers[4] \= "/" AND vennfillers[7] \= "/" THEN vennfillers[4]:- vennfillers[7]:- Copy("?")
B57 557 ELSE BEGIN
558 IF vennfillers[4] \= "/" THEN vennfillers[4]:- Copy("*");
559 IF vennfillers[7] \= "/" THEN vennfillers[7]:- Copy("*")
E57 560 END;
561 fallacyflags[1]:= fallacyflags[4]:= fallacyflags[8]:= FALSE;
562 trueminorpairs:- Copy(" BB BM BL MB MM ML LB LM")
E56 563 END
564 ELSE COMMENT type = "O";
B58 565 BEGIN
566 quantifier:- Copy("Some");
567 copula:- Copy("are not");
568 IF vennfillers[1] \= "/" AND vennfillers[5] \= "/" THEN vennfillers[1]:- vennfillers[5]:- Copy("?")
B59 569 ELSE BEGIN
570 IF vennfillers[1] \= "/" THEN vennfillers[1]:- Copy("*");
571 IF vennfillers[5] \= "/" THEN vennfillers[5]:- Copy("*")
E59 572 END;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-11
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
573 fallacyflags[2]:= fallacyflags[5]:= fallacyflags[8]:= FALSE;
574 trueminorpairs:- Copy(" BM BL ML LL")
E58 575 END
E47 576 END;
577 makestatement;
E33 578 END INSP*CT minorpremise;
579
580 conclusion:- NEW statement;
581 INSPECT conclusion DO
B60 582 BEGIN
583 type:- form.Sub(3,1);
584 subjectterm:- minorterm;
585 predicateterm:- majorterm;
586 tag:- Copy("Conclusion: ");
587 IF type = "A" THEN
B61 588 BEGIN
589 quantifier:- Copy("All");
590 copula:- Copy("are");
591 fallacyflags[5]:= fallacyflags[6]:= fallacyflags[8]:= FALSE;
592 falseconpairs:- Copy(" BM BL ML LL")
E61 593 END
594 ELSE
595 IF type = "E" THEN
B62 596 BEGIN
597 quantifier:- Copy("No");
598 copula:- Copy("are");
599 fallacyflags[3]:= fallacyflags[4]:= fallacyflags[8]:= FALSE;
600 falseconpairs:- Copy(" BB BM BL MB MM ML LB LM")
E62 601 END
602 ELSE
603 IF type = "I" THEN
B63 604 BEGIN
605 quantifier:- Copy("Some");
606 copula:- Copy("are");
607 fallacyflags[5]:= fallacyflags[6]:= fallacyflags[7]:= FALSE;
608 IF aristotelian THEN fallacyflags[8]:= FALSE;
609 falseconpairs:- Copy(" LL")
E63 610 END
611 ELSE COMMENT type = "O";
B64 612 BEGIN
613 quantifier:- Copy("Some");
614 copula:- Copy("are not");
615 fallacyflags[3]:= fallacyflags[4]:= fallacyflags[7]:= FALSE;
616 IF aristotelian THEN fallacyflags[8]:= FALSE;
617 falseconpairs:- Copy(" MB LB LM BB")
E64 618 END;
619 makestatement;
E60 620 END of INSP*CT conclusion;
621
622 mood:- conc(majorpremise.type,minorpremise.type,conclusion.type);
623 form:- conc(mood,"-",figure);
E18 624 END PR*CEDURE makesyllogism;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-12
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
625
626 PROCEDURE makecounterexample;
627 COMMENT-------------------------------------------------------------------
628 This procedure is, in effect, a subset of "makesyllogism," so it could have
629 been extracted from a call on that procedure if enough (confusing) conditional
630 branching had been introduced. It has been coded separately, however, for
631 better readability.
632 --------------------------------------------------------------------------;
B65 633 BEGIN
634 truemajorpremise:- NEW statement;
635 INSPECT truemajorpremise DO
B66 636 BEGIN
637 type:- form.Sub(1,1);
638 tag:- Copy("TRUE Major Premise:");
639 IF figure = "1" OR figure = "3" THEN
B67 640 BEGIN
641 subjectterm:- countermiddleterm;
642 predicateterm:- countermajorterm;
643 IF type = "A" THEN
B68 644 BEGIN
645 quantifier:- Copy("All");
646 copula:- Copy("are")
E68 647 END
648 ELSE IF type = "E" THEN
B69 649 BEGIN
650 quantifier:- Copy("No");
651 copula:- Copy("are")
E69 652 END
653 ELSE IF type = "I" THEN
B70 654 BEGIN
655 quantifier:- Copy("Some");
656 copula:- Copy("are")
E70 657 END
658 ELSE COMMENT type = "O";
B71 659 BEGIN
660 quantifier:- Copy("Some");
661 copula:- Copy("are not")
E71 662 END
E67 663 END
664 ELSE COMMENT figure = "2" OR figure = "4";
B72 665 BEGIN
666 subjectterm:- countermajorterm;
667 predicateterm:- countermiddleterm;
668 IF type = "A" THEN
B73 669 BEGIN
670 quantifier:- Copy("All");
671 copula:- Copy("are")
E73 672 END
673 ELSE IF type = "E" THEN
B74 674 BEGIN
675 quantifier:- Copy("No");
676 copula:- Copy("are")
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-13
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E74 677 END
678 ELSE IF type = "I" THEN
B75 679 BEGIN
680 quantifier:- Copy("Some");
681 copula:- Copy("are")
E75 682 END
683 ELSE COMMENT type = "O";
B76 684 BEGIN
685 quantifier:- Copy("Some");
686 copula:- Copy("are not")
E76 687 END
E72 688 END;
689 makestatement
E66 690 END INSP*CT truemajorpremise;
691
692 trueminorpremise:- NEW statement;
693 INSPECT trueminorpremise DO
B77 694 BEGIN
695 type:- form.Sub(2,1);
696 tag:- Copy("TRUE Minor Premise:");
697 IF figure = "3" OR figure = "4" THEN
B78 698 BEGIN
699 subjectterm:- countermiddleterm;
700 predicateterm:- counterminorterm;
701 IF type = "A" THEN
B79 702 BEGIN
703 quantifier:- Copy("All");
704 copula:- Copy("are")
E79 705 END
706 ELSE IF type = "E" THEN
B80 707 BEGIN
708 quantifier:- Copy("No");
709 copula:- Copy("are")
E80 710 END
711 ELSE IF type = "I" THEN
B81 712 BEGIN
713 quantifier:- Copy("Some");
714 copula:- Copy("are")
E81 715 END
716 ELSE COMMENT TYPE = "O";
B82 717 BEGIN
718 quantifier:- Copy("Some");
719 copula:- Copy("are not")
E82 720 END
E78 721 END
722 ELSE COMMENT figure = "1" OR figure = "2";
B83 723 BEGIN
724 subjectterm:- counterminorterm;
725 predicateterm:- countermiddleterm;
726 IF type = "A" THEN
B84 727 BEGIN
728 quantifier:- Copy("All");
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-14
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
729 copula:- Copy("are")
E84 730 END
731 ELSE IF type = "E" THEN
B85 732 BEGIN
733 quantifier:- Copy("No");
734 copula:- Copy("are")
E85 735 END
736 ELSE IF type = "I" THEN
B86 737 BEGIN
738 quantifier:- Copy("Some");
739 copula:- Copy("are")
E86 740 END
741 ELSE COMMENT type = "O";
B87 742 BEGIN
743 quantifier:- Copy("Some");
744 copula:- Copy("are not")
E87 745 END
E83 746 END;
747 makestatement
E77 748 END INSP*CT trueminorpremise;
749
750 falseconclusion:- NEW statement;
751 INSPECT falseconclusion DO
B88 752 BEGIN
753 type:- form.Sub(3,1);
754 subjectterm:- counterminorterm;
755 predicateterm:- countermajorterm;
756 tag:- Copy("FALSE Conclusion: ");
757 IF type = "A" THEN
B89 758 BEGIN
759 quantifier:- Copy("All");
760 copula:- Copy("are")
E89 761 END
762 ELSE
763 IF type = "E" THEN
B90 764 BEGIN
765 quantifier:- Copy("No");
766 copula:- Copy("are")
E90 767 END
768 ELSE
769 IF type = "I" THEN
B91 770 BEGIN
771 quantifier:- Copy("Some");
772 copula:- Copy("are")
E91 773 END
774 ELSE COMMENT type = "O";
B92 775 BEGIN
776 quantifier:- Copy("Some");
777 copula:- Copy("are not")
E92 778 END;
779 makestatement
E88 780 END of INSP*CT falseconclusion;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-15
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E65 781 END PR*CEDURE makecounterexample;
782
783 PROCEDURE validate;
B93 784 BEGIN
785 IF figure = "1" THEN
B94 786 BEGIN
787 IF mood = "AAA" THEN latinname:- Copy("B(a)rb(a)r(a)")
788 ELSE IF mood = "EAE" THEN latinname:- Copy("C(e)l(a)r(e)nt")
789 ELSE IF mood = "AII" THEN latinname:- Copy("D(a)r(i)(i)")
790 ELSE IF mood = "EIO" THEN latinname:- Copy("F(e)r(i)(o)que")
791 ELSE IF aristotelian THEN
B95 792 BEGIN
793 IF mood = "AAI" THEN latinname:- Copy("none given")
794 ELSE IF mood = "EAO" THEN latinname:- Copy("none given")
E95 795 END
E94 796 END
797 ELSE IF figure = "2" THEN
B96 798 BEGIN
799 IF mood = "EAE" THEN latinname:- Copy("C(e)s(a)r(e)")
800 ELSE IF mood = "AEE" THEN latinname:- Copy("C(a)m(e)str(e)s")
801 ELSE IF mood = "EIO" THEN latinname:- Copy("F(e)st(i)n(o)")
802 ELSE IF mood = "AOO" THEN latinname:- Copy("B(a)r(o)c(o)")
803 ELSE IF aristotelian THEN
B97 804 BEGIN
805 IF mood = "AEO" THEN latinname:- Copy("none given")
806 ELSE IF mood = "EAO" THEN latinname:- Copy("none given")
E97 807 END
E96 808 END
809 ELSE IF figure = "3" THEN
B98 810 BEGIN
811 IF mood = "IAI" THEN latinname:- Copy("D(i)s(a)m(i)s")
812 ELSE IF mood = "AII" THEN latinname:- Copy("D(a)t(i)s(i)")
813 ELSE IF mood = "OAO" THEN latinname:- Copy("B(o)c(a)rd(o)")
814 ELSE IF mood = "EIO" THEN latinname:- Copy("F(e)r(i)s(o)n")
815 ELSE IF aristotelian THEN
B99 816 BEGIN
817 IF mood = "AAI" THEN latinname:- Copy("D(a)r(a)pt(i)")
818 ELSE IF mood = "EAO" THEN latinname:- Copy("F(e)l(a)pt(o)n")
E99 819 END;
E98 820 END
821 ELSE
822 IF figure = "4" THEN
B100 823 BEGIN
824 IF mood = "AEE" THEN latinname:- Copy("C(a)m(e)n(e)s")
825 ELSE IF mood = "IAI" THEN latinname:- Copy("D(i)m(a)r(i)s")
826 ELSE IF mood = "EIO" THEN latinname:- Copy("Fr(e)s(i)s(o)n")
827 ELSE IF aristotelian THEN
B101 828 BEGIN
829 IF mood = "AEO" THEN
B102 830 BEGIN
831 latinname:- Copy("none given");
832 Outimage;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-16
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
833 outline("NOTE: The syllogism you are about to see is the SOLE exception to the VENN");
834 outline("program's parsimonious implementation of the Aristotelian (or existential)");
835 outline("viewpoint. If you work through the questions, you will discover why.")
E102 836 END
837 ELSE IF mood = "EAO" THEN latinname:- Copy("F(e)s(a)p(o)")
838 ELSE IF mood = "AAI" THEN latinname:- Copy("Br(a)m(a)nt(i)p")
E101 839 END
E100 840 END;
841 IF latinname =/= NOTEXT THEN valid:= TRUE;
842 COMMENT----------------------------------------------------------------------
843 Validity could have been determined by stepping across ARRAY "fallacyflags,"
844 but then "doublecheck" (below) would be unable to detect internal errors.
845 "Validate," among other things, provides an independent check of validity.
846 -----------------------------------------------------------------------------;
E93 847 END PR*CEDURE validate;
848
849
850 PROCEDURE doublecheck;
851 COMMENT------------------------------------------------------------------
852 Used for debugging. Checks for internal errors and reports any it finds.
853 --------------------------------------------------------------------------;
B103 854 BEGIN
855 INTEGER i, max;
856 IF aristotelian THEN max:= 7 ELSE max:= 8;
857 IF valid THEN FOR i:= 1 STEP 1 UNTIL max DO
B104 858 BEGIN
859 IF fallacyflags[i] THEN
B105 860 BEGIN
861 Outtext("Program error: Fallacy flag(");
862 Outint(i,1);
863 Outtext(") set TRUE for valid ");
864 Outtext(form);
865 Outimage
E105 866 END
E104 867 END;
868 IF NOT valid THEN
B106 869 BEGIN
870 FOR i:= 1 STEP 1 UNTIL max DO
871 IF fallacyflags[i] THEN GOTO out;
872 Outtext("Program error: No fallacy flags set TRUE for invalid ");
873 Outtext(form);
874 Outimage;
875 out:
E106 876 END
E103 877 END PR*CEDURE doublecheck;
878
879 PROCEDURE outline(t);
880 NAME t; TEXT t;
881
B107 882 BEGIN
883 Outtext(t);
884 Outimage
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-17
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E107 885 END;
886
887 PROCEDURE outsyllogism;
B108 888 BEGIN
889 Outimage;
890 outline(majorpremise.all);
891 outline(minorpremise.all);
892 outline("-----------------------------------------------------------------");
893 outline(conclusion.all);
894 Outimage
E108 895 END PR*CEDURE outsyllogism;
896
897 PROCEDURE outcounterexample;
898 COMMENT------------------------------------------------------------------
899 Like "outsyllogism," but coded separately for better readability.
900 -------------------------------------------------------------------------;
B109 901 BEGIN
902 Outimage;
903 outline(truemajorpremise.all);
904 outline(trueminorpremise.all);
905 outline("-----------------------------------------------------------------");
906 outline(falseconclusion.all);
907 Outimage
E109 908 END PR*CEDURE outcounterexample;
909
910 initialize;
911 choose
E9 912 END CLA*S syllogism;
913
914 syllogism CLASS venndiagram;
B110 915 BEGIN
916 PROCEDURE outdiagram;
B111 917 BEGIN
918 INTEGER i, j;
919
920 PROCEDURE outdata;
B112 921 BEGIN
922 FOR j:= j STEP 1 UNTIL 8 DO
923 IF fallacyflags[j] THEN
B113 924 BEGIN
925 Outtext(" FALLACY(");
926 Outint(j,1);
927 Outtext("): ");
928 Outtext(termlist.fallacies[j]);
929 j:= j+1;
930 GOTO exit;
E113 931 END;
932 exit:
E112 933 END;
934
935 FOR i:= 1 STEP 1 UNTIL 7 DO IF vennfillers[i] = "BLANKS" THEN vennfillers[i]:- Copy(" ");
936
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-18
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
937 ! LINE ONE;
938 j:= 1;
939 Outtext(" ------------------");
940 Outtext(" MAJOR CLASS: " );
941 Outtext(majorterm);
942 Outimage;
943
944 ! LINE TWO;
945 Outtext("M !");
946 FOR i:= 1 STEP 1 UNTIL 6 DO Outtext(vennfillers[1]);
947 Outchar('!');
948 Outtext(vennfillers[5]);
949 Outtext(vennfillers[5]);
950 Outchar('!');
951 FOR i:= 1 STEP 1 UNTIL 6 DO Outtext(vennfillers[2]);
952 Outchar('!');
953 Outtext(" M MINOR CLASS: ");
954 Outtext(minorterm);
955 Outimage;
956
957 ! LINE THREE;
958 Outtext("I !");
959 FOR i:= 1 STEP 1 UNTIL 6 DO Outtext(vennfillers[1]);
960 Outchar('!');
961 Outtext(vennfillers[5]);
962 Outtext(vennfillers[5]);
963 Outchar('!');
964 FOR i:= 1 STEP 1 UNTIL 6 DO Outtext(vennfillers[2]);
965 Outchar('!');
966 Outtext(" A MIDDLE CLASS: ");
967 Outtext(middleterm);
968 Outimage;
969
970 ! LINE FOUR;
971 Outtext("N !");
972 FOR i:= 1 STEP 1 UNTIL 3 DO Outtext(vennfillers[1]);
973 Outtext("----------");
974 FOR i:= 1 STEP 1 UNTIL 3 DO Outtext(vennfillers[2]);
975 Outchar('!');
976 Outtext(" J MOOD-FIGURE: ");
977 Outtext(form);
978 Outimage;
979
980 ! LINE FIVE;
981 Outtext("O !");
982 FOR i:= 1 STEP 1 UNTIL 3 DO Outtext(vennfillers[1]);
983 Outchar('!');
984 Outtext(vennfillers[4]);
985 Outtext(vennfillers[4]);
986 Outchar('!');
987 Outtext(vennfillers[7]);
988 Outtext(vennfillers[7]);
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-19
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
989 Outchar('!');
990 Outtext(vennfillers[6]);
991 Outtext(vennfillers[6]);
992 Outchar('!');
993 FOR i:= 1 STEP 1 UNTIL 3 DO Outtext(vennfillers[2]);
994 Outchar('!');
995 Outtext(" O VIEWPOINT: ");
996 IF aristotelian THEN Outtext("Aristotelian (existential)")
997 ELSE Outtext("Boolean (hypothetical)");
998 Outimage;
999
1000 ! LINE SIX;
1001 Outtext("R !");
1002 FOR i:= 1 STEP 1 UNTIL 3 DO Outtext(vennfillers[1]);
1003 Outchar('!');
1004 Outtext(vennfillers[4]);
1005 Outtext(vennfillers[4]);
1006 Outchar('!');
1007 Outtext(vennfillers[7]);
1008 Outtext(vennfillers[7]);
1009 Outchar('!');
1010 Outtext(vennfillers[6]);
1011 Outtext(vennfillers[6]);
1012 Outchar('!');
1013 FOR i:= 1 STEP 1 UNTIL 3 DO Outtext(vennfillers[2]);
1014 Outtext("! R ");
1015 IF NOT reviewing THEN
B114 1016 BEGIN
1017 IF valid THEN Outtext(" VALID: Yes")
1018 ELSE Outtext(" VALID: No");
E114 1019 END;
1020 Outimage;
1021
1022 ! LINE SEVEN;
1023 Outtext(" ------------------ ");
1024 IF NOT reviewing THEN
B115 1025 BEGIN
1026 IF valid THEN
B116 1027 BEGIN
1028 Outtext(" LATIN NAME: ");
1029 Outtext(latinname)
E116 1030 END ELSE IF j<8 THEN outdata;
E115 1031 END;
1032 Outimage;
1033
1034 ! LINE eight;
1035 Outtext(" !");
1036 FOR i:= 1 STEP 1 UNTIL 8 DO Outtext(vennfillers[3]);
1037 Outtext("! ");
1038 IF NOT reviewing AND NOT valid AND j<8 THEN outdata;
1039 Outimage;
1040
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-20
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1041 ! LINE NINE;
1042 Outtext(" !");
1043 FOR i:= 1 STEP 1 UNTIL 8 DO Outtext(vennfillers[3]);
1044 Outtext("! ");
1045 IF NOT reviewing AND NOT valid AND j<8 THEN outdata;
1046 Outimage;
1047
1048 ! LINE TEN;
1049 Outtext(" ---------- ");
1050 IF NOT reviewing AND NOT valid AND j<8 THEN outdata;
1051 Outimage;
1052 outline(" MIDDLE ");
1053
1054 FOR i:= 1 STEP 1 UNTIL 7 DO IF vennfillers[i] = " " THEN vennfillers[i]:- Copy("BLANKS");
E111 1055 END PR*CEDURE outdiagram;
1056
1057 BOOLEAN PROCEDURE outblankdiagram;
B117 1058 BEGIN
1059 outline(" ------------------");
1060 outline("M !1 !5 !2 ! M CONVENTIONS");
1061 outline("I ! ! ! ! A");
1062 outline("N ! ---------- ! J '/' = this sector empty by Major Premise");
1063 outline("O ! !4 !7 !6 ! ! O '\' = this sector empty by Minor Premise");
1064 outline("R ! ! ! ! ! ! R 'X' = this sector empty by BOTH the above");
1065 outline(" ------------------ '?' = this OR adjacent sector MUST have a member");
1066 outline(" !3 ! '*' = this sector MUST have a member");
1067 outline(" ! !");
1068 outline(" ---------- Otherwise, value of sector is 'BLANKS'");
1069 outline(" MIDDLE (simply due to lack of information)");
1070 Outimage;
1071 outsyllogism
E117 1072 END PR*CEDURE outblankdiagram;
1073
1074 BOOLEAN PROCEDURE validityhelp;
B118 1075 BEGIN
1076 outline("The syllogism is valid only if you can 'read' the conclusion from the diagram");
1077 Outtext("just as it is. That is, ");
1078 IF conclusion.type = "A" THEN Outtext("both sectors 1 and 4 would have to be shaded out.")
1079 ELSE IF conclusion.type = "E" THEN Outtext("both sectors 5 and 7 would have to be shaded out.")
1080 ELSE IF conclusion.type = "I" THEN Outtext("either sector 5 or 7 would have to contain a '*'.")
1081 ELSE Outtext("either sector 1 or 4 would have to contain a '*'.");
1082 Outimage
E118 1083 END PR*CEDURE validityhelp;
1084
E110 1085 END CLA*S venndiagram;
1086
1087 INSPECT NEW safmin DO
B119 1088 BEGIN
1089 REF(venndiagram) ordinarysyllogism;
1090 INTEGER i, contacttime;
1091 BOOLEAN toggle, quit;
1092 COMMENT--------------------------------------------------------------------
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-21
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1093 Note that "toggle" is used for several DIFFERENT purposes.
1094 ---------------------------------------------------------------------------;
1095 TEXT response, target;
1096
1097 BOOLEAN PROCEDURE viewpointhelp;
B120 1098 BEGIN
1099 Outimage;
1100 outline("Under the Aristotelian (or existential) interpretation, the SUBJECT");
1101 outline("class of each 'A' and 'E' (universal) premise is assumed to have at");
1102 outline("least one member. (Some logicians assume that each class mentioned--three");
1103 outline("in all--must have members, but the stingy VENN program refuses to multiply");
1104 outline("entities beyond necessity. Under the Boolean (or hypothetical) viewpoint,");
1105 outline("even this stingy assumption about the subject class of 'A' and 'E' premises");
1106 outline("is void. Of course, it makes no difference which interpretation you select");
1107 outline("in the case of 'I' and 'O' (particular) premises since 'some' forces us");
1108 outline("to assume that their subject classes have at least one member.");
1109 COMMENT----------------------------------------------------------------------
1110 Parsimony was an important consideration, but this decision was also motivated
1111 by a desire to keep VENN.SIM and QUICK.SIM (an interactive, generative program
1112 for teaching immediate inference) consistent. Eventually parts of QUICK.SIM
1113 will be used in VENN, e.g., to produce syllogisms with obverted premises.
1114 Thus it is imperative that "adopting the existential viewpoint" mean ONE
1115 thing, whether we speak of immeidate inferences or syllogistic inferences.
1116 In fact, however, most authors MODIFY their stand on the existential viewpoint
1117 as they pass from immediate inference to syllogistic inference. Such slippage
1118 would wreak havoc in a computer algorithm, however! As a side-effect of this
1119 decision, we have the problem of deciding what to do with AEO-4. I prefer to
1120 consider it invalid, contending that its invalidity shows that the "rules"
1121 are incomplete. Nevertheless, AEO-4 IS considered valid by the program at this
1122 time. Later verions of VENN will probably treat it as invalid, however, and
1123 the rules will be modified so that AEO-4 will commit the existential fallacy.
1124 User comments are invited.
1125 -----------------------------------------------------------------------------;
1126 Outimage;
E120 1127 END;
1128
1129 BOOLEAN PROCEDURE figurehelp;
B121 1130 BEGIN
1131 Outimage;
1132 outline("The figure of a syllogism is determined by the spatial arrangement of");
1133 outline("the two occurrences of the MIDDLE term ('X') in the premises:");
1134 Outimage;
1135 outline(" -1- -2-");
1136 outline(" X Major Major X");
1137 outline(" Minor X Minor X");
1138 outline(" ----------- ----------");
1139 Outimage;
1140 outline(" -3- -4-");
1141 outline(" X Major Major X");
1142 outline(" X Minor X Minor");
1143 outline(" ---------- -----------");
1144 Outimage
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-22
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E121 1145 END;
1146
1147 IF trmop(8r2012, Sysout, 80) \= 80 THEN
B122 1148 BEGIN
1149 COMMENT------------------------------------------------------------
1150 Simulates "SET TTY WIDTH 80" if necessary and, if it was, reopens
1151 Sysout with this new parameter.
1152 ------------------------------------------------------------------;
1153 Sysout.Close;
1154 Sysout.Open(Blanks(80));
1155 outline("TTY WIDTH reset to 80 by program.")
E122 1156 END;
1157
1158 Outimage;
1159 outline("VENN Version 1 (c) copyright 1977 by its author, Dr. Walter Maner, Department");
1160 outline("of Philosophy, Old Dominion University, Norfolk, VA 23508. TEL: (804) 489-6517");
1161 Outimage;
1162 outline("Use of VENN implies an agreement to report all modifications and any program");
1163 outline("errors directly to the author.");
1164 Outimage;
1165 outline("NOTE: Typing a capital 'H' gets help, if any is available.");
1166 outline(" Default answers (if any) appear between slash marks,");
1167 outline(" e.g.,'/yes/'. If just the RETURN key is pushed, the");
1168 outline(" program will use the default value indicated. If not");
1169 outline(" it will use the value you supply after the final ':'.");
1170 Outimage;
1171 margin:= 1;
1172 helpchar:= 'H';
1173
1174 request("Need to review the description of this program ('yes' or 'no')? ",
1175 "yes",boolinput(toggle),
1176 "Huh?",nohelp);
1177 IF toggle THEN
B123 1178 BEGIN
1179 Outimage;
1180 outline("This program will generate new (standard) syllogisms for you for as");
1181 outline("long as you want to work at analyzing them. There are 256 formally");
1182 outline("distinct syllogisms and (in this program) so many novel combinations");
1183 outline("of terms for each of these 256 that the chance that you will get two");
1184 outline("syllogisms alike in two successive generations approaches zero. Since");
1185 outline("most of these 256 basic forms are invalid and since the program");
1186 outline("chooses at random from these forms (or a subset thereof), you must be");
1187 outline("skeptical of the arguments produced. As a rule, the chance of getting");
1188 outline("a valid syllogism under the Aristotelian interpretation is about 1 in");
1189 outline("11 while, under the tighter Boolean interpretation, it shrinks to near");
1190 outline("1 in 17. (You'll get to choose which interpretation the program is to");
1191 outline("use.) When you have correctly answered all the questions posed by the");
1192 outline("program regarding a syllogism, the program will proceed to draw the");
1193 outline("Venn diagram for the syllogism and print out a table of relevant data.");
1194 outline("At this point you can either work through the same syllogism again or");
1195 outline("have the program generate a new one (or quit). Instead of answering a");
1196 outline("question, you can type 'H' for help. A program clock will keep track");
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-23
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1197 outline("of how long it takes you to work through a given series of questions.");
1198 outline("You'll probably enjoy trying to best your own record. Of course, you");
1199 outline("can skip the questions if you just want to use VENN to check validity.");
1200 outline("You can even ask VENN to make up counterexamples to his own syllogism!");
1201 Outimage
E123 1202 END;
1203
1204 WHILE NOT quit DO
B124 1205 BEGIN
1206 ordinarysyllogism:- NEW venndiagram;
1207 INSPECT ordinarysyllogism DO
B125 1208 BEGIN
1209 request("Specify syllogism by MOOD and FIGURE (use '?' as a wild card): ","???-?",
1210 textinput(form,goodformspec),
1211 "Response should resemble 'AEI-2','EOE-4', '??E-?', '???-4', 'EII-?', etc.",
1212 help("Each statement's type (A,E,I, O or ?), followed by figure (1,2,3, 4 or ?)."));
1213
1214 request("Suggest a label (for the MAJOR class): ",
1215 majorterm,textinput(majorterm,majorterm.Length<25),
1216 "? Too long...try again",
1217 help("Any general category term not beginning with 'H' will work."));
1218 IF majorterm.Sub(1,1) \= "h" THEN upcase(majorterm);
1219
1220 request("And another label (for the MINOR class): ",
1221 minorterm,textinput(minorterm,minorterm.Length<25),
1222 "? Too long...try again",
1223 help("Any general category term not beginning with 'H' will work."));
1224 IF minorterm.Sub(1,1) \= "h" THEN upcase(minorterm);
1225
1226 request("And one more (for the MIDDLE class): ",
1227 middleterm,textinput(middleterm,middleterm.Length<25),
1228 "? Too long...try again",
1229 help("Any general category term not beginning with 'H' will work."));
1230 IF middleterm.Sub(1,1) \= "h" THEN upcase(middleterm);
1231
1232 request("Aristotelian interpretation ('yes' or 'no')? ",
1233 "yes",boolinput(aristotelian),
1234 "Huh? Type 'H' for help.",
1235 viewpointhelp);
1236
1237 makesyllogism;
1238 validate;
1239 doublecheck;
1240
1241 samesyllogism:
1242 request("Want to skip the question routine ('yes' or 'no')? ",
1243 "no",boolinput(justtesting),
1244 "Huh? Type 'H' for help.",
1245 help("If you say 'yes', the program will generate the Venn diagram immediately."));
1246
1247 IF NOT justtesting THEN
B126 1248 BEGIN
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-24
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1249 contacttime:= Entier(clocktime);
1250 Outimage;
1251 outline("Here we go...the clock is running. Good luck!");
1252 outsyllogism;
1253
1254 request("MOOD of this syllogism:",nodefault,
1255 textinput(response,upcase(response)= mood),
1256 "No. Try again or type 'H' for help.",
1257 help("A 3-letter word giving the type of each proposition in turn e.g., 'AEI'"));
1258 outline("Right!");
1259 Outimage;
1260 outsyllogism;
1261
1262 request("Figure:",nodefault,
1263 textinput(response, response = figure),
1264 "No. Try again or type 'H' for help.",
1265 figurehelp);
1266 outline("Right!");
1267 Outimage;
1268 outsyllogism;
1269
1270 request("Venn diagram, sector 1, will contain (/, \, X, ?, * or BLANKS): ",
1271 "BLANKS",textinput(response,response = vennfillers[1]),
1272 "Wrong. Type 'H' for help.",
1273 outblankdiagram);
1274 outline("Right!");
1275 Outimage;
1276 outsyllogism;
1277
1278 request("Sector 2 will contain (/, \, X, ?, * or BLANKS): ",
1279 "BLANKS",textinput(response,response = vennfillers[2]),
1280 "Wrong. Type 'H' for help.",
1281 outblankdiagram);
1282 outline("Right!");
1283 Outimage;
1284 outsyllogism;
1285
1286 request("Sector 3 will contain (/, \, X, ?, * or BLANKS): ",
1287 "BLANKS",textinput(response,response = vennfillers[3]),
1288 "Wrong. Type 'H' for help.",
1289 outblankdiagram);
1290 outline("Right!");
1291 Outimage;
1292 outsyllogism;
1293
1294 request("Sector 4 will contain (/, \, X, ?, * or BLANKS): ",
1295 "BLANKS",textinput(response,response = vennfillers[4]),
1296 "Wrong. Type 'H' for help.",
1297 outblankdiagram);
1298 outline("Right!");
1299 Outimage;
1300 outsyllogism;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-25
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1301
1302 request("Sector 5 will contain (/, \, X, ?, * or BLANKS): ",
1303 "BLANKS",textinput(response,response = vennfillers[5]),
1304 "Wrong. Type 'H' for help.",
1305 outblankdiagram);
1306 outline("Right!");
1307 Outimage;
1308 outsyllogism;
1309
1310 request("Sector 6 will contain (/, \, X, ?, * or BLANKS): ",
1311 "BLANKS",textinput(response,response = vennfillers[6]),
1312 "Wrong. Type 'H' for help.",
1313 outblankdiagram);
1314 outline("Right!");
1315 Outimage;
1316 outsyllogism;
1317
1318 request("Sector 7 will contain (/, \, X, ?, * or BLANKS): ",
1319 "BLANKS",textinput(response,response = vennfillers[7]),
1320 "Wrong. Type 'H' for help.",
1321 outblankdiagram);
1322 outline("Right!");
1323 Outimage;
1324
1325 outline("Now study the syllogism and the complete Venn diagram carefully");
1326 outline("in order to decide whether the syllogism is valid or invalid:");
1327 outsyllogism;
1328 reviewing:= TRUE;
1329 outdiagram;
1330
1331 IF valid THEN target:- Copy("YES") ELSE target:- Copy("NO");
1332 Outimage;
1333 request("Is it valid ('yes' or 'no')? ","no",
1334 textinput(response, upcase(response)= target),
1335 "Wrong. Shame on you! Try again or type 'H' for help.",
1336 validityhelp);
1337 outline("Right!");
1338 Outimage;
1339
B127 1340 BEGIN
1341 INTEGER i;
1342 Outimage;
1343 outline("From these same two premises, i.e.,");
1344 outline(majorpremise.all);
1345 outline(minorpremise.all);
1346 Outimage;
1347 outline("we can validly deduce the following conclusions:");
1348 IF (vennfillers[1] = "\") AND (vennfillers[4] = "\" OR vennfillers[4] = "/" OR vennfillers[4] =
1349 "X") THEN
B128 1350 BEGIN
1351 i:= i + 1;
1352 outline(conc("Conclusion: All ",minorterm," are ",majorterm))
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-26
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
E128 1353 END;
1354 IF (vennfillers[2] = "/") AND (vennfillers[6] = "/" OR vennfillers[6] = "\" OR vennfillers[6] =
1355 "X") THEN
B129 1356 BEGIN
1357 i:= i + 1;
1358 outline(conc("Conclusion: All ",majorterm," are ",minorterm))
E129 1359 END;
1360 IF (vennfillers[5] = "\" OR vennfillers[5] = "/" OR vennfillers[5] = "X")
1361 AND (vennfillers[7] = "\" OR vennfillers[7] = "/" OR vennfillers[7] = "X") THEN
B130 1362 BEGIN
1363 i:= i + 2;
1364 outline(conc("Conclusion: No ",minorterm," are ",majorterm,"."));
1365 outline(conc("Conclusion: No ",majorterm," are ",minorterm,"."))
E130 1366 END;
1367 IF (vennfillers[5] = "*" OR vennfillers[7] = "*") THEN
B131 1368 BEGIN
1369 i:= i + 2;
1370 outline(conc("Conclusion: Some ",minorterm," are ",majorterm,"."));
1371 outline(conc("Conclusion: Some ",majorterm," are ",minorterm,"."))
E131 1372 END;
1373 IF (vennfillers[1] = "*" OR vennfillers[4] = "*") THEN
B132 1374 BEGIN
1375 i:= i + 1;
1376 outline(conc("Conclusion: Some ",minorterm," are not ",majorterm,"."))
E132 1377 END;
1378 IF (vennfillers[2] = "*" OR vennfillers[6] = "*") THEN
B133 1379 BEGIN
1380 i:= i + 1;
1381 outline(conc("Conclusion: Some ",majorterm," are not ",minorterm,"."))
E133 1382 END;
1383 IF i = 0 THEN
B134 1384 BEGIN
1385 outline(" NONE!");
1386 Outimage
E134 1387 END
1388 ELSE
B135 1389 BEGIN
1390 Outimage;
1391 outline("No other valid deductions are possible.")
E135 1392 END;
1393 outline("You will have about 45 seconds to verify this for yourself by");
1394 outline("referring again to the Venn diagram:");
1395 reviewing:= TRUE;
1396 Outimage;
1397 outdiagram;
1398 sleep(45);
1399 reviewing:= FALSE
E127 1400 END;
1401 outsyllogism;
1402
1403
1404 IF NOT valid THEN
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-27
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
B136 1405 BEGIN
1406 outline("Now let's determine which fallacies were committed");
1407 outline("by evaluating the following TRUE/FALSE questions...");
1408 Outimage;
1409
1410 IF fallacyflags[1] THEN target:- Copy("T")
1411 ELSE target:- Copy("F");
1412 request("(1) Both premises negative ('T' or 'F'): ","F",
1413 textinput(response, upcase(response) = target),
1414 "No.",
1415 nohelp);
1416 outline("Right!");
1417 Outimage;
1418 outsyllogism;
1419
1420 IF fallacyflags[2] THEN target:- Copy("T")
1421 ELSE target:- Copy("F");
1422 request("(2) Neither premise distributes middle term ('T' or 'F'): ","F",
1423 textinput(response, upcase(response) = target),
1424 "No. Try again or type 'H' for help.",
1425 help("'..distributes..' = '..refers to ALL members of the class named by..'"));
1426 outline("Right!");
1427 Outimage;
1428 outsyllogism;
1429
1430 IF fallacyflags[3] THEN target:- Copy("T")
1431 ELSE target:- Copy("F");
1432 request("(3) Positive conclusion from negative Major Premise ('T' or 'F'): ","F",
1433 textinput(response, upcase(response) = target),
1434 "No. Try again or type 'H' for help.",
1435 help("'A' and 'I' are positive (affirmative) while 'E' and 'O' are negative."));
1436 outline("Right!");
1437 Outimage;
1438 outsyllogism;
1439
1440 IF fallacyflags[4] THEN target:- Copy("T")
1441 ELSE target:- Copy("F");
1442 request("(4) Positive conclusion from negative Minor Premise ('T' or 'F'): ","F",
1443 textinput(response, upcase(response) = target),
1444 "No. Try again or type 'H' for help.",
1445 help("'A' and 'I' are positive (affirmative) while 'E' and 'O' are negative."));
1446 outline("Right!");
1447 Outimage;
1448 outsyllogism;
1449
1450 IF fallacyflags[5] THEN target:- Copy("T")
1451 ELSE target:- Copy("F");
1452 request("(5) Negative conclusion from all positive premises ('T' or 'F'): ","F",
1453 textinput(response, upcase(response) = target),
1454 "No.",
1455 nohelp);
1456 outline("Right!");
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-28
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1457 Outimage;
1458 outsyllogism;
1459
1460 IF fallacyflags[6] THEN target:- Copy("T")
1461 ELSE target:- Copy("F");
1462 request("(6) Conclusion distributes MAJOR term but Major Premise doesn't ('T' or 'F'): ","F",
1463 textinput(response, upcase(response) = target),
1464 "No. Try again or type 'H' for help.",
1465 help("'..distributes..' = '..refers to ALL members of the class named by..'"));
1466 outline("Right!");
1467 Outimage;
1468 outsyllogism;
1469
1470 IF fallacyflags[7] THEN target:- Copy("T")
1471 ELSE target:- Copy("F");
1472 request("(7) Conclusion distributes MINOR term but Minor Premise doesn't ('T' or 'F'): ","F",
1473 textinput(response, upcase(response) = target),
1474 "No. Try again or type 'H' for help.",
1475 help("'..distributes..' = '..refers to ALL members of the class named by..'"));
1476 outline("Right!");
1477 Outimage;
1478
1479 IF NOT aristotelian THEN
B137 1480 BEGIN
1481 outsyllogism;
1482 IF fallacyflags[8] THEN target:- Copy("T")
1483 ELSE target:- Copy("F");
1484 request("(8) Both premises universal, yet conclusion is particular ('T' or 'F'): ","F",
1485 textinput(response, upcase(response) = target),
1486 "No.",
1487 nohelp);
1488 outline("Right!");
1489 Outimage;
E137 1490 END;
E136 1491 END;
1492
1493 Outtext("You worked through these questions in ");
1494 Outint(Entier(clocktime)-contacttime,6);
1495 Outtext(" seconds.");
1496 Outimage;
1497 outline("Now it's time to summarize our findings:")
E126 1498 END NOT justtesting;
1499
1500 outsyllogism;
1501 outdiagram;
1502 Outimage;
1503
1504 request("Want VENN to try to make up a counterexample ('yes' or 'no')? ",
1505 "yes", boolinput(toggle),
1506 "Huh? Type 'H' for help.",
1507 help("A syllogism of the same form with true premises and a false conclusion."));
1508
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-29
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1509 IF toggle THEN
B138 1510 BEGIN
1511 CLASS counterterms;
1512 COMMENT---------------------------------------------------------------------
1513 This CLASS implements a heuristic search for a set of three terms which, when
1514 substituted for the original three terms of a syllogism, will make both its
1515 premises true and its conclusion false. The most promising size combinations
1516 of subject and predicate classes for each statement are already known and
1517 stored by "makesyllogism" in the variables "truemajorpairs," "trueminorpairs,"
1518 "falseconpairs." (See comment at the first occurrence of "truemajorpairs:-" for
1519 further information about the content of these variables.) This CLASS
1520 object simply tries to find a set of three terms which will simultaneously
1521 satisfy the size specifications of three pairs, one each from "truemajorpairs,"
1522 "trueminorpairs," and "falseconpairs." If it succeeds, the CLASS detaches and
1523 a counterexample is generated with appropriate big, medium and little class terms.
1524 (See comments embedded in CLASS "terms" above.)
1525 ---------------------------------------------------------------------------;
B139 1526 BEGIN
1527 INTEGER i, j;
1528
1529 BOOLEAN onematch, found;
1530
1531 CHARACTER ch, sizeofmajorclass, sizeofmiddleclass, sizeofminorclass;
1532
1533 PROCEDURE choose;
B140 1534 BEGIN
1535 IF sizeofmajorclass = 'B' THEN countermajorterm:- pickterm(2)
1536 ELSE IF sizeofmajorclass = 'M' THEN countermajorterm:- pickterm(3)
1537 ELSE countermajorterm:- pickterm(4);
1538 IF sizeofmiddleclass = 'B' THEN countermiddleterm:- pickterm(2)
1539 ELSE IF sizeofmiddleclass = 'M' THEN countermiddleterm:- pickterm(3)
1540 ELSE countermiddleterm:- pickterm(4);
1541 IF sizeofminorclass = 'B' THEN counterminorterm:- pickterm(2)
1542 ELSE IF sizeofminorclass = 'M' THEN counterminorterm:- pickterm(3)
1543 ELSE counterminorterm:- pickterm(4);
1544 IF (countermajorterm == countermiddleterm OR countermiddleterm == counterminorterm
1545 OR countermajorterm == counterminorterm) THEN choose
E140 1546 END PR*CEDURE choose;
1547
1548 truemajorpairs.Setpos(1);
1549 trueminorpairs.Setpos(1);
1550 falseconpairs.Setpos(1);
1551
1552 IF valid THEN outline("You must be kidding. It can't be done.")
1553 ELSE WHILE falseconpairs.More DO
B141 1554 BEGIN
1555 j:= j + 1;
1556 falseconpairs.Getchar;
1557 COMMENT This position is blank so we continue...;
1558 sizeofminorclass:= falseconpairs.Getchar;
1559 sizeofmajorclass:= falseconpairs.Getchar;
1560 WHILE trueminorpairs.More DO
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-30
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
B142 1561 BEGIN
1562 j:= j + 1;
1563 trueminorpairs.Getchar;
1564 COMMENT This position is blank so we continue...;
1565 IF trueminorpairs.Getchar = sizeofminorclass THEN
B143 1566 BEGIN
1567 sizeofmiddleclass:= trueminorpairs.Getchar;
1568 WHILE truemajorpairs.More DO
B144 1569 BEGIN
1570 i:= i + 1;
1571 truemajorpairs.Getchar;
1572 COMMENT This position is blank so we continue...;
1573 ch:= truemajorpairs.Getchar;
1574 IF ch = sizeofmajorclass AND truemajorpairs.Getchar = sizeofmiddleclass
1575 THEN
B145 1576 BEGIN
1577 onematch:= found:= TRUE;
1578 choose;
1579 Detach;
1580 choose;
1581 COMMENT---------------------------------------------------------------------
1582 Before seeking new pair matches, VENN first tries different terms using current
1583 size data.
1584 -----------------------------------------------------------------------------;
1585 Detach;
1586 found:= FALSE
E145 1587 END
E144 1588 END;
1589 truemajorpairs.Setpos(1)
E143 1590 END
1591 ELSE trueminorpairs.Getchar
E142 1592 END;
1593 trueminorpairs.Setpos(1);
E141 1594 END;
1595 IF NOT valid THEN
B146 1596 BEGIN
1597 IF NOT onematch THEN
B147 1598 BEGIN
1599 j:= i + j;
1600 Outtext("After");
1601 Outint(j,3);
1602 Outtext(" tries,");
1603 Outint(i,3);
1604 Outtext(" of which almost succeeded,");
1605 outline(" VENN ran out of ideas and gave up.");
1606 Outimage
E147 1607 END
1608 ELSE outline("VENN can't think of another one. Sorry.")
E146 1609 END
E139 1610 END CLA*S match;
1611
1612 REF(counterterms) heuristic;
DECsystem-10 SIMULA Version 3 28-JUL- 1977 20:51 PAGE 1-31
VENN1.SIM [1662,21701] 28-JUL- 1977 0:46
1613 heuristic:- NEW counterterms;
1614 INSPECT heuristic DO
1615 WHILE found AND toggle DO
B148 1616 BEGIN
1617 Outimage;
1618 outline("The original syllogism was:");
1619 outsyllogism;
1620 outline("VENN proposes this as a counterexample:");
1621 makecounterexample;
1622 outcounterexample;
1623
1624 request("Want VENN to try to make up another counterexample ('yes' or 'no')? ",
1625 "no", boolinput(toggle),
1626 "Huh?", nohelp);
1627
1628 IF toggle THEN Resume(heuristic)
E148 1629 END
E138 1630 END;
1631
1632 request("Want to stop ('yes' or 'no')? ","no",
1633 boolinput(quit),"Huh? Type 'H' for help.",
1634 help("'No' will end execution of the program."));
1635
1636 IF NOT quit THEN
B149 1637 BEGIN
1638 request("Different syllogism this time ('yes' or 'no')? ","yes",
1639 boolinput(toggle),
1640 "Huh? Type 'H' for help.",
1641 help("'No' repeats the cycle on the current syllogism."));
1642 IF NOT toggle THEN GOTO samesyllogism
E149 1643 END
E125 1644 END INSP*CT ordinary syllogism;
E124 1645 END "WHILE NOT quit DO" loop;
E119 1646 END INSP*CT safmin;
E6 1647 END INSP*CT termlist;
E2 1648 END
E1 1649 END
DEFAULT SWITCHES USED
NO ERRORS DETECTED