Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0074/gnosis.doc
There are 2 other files named gnosis.doc in the archive. Click here to see a list.


      GNOSIS - A CAI Author Language and Preprocessor
      ===============================================

	     (c) Copyright 1978 by Walter Maner
		  Department of Philosophy
		  Old Dominion University
		     Norfolk, VA. 23508



	  Based in part on an  earlier	manuscript
	  by   Jacob   Palme,	Swedish   Research
	  Institute    of    National	  Defense,
	  Stockholm, Sweden



			  ABSTRACT

     GNOSIS provides a CAI authoring language which makes it
relatively  easy  for any teacher with a basic understanding
of "programmed" textbooks to develop computerized  tutorials
for his students.  Although material already written in such
a format can be transformed virtually as-is by GNOSIS into a
form  suitable	for  computer  delivery,  the  teacher would
normally be writing his own "script." This  script,  because
it simulates the dialogue one might overhear if that teacher
were tutoring a student in private, can be made to "come  to
life" on a computer terminal by the addition of a few simple
GNOSIS command words.  The computer driven tutorial  is,  in
reality,  a  compiled  version	of  the ALGOL program GNOSIS
writes in response to the script prepared  by  the  teacher.
In fact, GNOSIS has been designed in such a way that the ANY
of the facilities of ALGOL can be exploited anywhere in  the
lesson.

     The fact that GNOSIS has been designed to function as a
TEACHING  rather  than	as  a TESTING system is reflected in
program logic at all levels.  In  accord  with	this  design
philosophy,  GNOSIS  tempers  negative and positive feedback
according to  psychological  context,  simulates  a  correct
response  (and	the comment which would have accompanied it)
when all else  fails,  encourages  student  control  through
skipping  and backstepping facilities, and generates teacher
reports which are geared to lesson improvement.


KEY  WORDS   AND   PHRASES:    GNOSIS,	 Computer   Assisted
Instruction,	CAI,   instruction,   teaching,   education,
computer, learning, school,  pedagogy,	pedagogics,  Digital
Equipment Corporation, DEC, PDP, ALGOL, SIMULA.
GNOSIS.DOC					      Page 2


			     *










		     TABLE OF CONTENTS



1.0   WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?
1.1   What Are The Supposed Advantages Of CAI?
1.2   What Is CAI Supposed To Do For The Teacher?
1.3   What Is CAI Supposed To Do For The Student?
1.4   What Are The Supposed Disadvantages Of CAI?

2.0   BASIC CHARACTERISTICS OF GNOSIS

3.0   THE GNOSIS COMMAND LANGUAGE
3.1   A Simple GNOSIS Lesson
3.2   Advice For Beginners
3.3   Alphabetical List Of GNOSIS Commands

4.0   GNOSIS TWO-PAGE SUMMARY

5.0   PRECEDENCE TABLE FOR GNOSIS COMMANDS

6.0   ERROR DIAGNOSIS AND RECOVERY
6.1   GNOSIS Translator Messages
6.1.1 GNOSIS Error Messages -
6.1.2 GNOSIS Warning Messages -
6.2   ALGRTS (ALGOL Run-time System) Messages
6.3   ALGOL Compiler Error Messages

7.0   WRITING ALGOL SEGMENTS INTO YOUR LESSON
7.1   Standard Variables And Procedures
7.1.1 GNOSIS Variables -
7.1.2 GNOSIS Procedures -
7.2   Creating Variables
7.3   Creating Procedures

8.0   WRITING GNOSIS LESSONS
8.1   Question Types
8.2   Lesson-generated Diagnostic Profiles
8.3   Some Advice

9.0   RUNNING GNOSIS

10.0  SETTING UP STUDENT ACCOUNTS
GNOSIS.DOC					      Page 3


INDEX OF GNOSIS COMMANDS

A.0   SELECTED BIBLIOGRAPHY

B.0   ILLEGAL LABEL NAMES

C.0   USE OF IF-CLASS COMMANDS
C.1   Example I
C.2   Example II

D.0   USEFUL MIC PROGRAMS
D.1   GNOSIS.MIC
D.2   SORT.MIC

E.0   MACRO ROUTINES
E.1   INTRUT Intercept Routine
E.2   R Routine
E.3   RUN Routine

F.0   SAMPLE GNOSIS PROGRAM

G.0   FORMATTING THE <LESSONNAME>.ALG FILE

H.0   CONTENTS OF GNOSIS DISTRIBUTION TAPE

I.0   IMPLEMENTATION CHECKLIST
I.1   Essential Steps
I.2   Other Desirable Steps
I.3   Testing
GNOSIS.DOC					      Page 4


'















			     *


		       ACKNOWLEDGMENT

The author wishes to express his appreciation to Jacob Palme
for  much  insightful  advice  and  for  his assistance with
Swedish texts;	to  the  Old  Dominion	University  Research
Foundation  for  a Summer Research Grant (1976) which funded
preliminary  work  on  GNOSIS;	 to  the  National   Science
Foundation's   program	 for   Comprehensive  Assistance  to
Undergraduate Science Education (CAUSE)  which	funded,  via
the  ODU  CAUSE  office,  crucial  work on GNOSIS during the
summer of 1977;  and  to  the  ODU  Computer  Center  for  a
generous  allowance of computer time throughout a three-year
period.

			     *
GNOSIS.DOC					      Page 5
WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?


			     *













1.0  WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?

     The surprising answer to this question  is  that,	with
the  possible  exception  of  certain kinds of generative or
simulation programming,  there	is  nothing  inherently  new
about  CAI.   The  computer  --  grand	as  it	is -- simply
provides a new vehicle for doing the various kinds of things
teachers   have   always  done,  though  perhaps  with	less
convenience and efficiency.  From  the	teacher's  point  of
view,  then,  the invention of the computer should be viewed
on a par with the invention of the erasable chalkboard,  the
printing  press,  the  pencil,	the  video tape machine, the
overhead projector, and so on.	Each provided  nothing	more
than  a  distinct  instructional  medium which could then be
exploited by the teacher and learner alike.  No matter	what
the  computer  does for us, it is still true that curriculum
materials must be organized, developed and evaluated by  the
trained  teaching  professional.   The	computer is about as
much a threat to the competent teacher as the textbook.

     It is  true  that	suitably  programmed  machines	will
increasingly  do  certain  things  faster  or longer or more
accurately or in more places than human  beings.   But	note
that  this  amounts  to  a  continuing	REDEFINITION of what
should henceforth be considered  "the  human  use  of  human
beings"!   If  there  is  any  teaching function which could
better be left to some automatic  medium,  then  it  clearly
SHOULD	be  left  to  this  medium  most  of the time.	Why?
Because it  would  be  DEGRADING  for  any  human  being  to
continue  to  perform  such a menialized task (e.g., grading
homework).  The computer revolution promises, therefore,  to
give teachers increasingly more time to concentrate on their
"higher" roles -- a vision of the future which should please
all but the incompetent.

     CAI is often confused with Computer  Based  Instruction
(CBI)  and  Computer  Managed  Instruction  (CMI).  We say a
course is computer BASED when the computerized materials can
stand  alone  as a complete and adequate resource.  Very few
courses now claim to be computer based and, in	this  sense,
GNOSIS.DOC					      Page 6
WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?


only   a   scarce   few  ever  will  be.   Computer  MANAGED
instruction, in contrast to both CAI and CBI, has little  to
do  with  the  delivery of instruction.  CMI fulfills a role
which is largely (or even exclusively) administrative.	That
is,  it  assists  the  teacher	with  what  has  been called
"classroom management":  student records, test construction,
test  grading,	statistical chores, and so on.	CAI provides
exactly what the term "assisted" implies -- i.e., a  helpful
extension  of  the  usual course methods and materials.  The
role of CAI at the present time,  and  for  the  foreseeable
future, is primarily one of course enrichment.[1]



1.1  What Are The Supposed Advantages Of CAI?

     Whatever claims are made for  CAI,  it  is  clear	that
their  proper  evaluation is an empirical matter.  If CAI IS
better then it will have to prove itself better in the usual
way,  through  educational  research.	What  follows below,
then, is a discussion of some  advantages  commonly  ALLEGED
for  this  mode  of instruction.  They represent conjectures
this author finds plausible apriori and, as such, they could
probably  best	serve  us  as  research hypotheses.  And who
knows?	Perhaps your  own  research  will  be  a  factor  in
determining  which  of these guesses are more nearly in line
with the facts.



1.2  What Is CAI Supposed To Do For The Teacher?

     1.  By making it unnecessary for  the  teacher  himself
	 either  to  present or to evaluate the large amount
	 of drill and practice students will need to have in
	 skill-oriented  courses,  CAI should in theory free
	 the teacher  for  more  creative  and	intellectual
	 encounters with students.

     2.  Because  a  CAI  program  can	routinely  manage  a
	 student's  path through curriculum material (based,
	 of  course,  on  decision  criteria   the   teacher
	 supplies),  the  computer  should in theory make it
	 possible   for   the	teacher   to   individualize
	 instruction  in  circumstances  where	it  was  not
	 administratively feasible to do so before CAI.

---------------
     1.  There is much progress being made in  a  number  of
related  areas,  however.   These  include  GCAI (Generative
CAI),  SCAI   (Simulation   CAI),   CAG   (Computer-assisted
Guidance),    CAT   (Computer-administered   Testing),	 CGT
(Computer-generated Tests), and even certain  administrative
applications.
GNOSIS.DOC					      Page 7
WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?


     3.  Because a CAI program	can  AUTOMATICALLY  generate
	 teacher  reports  on  individual  student  progress
	 through  curriculum  material,   it   can   provide
	 diagnostic   or  evaluative  data  which  would  be
	 decidely less	convenient  to	develop  using	more
	 traditional approaches.

     4.  Because teacher reports are developed	immediately,
	 CAI  should  afford  the teacher the opportunity to
	 evaluate instructional content and strategies while
	 there is still time to change them for the better.

     5.  Because CAI programs can be edited at any time  the
	 author  feels so inclined, even while in active use
	 by  students,	revision  can  be   continuous	 and
	 responsive.

     6.  Because  changes  can	be  effected   in   computer
	 programs  without  the  need to retype and reformat
	 the program  as  a  whole,  the  editing  chore  is
	 comparatively	 painless  from  the  standpoint  of
	 "manuscript management."

     7.  For all the reasons given above, desirable  changes
	 are  more  likely to be made than they would be if,
	 say, the instructional  vehicle  were	a  published
	 textbook.

     8.  Because a CAI program always  performs  exactly  as
	 designed,  it	provides  an unsurpassed opportunity
	 for the teacher qua educator to do  research  under
	 carefully controlled experimental conditions.




1.3  What Is CAI Supposed To Do For The Student?

     1.  Because a computerized  lesson  can  be  delivering
	 instruction   in   any   one	of  several  places,
	 simultaneously, it should normally prove to be more
	 accessible than the teacher.

     2.  Because a computerized lesson can in  principle  be
	 delivered at any time, the student should in theory
	 be able to benefit from a more flexible  scheduling
	 of his workload.

     3.  Because CAI permits a student to make his  mistakes
	 discretely,  it  should  in  theory promote greater
	 involvement by students who are  normally  reticent
	 or  who  find	the  typical  classroom  environment
	 intimidating.
GNOSIS.DOC					      Page 8
WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?


     4.  Because   a   well-designed   computerized   lesson
	 simulates sessions of private tutoring, the student
	 should come to look upon the medium  as  a  vehicle
	 for personalizing instruction.

     5.  Because the student can proceed at  his  own  pace,
	 slower   learners   should  not  ever	have  to  be
	 embarrassed by their more gifted peers;  nor should
	 these	gifted	themselves  ever  have	to wallow in
	 boredom while the teacher struggles with  the	less
	 advantaged.

     6.  Because the machine never tires, it should be	able
	 to  provide  whatever amounts of drill and practice
	 are necessary for a student to become successful.

     7.  Because feedback is immediate and pertinent,  there
	 should  be  little  opportunity  for the learner to
	 become entrenched in bad habits.

     8.  Because the student may exercise some control	over
	 the  delivery of the computerized lesson, he should
	 in  theory   be   able   to   contribute   to	 the
	 individualization  of	instruction  in  partnership
	 with the teacher.

     9.  Because a computerized program IS so attentive  and
	 responsive,   it  should  be  more  motivating  for
	 students to learn in this way than in circumstances
	 where the student is lost in a sea of faces.

    10.  Because the computer forces  the  learner  into  an
	 active  role,	he  should be able to learn more ...
	 better ...  faster, and he should be able to retain
	 it longer.

    11.  Because CAI furnishes	the  student  with  tangible
	 indications of his progress through the curriculum,
	 he should in theory be more highly motivated  than,
	 say,  the  student  who is told of his progress (or
	 lack of it) only at examination time.

    12.  Because the program can be made to  adjust  to  the
	 level	of  competence	actually demonstrated by the
	 student, he should be able  to  get  precisely  the
	 amount  of instruction he needs on each occasion so
	 that his time is used to maximum advantage.
GNOSIS.DOC					      Page 9
WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?


1.4  What Are The Supposed Disadvantages Of CAI?

     1.  Because computerized lessons are easy to revise, it
	 is   difficult   to   excuse	oneself   from	this
	 essentially endless chore.

     2.  Because the routine use of computerized lessons can
	 generate   an	avalanche  of  valuable  data  about
	 students, the onus  is  on  the  teacher  as  never
	 before to make informed judgments about students.

     3.  Because of the highly tutorial nature of CAI lesson
	 design,  the  author  is  forced as never before to
	 enter the minds  of  his  students,  to  anticipate
	 their	responses,  and  to  prepare  individualized
	 diagnostic comments.  Not every teacher -- not even
	 every	 GOOD  teacher	--  commands  the  necessary
	 insight.

     4.  Because  the  preparation  of	computerized  lesson
	 material  demands  a  degree  of  organization  not
	 normally required either for lecturing or  textbook
	 authoring,  CAI  can  force  the  teacher  to spend
	 considerable time restructuring his course.

     5.  Because a well  conceived,  half-hour	computerized
	 lesson  will  require, on the average, about twenty
	 hours of authoring time, many teachers will have to
	 move slowly into CAI.

     6.  For the same reason, teachers will be reluctant  to
	 change    textbooks	once   they   have   written
	 computerized lessons to accompany them.

     7.  Because a CAI program is, like  a  book,  a  direct
	 indication  of the author's mastery of the material
	 and  of  his  techniques  for	presenting  it,  any
	 deficiencies  which  may  exist  are  likely  to be
	 highly visible to students and colleagues.

     8.  Because computer resources are -- and will continue
	 to  be  -- limited relative to demand, both teacher
	 and student  will  find  themselves  competing  for
	 their "piece of the machine."

     9.  Because of the present anti-competitive  nature  of
	 the  computer	industry  (and for other reasons), a
	 CAI program will not be nearly as  sharable  or  as
	 marketable as a textbook, video cassette, or film.

    10.  Because the use  of  computer	lessons  presupposes
	 some  minimal	typing ability, certain students may
	 not  avail  themselves  of  the   opportunity	 CAI
	 provides unless special orientation is provided.
GNOSIS.DOC					     Page 10
WHAT IS COMPUTER ASSISTED INSTRUCTION (CAI)?


    11.  Because   approximately   correct   responses	 and
	 misspelled  responses	are  usually treated exactly
	 like wrong responses by the program, a student  may
	 become frustrated.

    12.  Because CAI permits flexible  pacing  by  learners,
	 the   teacher	must  be  prepared  to	confer	with
	 students on ALL aspects of the course at any  time.
	 It  is  not enough just to be prepared for the unit
	 at hand.
GNOSIS.DOC					     Page 11
BASIC CHARACTERISTICS OF GNOSIS


			     *













2.0  BASIC CHARACTERISTICS OF GNOSIS

     GNOSIS provides, through its ten basic  commands,[2]  a
simple	CAI  authoring	language which makes it easy for any
teacher with a basic understanding of "programmed" textbooks
to   develop   computerized   tutorials  for  his  students.
Although material already written in such a  format  can  be
transformed  virtually	as-is by GNOSIS into a form suitable
for computer delivery, the teacher would normally be writing
his  own  "script."  This  script,  because it simulates the
dialogue one might overhear if that teacher were tutoring  a
student  in  private,  can  be	made  to "come to life" on a
computer terminal by the addition of  a  few  simple  GNOSIS
command words.	The computer driven tutorial is, in reality,
a compiled version of the ALGOL  program  GNOSIS  writes  in
response to the script prepared by the teacher.

     As in the ordinary tutoring environment, the  student's
path  through  the  material  can  be  guided in various and
subtle ways, e.g., by routing students having difficulty  to
supplementary  material.   The	program  qua  tutor can also
react in helpful ways to  a  variety  of  anticipated  false
responses   to	 questions,   e.g.,  by  giving  appropriate
diagnostic commentary or hints, followed by a repetition  of
the   wrongly  answered  question.   Although  unanticipated
responses can be saved	for  inclusion	in  teacher  reports
(along	with  statistics on individual student performance),
the data which are generated exist for the sake of improving
the  lesson  pedagogically.   This  is	in  keeping with the
general design philosophy that GNOSIS should be  a  TEACHING
system	 rather   than	 a  TESTING  system.   GNOSIS  is  a
general-purpose test-and-branch system for Computer Assisted
Instruction.   The  teacher  prepares  a  lesson or "script"
containing short texts and questions.  This lesson is  input

---------------
     2.  See below, section 3.2.   Of  course,	GNOSIS	also
recognizes  many  advanced  commands which will be valued by
the sophisticated CAI author.
GNOSIS.DOC					     Page 12
BASIC CHARACTERISTICS OF GNOSIS


to the computer and translated by the GNOSIS into the  ALGOL
language.  The ALGOL compiler will then translate the lesson
into executable machine code and, after that, the lesson can
be run by the student.

     Because GNOSIS lessons are ultimately compiled en	bloc
and  because  the  compiler which does the final translation
generates  highly  efficient  machine  code,  the  CPU	time
consumed by students using GNOSIS lessons will be dramaticly
less  than  for  those	using  interpretative  systems	like
SCHOLAR-TEACH.

     Compared to SCHOLAR-TEACH, its principal competitor  on
DEC   hardware,   GNOSIS   has	 the   following  additional
facilities:

     1.  Use of highly mnemonic and natural English  command
	 words	(e.g.,	"QUESTION"  to	output	a  question,
	 "TEXT" to output a text block);  this makes writing
	 lessons in GNOSIS as simple as writing a script for
	 a programmed textbook.

     2.  Availability  of  both   upper   and	lower	case
	 characters   to  improve  readability	and  provide
	 emphasis.

     3.  Automatic  (defeasible)  vertical   segmenting   of
	 display  so  that  the  "scrolling effect" will not
	 disadvantage students working at a CRT.

     4.  Automatic  (defeasible)  right   justification   of
	 display with a "ragged right" at column 72.

     5.  Automatic  (defeasible)   generation	of   teacher
	 reports  which, instead of containing all manner of
	 irrelevant information, store	precisely  the	data
	 necessary   to  make  improvements  in  the  lesson
	 design.

     6.  Automatic (defeasible) simulation of a response the
	 program   would  have	considered  correct  if  the
	 student fails on repeated  attempts  to  supply  an
	 acceptable response.

     7.  Automatic  (defeasible)   collection	of   student
	 comments  on  the  lesson, whether the comments are
	 brief or voluminous.

     8.  Automatic (defeasible) use of the  student's  first
	 name in commenting and feedback routines.

     9.  Capability (defeasible) for student to back  up  or
	 skip ahead to an arbitrary point in the lesson.
GNOSIS.DOC					     Page 13
BASIC CHARACTERISTICS OF GNOSIS


    10.  Availability of a large number (13) of  pre-defined
	 branching  conditions,  far  more than exist in any
	 other CAI language.

    11.  Convenient access of the full facilities  of  ALGOL
	 whenever they are desired.

    12.  Convenient access to  external  FORTRAN  procedures
	 via ALGOL.

    13.  Automatic	(defeasible),	   context-sensitive
	 dispensing of hints.

    14.  Efficient entry and storage of global help texts.

    15.  Six times faster lesson  execution  than  with  CAI
	 languages    requiring    an	interpreter   (e.g.,
	 SCHOLAR-TEACH).

    16.  Automatic (defeasible) use of the  bell  to  prompt
	 student.

    17.  Absolute control of how branching  is	effected  at
	 run-time   (can  be  entirely	teacher  controlled,
	 entirely student controlled, or any mixture of  the
	 two).

    18.  Automatic (defeasible) transfer to another lesson.

    19.  Availability of multiple-choice question-and-answer
	 strategies which require the student to pick two or
	 more of  the  presented  alternatives	but  do  not
	 necessarily  penalize	him  for  a  partially wrong
	 response.

    20.  Automatic  generation	of  positive  and   negative
	 feedback,   suitably  individualized  according  to
	 context.


     As the GNOSIS author becomes more sophisticated in  his
needs  and  aspirations, there will come a time when he will
"turn programmer" and begin to write  brief  ALGOL  segments
into  his  lesson  script.  GNOSIS supports this transition,
but does not force it.	Because of this, more study  may  be
required  in  order  to  take  full advantage of GNOSIS than
would  be  required  for,  say,  SCHOLAR-TEACH.    But	 the
important  thing  is  that these easy-to-acquire programming
skills will give the author better, more flexible, and	more
extensible  facilities	once he has mastered them.  In fact,
through ALGOL, GNOSIS gives him access to all the facilities
of  a  powerful,  high-level programming language.  No other
CAI author language provides such an opportunity.
GNOSIS.DOC					     Page 14
BASIC CHARACTERISTICS OF GNOSIS


     The  principal  disadvantage  of  GNOSIS  is  that  the
ready-to-run  lesson  (.SAV  file)  is large compared to the
script which generated it -- about five times larger on  the
average.    While  regrettable,  this  situation  is  wholly
consistent  with  a  design  philosophy  which	 calls	 for
sacrificing  storage  efficiency whenever that would improve
runtime efficiency.  It is part  of  the  cost	of  avoiding
interpretive execution.
GNOSIS.DOC					     Page 15
THE GNOSIS COMMAND LANGUAGE


			     *













3.0  THE GNOSIS COMMAND LANGUAGE

     The GNOSIS language  consists  of	approximately  forty
simple	commands  which  are used in conjunction with texts,
questions, canned answers, hints, and comments.  All  GNOSIS
commands  begin  with  a reserved symbol, usually "%",[3] in
the first column (extreme left margin) of a line.  Only  the
first  three  letters of the command are significant, so one
may freely abbreviate "%QUESTION" to "%QUE", etc.



3.1  A Simple GNOSIS Lesson

     Even if you have no experience in computer programming,
you  will have little difficulty understanding the following
simple GNOSIS lesson.  In fact, such lessons  have  more  in
common	with  theater  scripts	than  with  any  programming
language you have ever heard  of.   Roughly,  in  the  lines
following %TEXT or %QUESTION, the teacher is speaking to the
student;  in the word or phrase immediately following %RIGHT
or  %WRONG,  the student is responding to the teacher;	and,
in the lines following %RIGHT and  %WRONG,  the  teacher  is
reacting to the student's response.


--------------------- A SIMPLE LESSON ---------------------

%TEACHER Dr. Walter Maner
%DISK
		COMMENT:  "%DISK" causes the lesson to
		generate reports for the teacher.  See
		section 3.3 for a full description of this
		command.
%NAME

---------------
     3.  The "!" cannot  be  used  since  it  is  a  comment
marker.   (This  implies  that	the  first  line cannot be a
comment.) However, any other symbol can be chosen.
GNOSIS.DOC					     Page 16
THE GNOSIS COMMAND LANGUAGE


		COMMENT:  "%NAME" causes the lesson to ask
		the student to enter his name.	See section
		3.3. for a full description of this command.

%TEXT
This lesson contains some riddles.  Put on your thinking cap
and try to answer them.
%QUESTION
What was the President's name in 1951?
%RIGHT Jimmy
Of course, Jimmy Carter was not President in 1951, but the
name of our President (i.e., Jimmy Carter) was "Jimmy" back
in 1951.  (He didn't change his name.)
%RIGHT Carter
%SAME
		COMMENT:  The %SAME command is explained in
		section 3.3.  Basically, it enables a single
		teacher reaction to be paired with several
		different student responses.  Here, the
		dialogue appearing after "%RIGHT Jimmy"
		will be delivered to the student if his
		response contains either "Jimmy", "Carter",
		or "James".

%RIGHT James
%SAME
%WRONG Harry
Harry Truman was the President in 1951, but I didn't ask you
who was President.  I asked you what our President's NAME
was in 1951.  Do you see the difference?
%WRONG Truman
%SAME
%WRONG
Hint:  His initials are J.C.
%WRONG
Another Hint:  What is our President's name now?  Has it
changed since 1951?
%QUESTION
How many three-cent postage stamps in a dozen?
%RIGHT 12
A dozen is still a dozen.  It doesn't matter what makes
up the dozen.
%RIGHT twelve
%SAME
%WRONG 4
You divided 3 into 12.	That gives 4, but you outsmarted
yourself!  Really, now, how could there be only 4 stamps
in a dozen?  Where did you go to school?
%WRONG four
%SAME
%WRONG
It takes twelve objects to make a dozen, doesn't it?
Does it matter whether the objects are three-cent stamps,
eggs, or what-have-you?
GNOSIS.DOC					     Page 17
THE GNOSIS COMMAND LANGUAGE


%END

--------------------------- END ----------------------------


     As you can see, the formula for writing a GNOSIS lesson
is simple indeed:

     1.  Display text to the student with %TEXT commands.

     2.  Ask questions with %QUESTION commands.

     3.  React to right answers with %RIGHT commands.

     4.  React to wrong answers with %WRONG commands.

Most GNOSIS lessons  will  deviate  very  little  from	this
paradigm.

     An actual terminal session (see below) would follow the
lesson	script	(see  above) faithfully but not blindly.  At
every point, GNOSIS would  be  making  judgments  about  the
student,  the lesson environment, and other relevant factors
in order to  generate  intelligent  comments  and  displays.
Note  especially  how  GNOSIS  would  manage the interaction
between the computer and the  student,	e.g.,  by  providing
feedback appropriate to the context.  In certain situations,
the student would be  recycled	through  the  question;   in
others,  GNOSIS  would	realize that the student is guessing
wildly, that the  program  is  no  longer  providing  useful
diagnostic  help, and would determine that the best approach
under the circumstances  would	be  to	simulate  a  correct
answer.  The student's first name would be used occasionally
to personalize dialogue -- often enough but not too often.

     Here, then, is an actual terminal session based on  the
simple lesson script given above:


------------------ ACTUAL TERMINAL SESSION -----------------

Hello!	This is GNOSIS talking.
I'd like to know your full name--
just type it in after the arrow.

	(Unless you enter a made-up name, GNOSIS will
	generate personal data based on this session.)

-->Walter Maner
Glad to meet you, WALTER!

Welcome to the lesson 'RIDDLE'.

This lesson was produced by the GNOSIS system for computer
GNOSIS.DOC					     Page 18
THE GNOSIS COMMAND LANGUAGE


aided instruction (CAI) from the Research Institute of
National Defense, Stockholm, Sweden, and the Old Dominion
University Research Foundation.

The author of this lesson is...
Dr. Walter Maner

IMPORTANT:  You can interrupt the lesson at any time by
typing the single character "%" on your terminal and then
pushing the RETURN button.

GNOSIS will then explain how you can type
	(1) 'STOP' to end the lesson immediately;
	(2) 'SKIP' to move on to the next question; or
	(3) 'BACK' to return to the previous question.

Push RETURN -->

This lesson contains some riddles.  Put on your thinking
cap and try to answer them.

Push RETURN -->

What was the President's name in 1951?
-->Harry Truman
Wrong!
Harry Truman was the President in 1951, but I didn't ask
you who was President.	I asked you what our President's
NAME was in 1951.  Do you see the difference?

Please try again.

What was the President's name in 1951?
-->Lyndon Johnson
No, you're wrong this time, WALTER.
Another Hint:  What is our President's name now?  Has it
changed since 1951?

Please try again.

What was the President's name in 1951?
-->James Earl Carter
Exactly right, WALTER!	There is hope for you after all!

JAMES EARL CARTER
	   ^^^^^^

		COMMENT:  In certain ambiguous contexts,
		GNOSIS will flag the word or words it
		took to be significant in the student's
		response.

Of course, Jimmy Carter was not President in 1951, but the
name of our President (i.e., Jimmy Carter) was "Jimmy" back
GNOSIS.DOC					     Page 19
THE GNOSIS COMMAND LANGUAGE


in 1951.  (He didn't change his name.)

Push RETURN -->

How many three-cent postage stamps in a dozen?
-->four
No, you're wrong this time.
You divided 3 into 12.	That gives 4, but you outsmarted
yourself!  Really, now, how could there be only 4 stamps
in a dozen?  Where did you go to school?

Please try again.

How many three-cent postage stamps in a dozen?
-->three
Sorry.

Just for the record, GNOSIS will simulate an acceptable
answer:

-->12
Very good.
A dozen is still a dozen.  It doesn't matter what makes
up the dozen.

Push RETURN -->

During the lesson "RIDDLE" you answered 2 questions,
and you gave the right answer 1 times.
On 0 questions your answer was right on your very first
try.

If you have any message for the teacher, then type it now,
one line at a time.  Finish with an EXTRA push on the
RETURN key.

-->This was a silly lesson.
-->
Leaving the lesson "RIDDLE"...

Have a nice day, WALTER!

--------------------------- END ----------------------------




3.2  Advice For Beginners

     Beginners should note that, while	there  is  a  fairly
large  number of GNOSIS commands, a very powerful lesson can
be written using  only	TEN  of  these:   %TEXT,  %QUESTION,
%RIGHT,  %WRONG,  %NOEXTRA, %EXTRA, %NOORDER, %ORDER, %GOTO,
and %END.  Learn how  to  use  these  basic  commands  first
GNOSIS.DOC					     Page 20
THE GNOSIS COMMAND LANGUAGE


before	you  advance  to  more	sophisticated devices.	As a
novice, you should also take note of the fact that it is NOT
necessary  to know how to program in ALGOL in order to write
GNOSIS programs.  In fact, you can ignore everything said in
this  manual  about  ALGOL "code" and ALGOL "segments" until
you are ready to extend your abilities	in  this  direction.
In  the  normal  case, the ALGOL coding would be done by the
Academic Support Service of your computer center anyway.

     When you have mastered the ten  basic  commands,  study
the demonstration program "HOW.GNO" provided in an appendix.
Try to imagine what "HOW" will do when it is run.   Then  "R
HOW"  and,  as	"HOW" runs, try to discover in the "HOW.GNO"
script the lines which are producing the  effects  you	see.
Compare  these	effects  with  the documentation provided in
this manual.

     Since GNOSIS commands cannot  appear  in  an  arbitrary
order, beginners are also encouraged to make faithful use of
the "Precedence Table for  GNOSIS  Commands"  (section	5.0,
below).    In	addition,  the	discussion  "Writing  GNOSIS
Lessons" (section 8,, below) should be helpful.  (In a later
release,  a  series of GNOSIS lessons which themselves teach
GNOSIS will be available.)



3.3  Alphabetical List Of GNOSIS Commands

     Note:  The character "|" is used to separate items of a
set from which one, and only one, member can be chosen.  The
characters "[" and "]" are used to enclose an item which may
be  present  or absent.  The characters "<" and ">" are used
to enclose non-literal elements, i.e., elements which  would
have  to  be  REPLACED by a literal before the code would be
valid.	Of course, "<empty>" is to be  replaced  by  a	null
literal,  namely, nothing.  Items not enclosed by these left
and right carats are literals,	hence  can  be	put  in  the
GNOSIS script just as they appear.

     1.  %ALGOL <one or more lines of ALGOL code>;

	      This command causes one or more lines of ALGOL
	 code  to  be  transferred  unchanged  to  the ALGOL
	 translation of the teacher's script.	The  segment
	 must  be legal in ALGOL and, in addition, must mesh
	 with the GNOSIS lesson at the point of insertion.

     2.  %BELL <empty>

	      Causes the bell to be rung  at  the  student's
	 terminal  whenever  the  computer is awaiting input
	 from him.  Useful in noisy  environments  and	with
	 first-time computer users.
GNOSIS.DOC					     Page 21
THE GNOSIS COMMAND LANGUAGE


     3.  %COPYRIGHT <line containing copyright notice>

	      If this command is used then,  each  time  the
	 lesson is run, a copyright notice will be output as
	 part of the lesson header.  This copyright  applies
	 only  to the lesson itself, of course -- not to the
	 GNOSIS software.

     4.  %DISK <empty>

	      Causes teacher reports to be created at lesson
	 runtime,  then  routed  to  preexisting  disk files
	 named <lessonname>.DTA and  <lessonname>.SRT.	 The
	 <lessonname>.DTA  file  contains a page of data for
	 each run of the lesson.   These  data	include  the
	 student's   name,   a	 trace	 of  his  unexpected
	 responses, lesson statistics, and  any  message  he
	 may	have	left	for    the   teacher.	 The
	 <lessonname>.SRT file contains only the "unexpected
	 response"  traces,  converted	to a format suitable
	 for sorting.

	      Unless the %DISK (or %DISC or %DSK) command is
	 used,	then teacher reports (if any) will be routed
	 to the lineprinter and no machine readable  records
	 will remain.  The reports queued to the lineprinter
	 are equivalent  to  those  which  would  have	been
	 contained  in the <lessonname>.DTA file except that
	 each page is printed as a separate  item.   Without
	 the  %DISK  command,  no  <lessonname>.SRT  file is
	 generated.

	      When using the %DISK  command,  care  must  be
	 taken	  to	ensure	  that	 the   blank   files
	 <lessonname>.DTA  and	<lessonname>.SRT  have	been
	 created  IN  THE  ACCOUNT  WHERE THE LESSON WILL BE
	 RUN.  They must exist there before  the  lesson  is
	 used  for  the  first time.  Otherwise a mysterious
	 error message will be sent to the student by ALGDDT
	 as  he tries to exit from the lesson.	A protection
	 of <155> should be given  to  these  report  files.
	 This  isn't  adequate	for all purposes, of course,
	 but it is a workable compromise for the teacher who
	 wishes  to  inspect,  print  or copy-and-sort these
	 records from another account.

	      The %DISK command executes  implicit  %TEACHER
	 and  %KEEP  commands.	 Thus,	an explicit %TEACHER
	 command will be required only if it is necessary to
	 add the teacher's name and address.

	      Technical  Note:	 Unless  %NAME	is  used  in
	 conjunction  with %DISK, only one student at a time
	 may use a report-generating lesson.  When the %NAME
GNOSIS.DOC					     Page 22
THE GNOSIS COMMAND LANGUAGE


	 command  is  used, however, temporary .DTA and .SRT
	 files (based on  his  first  name)  are  opened  at
	 runtime.   Writing  to  these files (until the very
	 end   of   the   lesson)   usually    avoids	 any
	 conflict-of-access  problems connected with writing
	 the  main  <lessonname>.DTA  and   <lessonname>.SRT
	 files.

     5.  %END <empty>

	      This is -- MUST be -- the last  command  of  a
	 lesson.   Any	text  after  this  command  will  be
	 ignored by GNOSIS.

     6.  %EXTRA <empty>

	      This command will influence the way  in  which
	 student  responses  are  compared  to canned answer
	 patterns.  After a %EXTRA command,  and  until  the
	 next  %NOEXTRA  command,  student responses will be
	 considered  correct  even  if	they  contain  extra
	 characters  not  part	of the %RIGHT answer pattern
	 PROVIDED they do at least contain all the essential
	 characters.   If  the	response  DOES contain extra
	 characters, then GNOSIS  will	flag  the  essential
	 characters with uparrows.

	      GNOSIS is initialized in %EXTRA mode and	will
	 remain  in  this mode until it encounters the first
	 %NOEXTRA command line.  Note that, in %EXTRA  mode,
	 the  response	"yes  or  no"  will  be considered a
	 correct response to any "%RIGHT yes" or "%RIGHT no"
	 command!   GNOSIS  will  obligingly  flag the "yes"
	 part as correct in one case, the "no" part  in  the
	 other.

     7.  %FINISH <empty>

	      This command will enable the user to place one
	 or   more   lines  of	ALGOL  code  in  the  GNOSIS
	 translated  lesson  immediately  before  its  final
	 "END".   (Ordinarily  this  would  be possible only
	 through editing the .ALG file produced by  GNOSIS.)
	 "%ALGOL  <one	or  more lines of ALGOL code>;" MUST
	 follow the %FINISH command.  Note too that  %FINISH
	 does  NOT  terminate  the lesson script;  a %END is
	 still necessary to close the lesson.

     8.  %GOTO <label>;

	      Normally the student will proceed through  the
	 teacher's  script  in	more or less linear fashion.
	 This ordinary flow of control	can  be  overridden,
	 however, by use of the %GOTO command.	This command
GNOSIS.DOC					     Page 23
THE GNOSIS COMMAND LANGUAGE


	 will  cause  the  lesson  to	branch	 (or   jump)
	 immediately and unconditionally to the line bearing
	 the label.  The %GOTO may appear  anywhere  in  the
	 lesson.  However, if it is used in association with
	 the comments or hints following one of  the  answer
	 commands  (%RIGHT, %WRONG, %LACK or %NEUTRAL), then
	 the %GOTO command must  FOLLOW  these	comments  or
	 hints.  The <label> which serves as the argument or
	 "destination" for the	%GOTO  command	can  be  one
	 which	you  have explicitly written into the lesson
	 or it can be one of the standard, predefined labels
	 provided by the GNOSIS system.

	      The five standard labels in the GNOSIS  system
	 are:

	 1.  "start"

		  Marks the beginning of the  whole  lesson.
	     Thus "%GOTO start;" causes the entire lesson to
	     be repeated.

	 2.  "endoflesson"

		  Marks the end of the lesson.	Thus  "%GOTO
	     endoflesson;" causes the lesson to be aborted.

	 3.  "repeat"

		  Marks the beginning of the  last  question
	     cycle.   Thus  "%GOTO  repeat;"  will  have the
	     effect of repeating the previous question.

	 4.  "simulate"

		  Marks  the  place  where   GNOSIS   begins
	     simulating   a  correct  response.   (For	this
	     purpose, GNOSIS uses the answer supplied as  an
	     argument  to the FIRST %RIGHT command.) If, for
	     example,  you  want  GNOSIS  to  count  several
	     divergent	responses  as  correct	but go on to
	     simulate what you take to be the best response,
	     then  you	could  type  "%GOTO simulate;" after
	     your comment (if  any)  for  a  %RIGHT  command
	     which  took  as  its  argument  one of the less
	     desirable answers.

	 5.  "next"

		  Marks the point of exit from	the  current
	     question  cycle.	Thus  "GOTO next;" will have
	     the  effect  of  skipping	past   the   current
	     question routine to whatever happens to be next
	     in the program.
GNOSIS.DOC					     Page 24
THE GNOSIS COMMAND LANGUAGE


		  If for some reason you do NOT want  GNOSIS
	     to  simulate a correct response after a student
	     has repeatedly failed to give one of  his	own,
	     you  can  insert  "GOTO  next;"  after the last
	     "%WRONG <empty>" command.

	 User defined labels can be inserted almost anywhere
	 by  using  a  %ALGOL command but it is usually more
	 convenient  to  associate  them  with	 %TEXT	 and
	 %QUESTION  commands.	If you do not insert a %GOTO
	 command after an answer command, then	the  default
	 action  is  "%GOTO  repeat;"  in  %WRONG  or  %LACK
	 environments, "%GOTO next;" in %RIGHT	or  %NEUTRAL
	 environments.

     9.  %HELP <unique one-word designation for help text>
	 <one or more lines of help text>

	      The %HELP command causes GNOSIS to establish a
	 global  help  text,  i.e., one which is potentially
	 accessible by the student  from  any  part  of  the
	 lesson.   "%ALGOL  <help  text name>;", wherever it
	 may appear in the program, will subsequently  cause
	 the help text to be displayed.

    10.  %IF <switchname>

	      Assuming <switchname> has  been  declared  and
	 initialized by a %SWITCH command, the occurrence of
	 %IF will cause the text between  the  %IF  and  the
	 next  %IFEND  to  be  deposited  in  the translated
	 lesson ONLY if <switchname> was  initialized  TRUE.
	 Otherwise these lines of text will be skipped.[4]

    11.  %IFEND <switchname>

	      This  command   turns   off   the   %IF/%IFNOT
	 facility.  In other words, the SCOPE of each %IF or
	 %IFNOT extends to the next occurrence of  a  %IFEND
	 command.   Thus,  all text following %IFEND will be
	 included  in  the  translated	lesson	 as   usual,
	 regardless   of   previous   %IF's   or   %IFNOT's.
	 Subsequent  %IF's  or	%IFNOT's  will,  of  course,
	 create  another  need for an %IFEND to define THEIR
	 scope -- unless that scope extends all the  way  to
	 the  end  of  the  lesson.   %IFEND  must therefore
	 follow some %IF or %IFNOT command.[5]

---------------
     4.  Use of these commands if discussed  further  in  an
appendix to this documentation.

     5.  Use of these commands if discussed  further  in  an
appendix to this documentation.
GNOSIS.DOC					     Page 25
THE GNOSIS COMMAND LANGUAGE


    12.  %IFNOT <switchname>

	      Assuming <switchname> has  been  declared  and
	 initialized  by a %SWITCH command, the text between
	 %IFNOT and the next %IFEND command will be included
	 in  the  ALGOL  translation  of  the lesson ONLY if
	 <switchname> is FALSE.  Used  only  in  conjunction
	 with a previous %SWITCH.[6]

    13.  %INITIALIZE <one or more line of ALGOL code>;

	      This command is normally	used  to  initialize
	 global  variables which have been declared with the
	 %VARIABLES command, although it could just as	well
	 be used to reinitialize GNOSIS system parameters if
	 that  should  ever   be   necessary.	 %INITIALIZE
	 operates  like  %ALGOL (see above), except that the
	 code following  %INITIALIZE  is  written  into  the
	 lesson  at  the  point  where data are initialized,
	 just before the start of the main program.

    14.  %JUSTIFY <empty>

	      Causes  all  text,  including  the   text   in
	 %QUESTION   blocks   and   %HELP   blocks,   to  be
	 semi-justified to produce a ragged right at  column
	 =<  72.   It  also  causes such text material to be
	 paged out in such a way that nothing will  be	lost
	 scrolling off the top of a CRT.

	      Although	 GNOSIS   begins   processing	text
	 material  in  the %NOJUSTIFY mode, an occurrence of
	 the  %JUSTIFY	command  will  change  the  mode  of
	 processing until a subsequent %NOJUSTIFY command is
	 encountered.

	      In  the  %JUSTIFY  mode,	GNOSIS	will   treat
	 spaces,  tabs,  linefeeds  and  carriage returns as
	 mere separators.  Only blank lines will  be  output
	 exactly  as  typed in.  Moreover, when operating in
	 the %JUSTIFY mode, GNOSIS will be sensitive to  the
	 occurrence  of  certain  characters.  These include
	 the doublequote, the left and	right  bracket,  and
	 the semicolon.






---------------
     6.  Use of these commands if discussed  further  in  an
appendix to this documentation.
				NOTE

	     Failing to avoid these characters in blocks
	     of  text  processed in the %JUSTIFY mode is
	     certain to cause peculiar	and  even  fatal
	     effects.


	 This sensitivity is caused by the way ALGOL  string
	 scanner  works.   In  later  releases	of GNOSIS, a
	 workaround should be provided.

	      The only ALGOL carriage-control command  which
	 can  be safely used inside the scope of %JUSTIFY is
	 the   "[T]"	command,    for    tabbing.	This
	 carriage-control  command,  if  used  at  the	very
	 beginning of the %JUSTIFY text  or  after  a  blank
	 line  in  that  text,	will  not cause any peculiar
	 effects.  It may, however, cause the  right  margin
	 to be exceeded by a few characters.

    15.  %KEEP <empty>

	      This command is  useful  only  in  association
	 with a %TEACHER command, i.e., in report-generating
	 lessons.  Unless %KEEP is used in such a lesson (or
	 unless  %DISK	is  used, which executes an implicit
	 %KEEP command), the student  will  be	directed  to
	 pick  up the teacher report generated by the lesson
	 (after it has been printed by the lineprinter), and
	 to  bring this report to the teacher.	This command
	 is probably not needed any longer since reports can
	 conveniently be kept on disk.

    16.  %LACK <element(s) likely to be missing from answer>
	 <optional line(s) of comments>

	      This  command  causes  GNOSIS  to  search  for
	 something  which  (a)	is  essential  to  a correct
	 response but which (b) is likely to be missing.  If
	 the   the  item  is  not  found  in  the  student's
	 response, then  he  receives  appropriate  negative
	 feedback  from  GNOSIS and the text (if any) on the
	 optional  line(s)  after  the	%LACK	command   is
	 displayed  to	him at that point.  If more than one
	 element  is  expected	to  be	lacking   from	 the
	 student's  response,  then he receives feedback and
	 commentary (if any) as soon as ANY of the  elements
	 cannot be detected in his response.

	      The chief advantage of the %LACK command	does
	 not  lie  in its increased efficiency but rather in
	 the opportunity  it  provides	for  writing  highly
	 specific   diagnostic	 comments.    Despite	this
	 advantage,  we  recommend   AGAINST   using   %LACK
	 commands while your computer lesson is under active
	 development --  especially  in  the  early  stages.
	 This  is  because  %LACKs  will tend to capture any
GNOSIS.DOC					     Page 27
THE GNOSIS COMMAND LANGUAGE


	 response which  deviates,  however  slightly,	from
	 your preconceived idea of a right answer.  For this
	 reason, any student response which is matched by  a
	 %LACK	command  is  routed to the teacher report on
	 the  theory  that  possibly,  just  possibly,	that
	 response  might  be an alternative correct response
	 to the question posed.  This routing constitutes an
	 important exception to the general rule;  normally,
	 only unanticipated responses would be routed to the
	 teacher report.

	      Technical Note:  Regardless of context,  %LACK
	 works	as  if	%NOORDER  and  %EXTRA  were declared
	 immediately above it.

    17.  %LANGUAGE Swedish | English

	      This command tells the system  which  language
	 to  use  in  communication  with  the student.  The
	 command is not necessary if the language is  to  be
	 English.   (The language used in communicating with
	 the  teacher  at  the	time  his  script  is  being
	 processed   by   GNOSIS  is  not  affected  by  the
	 %LANGUAGE command;  it is always English.)

    18.  %LOCK <empty>

	      PERMANENTLY  disables  the  backstepping	 and
	 skipping  provisions  of GNOSIS.  The student is in
	 effect "locked" into the lesson path defined by the
	 teacher  unless  the  teacher	explicitly  supplies
	 branching  opportunities  in  the  lesson   itself.
	 (Note,  however, that the student can still END the
	 lesson by typing "stop".) There does not exist,  as
	 yet, a corresponding %UNLOCK command.

    19.  %NAME <empty>

	      Causes the GNOSIS lesson to exchange greetings
	 with  the  student at the start of the lesson.  The
	 student's full name is requested (and routed to the
	 <lessonname>.DTA  file,  if any) and his first name
	 is saved for use in I/O routines.

    20.  %NEUTRAL <an answer not right or wrong> | <empty>
	 <optional line(s) of comments>

	      This command tells  GNOSIS  to  search  for  a
	 response  and,  if  it is found, to interpret it as
	 being	neither  correct  nor  incorrect.   If	 the
	 neutral  target  text	is  found  in  the student's
	 response, then any line(s)  of  comments  or  hints
	 provided  by  the  teacher will be displayed to the
	 student at that point.  The  default  for  %NEUTRAL
GNOSIS.DOC					     Page 28
THE GNOSIS COMMAND LANGUAGE


	 commands  is "%GOTO next;" so the teacher who wants
	 a  question  repeated	after  GNOSIS  has  found  a
	 neutral  match  will have to insert "%GOTO repeat;"
	 after that %NEUTRAL command (and comments, if any).

	      Technical Note:  The procedure "extratest"  is
	 NOT  called for %NEUTRAL commands with empty answer
	 patterns.  Thus clever use  of  "%NEUTRAL  <empty>"
	 should  enable  the teacher to trap most misspelled
	 responses with no prejudice to the student's  score
	 -- or ego.

    21.  %NEXTLESSON run("<lessonname>");|r("<lessonname>");

	      This command tells GNOSIS which lesson to  run
	 after	the  student  finishes	the  current lesson.
	 Transfer to this lesson is wholly automatic at  the
	 point	of  exit, just as if the new lesson had been
	 called up by GNOSIS directly, without	intervention
	 of the monitor.[7]

	      The next lesson can be any RUN-able or  R-able
	 program, i.e., any program with the extension .SAV,
	 .EXE or .SHR).   "run("<lesson  name>");"  is	used
	 when  the  lesson resides in the student's area,[8]
	 "r("<lesson name>");" when it resides in  the	SYS:
	 area.[9]

	      Technical Note:  The  literal  which  replaces
	 "<lesson  name>" must be a single filename, without
	 extension.

    22.  %NOCONTROLC <empty>
	 [Partially Implemented]

	      In this mode, if a student types a CTRL-C,  he
	 will	not   be  returned  to	the  monitor  level.
	 Instead, he will be logged off the  system  without
	 further  ado.[10]  (Thus  a  single  CTRL-C becomes

---------------
     7.  R.MAC and RUN.MAC,  the  programs  responsible  for
this effect, are listed in an appendix.

     8.  If a library has been established (e.g.,  with  the
line   "LOGIN/LIB:[<account   number>]"   in  the  student's
SWITCH.INI file),  then  "run"	will  tap  programs  in  the
library as well as those in the account itself.

     9.  A variant of  these,  "pub("<lesson  name>");",  is
also supported by GNOSIS for systems with a "PUB:" area.

     10.  INTRUT.MAC,  the  program  responsible  for	this
effect, is listed in an appendix.
GNOSIS.DOC					     Page 29
THE GNOSIS COMMAND LANGUAGE


	 functionally equivalent to BASIC's "BYE" command.)

	      Note:  If the student types  SEVERAL  CTRL-C's
	 in  rapid succession, the effect will be to run and
	 then abort LOGOUT, thus leaving the student  logged
	 in  and  at  monitor  level.  It is hard to see how
	 this  bug  could  be  fixed   without	 making   it
	 impossible to abort LOGOUT.

    23.  %NOEXTRA <empty>

	      This command will influence the way  in  which
	 student  responses  are  compared  to canned answer
	 patterns.  After a %NOEXTRA command  --  and  until
	 the  next  %EXTRA  command  -- a student's response
	 will  be  considered  wrong  if  it  contains	 ANY
	 characters   not   present  in  the  canned  answer
	 pattern.

    24.  %NOJUSTIFY <empty>

	      Switches	off  the  text	justifying  routines
	 until	the next occurrence of %JUSTIFY.  This means
	 that all text will be displayed  exactly  as  typed
	 in,  without  change.	 GNOSIS begins processing in
	 the %NOJUSTIFY mode.

    25.  %NOORDER <empty>

	      This command will influence the way  in  which
	 student  responses  are  compared  to canned answer
	 patterns.  After the %NOORDER command -- and  until
	 the  next  %ORDER  command  -- a student's response
	 will be considered correct even if the elements  of
	 the  student's  response  do not appear in the same
	 order as the elements of the canned answer pattern.
	 (ALL	the  necessary	elements  must	be  present,
	 however, or  the  response  is  considered  wrong.)
	 GNOSIS is initialized to the %NOORDER mode and will
	 remain in that mode until the first %ORDER  command
	 (if any) is encountered.

    26.  %ORDER <empty>

	      This command will influence the way  in  which
	 student  responses  are  compared  to canned answer
	 patterns.  After a %ORDER command -- and until  the
	 next  %NOORDER command -- a student's response will
	 be considered correct only if the elements  of  the
	 student's  response  appear  in  PRECISELY the same
	 order as the elements of the canned answer pattern.
GNOSIS.DOC					     Page 30
THE GNOSIS COMMAND LANGUAGE


    27.  %PROCEDURE <one or more lines of ALGOL code>;

	      This command is used to make a standard  ALGOL
	 procedure    declaration.    Code   following	 the
	 %PROCEDURE command is processed like code following
	 the  %ALGOL  command (see above), except that it is
	 written  into	the  lesson  at  the   point   where
	 procedure declarations belong.

	      Technical Note:  The %PROCEDURE command itself
	 is  not  copied,  since  it  might  well  have been
	 abbreviated to %PRO;  thus the  terms	"PROCEDURE",
	 "EXTERNAL   PROCEDURE",  and  so  on  should  occur
	 immediately after %PROCEDURE even though this might
	 appear redundant.

    28.  %QEND <one line of ALGOL code>[;] | <empty>

	      This  command  causes  GNOSIS   to   close   a
	 question-and-answer  processing loop.	This command
	 is rarely used  since	%TEXT,	%QUESTION  and	%END
	 contain this command implicitly.  However, %QEND is
	 sometimes useful  before  certain  %ALGOL  commands
	 since	those  commands  do NOT implicitly close the
	 question-and-answer loop.  So, for example, if  you
	 had  an  independent  block of ALGOL code to insert
	 between  two  %QUESTION  commands,  it   would   be
	 necessary to use %QEND after the first question and
	 answer patterns.

    29.  %QUESTION <one line of ALGOL code>[;] | <empty>
	 <question to be displayed -- one or more lines>

	      The %QUESTION command, like the %TEXT command,
	 can  take  as	its  argument a single line of ALGOL
	 code, usually a condition statement and/or a label.
	 (Refer to description of the %TEXT command, below.)

	      In addition to  causing  the  question  to  be
	 displayed, the %QUESTION command invokes a response
	 input and evaluation routine which continues
GNOSIS.DOC					     Page 31
THE GNOSIS COMMAND LANGUAGE


	 to cycle until, roughly, the  student	types  in  a
	 correct  response  or is guessing so wildly that he
	 is receiving no further diagnostic help.[11]

    30.  %RIGHT <a possible right answer>
	 <optional line(s) of comments>

	      This command causes GNOSIS to  search  for  an
	 answer  pattern and, if it is found, to consider it
	 correct.  If a match for the canned answer is found
	 in  the  student's  response,	then  the  following
	 happens:

	 1.  The GNOSIS system	gives  the  student  one  of
	     several  stock  messages, all of which have the
	     effect of providing positive feedback.

	 2.  If he had previously missed this question then,
	     depending on the circumstances, GNOSIS provides
	     additional stock messages designed to encourage
	     him.

	 3.  The text on the optional line(s) following  the
	     %RIGHT  command (until the next GNOSIS command)
	     is displayed to the student.

	 4.  Various  statistical   variables	(see   %TEXT
	     command) are updated.

	 5.  GNOSIS moves on to the next item of business.


    31.  %SAME <empty>

	      This  command  is  used  to  avoid   duplicate
	 storage and typing of comments whenever the comment
	 provided for the previous %RIGHT, %WRONG, %LACK  or
	 %NEUTRAL answer pattern can be reused.  As it turns
	 out, this need to reuse comments is fairly  common,
	 causing  %SAME  to  be  one  of the most frequently

---------------
     11.  As  long  as	a  student  is	supplying  responses
matched  by  the canned answers following the answer pattern
commands (i.e., %RIGHT, %WRONG and %LACK  [and	%NEUTRAL  if
followed  by  "%GOTO  repeat;"]),  then  he will be recycled
through the question.  If he  does  NOT  supply  a  response
which matches any of these, then he will be recycled through
the question once for each "%WRONG <empty>"  pattern.	That
is,  the  number of "%WRONG <empty>" commands determines the
number	of  times  a  student  giving  unanticipated  (i.e.,
unmatched)  responses will be recycled through the question.
If there are 'n' "%WRONG <empty>" commands for the question,
then  'n  +  1' unanticipated responses will force GNOSIS to
simulate a correct response.
GNOSIS.DOC					     Page 32
THE GNOSIS COMMAND LANGUAGE


	 encountered commands in  GNOSIS  lessons.   Loosely
	 speaking,   %SAME  tells  GNOSIS  to  "borrow"  the
	 comment  immediately  preceding  the  last   answer
	 command.   But  the  technical  user should realize
	 that,	 strictly   speaking,	%SAME	causes	  an
	 unconditional	 branch  to  the  previous  response
	 evaluation loop;  so not only will the  comment  be
	 the  same but any %GOTO or %ALGOL command following
	 that prior comment will also be obeyed.

	      Obviously, the first answer  command  after  a
	 %QUESTION  command  may  not be followed by a %SAME
	 command since there would,  in  this  case,  be  no
	 previous comment to reuse.

    32.  %SGNOSIS <empty>

	      GNOSIS lessons normally output a header  which
	 tells	the  student  that  he	is  running a GNOSIS
	 lesson, that it was authored by so-and-so, and that
	 he  can  do  certain  things  to  control  his path
	 through the lesson.   Also,  and  the	end  of  the
	 question-and-answer  section  of the lesson, GNOSIS
	 will normally output a corresponding trailer  which
	 tells	the  student  how  he scored.  %SGNOSIS (for
	 [S]top GNOSIS) will inhibit  the  display  of	this
	 header and trailer.  The command is useful when you
	 want to use GNOSIS to administer a questionnaire.

    33.  %SWITCH <switchname> TRUE | <switchname> FALSE

	      This  command  declares  and   initializes   a
	 Boolean   variable   with  the  name  <switchname>.
	 %SWITCH enables the %IF %IFNOT, and %IFEND commands
	 (see above).[12]

    34.  %TEACHER <line with teacher's name, etc.> | <empty>

	      If this command is included in a lesson,	then
	 teacher reports (of some kind) will be produced for
	 the lesson, and students will be told who  authored
	 the  lesson  each  time  the lesson is run.  If the
	 %TEACHER command is used with	an  empty  argument,
	 then  an anonymous teacher report will be generated
	 and no information about lesson authorship will  be
	 displayed to the student at runtime.




---------------
     12.  These  commands  are	discussed  further   in   an
appendix to this documentation.
GNOSIS.DOC					     Page 33
THE GNOSIS COMMAND LANGUAGE


	      The <lessonname>.DTA teacher  report  contains
	 the following information:

	 1.  The student's full name, if operating in  %NAME
	     mode.

	 2.  Unexpected  responses  to	questions   in	 the
	     lesson.

	     This trace will include any unforeseen  student
	     response	or,   roughly  speaking,  all  those
	     responses students entered without getting  any
	     specific	 diagnostic   feedback.    Recurrent
	     unanticipated responses usually signal  a	need
	     to  rewrite the lesson with that response as an
	     argument for an answer command --	followed  of
	     course by appropriate comments or hints.


	 3.  Basic  statistical  data  about  the  student's
	     performance.

	     These data should not be taken  too  seriously,
	     especially  when the lesson permits the student
	     to   exercise   control   over   skipping	 and
	     backstepping.

	 4.  Student comments about the lesson.

	     GNOSIS can store as lengthy a  comment  as  the
	     student  wants  to  type,	even  if his comment
	     should run on for pages.

	 The <lessonname>.SRT report, which is generated  if
	 %DISK	 is   used  in	conjunction  with  %TEACHER,
	 contains the trace of	unexpected  responses  in  a
	 form ready to be input to the utility program SORT.
	 The following command string usually does the job:

	      .R SORT
	      *x.SRT=x.SRT/KEY:1:60:A/ALPHA/RECORD:132

	 where "x" = <lessonname>.[13]

    35.  %TEXT <one line of ALGOL code>[;] | <empty>
	 <text to be displayed -- one or more lines>




---------------
     13.  A  MIC  program  which  accomplishes	this  rather
painlessly is listed in an appendix.
GNOSIS.DOC					     Page 34
THE GNOSIS COMMAND LANGUAGE


	      The text on the lines following this  command,
	 and  until the next GNOSIS command, is displayed to
	 the student.  The %TEXT command can take any single
	 line  of  ALGOL  code as an argument.	Usually this
	 code will contain conditions (as arguments  for  IF
	 statements) and/or labels.  The syntax of condition
	 and label can be

	 1.  <condition  with	label>	 ::=   [<condition>]
	     [<label>:]

		  Note that "<label>:"	is,  here,  a  label
	     DECLARATION.  That is, its occurrence here puts
	     an identifying  mark  in  the  lesson  at	this
	     point.   If  it  were  an	argument for a %GOTO
	     statement, the terminal punctuation would be  a
	     semicolon	rather than a colon.  The occurrence
	     of the colon signifies  the  declaration  of  a
	     label.

	 2.  <condition> ::= IF  <condition  elements>	THEN
	     [GOTO <label>;]

		  Note that <label>  functions	here  as  an
	     argument  for the GOTO.  The label declaration,
	     consisting of the	same  label  followed  by  a
	     colon,  must  have  occurred  elsewhere  in the
	     script.

	 3.  <condition elements> ::= <condition element>  [
	     AND | OR <condition elements>]

	 4.  <condition element> ::=  <variable>  <comparer>
	     <constant>

	 5.  <comparer> ::= <= | >= | = | #

	 6.  <label> ::= <a string of letters > |  <a  mixed
	     string  of letters and digits which BEGINS with
	     a letter>	|  <one  of  the  GNOSIS  predefined
	     labels.

	 7.  <variable> ::=  score  |  percent	|  qcount  |
	     lasterrors   |   lastrights   |  latepercent  |
	     lastpercent |  lastlatepercent  |	lastscore  |
	     lastlatescore | <user defined variable>

	     1.  "score" = the running	total  of  questions
		 for   which   the  student  had  a  correct
		 response on  his  first  try.	 Note:	 The
		 student's  final  "score"  appears  in  the
		 <lessonname>.DTA file (if any).
GNOSIS.DOC					     Page 35
THE GNOSIS COMMAND LANGUAGE


	     2.  "latescore"  =   the	running   total   of
		 questions  for  which the student sooner or
		 later had a correct response.	 Note:	 The
		 student's  final "latescore" appears in the
		 <lessonname>.DTA (if any).

	     3.  "percent"  =  the  running  percentage   of
		 questions for which the student has given a
		 correct response on his first	try.   Note:
		 A Student's final "percent" score is routed
		 to the <lessonname>.DTA file (if any).

	     4.  "qcount" = the running total  of  questions
		 which	has  been put to the student.  Note:
		 The  final  "qcount"  is  routed   to	 the
		 <lessonname>.DTA file (if any).

	     5.  "lasterrors"  =   the	 number   of   wrong
		 responses  which  the	student  gave to the
		 previous question.

	     6.  "lastrights"  =   the	 number   of   right
		 responses  which  the	student  gave to the
		 previous question.  Obviously, the value of
		 "lastrights" will be either 0 or 1.

	     7.  "latepercent" = the percentage of questions
		 answered correctly by the student since the
		 start of the lesson whether the student was
		 correct   on  the  first  try	or  not.   A
		 student's  final  "latepercent"  score   is
		 routed  to  the  <lessonname>.DTA  file (if
		 any).

	     8.  "lastpercent" = the percentage of questions
		 answered  correctly  on  the very first try
		 since	the   previous	 "lastpercent"	 was
		 evaluated.

	     9.  "lastlatepercent"  =  the   percentage   of
		 questions  answered  correctly  (whether on
		 the  first  try  to  afterward)  since  the
		 previous "lastlatepercent" was evaluated.

	    10.  "lastscore"  =  the  number  of   questions
		 answered  correctly  on  the very first try
		 since	 the   previous   "lastscore"	 was
		 evaluated.

	    11.  "lastlatescore" = the number  of  questions
		 answere  correctly  by the student (whether
		 on the first try or not) since the previous
		 "lastlatescore" was evaluated.
GNOSIS.DOC					     Page 36
THE GNOSIS COMMAND LANGUAGE


	      Attaching a label to a block  of	text  allows
	 the  teacher  to  program a jump to that block from
	 from other parts of a lesson, either  conditionally
	 or  unconditionally.	Usually, however, one of the
	 previous eleven  variables  is  used  so  that  the
	 branch  is  dependent	on  the  evaluation  of that
	 variable:

	      %TEXT text1:
	      ...
	      %TEXT IF score < 5 THEN GOTO text1;  text2:

	      Unless %LOCK is in effect, branching based  on
	 "---score"  and  "qcount" may not have the intended
	 result.  The "---percent" variables will  generally
	 fare better under learner control, so it is wise to
	 use them  in  all  environments  except  the  %LOCK
	 environment.

	      Important:  Not all  words  are  permitted  as
	 labels  or  variable  names.  Some are reserved for
	 other purposes by the GNOSIS  system  or  by  ALGOL
	 itself  and  others,  while not reserved, will have
	 peculiar effects when used in	the  GNOSIS  script.
	 To  avoid  mysterious	error  messages,  especially
	 while learning the GNOSIS system, you will probably
	 want  to include at least one digit or period (".")
	 in your labels.   (The  first	character,  however,
	 must be a letter.) Or, if you prefer, you can refer
	 to the appendix for a list of all words  likely  to
	 cause problems.

    36.  %VARIABLES <one or more lines of ALGOL code>;

	      This command is used to  make  standard  ALGOL
	 global  variable declarations.  %VARIABLES operates
	 like %ALGOL (see above), except that  the  code  is
	 written  into the lesson at the point that variable
	 declarations are laid out.

    37.  %WRONG <possible wrong answer> | <empty>
	 <optional line(s) of comments>

	      This command causes GNOSIS to  search  for  an
	 answer  pattern and, if it is found, to consider it
	 wrong.  If a match for the canned answer  is  found
	 in  the  student's  response,	then  the  following
	 happens:

	 1.  The GNOSIS system	gives  the  student  one  of
	     several  stock  messages, all of which have the
	     effect of providing negative feedback.
GNOSIS.DOC					     Page 37
THE GNOSIS COMMAND LANGUAGE


	 2.  The text on the optional line(s) following  the
	     %WRONG  command (until the next GNOSIS command)
	     is displayed to the student.

	 3.  If the  student  is  still  getting  meaningful
	     help[14]  from  the  program,  he	is  recycled
	     through the  question  once  more;   otherwise,
	     GNOSIS   simulates  a  correct  response  (plus
	     commentary for such a response) and moves on to
	     the next item of business.































---------------
     14.  As  long  as	a  student  is	supplying  responses
matched  by  the canned answers following the answer pattern
commands (i.e., %RIGHT, %WRONG and %LACK  [and	%NEUTRAL  if
followed  by  "%GOTO  repeat;"]),  then  he will be recycled
through the question.  If he  does  NOT  supply  a  response
which matches any of these, then he will be recycled through
the question once for each "%WRONG <empty>"  pattern.	That
is,  the  number of "%WRONG <empty>" commands determines the
number	of  times  a  student  giving  unanticipated  (i.e.,
unmatched)  responses will be recycled through the question.
If there are 'n' "%WRONG <empty>" commands for the question,
then  'n  +  1' unanticipated responses will force GNOSIS to
simulate a correct response.
GNOSIS.DOC					     Page 38
GNOSIS TWO-PAGE SUMMARY


4.0  GNOSIS TWO-PAGE SUMMARY



				NOTE

	     Some command lines MUST be terminated by  a
	     semicolon.   Where  a  semicolon may or may
	     not be required, a  "[;]"	appears  in  the
	     command	schema.    The	 "|"   separates
	     alternatives, one of which must be chosen.



     1.  %ALGOL <one or more lines of ALGOL code>;

     2.  %BELL <empty>

     3.  %COPYRIGHT <one-line copyright notice>

     4.  %DISK <empty>

     5.  %END <empty>

     6.  %EXTRA <empty>

     7.  %FINISH <empty>

     8.  %HELP <unique one-word designation for help text>
	 <one or more lines of help text>

     9.  %IF <switchname>

    10.  %IFEND <switchname>

    11.  %IFNOT <switchname>

    12.  %INITIALIZE <one or more line of ALGOL code>;

    13.  %JUSTIFY <empty>

    14.  %KEEP <empty>

    15.  %LACK <element(s) likely to be missing from answer>
	 <optional line(s) of comments>

    16.  %LANGUAGE Swedish | English

    17.  %LOCK <empty>

    18.  %NAME <empty>
GNOSIS.DOC					     Page 39
GNOSIS TWO-PAGE SUMMARY


    19.  %NEUTRAL <an answer not right or wrong> | <empty>
	 <optional line(s) of comments>

    20.  %NEXTLESSON run("<lessonname>");|r("<lessonname>");

    21.  %NOCONTROLC <empty>
	 [Partially Implemented]

    22.  %NOEXTRA <empty>

    23.  %NOJUSTIFY <empty>

    24.  %NOORDER <empty>

    25.  %ORDER <empty>

    26.  %PROCEDURE <one or more lines of ALGOL code>;

    27.  %QEND <one line of ALGOL code>[;] | <empty>

    28.  %QUESTION <one line of ALGOL code>[;] | <empty>
	 <question to be displayed -- one or more lines>

    29.  %RIGHT <a possible right answer>
	 <optional line(s) of comments>

    30.  %SAME <empty>

    31.  %SGNOSIS <empty>

    32.  %SWITCH <switchname> TRUE | <switchname> FALSE

    33.  %TEACHER <line with teacher's name, etc.> | <empty>

    34.  %TEXT <one line of ALGOL code>[;] | <empty>
	 <text to be displayed -- one or more lines>

    35.  %VARIABLES <one or more lines of ALGOL code>;

    36.  %WRONG <possible wrong answer> | <empty>
	 <optional line(s) of comments>
GNOSIS.DOC					     Page 40
PRECEDENCE TABLE FOR GNOSIS COMMANDS


5.0  PRECEDENCE TABLE FOR GNOSIS COMMANDS


============================================================
PRECEDENCE	COMMAND 	COMMENT
============================================================
     0		%ALGOL	       Use of these commands is
     0		%EXTRA	       unrestricted.  They may go
     0		%GOTO	       anywhere in the lesson.
     0		%IF
     0		%IFEND	       However, the %SWITCH
     0		%IFNOT	       command must precede
     0		%JUSTIFY       %IFs, %IFENDs and %IFNOTs.
     0		%NOEXTRA
     0		%NOJUSTIFY
     0		%NOORDER
     0		%ORDER
------------------------------------------------------------
     1		%BELL	       These commands (if used)
     1		%COPYRIGHT     must precede all those > 1.
     1		%DISK (also %DSK or %DISC)
     1		%KEEP
     1		%LANGUAGE
     1		%LOCK
     1		%NAME
     1		%NEXTLESSON
     1		%NOCONTROLC
     1		%SGNOSIS
     1		%SWITCH
     1		%TEACHER
------------------------------------------------------------
     2		%VARIABLES     This command (if used)
				must precede all those > 2.
------------------------------------------------------------
     3		%HELP	       These commands (if used)
     3		%PROCEDURE     must precede all those > 3.
------------------------------------------------------------
     4		%INITIALIZE    This command (if used)
				must precede all those > 4.
------------------------------------------------------------
     5		%LACK	       These commands (if used)
     5		%NEUTRAL       must precede all those > 5.
     5		%QEND
     5		%QUESTION      After %QUESTION, %RIGHTs
     5		%RIGHT	       precede %WRONGs (or %LACKs).
     5		%SAME	       %NEUTRALs can go anywhere.
     5		%TEXT	       <empty> patterns should
     5		%WRONG	       appear last.
------------------------------------------------------------
     6		%FINISH        This command (if used) must
			       precede only the %END.
------------------------------------------------------------
     7		%END	       This command must be last.
============================================================
GNOSIS.DOC					     Page 41
PRECEDENCE TABLE FOR GNOSIS COMMANDS


     While GNOSIS does some rudimentary checking for  errors
in  precedence,  it  will  accept  some contextually awkward
orderings of the  answer  pattern  commands.   For  example,
GNOSIS	will  accept  %NEUTRAL	at any point after %QUESTION
even though, in the context of the lesson,  that  occurrence
of %NEUTRAL may have unintended effects.
GNOSIS.DOC					     Page 42
ERROR DIAGNOSIS AND RECOVERY


			     *













6.0  ERROR DIAGNOSIS AND RECOVERY

6.1  GNOSIS Translator Messages

     A complete list of all  the  messages  associated	with
GNOSIS	error  diagnostics  follows below.  Obviously, those
called	"errors"  are  more  serious  than  the  "warnings."
Regardless  of	the  severity  of the error, however, GNOSIS
will try to recover and produce a program  legal  in  ALGOL.
(Note:	  The  program,  even  if  legal,  may	behave	very
strangely.) Thus, translation  will  continue  despite	user
error.

     When a  troublesome  line	is  encountered  by  GNOSIS,
several things happen in succession:  (a) the offending line
is displayed, (b) the appropriate error or  warning  message
is displayed, (c) a four-digit number is displayed with this
message, corresponding to the  line  number  in  the  GNOSIS
source	 program   (GNOSIS.ALG)   which   called  the  error
procedure, (d) the next three lines of the lesson script are
displayed  for	the sake of context, and (e) GNOSIS attempts
to recover from the error and continues translating.  If the
lesson	script	contained  no line numbers, then approximate
line numbers are generated and	displayed  with  the  lesson
lines.	 Otherwise,  the  line	numbers in the lesson script
will be displayed.

     In the context of the occurrence of the mistake, all of
these messages should prove to be self-explanatory.



6.1.1  GNOSIS Error Messages -

     1.  No switchname in %IF-class command.  Line  will  be
	 ignored.

     2.  Unknown switchname in %IF-class command.  Line will
	 be ignored.
GNOSIS.DOC					     Page 43
ERROR DIAGNOSIS AND RECOVERY


     3.  Unrecognized command line found.  As a result, this
	 line up to next command line will be ignored.

     4.  A command line is required at	this  point.   As  a
	 result  this  line  up to next command line will be
	 ignored.

     5.  Command is out of place here.	As  a  result,	this
	 line up to next command line will be ignored.

     6.  No previous comment  available.   Command  will  be
	 ignored.

     7.  No switchname in %SWITCH  command.   Line  will  be
	 ignored.

     8.  More than 9 switches not allowed.  THIS switch will
	 replace the old number nine.

     9.  Switch  value	neither  "TRUE"  nor  "FALSE".	 The
	 effect of this error is undefined.

    10.  Expected answers must precede	first  empty  answer
	 pattern.  Command will be ignored.




6.1.2  GNOSIS Warning Messages -

     1.  Long  input  line  will   be	truncated   to	 132
	 characters.

     2.  Character after line-number is not TAB.

     3.  Command character not first in line.

     4.  %IFEND on non-active switch -- will have no effect.

     5.  Semicolon  omitted  at  end  of  "%GOTO"   command.
	 GNOSIS will supply one for you.

     6.  You are not using "%" as a command indicator.

     7.  Unknown language.  GNOSIS will default to English.

     8.  This switch is doubly defined.

     9.  Ignore   this	 message   if	you   have   created
	 <lessonname>.DTA<155>	 and   <lessonname>.SRT<155>
	 files to receive teacher reports.
GNOSIS.DOC					     Page 44
ERROR DIAGNOSIS AND RECOVERY


    10.  Ignore this message if you meant to omit  teacher's
	 name and address.




6.2  ALGRTS (ALGOL Run-time System) Messages

     After these errors, GNOSIS will enter a debugging mode.
Unless the user is familiar with the operation of ALGDDT, he
should CTRL-C out of the program at  this  point  and  rerun
GNOSIS.

     1.  ?Run-time error at address <number>
	 File DSK:<filename> not available or rename failure

	      The file GNOSIS tried to	open  and  translate
	 does not exist.

     2.  ?Run-time error at address <number>
	 Attempt  to  read  or	write  over  end-of-file  on
	 DSK:<lessonname>

	      A %END command was not used to end the  lesson
	 GNOSIS was translating.




6.3  ALGOL Compiler Error Messages

     Certain errors may occur  when  the  TRANSLATED  lesson
(i.e., <lessonname>.ALG) is submitted to the ALGOL compiler.
These errors are varied and mysterious -- at least, to those
unfamiliar  with  the  ALGOL programming language.  When you
try to identify the source of these errors  in	your  lesson
script,  you  should concentrate on those portions which are
ALGOL-like.   These  include  the  code  following   %ALGOL,
%PROCEDURE,  %VARIABLES and %INITIALIZE commands.  The short
ALGOL sequences after %QUESTION, %TEXT and  %QEND  are	also
suspect.

     It  is  impossible  to  generalize  about	these  error
messages.   However,  the  following  checklist should prove
helpful:

     1.  [ ]Did you use a semicolon at the end of  the	code
	 following    %ALGOL,	 %INITIALIZE,	%NEXTLESSON,
	 %PROCEDURE, and %VARIABLES commands?

	      A   semicolon   is    ALWAYS    required	  as
	 end-punctuation  in  these  cases.   In addition, a
	 semicolon MAY be required  after  %QUESTION,  %TEXT
	 and  %QEND  commands if short ALGOL segments follow
GNOSIS.DOC					     Page 45
ERROR DIAGNOSIS AND RECOVERY


	 them.	Not all ALGOL segments require the semicolon
	 as   end-punctuation,	 however  (e.g.,  "%TEXT  IF
	 lasterrors > 3 THEN").

     2.  [ ]Did you avoid the left and right square bracket,
	 the   doublequote   and  the  semicolon  in  lesson
	 segments within the scope of %JUSTIFY?

	      The only ALGOL carriage-control  command	that
	 can  safely be used inside the scope of %JUSTIFY is
	 "[T]", for tabbing.

     3.  [ ]Does a colon follow your labels?

	      Except when  you	are  using  a  label  as  an
	 argument  for	a %GOTO command, the label should be
	 followed immediately by a colon.

     4.  [ ]Does a "%GOTO <label>;"  attempt  a  jump  to  a
	 non-existent label?

	      Perhaps you deleted a label  without  deleting
	 all  the  %GOTO commands which had that label as an
	 argument.

     5.  [ ]Did you try to use a reserved word	or  standard
	 identifier as a label?

	      A list of illegal labels (i.e., reserved words
	 and  standard identifiers) is given in an appendix.
	 You can always avoid errors of this kind by using a
	 number  of  period  in  your  labels.	 (The  first
	 character of a label, however, must be a letter.)
GNOSIS.DOC					     Page 46
WRITING ALGOL SEGMENTS INTO YOUR LESSON


			     *













7.0  WRITING ALGOL SEGMENTS INTO YOUR LESSON

     One of the great advantages of GNOSIS compared  to  all
other  CAI  author  languages is that, in GNOSIS, the lesson
designer  can  use  the  facilities  of  ALGOL	whenever  he
pleases.   In  the  usual  case,  he  will  be tapping these
facilities  through  the  %ALGOL,  %VARIABLES,	 %PROCEDURE,
%INITIALIZE   and  %FINISH  commands.	Generally  speaking,
anything which an ALGOL programmer could do  in  a  standard
ALGOL  program	he  can also do in the GNOSIS lesson script.
This includes calling up external  FORTRAN  routines[15]  to
generate   graphics,  external	MACRO  routines  to  improve
efficiency, and so on.

     In addition, the programmer may want to write  segments
of  ALGOL code which extend GNOSIS in certain ways.  To make
it easier to interface this code with the  lesson,  some  of
the  variables	and  all  of  the  procedures used in GNOSIS
lessons are described  below.	In  addition  to  the  items
discussed,  the user who wants to take advantage of standard
features should recall that standard labels exist within the
lesson.   See the discussion of these in connection with the
explanation of the %GOTO command, above.



7.1  Standard Variables And Procedures








---------------
     15.  See "Creating Procedures," below, section 7.3  for
further information about calling external FORTRAN routines.
GNOSIS.DOC					     Page 47
WRITING ALGOL SEGMENTS INTO YOUR LESSON


7.1.1  GNOSIS Variables -

     1.  Name:	"answercopy"

	 Type:	STRING

	      This  variable  contains	the   last   student
	 response    input    by   GNOSIS.    Thus   "%ALGOL
	 Write(answercopy);Newline;" causes that response to
	 be  echoed  on  the terminal exactly as the student
	 typed it.

     2.  Name:	"firstname"

	 Type:	STRING

	      This variable contains (%NAME mode  only)  the
	 first name of the student.  Thus
 
		%ALGOL IF percent > 90 THEN
		   personalize("Nice goin'!");
		Newline;
 
	 will,	under  the proper circumstances, cause "Nice
	 goin', HARRY!" to be  typed  out  on  the  terminal
	 (assuming  the  student's  first  name  was Harry).
	 This	effect	 occurs   because   the    procedure
	 "personalize" uses the value of "firstname" now and
	 then at the tail end of string constants it  writes
	 to the student.

     3.  Name:	"right[0]" ...	"right[9]"
		"wrong[0]" ...	"wrong[9]"

	 Type:	STRING ARRAYs

	      If you want some offbeat language to  be	used
	 when  the  student gets a question right, you could
	 use following lines:

		...
		%INITIALIZE
		right[0]:= "Right on!";
		right[1]:= "Terrific!";
		right[2]:= "Congratulations!";
		...
 
	 Similar  redefinitions  of  the  stock comments for
	 wrong responses could also be entered, e.g.,

		...
		%INITIALIZE
		wrong[0]:= "Shame on you!";
		wrong[1]:= "You blew it.";
GNOSIS.DOC					     Page 48
WRITING ALGOL SEGMENTS INTO YOUR LESSON


		wrong[2]:= "Not even close.";
		...
 

     4.  Names:  "lasterrors"
		 "lastrights"
		 "score"
		 "latescore"
		 "qcount"
		 "lastqcount"
		 "lastqkount"
		 "lastscorecount",
		 "lastlatescorecount"
		 "lastscorekount"
		 "lastlatescorekount"

	 Type:	INTEGER

	      See  the	discussion  of	these  variables  in
	 connection   with  the  explanation  of  the  %TEXT
	 command above.




7.1.2  GNOSIS Procedures -

     1.  Name:	"getline"

	 Typeless

	      "Getline" reads in a line of text input by the
	 student, dumping it in the STRING "answer".  Column
	 one of the line is checked to see  if	the  student
	 typed	"%",  indicating that he wanted to interrupt
	 the flow of the lesson.

     2.  Name:	"here"

	 Type:	BOOLEAN
	 Parameter Type:  STRING, passed by value

	      "Here" determines whether the argument  string
	 can  be  found  beginning  at	"pos" in the student
	 response.  Blanks, but nothing  else,	may  precede
	 the  matching	word.	"Here"	is  mostly  used for
	 responses matched in the %NOEXTRA mode.

     3.  Name:	"anywhere"

	 Type:	BOOLEAN
	 Parameter Type:  STRING, passed by value
GNOSIS.DOC					     Page 49
WRITING ALGOL SEGMENTS INTO YOUR LESSON


	      "Anywhere"  determines  whether  the  argument
	 string   can  be  found  anywhere  in	the  student
	 response after "pos".	Blanks and unmatched strings
	 will be bypassed.  "Anywhere" is used in the %EXTRA
	 mode and in the %NOEXTRA %NOORDER mode.  "Anywhere"
	 will  substitute  blanks  for all characters in the
	 matched strings.  This allows the program (e.g., in
	 the  %NOEXTRA	mode) to determine whether there are
	 any non-blank characters in the  student  response.
	 In the %NOEXTRA mode, his response will be wrong if
	 any non-blank characters remain.

     4.  Name:	"random"

	 Type:	INTEGER

	      "Random" is a number generator which  gives  a
	 random  number between 0 and 9.  The generator will
	 not repeat itself until after 862 generations.[16]

     5.  Name:	"personalize"

	 Typeless
	 Parameter Type:  STRING, passed by value

	      "Personalize" uses the student's firstname  in
	 conversational  I/O to give a personal touch to the
	 lessons.   To	avoid  monotony   and	to   further
	 efficiency,  the  probability that the message will
	 be personalized is only .2.

     6.  Name:	"rightmessage"

	 Typeless
	 Parameterless

	      "Rightmessage" is called when  a	student  has
	 made  a  correct  response.  He is told about this,
	 and the score	is  updated.   The  message  to  the
	 student   is  different  depending  on  whether  he
	 succeeds on the fist try  or  only  after  previous
	 fruitless  attempts.	Random	numbers  are used to
	 choose between ten different messages to give	some

---------------
     16.  An external FORTRAN call would have given us this,
but  we  did  not  wish  to  make  GNOSIS dependent upon the
PRESENT conventions for external calls	in  ALGOL.   Indeed,
these seem to be changing with each new release.  Of course,
if the lesson author  uses  "%NOCONTROLC"  or  "%NEXTLESSON"
then  GNOSIS does make an external call.  However, it is the
FORTRAN interface for these calls which seems to be evolving
most rapidly, not the MACRO interface.
GNOSIS.DOC					     Page 50
WRITING ALGOL SEGMENTS INTO YOUR LESSON


	 variation to the conversation.

     7.  Name:	"wrongmessage"

	 Typeless
	 Parameterless

	      "Wrongmessage" is called when  a	student  has
	 made an erroneous response.  He is told about this,
	 and the  lesson  statistics  are  updated.   Random
	 numbers  are  used  to choose between ten different
	 messages in order provide  some  variation  in  the
	 conversation.

     8.  Name:	"pause"

	 Typeless
	 Parameterless

	      Lesson text is given to the student  in  small
	 portions.  One reason for this is that it is easier
	 to read a little at a time.  Another reason is that
	 display  terminals have a limited screen size.  The
	 "pause" PROCEDURE produces a pause in	the  display
	 of  text  to  the  student,  and  she	can continue
	 whenever she has finished examining  the  displayed
	 material.  To go on, she simply pushes the "RETURN"
	 key.  Normally, this PROCEDURE  is  called  between
	 each  %TEXT or %QUESTION, but GNOSIS will introduce
	 ADDITIONAL  automatic	pause  points  within  large
	 blocks  of  text or question material.  The teacher
	 can  inhibit  pauses  BETWEEN	 "%"   commands   by
	 "nopause:=  TRUE",  but  the  pauses  which  GNOSIS
	 inserts in long text blocks cannot be inhibited.

     9.  Name:	"page"

	 Typeless
	 Parameterless

	      "Page" can be called by the  teacher  when  he
	 wants	to  blank the screen on a display terminal).
	 The  effect  produced	is,  of   course,   terminal
	 dependent.

    10.  Name:	"extratest"

	 Typeless
	 Parameterless

	      "Extratest" will flag and display those  parts
	 of  the  student response which WERE matched by the
	 teacher answer  pattern  IF  the  student  response
	 contained   extra  (i.e.,  superfluous)  characters
GNOSIS.DOC					     Page 51
WRITING ALGOL SEGMENTS INTO YOUR LESSON


	 "Extratest"  is  called  automatically  for  %RIGHT
	 responses in the %EXTRA mode.

    11.  Name:	"percent"

	 Type:	REAL
	 Parameterless

	      "Percent" returns the percentage of  questions
	 answered correctly by the student on his very first
	 try since the start of the lesson.

    12.  Name:	"latepercent"

	 Type:	REAL
	 Parameterless

	      "Latepercent"  returns   the   percentage   of
	 questions  answered  correctly by the student since
	 the start of the lesson whether student was correct
	 on the first try or afterward.

    13.  Name:	"lastscore"

	 Type:	INTEGER
	 Parameterless

	      "Lastscore" returns the  number  of  questions
	 answered correctly on the very first try since this
	 PROCEDURE was last called.

    14.  Name:	"lastlatescore"

	 Type:	INTEGER
	 Parameterless

	      "Lastlatescore"	returns   the	number	  of
	 questions  answered  correctly since this PROCEDURE
	 was last called whether student was correct on  the
	 very first try or afterward.

    15.  Name:	"lastpercent"

	 Type:	REAL
	 Parameterless

	      "Lastpercent"  returns   the   percentage   of
	 questions  answered correctly on the very first try
	 since this PROCEDURE was last called.

    16.  Name:	"lastlatepercent"

	 Type:	REAL
	 Parameterless
GNOSIS.DOC					     Page 52
WRITING ALGOL SEGMENTS INTO YOUR LESSON


	      "Lastlatepercent" returns  the  percentage  of
	 questions  answered  correctly since this PROCEDURE
	 was last called whether student was correct on  the
	 first try or afterward.

    17.  Name:	"putaway"

	 Typeless
	 Parameter Type:  STRING, passed by value

	      If the lesson  contained	a  report-generating
	 command,  then  unexpected  student  responses  are
	 written into a pair  of  reports,  <lessonname>.DTA
	 and  <lessonname>.SRT, which the teacher can use to
	 improve   the	 lesson.    "Putaway"	writes	 the
	 unexpected responses in these files.

    18.  Name:	"putmessage"

	 Typeless
	 Parameter Typeless

	      If no  disk  files  are  being  generated  for
	 teacher reports, "Putmessage" will tell the student
	 to send hardcopy reports to the teacher  --  unless
	 no  teacher's	name  and  address was supplied with
	 %TEACHER command)

    19.  Name:	"tryagain"

	 Typeless
	 Parameterless

	      Questions  output  to  students  who  give  no
	 response,   a	wrong  response,  or  an  incomplete
	 response   are   usually   repeated   by    GNOSIS.
	 "Tryagain"  will  output  to  such  students a "try
	 again"   message   which   varies   according	  to
	 circumstances.   In %NEUTRAL mode, the message will
	 always  be  "Please  try  again".   Otherwise,  the
	 content  of  the  message  depends on the number of
	 times the student has	failed	to  give  a  correct
	 response.

    20.  Name:	"giveanswer"

	 Typeless
	 Parameterless

	      "Giveanswer" displays  a	right  answer  to  a
	 student   who	is  skipping  the  question  or  who
	 repeatedly fails to give  a  right  response.	 The
	 response given will always be the one following the
	 FIRST %RIGHT command for the preceding %QUESTION.
GNOSIS.DOC					     Page 53
WRITING ALGOL SEGMENTS INTO YOUR LESSON


7.2  Creating Variables

     A lesson designer will often need extra variables.   In
GNOSIS,  these are extremely easy to declare, initialize and
use.  For example, if it is important to  know	how  well  a
student  is  doing on each part of a lesson, then the author
can proceed as follows:

	...
	%VARIABLES INTEGER firstpartscore, secondpartscore;
	...
	%INITIALIZE firstpartscore:= secondpartscore:= 0;
	...
	%QUESTION
	!Last question in first part of lesson
	...
	%QEND firstpartscore:= score;
	%QUESTION IF firstpartscore > 9 THEN
	You are doing very well so far.  Would you
	like to skip the rest of the lesson?
	%NEUTRAL yes
	%GOTO endoflesson;
	%NEUTRAL no
	!"GOTO next;" is the default.
	%NEUTRAL
	Please answer 'yes' or 'no'.
	%GOTO repeat;
	...
	%QUESTION
	!Last question in second part of lesson
	...
	%QEND secondpartscore:= score - firstpartscore;
	%ALGOL IF secondpartscore > firstpartscore THEN
	BEGIN
	   Write("You did better in the second part, ");
	   IF firstname = "" THEN Write("SOCRATES") ELSE
	   Write(firstname);
	   Write("!");
	   Newline
	END;
 
More  commonly,  the  lesson  author  will want to declare a
whole array of variables, e.g.,

	...
	%VARIABLES INTEGER ARRAY partscores[1:10];
	...
	%INITIALIZE
	BEGIN
	   INTEGER i;
	   FOR i:= 1 STEP 1 UNTIL 10 DO partscores[i]:= 0
	END;
GNOSIS.DOC					     Page 54
WRITING ALGOL SEGMENTS INTO YOUR LESSON


7.3  Creating Procedures

     ALGOL procedures are  easy  to  insert  in  the  lesson
script and easy to call, e.g.,

	...
	%PROCEDURE PROCEDURE echoinput;
	BEGIN
	   Write("Your last response, as 'seen' ");
	   Write("by the program was:");
	   Newline;
	   Write(answercopy);
	   Newline;
	   Write("That was not one of the choices.");
	   Newline
	END;
	...
	%QUESTION
	...
	!Allowable responses to this question were
	!A, B, C or D.	One of these was right and
	!the other three were wrong.  The student
	!typed X, thus matching none of the above.
	!His response shouldn't be counted wrong,
	!so we proceed to trap it as follows.
	%NEUTRAL
	%ALGOL echoinput;
	%GOTO repeat;
	!GNOSIS defaults to "GOTO next" after %NEUTRAL
	...


     External procedures can be declared and  used  too,  of
course.

     FORTRAN subroutines may easily be incorporated  in  the
GNOSIS lesson script, e.g.,

	...
	%PROCEDURE EXTERNAL FORTRAN PROCEDURE foo(x, y);
	INTEGER x, y;
	...

Having been declared, "foo" can then can then be  called  by
use  of  the  ALGOL  library  procedure  CALL  (for typeless
routines).  Type procedures can be  invoked  by  ICALL	(for
INTEGER  routines),  RCALL  (for  REAL routines), DCALL (for
LONG REAL or  double-precision	routines),  and  LCALL	(for
BOOLEAN  or logical routines).	The first parameter in these
procedure calls must be the name of the FORTRAN  subroutine.
Subsequent  parameters	are  taken  as	the arguments to the
procedure  (e.g.,  "CALL  (foo,  x,  y);"  which  would   be
equivalent to "CALL foo(x, y)" in a FORTRAN program).
GNOSIS.DOC					     Page 55
WRITING ALGOL SEGMENTS INTO YOUR LESSON


     The  FORTRAN  interface   routines   were	 extensively
rewritten for Version 10 of ALGOL.  The major new feature is
that arrays (of any dimension) can now be passed.  In  fact,
all  of  the  restrictions  on parameters have been removed,
except that strings may not be passed.	Note  too  that,  in
Version  10,  the  name  of  the  FORTRAN  routine  must  be
specified by type in the external  declaration	(unless,  of
course, it is typeless).
GNOSIS.DOC					     Page 56
WRITING GNOSIS LESSONS


			     *













8.0  WRITING GNOSIS LESSONS

     Some of those new to  CAI	can  easily  envision  whole
curricula running on computers.  This is STRICTLY visionary,
however, unless (1) the  machine  is  totally  dedicated  to
computer-assisted  instruction	and  (2)  a  team-management
approach is taken to  the  authorship  and  testing  of  CAI
software.   Beyond  this,  there are at least two additional
complications:	(1) curriculum organization and content  may
change	before	the  software  is  ready  and (2) changes in
associated software and hardware may  dictate  a  change  in
approach.

     For these reasons, I suggest that you set for  yourself
the more attainable goal of, say, computerizing the exercise
material in the textbook you currently use.  Those of us who
teach  skill-oriented courses would probably LIKE to be able
to  assign,  grade  and  return  to  students	(with	full
diagnostic  commentary,  naturally)  all  of  the  exercises
included in our textbooks.  But time does not -- or, rather,
DID  not  --  afford us this luxury.  With GNOSIS this is no
longer an impossible dream.  In a moment, I will explain how
I  have  achieved  this objective with my GNOSIS courseware.
First, I want to review  for  you  the	different  types  of
presentations	available   to	you  through  the  %QUESTION
command.



8.1  Question Types

     1.   A  CONSTRUCTED  RESPONSE  item  results  from   an
open-ended use of the %QUESTION command, e.g.,

	...
	%QUESTION
	What is the principal effect of electrolysis
	on marine hardware?
	%RIGHT ...
GNOSIS.DOC					     Page 57
WRITING GNOSIS LESSONS


Note  that  such a question allows a FREE-FORM response, and
many  different  responses  probably  should  be  considered
correct.

     The task of the lesson designer is to anticipate all of
the  frequently recurring right and wrong responses and, for
each  response,  to  provide  feedback	tailored   to	that
response.  Otherwise the program will appear to be arbitrary
and dumb.  Even if your lesson is born acting like an idiot,
there  is  no  reason why it should continue to do so if you
make full and appropriate use  of  the	information  in  the
".SRT"	file.  So, I advise you to study that file carefully
in the early stages, PARTICULARLY  if  you  use  constructed
response  items.   In  addition, make sure such questions do
not permit myriads of correct responses.  Ask  for  a  short
response  or, better still, word your question in such a way
that a single word or short response will satisfy it.

     2.  A COMPLETION item results when  %QUESTION  presents
to the student a fill-in-the-blank(s) problem, e.g.,

	...
	%QUESTION
	Electrolysis causes marine hardware to
	become __________________.
	...

The  lesson  author  may use only one blank, as above, or he
may leave a whole  series  of  blanks  for  the  student  to
complete.   Of	course,  if the order in which the responses
are given is important, then %ORDER must be in effect before
the  %QUESTION	command  is  used to deliver the item to the
student.  As before,  the  ".SRT"  file  should  be  studied
carefully.

     3.  A MATCHING  item  presents  the  student  with  the
problem  of  pairing  items belonging in one list with items
belong in another.  It is the  most  natural  way  to  teach
closely  related  material  since  the	format	permits many
distinctions to be taught at once.

     Matching questions present the  lesson  author  with  a
considerable  burden, however.	The total number of ways two
lists can be paired will be statistically large, yet he must
anticipate   the   most  likely  right	and  wrong  parings,
providing commentary for  each	case.	This  task  is	made
easier	if the student is directed to attempt one match at a
time.  The most efficient way to accomplish this  in  GNOSIS
is to make the list itself a %HELP routine, e.g.,

	...
	%NOJUSTIFY
	%HELP list1
	(1) <item>			(a) <item>
GNOSIS.DOC					     Page 58
WRITING GNOSIS LESSONS


	(2) <item>			(b) <item>
	...
	%JUSTIFY
	...
	%QUESTION
	What matches item '(2)'?  (Type 'help' to see
	the list again.)
	%NEUTRAL help
	%ALGOL list1;
	%GOTO repeat;
	%RIGHT ...

As  before,  you  have	the  task of anticipating all likely
mismatches and of writing diagnostic  commentary  to  follow
those %WRONG commands.	Incidentally, the number of possible
choices (in the selection column) should be greater than the
number	of  items to be matched.  As always, the ".SRT" file
is a gold mine of ideas.

     In the next release of GNOSIS,  we  expect  to  have  a
%MATCH	command  ready.   When used, %MATCH would format the
matching  question,  manage  re-display  of  the   list   as
necessary,  and  generate  appropriate feedback based on the
degree to which the student response was correct.

     4.  A RANKING item results when the author presents the
learner  with  the  problem  of ordering a list according to
some criterion (e.g., better to worse, light  to  heavy,  in
time order, and so on).

     As with matching  items,  if  you	decide	to  let  the
student  assign  a rank to each item in the list separately,
in response to a question about that specific item, then you
will  have  to make use of the %HELP feature to avoid having
to retype the list for each new %QUESTION.  Of	course,  you
could  ask  the  student  for  the entire rank-sequence as a
single response but, even with lists of five or  six  items,
that   technique   greatly   complicates   the	 problem  of
anticipating what that response will  be.   Longer  comments
are  also  required  if  you  choose the simultaneous answer
route.	(In the next release of GNOSIS, we hope  to  have  a
%RANK  command	ready  to  simplify  this part of the lesson
design.)

     5.  MULTIPLE-CHOICE items are already familiar to	you.
Research  shows  three	to  five  choices per item are best.
And, if you select the choices empirically,  based  on	your
knowledge  of  likely student misconceptions and confusions,
then the diagnostic comments you build into %WRONG  patterns
will be supremely enlightening.  Also, multiple-choice items
are the best items to present  to  unskilled  typists  since
responses other than the 3-5 standard choices can be trapped
by putting
GNOSIS.DOC					     Page 59
WRITING GNOSIS LESSONS


	...
	%NEUTRAL
	The choices open to you are 'A', 'B', 'C' or 'D'.
	%GOTO repeat;
	...

after  the  comment for the last %WRONG command.  Use of the
"%NEUTRAL <empty>" trap rules out subsequent use of  "%WRONG
<empty>", of course, since the first <empty> pattern matches
any response not matched above it.

     Note too that if more  than  one  alternative  must  be
listed	in order for the student's response to be considered
correct (e.g., "A, B"), then it is easy  to  trap  partially
correct responses with sequences like

	...
	%NOEXTRA
	%RIGHT a b
	<comment>
	%RIGHT a , b
	%SAME
	%EXTRA
	%NEUTRAL a
	'A' is ONE of the correct responses!
	%GOTO repeat;
	%NEUTRAL b
	'B' is ONE of the correct responses!
	%GOTO repeat;
	...

THIS OBVIATES THE NEED for second-order choices  like  "none
of  the above," "two of the above," "all of the above," etc.
If you continue to use such choices, you are  not  realizing
the power of computer-assisted instruction!

     Your multiple-choice items will discriminate better  if
you  are careful to construct the choices in parallel, using
the same grammatical structure in each, and so on.  A useful
fudge  is  to  ask  for  the  single  response	which  "best
satisfies" the demands of the question.

     6.  The TRUE/FALSE item is really a degenerate kind  of
multiple-choice  item.	 So  much of what is said above also
applies here.  I use such items sparingly, usually to  break
up  what would otherwise be a sterile series of text blocks.
True/false (or agree/disagree, yes/no, etc.)  items  do  not
have  great  pedagogic	value,	but they provide variety and
they do demand an active response  of  some  kind  from  the
student.
GNOSIS.DOC					     Page 60
WRITING GNOSIS LESSONS


8.2  Lesson-generated Diagnostic Profiles

     A computerized textbook exercise would use a variety of
the question types discussed above.  In addition, it is easy
to extend the lesson in  such  a  way  that  it  provides  a
complete diagnostic profile for each student.

     Let us suppose that the curriculum is broken down	into
units of study, and that there are behavioral objectives for
each unit.  Let us also suppose  that  one  chapter  of  the
associated textbook corresponds to one unit of study.  Given
this common arrangement of  curriculum,  a  powerful  GNOSIS
program  could	be  designed as sketched below.  To make the
example as concrete as possible, let us  suppose  that	this
program is for UNIT1, that UNIT1 has 5 behavioral objectives
associated with it, and that it covers pages  33-55  of  the
textbook.

	...
	%VARIABLES INTEGER ARRAY pages[33:55],
	objectives[1:5];
	...
	%PROCEDURE PROCEDURE updatepages(n, m);
	INTEGER n, m;
	BEGIN
	   INTEGER i;
	   IF lasterrors > 0 THEN
	      FOR i:= n STEP 1 UNTIL m DO
	      PAGES[i]:= pages[i] + lasterrors
	END;

	%PROCEDURE PROCEDURE updateobj(n);
	INTEGER n;
	BEGIN
	   objectives[n]:= objectives[n] + lasterrors
	END;
	...
	%PROCEDURE PROCEDURE profileobj(channel);
	INTEGER channel;
	BEGIN
	   INTEGER i, j;
	   Selectoutput(channel);
	   Newline;
	   Newline;
	   FOR i:= 1 STEP 1 UNTIL 5 DO
	   BEGIN
	      Write("OBJECTIVE No. ");
	      Print(i,3);
	      Write(":	");
	      For j:= 1 STEP 1 UNTIL objectives[i] DO
		 Write("*");
	      Newline
	   END;
	   Selectoutput(0)
GNOSIS.DOC					     Page 61
WRITING GNOSIS LESSONS


	END of PR*CEDURE profileobj;

	%PROCEDURE PROCEDURE profilepages(channel);
	INTEGER channel;
	BEGIN
	   INTEGER i, j;
	   Selectoutput(channel);
	   Newline;
	   Newline;
	   FOR i:= 33 STEP 1 UNTIL 55 DO
	   BEGIN
	      Write("Page ");
	      Print(i,3);
	      Write(":	");
	      FOR j:= 1 STEP 1 UNTIL pages[i] DO
		 Write("*");
	      Newline
	   END;
	   Selectoutput(0)
	END of PR*CEDURE profilepages;

	%INITIALIZE
	BEGIN
	   INTEGER i;
	   FOR i:= 1 STEP 1 UNTIL 5 DO
	      objectives[i]:= 0;
	   FOR i:= 33 STEP 1 UNTIL 55 DO
	      pages[i]:= 0
	END;
	...
	%QUESTION
	!This question tests mastery of objective 3 and 4.
	!Pages 33-36 and 40-41 in the text are relevant
	!to good performance on this objective
	...
	%QEND updatepages(33, 36); updateobj(3);
	%ALGOL updatepages(40, 41); updateobj(4);
	!Do a similar thing for each question.
	...
	%FINISH
	%ALGOL
	Write("A diagnostic profile for you follows.);
	Write("The objectives followed by the most");
	Write("asterisks are causing you the most");
	Write("difficulty:");
	profileobj(0);
	!The TTY is open on channel 0
	profileobj(2);
	!<lessonname>.DTA is open on channel 2
	pause;
	Write("You could benefit most from a review");
	Write("of the page numbers followed by the");
	Write("most asterisks:");
	profileobj(0);
GNOSIS.DOC					     Page 62
WRITING GNOSIS LESSONS


	profileobj(2);
	%END
	...


     The kind of diagnosis provided by	the  GNOSIS  segment
given  above  proves  INVALUABLE  to students.	It, together
with the routine diagnostic comments in the  lesson  itself,
should gain for the student all the advantages he might have
had  if  you  had  spent  several  hours  pouring  over  his
homework.  And he didn't even have to wait!



8.3  Some Advice[17]

     1.  Allow the high-achieving student to CHOOSE  whether
to be branched ahead.  If you make it automatic, you deprive
him of a unique kind of positive reinforcement.

     2.  Always make your commentary a	complete  one,	even
for  %RIGHT  commands.	 We cannot assume that, just because
the student got the question right, that he now is  in	full
command of the concept.

     3.  Let your  personality,  your  sense  of  humor  and
irony,	your colloquialisms be reflected in the lesson.  The
machine won't stand between you and the student  unless  you
are dullard enough to let it.

     4.  The flow of instruction between %TEXT and %QUESTION
blocks	is  important.	After pauses, preserve continuity by
using phrases like "The last item should have  you  thinking
about...."

     5.  GNOSIS breaks up text material for display purposes
only.	You  should  further  break  the  monotony  of	long
sessions of text reading by asking questions -- even trivial
TRUE/FALSE questions.

     6.  Use the student's own response  in  preparing	your
commentary.   You will know what it is most of the time;  it
will be the argument given for the  current  answer  pattern
command.   Even  in the worst case (%WRONG <empty>) you will
still know what responses were NOT made.



---------------
     17.  Some of the following is adapted  from  Jeanne  L.
Burson,  THE  AUTHOR'S GUIDE TO CAI:  DEVELOPMENT (Columbus,
Ohio:  Ohio State University, Division of Computing Services
for Medical Education and Research, 1976), pp.	161-163.
GNOSIS.DOC					     Page 63
WRITING GNOSIS LESSONS


     7.  Relate your comments as closely as possible to  the
student's   response.	Avoid  %SAME  unless  the  identical
comment really will do the job.

     8.  Aim to  provide  diagnostic  commentary  for  EVERY
%WRONG, %RIGHT, %LACK and %NEUTRAL answer pattern command.

     9.  Unless the question is a TRUE/FALSE item or you are
using "%NEUTRAL <empty>" to trap responses that fall outside
a predefined  set  (e.g.,  the	choices  associated  with  a
multiple-choice item), you should always include one or more
"%WRONG  <empty>"  commands.   It's   the   only   way	 the
unanticipated  responses  will	ever find their way into the
teacher reports.

     10.   Provide  commentary	even  for  "%WRONG  <empty>"
commands.   Supply  hints  if  nothing	else  comes to mind.
NEVER LEAVE THE STUDENT HANGING!

     11.  Let the student know approximately  how  long  the
program  is  and,  occasionally,  how much of the program is
left.  This could be a time estimate  or,  if  that  is  too
difficult  to  gauge, an estimate of the number of questions
he is likely  to  encounter.   If  the	lesson	has  obvious
breaks, say, "If you have to quit soon, this would be a good
stopping point."

     12.  Watch a dozen students run your lesson before  you
unleash  it  on the remainder of the student body.  Ask them
to tell you what makes them uncomfortable.

     13.   Review  the	teacher  report  files	 frequently,
especially  in the early stages.  After you have extensively
modified a lesson, delete and recreate the  ".SRT"  file  so
that the new data will not be confused with the old.

     14.   Remember   that   the   program   portrays	YOUR
personality,  not  that  of the hardware.  If it is dull and
uninteresting, redundant  and  confusing,  it  can  only  be
because YOU are all of these things.  Perk up!	Interact!
GNOSIS.DOC					     Page 64
RUNNING GNOSIS


			     *













9.0  RUNNING GNOSIS

     Let's assume you have written a lesson called BIRD.GNO.
Assuming the GNOSIS.MIC and GNOLIB.REL files exist in "MIC:"
and "SYS:" respectively, then all you need to do is type

	DO GNOSIS BIRD

after  the  period  prompt provided by the monitor.  If this
doesn't work, try

	DO SYS:GNOSIS BIRD

If that fails, then you will have to proceed as follows.

     First you will run  GNOSIS  to  translate	the  lesson.
Then,  if  all	is  well,  you will run ALGOL to compile it.
Then, if all remains satisfactory, you will save the lesson.
Don't  forget  to  create BIRD.SRT and BIRD.DTA files in the
student account when these  are  required  by  the  program.
(GNOSIS  will  warn  you  about this.) In exhaustive detail,
then, the procedure is as follows:

     1.  Type "R GNOSIS<CR><LF>" after	the  monitor  period
	 prompt.

	      GNOSIS will begin to execute, asking  you  for
	 the  name  of	the lesson to be translated.  GNOSIS
	 will prompt you with a "-->".

     2.  Type "BIRD<CR><LF>" after the "-->" prompt.

	      GNOSIS defaults to the  ".GNO"  extension  and
	 begins  translation.	If  the  lesson  has another
	 extension, then you  should  not  allow  GNOSIS  to
	 default  to  ".GNO" but rather type in the complete
	 file description, including extension.  If  all  is
	 well, you will continue with the next step.
GNOSIS.DOC					     Page 65
RUNNING GNOSIS


     3.  Type "<CR><LF>" after	GNOSIS	reprompts  with  the
	 "-->".

	      This causes GNOSIS to exit.

     4.  Type "LOAD BIRD.ALG, SYS:GNOLIB.REL<CR><LF>"  after
	 the monitor period prompt.

	      The ALGOL compiler will be called into  action
	 and will prepare a machine readable version of your
	 lesson and name it "BIRD.REL." (You  can  omit  the
	 "...,	SYS:GNOLIB.REL ..." part of the load command
	 if you did not use the %NEXTLESSON  or  %NOCONTROLC
	 commands  in  your  lesson.  Of course, if for some
	 reason you are  unable  to  access  the  GNOLIB.REL
	 file,	you  will  have no choice but to avoid these
	 two commands.)

	      If all seems to be in order, you will want  to
	 run your lesson to be sure it performs as desired.

     5.  After	 the	monitor    period    prompt,	type
	 "START<CR><LF>"  or,  when  that doesn't work, "EXE
	 BIRD.REL<CR><LF>".

	      If the lesson is bug free, you  will  want  to
	 prepare   a   production  (i.e.,  smaller,  faster)
	 version of it and save that version.  It  would  be
	 wise,	however,  to  try  BIRD on at least three or
	 four "real students" before you proceed  past	this
	 stage.

	      Note:   If  the  lesson  requires  ".DTA"  and
	 ".SRT" files, it will not run to completion without
	 these files.  Instead, at lesson  exit,  the  ALGOL
	 run-time  system  will  generate  an error message.
	 You can ignore this for now, using CTRL-C's to exit
	 from  ALGDDT.	 But  --  notice -- these files must
	 exist in the student account before the  lesson  is
	 run.

     6.  Type "R ALGOL<CR><LF>"  after	the  monitor  period
	 prompt.

	      ALGOL will respond  with	a  "*"	prompt	when
	 ready.

     7.  After the "*" prompt, type
	 "BIRD.REL=BIRD.ALG/NOSYMBOLS/PRODUCTION<CR><LF>".

	      If there are no errors, ALGOL  will  type  "No
	 errors" and reprompt with a "*".
GNOSIS.DOC					     Page 66
RUNNING GNOSIS


     8.  Type a CTRL-Z after this "*".

	      This causes an exit from ALGOL.

     9.  When the monitor period prompt returns, type  "LOAD
	 BIRD.REL, SYS:GNOLIB.REL<CR><LF>".

	      This will load the production version  of  the
	 lesson.   As  before,	the part after "BIRD.REL" is
	 necessary only  if  you  used	the  %NEXTLESSON  or
	 %NOCONTROLC command in BIRD.GNO.

    10.  Type "OSAVE<CR><LF>" after the period prompt.

	      The monitor will reply "BIRD saved".

    11.  Congratulate yourself.

Forever after, it is only necessary to type  "RUN  BIRD"  to
run the lesson.
GNOSIS.DOC					     Page 67
SETTING UP STUDENT ACCOUNTS


			     *













10.0  SETTING UP STUDENT ACCOUNTS

     For security reasons, you will  probably  NOT  want  to
keep the ".SAV" version of your lessons in a student account
where,	among  other  things,  they  could  be	accidentally
deleted.    Store  them,  therefore,  in  YOUR	account  and
establish a separate account for students.  Of	course,  you
will  still  have  to deposit any required ".DTA" and ".SRT"
files in the STUDENT account with  a  protection  of  <155>.
(At  present, there is no way to provide better security for
the teacher reports.) In addition, in the  student  account,
create a "SWITCH.INI" file which (at least) has this line in
it:

     LOGIN/LIB:[<YOUR project-programmer number>]

This will establish your account  as  the  library  for  the
student  account.   Students  will thereafter be able to run
the lessons with the simple command string "RUN  <lessonname
without  extension>".	A  typical  SWITCH.INI	file  for  a
student account would look like this:

	LOGIN/FORM
	LOGIN/NOCRLF
	LOGIN/LC
	LOGIN/FILL:0
	LOGIN/ECHO
	LOGIN/WIDTH:132
	LOGIN/PAGE
	LOGIN/LIB:[<account number>]
	LOGIN/RUN:LIB:MASTER


The first seven switches  set  TTY  parameters,  the  eighth
establishes  the  teacher's  account as the library, and the
ninth  runs  a	program  out  of  the	teacher's   account,
"MASTER.SAV", which could (for example)
GNOSIS.DOC					     Page 68
SETTING UP STUDENT ACCOUNTS


     1.  deliver a message from you to the student;

     2.  tell him which lessons are available;	and

     3.  run the lesson of his choice.

The code for the MASTER program could be as follows:

BEGIN
   INTEGER i, j;

   EXTERNAL PROCEDURE run;
   COMMENT:  Load with GNOLIB.REL;

   BOOLEAN PROCEDURE endoffile;
   endoffile:= (i = "/".[1] AND j = "*".[1]);

   PROCEDURE readandwrite(channel, file);
   INTEGER channel;
   STRING file;
   BEGIN
      i:= j:= 0;
      Openfile(channel, file);
      Selectinput(channel);
      WHILE NOT endoffile DO
      BEGIN
	 Insymbol(i);
	 Nextsymbol(j);
	 Outsymbol(i)
      END;
      Closefile(channel);
      Selectinput(0)
   END;

   PROCEDURE Pause;
   BEGIN
      i:= 0;
      Newline;
      Newline;
      Write("Now push RETURN --> ");
      Breakoutput;
      WHILE i # 10 DO Insymbol(i)
   END;


   Input(0, "TTY");
   Input(1, "DSK");
   readandwrite(1, "NOTICE");
   COMMENT:  The NOTICE file will contain the
   current message-of-the-day from the teacher
   to the student.  The contents of the NOTICE
   file can be changed frequently and MASTER
   will display the newest version.  The NOTICE
   file must end with the character sequence
GNOSIS.DOC					     Page 69
SETTING UP STUDENT ACCOUNTS


   "/*";
   Pause;
   run("CHOOSE")
   COMMENT:  Control now passes to the CHOOSE
   program.  In addition, at the end of each
   lesson run, control also passes back to the
   CHOOSE program via a "%NEXTLESSON run("CHOOSE")"
   command;
END


And the code for the helper program,  CHOOSE,  could  be  as
follows:

BEGIN

   INTEGER i, j, choice;

   EXTERNAL PROCEDURE r, run;
   COMMENT: Load with GNOLIB.REL;

   BOOLEAN PROCEDURE endoffile;
   endoffile:= (i = "/".[1] AND j = "*".[1]);

   PROCEDURE readandwrite(channel, file);
   INTEGER channel;
   STRING file;
   BEGIN
      i:= j:= 0;
      Openfile(channel, file);
      Selectinput(channel);
      WHILE NOT endoffile DO
      BEGIN
	 Insymbol(i);
	 Nextsymbol(j);
	 Outsymbol(i)
      END;
      Closefile(channel);
      Selectinput(0)
   END;

   SWITCH choose:= one, two, three, four, five;
   Input(0, "TTY");
   Input(1, "DSK");
   readandwrite(1, "LIST");
   COMMENT:  CHOOSE now reads and writes a
   file containing a list of all available
   lessons.  An integer value is paired with
   each lesson.  This integer is the option
   number for that particular lesson.  The
   last option number is paired with the
   program LOGOUT.  The LIST file must end with
   the character sequence "/*";
GNOSIS.DOC					     Page 70
SETTING UP STUDENT ACCOUNTS


   repeat:
   Write("Enter option NUMBER:	");
   Breakoutput;
   Read(choice);
   GOTO choose[choice];
   Newline;
   Write("?Option number out-of-range.");
   Newline;
   GOTO repeat;

   one: run("LESON1");
   two: run("LESON2");
   three: run("LESON3");
   four: run("LESON4");
   five: r("LOGOUT");
END



     Do not forget -- in YOUR account --  to  protect  <155>
the  ".SAV"  version of the lessons students will be running
from  theirs.	You  may  also	wish  to  write  a   similar
"SWITCH.INI"  file  for  your  account which establishes the
student account as the library for  your  own.	 This  would
allow  you  to inspect and print the ".SRT" and ".DTA" files
with simple monitor commands, almost as if they were in your
own account.[18]

     Periodically, as the lessons are run by  students,  you
should	sort the ".SRT" files, using the DEC utility program
SORT.[19] Study the sorted file carefully and  try  to	find
ways to improve the lesson design.  You will likely discover
alternate right responses for questions you thought  had  no
other  right  responses.  And you may find that a particular
wrong response occurs so often that either  (1)  the  lesson
should be redesigned so that it does not mislead the student
or (2) the lesson should be modified to include a diagnostic
comment  for  that  recurrent  wrong  response.  In fact, my
experience with GNOSIS lessons is  that  the  real  work  in
lesson	design	begins	only AFTER students begin to run the
lessons.




---------------
     18.  It is often necessary that your  account  and  the
student  account  be  located on the same DSK structure, but
this restriction is system-dependent.

     19.  A MIC program which  accomplishes  this  has	been
included in an appendix.
GNOSIS.DOC					     Page 71
SETTING UP STUDENT ACCOUNTS


     In addition, you should probably should print,  delete,
and  recreate the ".DTA" files from time to time, since they
can become rather large.  These, too, can  be  studied	with
profit -- especially, the student comments.  I trust most of
these will be favorable but, if not, GNOSIS makes it  fairly
easy  to  identify the parts of the lesson which were giving
students serious trouble.
INDEX OF GNOSIS COMMANDS


'












		  INDEX OF GNOSIS COMMANDS


%algol . . . . . . . . . . . . 20, 22, 24-25, 30, 32, 36,
			       38, 44, 46-47
 
%bell  . . . . . . . . . . . . 20, 38
 
%copyright . . . . . . . . . . 20, 38
 
%disk  . . . . . . . . . . . . 21, 26, 33, 38
 
%end . . . . . . . . . . . . . 19, 22, 30, 38, 44
%extra . . . . . . . . . . . . 19, 22, 27, 29, 38, 49, 51
 
%finish  . . . . . . . . . . . 22, 38, 46
 
%goto  . . . . . . . . . . . . 19, 22-24, 28, 31-32, 34, 37,
			       43, 45-46
 
%help  . . . . . . . . . . . . 24-25, 38, 57-58
 
%if  . . . . . . . . . . . . . 24, 32, 38, 42
%ifend . . . . . . . . . . . . 24-25, 32, 38, 43
%ifnot . . . . . . . . . . . . 24-25, 32, 38
%initialize  . . . . . . . . . 25, 38, 44, 46
 
%justify . . . . . . . . . . . 25-26, 29, 38, 45
 
%keep  . . . . . . . . . . . . 21, 26, 38
 
%lack  . . . . . . . . . . . . 23-24, 26-27, 31, 37-38, 63
%language  . . . . . . . . . . 27, 38
%lock  . . . . . . . . . . . . 27, 36, 38
 
%name  . . . . . . . . . . . . 21, 27, 33, 38, 47
%neutral . . . . . . . . . . . 19, 24, 27-28, 31, 37, 39,
			       41, 52, 59, 63
%nextlesson  . . . . . . . . . 28, 39, 44, 49, 65-66
%nocontrolc  . . . . . . . . . 28, 39, 49, 65-66
%noextra . . . . . . . . . . . 19, 22, 29, 39, 48-49
%nojustify . . . . . . . . . . 25, 29, 39
%noorder . . . . . . . . . . . 19, 27, 29, 39, 49
INDEX OF GNOSIS COMMANDS
 
%order . . . . . . . . . . . . 19, 29, 39, 57
 
%procedure . . . . . . . . . . 30, 39, 44, 46
 
%qend  . . . . . . . . . . . . 30, 39, 44
%question  . . . . . . . . . . 15, 17, 19, 24-25, 30, 32,
			       39, 41, 44, 50, 52, 56-58, 62
 
%right . . . . . . . . . . . . 15, 17, 19 22-24, 31, 37, 39,
			       51-52, 62-63
 
%same  . . . . . . . . . . . . 31-32, 39, 63
%sgnosis . . . . . . . . . . . 32, 39
%switch  . . . . . . . . . . . 24-25, 32, 39, 43
 
%teacher . . . . . . . . . . . 21, 26, 32-33, 39, 52
%text  . . . . . . . . . . . . 15, 19, 17, 24, 30-31, 33-34,
			       36, 39, 44-45, 48, 50, 62
 
%variables . . . . . . . . . . 25, 36, 39, 44, 46
 
%wrong . . . . . . . . . . . . 15, 17, 19, 23-24, 31, 36-37,
			       39, 58-59, 62-63











			APPENDIX A

		   SELECTED BIBLIOGRAPHY



     1.  -----,  DECSYSTEM10  ALGOL  PROGRAMMER'S  REFERENCE
	 MANUAL  (Maynard, Massachusetts:  Digital Equipment
	 Corporation, 1974).  The basic ALGOL reference  for
	 DEC users.  Not a stand-alone guide.  A new edition
	 is imminent.

     2.  Bauer,  F.   L.,  ET  AL.,  INTRODUCTION  TO  ALGOL
	 (Englewood   Cliffs,  New  Jersey:   Prentice-Hall,
	 1964).

     3.  Burson, Jeanne  L.,  THE  AUTHOR'S  GUIDE  TO	CAI:
	 DEVELOPMENT (Columbus, Ohio:  Ohio State University
	 Division  of	Computing   Services   for   Medical
	 Education  and  Research,  1977).  Loose-leaf guide
	 for lesson designers at OSU.

     4.  Bush, Steve, PNOSIS:  A  LANGUAGE  FOR  SIMPLE  CAI
	 (Dallas,   Texas:    University  of  Texas  Medical
	 Computing Resources Center,  1978).   Documentation
	 on   a  preprocessor,	using  a  subset  of  GNOSIS
	 commands,  which  translates  directly  into  PILOT
	 rather  than  ALGOL.	Originally called GNOSIS-II.
	 PNOSIS supports direct  coding  in  PILOT  much  as
	 GNOSIS  supports direct coding in ALGOL.  A version
	 should be available from DECUS.

     5.  Callender,  Patricia,	PROGRAMMED  LEARNING:	 ITS
	 DEVELOPMENT AND STRUCTURE (London:  Longmans, Green
	 and Co., 1969).

     6.  Dijkstra, E.  W., A PRIMER OF ALGOL 60  PROGRAMMING
	 TOGETHER  WITH  REPORT  ON THE ALGORITHMIC LANGUAGE
	 ALGOL 60 (New York:  Academic Press,  Inc.,  1962).
	 Historically, the standard reference on ALGOL 60.

     7.  Lindsay, C.   H.   and  Van  der  Meulen,  S.	 G.,
	 INFORMAL  INTRODUCTION  TO ALGOL 68 (Amsterdam, The
	 Netherlands:  North Holland Publishing Co.,  1977).
	 Standard  documentation  for  a  later  version  of
	 ALGOL.
SELECTED BIBLIOGRAPHY				    Page A-2



     8.  Malcolme-Lawes, D.  J., PROGRAMMING-ALGOL (Elmsfor,
	 New York:  Pergamon Press, Inc., 1969).

     9.  Markle,  Susan  Meyer,  GOOD  FRAMES  AND  BAD:   A
	 GRAMMAR OF FRAME WRITING (New York:  John Wiley and
	 Sons, 1969).  Excellent introduction to the writing
	 of programmed textbooks.  Skinnerian bent.

    10.  Pagan, Frank G., A PRACTICAL GUIDE TO ALGOL 68 (New
	 York:	John Wiley and Sons, 1976).

    11.  Palme, Jacob, GNOSIS -- A SYSTEM FOR COMPUTER AIDED
	 INSTRUCTION  (Stockholm,  Sweden:  Swedish National
	 Defense  Research  Institute,	 1973	and   1975).
	 Manuals for previous versions of GNOSIS.

    12.  Wichman, B., ALGOL 60	COMPILATION  AND  ASSESSMENT
	 (New York:  Academic Press Inc., 1973).

    13.  Wijngaarden, A.  van, ET AL., REVISED REPORT ON THE
	 ALGORITHMIC	LANGUAGE   ALGOL   68	(New   York:
	 Springer-Verlag, 1976).











			APPENDIX B

		    ILLEGAL LABEL NAMES



     The following words are illegal as user-supplied labels
within	GNOSIS lessons.  Those marked with a single asterisk
are reserved words in ALGOL, those with  a  double  asterisk
are  used  by  GNOSIS lessons, and the remainder are used by
ALGOL.	Of course, ANY of these words can be used for  their
INTENDED purpose within a lesson, but never as labels.


ABS		     AND*		   ANSWERCOPY**
ANSWERLENGTH**	     ANSWER**		   ANYWHERE**
ARCCOS		     ARCSIN		   ARCTAN
ARRAY*		     BACKSPACE		   BACK**
BEGIN*		     BLANK**		   BOOLEAN*
BREAKOUTPUT	     CARRIAGERETURN**	   CHAR**
CHECKOFF*	     CHECKON*		   CLOSEFILE
COMMENT*	     CONCAT		   CONTROLG**
CONTROLSTART**	     COS		   COSH
DCALL		     DELETE		   DIV*
DO*		     ELSE*		   ENDFILE
ENDOFLESSON**	     ENDOFLINE**	   END*
ENTIER		     EQV*		   EXTERNAL*
EXTRATEST**	     FALSE*		   FIRSTNAME**
FIRSTTRY**	     FORWARD*		   FOR*
GETLINE**	     GFIELD		   GIVEANSWER**
GLOBAL		     GOTO*		   GO*
HERE**		     ICALL		   IF*
IHAVEBLANKED**	     IMAX		   IMIN
IMP*		     INPUT		   INSYMBOL
INTEGER*	     IOCHAN		   LABEL*
LARCTAN 	     LASTERRORS**	   LASTLATEPERCENT**
LASTLATESCORECOUNT** LASTLATESCOREKOUNT**  LASTLATESCORE**
LASTPERCENT**	     LASTQCOUNT**	   LASTQKOUNT**
LASTRIGHTS**	     LASTSCORECOUNT**	   LASTSCOREKOUNT**
LASTSCORE**	     LATEPERCENT**	   LATESCORE**
LCALL		     LCOS		   LESSONNAME**
LEXP		     LINEFEED** 	   LINE*
LINKR		     LISTOFF*		   LISTON*
LLN		     LMIN		   LN
LONG*		     LSIN		   LSQRT
MESSAGE**	     NEWLINE		   NEWSTRING
ILLEGAL LABEL NAMES				    Page B-2



NEXTSYMBOL	     NEXT**		   NOPAUSE**
NOT*		     OPENFILE		   OR*
OUTSYMBOL	     OWN*		   PAGE**
PAUSE** 	     PERCENT**		   PERSONALIZE**
POS**		     PRINTOCTAL 	   PROCEDURE*
PROMPT**	     PUTAWAY**		   PUTMESSAGE**
QCOUNT**	     RANDNO**		   RANDOM**
RCALL		     READOCTAL		   REAL*
REM*		     REPEAT**		   RESTORE**
REWIND		     RIGHTATLAST**	   RIGHTMESSAGE**
RIGHT** 	     RMAX		   RMIN
SCORE** 	     SELECTINPUT	   SELECTOUTPUT
SFIELD		     SIN		   SINH
SIMULATE**	     SKIPSYMBOL 	   SKIP**
SQRT		     START**		   STEP*
STOP**		     STRING*		   SWITCH*
TAB		     TANH		   TEMPFILE
THEN*		     TRACEOFF		   TRACEON
TRANSFILE	     TRUE*		   TRYAGAIN**
UNTIL*		     UPARROW**		   VALUE*
WHILE*		     WRONGMESSAGE**	   WRONG**











			APPENDIX C

		  USE OF IF-CLASS COMMANDS



C.1  EXAMPLE I

     Let us suppose that you are  bilingual  Swedish/English
and  that  you	wish  to  write ONE lesson that will work in
either	Swedish  or  English  depending  on  the  situation.
Strictly  speaking,  this is impossible, but you can achieve
almost the same effect by coding your lesson as follows:

	...
	%SWITCH english TRUE
	%IF english
	!The BOOLEAN "english" is TRUE so
	!the following English segment
	!will become part of the translated
	!lesson.
	...
	%IFNOT english
	!This Swedish segment will not
	!become part of the translated
	!lesson since "english" is TRUE
	...
	%IFEND english
	!Everything else will be part of
	!the translated lesson regardless
	!of how the %SWITCH command
	!initializes "english"
	...

Now,  just  by	changing  a  single line in the file, we can
cause a Swedish language  version  to  be  prepared  by  the
GNOSIS translator.  We simply replace "%SWITCH english TRUE"
by "%SWITCH english FALSE".  No  other	editing  has  to  be
done!  This is the value of the IF-facility.
USE OF IF-CLASS COMMANDS			    Page C-2
EXAMPLE II


C.2  EXAMPLE II

     Let us suppose that CHOOSE.SAV -- when  it  is  finally
ready  -- will be a program which reads and writes a list of
available lessons, allows a student to pick one of  them  to
be  run,  and then runs that lesson for him.  (At the end of
the  lesson,  control  would  pass  back  to  CHOOSE  via  a
%NEXTLESSON  command.) Now, despite the fact that CHOOSE.SAV
is not yet available, we can nevertheless lay the groundwork
for  it  in  the  lesson  script  by  coding  that script as
follows:

	...
	%SWITCH autotransfer FALSE
	%IF autotransfer
	%NEXTLESSON run("CHOOSE");
	%IFEND autotransfer
	...
	%IF autotransfer
	%FINISH
	%ALGOL
	Newline;
	Write("Transferring to CHOOSE program.");
	Newline;
	%IFEND autotransfer
	%END

The lesson segment above would NOT cause GNOSIS to  generate
code  to  support  the	automatic transfer of the student to
another lesson.  When CHOOSE  finally  is  ready,  the	only
change	that  would then need to be made in the lesson would
be the replacement  of	"%SWITCH  autotransfer	FALSE"	with
"%SWITCH  autotransfer	TRUE".	 GNOSIS  would then generate
code to support transfer.  No other editorial changes  would
be required.











			APPENDIX D

		    USEFUL MIC PROGRAMS



D.1  GNOSIS.MIC

     The  following  MIC[20]  program  (GNOSIS.MIC  on	 the
distribution tape) makes preparing CAI lessons about as easy
as watching a player piano play.  Once this file is in	your
account,  all  you need to do to prepare lessons is type "DO
GNOSIS <lessonname without  extension>".   The	MIC  program
assumes  the  extension  is ".GNO" and takes control at that
point, pausing only at essential decision points to  see  if
you want to continue.

     If you decide to try to  make  a  MIC  file  like	this
yourself,   then  you  must  know  TECO  rather  thoroughly,
notably:

     1.  that "3I$$" inserts  a  CTRL-C  whereas  "S<003>$$"
	 searches for one;

     2.  that "7I$$" inserts a	CTRL-G	(the  bell)  whereas
	 "S<007>$$" searches for one;

     3.  that "19I$$" inserts a  CTRL-S  whereas  "S<023>$$"
	 searches for one.

------------------------------------------------------------


![MIC] Enabling CTRL-S and CTRL-Q commands
.SET TTY PAGE
![MIC] Command Format:	"DO GNOSIS <lessonname>".  Since
![MIC] the ".GNO" extension is ASSUMED for <lessonname>.
![MIC] you should NOT supply it in the command string.
![MIC] Type a CTRL-Q to continue, CTRL-Cs to cancel^G
.^S
![MIC] Submitting 'A.GNO to the GNOSIS translator

---------------
     20.  Standard MIC documentation is  supplied  with  the
GNOSIS	distribution tape.  However, if your system supports
MIC  commands,	then  this  documentation  would  likely  be
available from your systems programmers anyway.
USEFUL MIC PROGRAMS				    Page D-2
GNOSIS.MIC


.R GNOSIS
*'A
*
![MIC] Type a CTRL-Q to continue, CTRL-Cs to cancel^G
.^S
![MIC] Submitting the translated program, 'A.ALG to the
![MIC] ALGOL compiler with NOSYMBOLS, PRODUCTION switches
.R ALGOL
*'A.REL='A.ALG/NOSYMBOLS/PRODUCTION
*^C
![MIC] Type a CTRL-Q to continue, CTRL-Cs to cancel^G
.^S
![MIC] Loading with GNOLIB.REL
.LOAD 'A.REL,SYS:GNOLIB.REL
![MIC] Type a CTRL-Q to continue, CTRL-Cs to cancel^G
.^S
![MIC] Saving lesson as 'A.SAV
.OSAVE 'A
![MIC] "RUN 'A" will now run the lesson.
![MIC] Deleting the garbage files 'A.REL, 'A.ALG
.DEL 'A.REL, 'A.ALG
![MIC] Finished...exiting to monitor
!.



D.2  SORT.MIC

     The following MIC program will use the utility  program
SORT to alphabetize the <lessonname>.SRT files.  This groups
the unexpected responses to each question together  and,  in
addition,  alphabetizes the unexpected responses within each
of those groupings.


     To start this MIC program, type "DO SORT <filename with
extension>".

------------------------------------------------------------



![MIC] Command Format:	"DO SORT <filename>".
![MIC] Note:  ".SRT" extension is NOT assumed.
!
![MIC] The DEC utility "SORT" will be run next.
![MIC] It will alphabetize the 'A file, keying
![MIC] on the first 30 characters.  Record
![MIC] length must not exceed 300 characters.
!
.R SORT
*'A='A/KEY:1:30:A/ALPHA/RECORD:300
*^Z
![MIC] The sorted file will be typed out.
USEFUL MIC PROGRAMS				    Page D-3
SORT.MIC


![MIC] Type CTRL-C when you have seen enough.
!
.TYPE 'A











			 APPENDIX E

		       MACRO ROUTINES



E.1  INTRUT INTERCEPT ROUTINE

     Immediately below is the MACRO code associated with the
external ALGOL procedure "stopkc".  It becomes a part of the
lesson when the %NOCONTROLC command is used.
------------------------------------------------------------



;AUTHOR:  JACOB PALME
;EXTERNAL PROCEDURE TO BE CALLED FROM ALGOL VER 10
;THE CALL IS STOPKC
;ACTION:  RUNS LOGOUT UPON INTERCEPTING CTRL-Cs
TITLE INTRUT INTERCEPT ROUTINE
	ENTRY	STOPKC
	LOC	134
		;.JBINT
	EXP	INTBLK
		;POINTS TO INTERRUPT BLOCK
	RELOC
		;BACK TO ORDER
INTBLK::XWD	4,INTRUT
		;GO TO INTRUT ON INTERCEPT
	XWD	0,-1
		;TAKE ALL
	0
	0
INTRUT::HRRZI	RUNBLK
		;SET UP TO RUN
		;	SETZM	INTBLK+2
	CLOSE	2,0
		;CLOSE THE LPT
	RUN
		;AND RUN LOGOUT
	HALT
RUNBLK: SIXBIT/SYS/
	SIXBIT/LOGOUT/
	0
	0
	0
MACRO ROUTINES					    Page E-2
INTRUT INTERCEPT ROUTINE


	0
	HALT
STOPKC: MOVEM	,SAV0
		;SAVE 0
	MOVEI	,INTBLK
		;GET ADR OF INTBLK
	MOVEM	,134
		;STORE IN INTERRUPT ADDRESS
	MOVE	,SAV0
		;RESTORE
---------------
	JSP	16,.%ALGDR##+1
	Z	[0]
		;????
	1,,3
	SOJE	1
	JRST	2(15)
	1,,0
SAV0:	Z
		;SAVE AREA FOR REG 0
	END



E.2  R ROUTINE

     This is the MACRO code  associated  with  the  external
ALGOL  procedure  "r".	It becomes a part of the lesson when
the %NEXTLESSON command is used.
------------------------------------------------------------



;AUTHOR: JACOB PALME
;EXTERNAL PROCEDURE TO BE CALLED FROM ALGOL VER 10
;THE CALL IS R("NAME");
;ACTION: SAME AS IF .R NAME WAS GIVEN FROM TTY
TITLE	R ROUTINE
	ENTRY	R
R:	JRST	R+4
	EXP	0
		;TRACE BLOCK
		1,,1
		;1 LETTER NAME
	SIXBIT	/R/
	JSP	16,.%ALGDR##+1
	EXP	R+1
		;ADDRESS OF TRACE BLOCK
	1,,6
	362000,,2
		;NON-TYPE EXTERNAL PROCEDURE, 1 PARAM
	70540,,3
		;STRING, FORMAL BY NAME
	JSP	16,.%ALGDR##+12
	XCT	3(15)
MACRO ROUTINES					    Page E-3
R ROUTINE


	MOVE	3,0
		;GETSTRING ADDRESS
	HRRZ	1,1
;GET LENGTH OF ARGUMENT STRING IN 1
	CAIL	1,6
		;SKIP IF LESS THAN 6
	MOVEI	1,6
		;SET LENGTH TO 6 IF GREATER
WIND:	ILDB	2,FRPOIN
		;TAKE A CHAR FROM THE STRING
		;(REG 0 IS POINTER)
	SUBI	2,40
		;CONV TO SIXBIT
	IDPB	2,TOPOIN
		;STORE IN NAME
	SOJG	1,WIND
		;LOOP MAX 6 TURNS
	HRRZI	RUNBLK
		;SET UP FOR RUN
	CLOSE	2,0
		;CLOSE THE LPT
RUNP:	RUN	0,
		;RUN THE SPECIFIED PROGRAM
	OUTSTR	[ASCIZ/?CANNOT FIND SPECIFIED PROGRAM/]
		;LOGS OUT INSTEAD
	HRRZI	RUNBLK
		;SET UP FOR RUN AGAIN
	MOVE	3,[SIXBIT/LOGOUT/]
		;BUT LOGOUT THIS TIME
	MOVEM	3,NAME
		;PUT INTO RUN BLOCK
	JRST	RUNP
		;GO LOGOUT
	HALT
RUNBLK: SIXBIT/SYS/
		;TAKE IT FROM SYS:
NAME:	Z
		;TO BE ENTERED FROM CALL ARGUMENT
	Z
		;NOT INTERESTED IN EXT
	Z
	Z
	Z
FRPOIN: POINT	7,(3)
		;TAKE FROM WHAT REG 3 POINTS TO
TOPOIN: POINT	6,NAME
		;AND PLACE IN NAME
;THE PROGRAM IS NEVER USED AGAIN-SO WE CAN DESTROY POINTERS
	END
MACRO ROUTINES					    Page E-4
RUN ROUTINE


E.3  RUN ROUTINE

     This is the MACRO code  associated  with  the  external
ALGOL procedure "run".	It also becomes a part of the lesson
when the %NEXTLESSON command is used.
------------------------------------------------------------



;AUTHOR:  JACOB PALME
;EXTERNAL PROCEDURE TO BE CALLED FROM ALGOL VER 10
;THE CALL IS RUN("NAME");
;ACTION: SAME AS IF .RUN NAME WAS GIVEN FROM TTY
TITLE	RUN ROUTINE
	ENTRY	RUN
RUN:	JRST	RUN+4
	EXP	0
		;TRACE BLOCK
		1,,3
		;3 LETTER NAME
	SIXBIT	/RUN/
---------------
	JSP	16,.%ALGDR##+1
	EXP	RUN+1
		;ADDRESS OF TRACE BLOCK
	1,,6
	362000,,2
		;NON-TYPE EXTERNAL PROCEDURE, 1 PARAM
	70540,,3
		;STRING, FORMAL BY NAME
	JSP	16,.%ALGDR##+12
	XCT	3(15)
	MOVE	3,0
		;GETSTRING ADDRESS
	HRRZ	1,1
;GET LENGTH OF ARGUMENT STRING IN 1
	CAIL	1,6
		;SKIP IF LESS THAN 6
	MOVEI	1,6
		;SET LENGTH TO 6 IF GREATER
WIND:	ILDB	2,FRPOIN
		;TAKE A CHAR FROM THE STRING
		;(REG 0 IS POINTER)
	SUBI	2,40
		;CONV TO SIXBIT
	IDPB	2,TOPOIN
		;STORE IN NAME
	SOJG	1,WIND
		;LOOP MAX 6 TURNS
	HRRZI	RUNBLK
		;SET UP FOR RUN
	CLOSE	2,0
		;CLOSE THE LPT
RUNP:	CALLI	0,35
		;RUN THE SPECIFIED PROGRAM
MACRO ROUTINES					    Page E-5
RUN ROUTINE


	OUTSTR	[ASCIZ/?CANNOT FIND SPECIFIED PROGRAM/]
		;LOGS OUT INSTEAD
	HRRZI	RUNBLK
		;SET UP FOR RUN AGAIN
	MOVE	3,[SIXBIT/LOGOUT/]
		;BUT LOGOUT THIS TIME
	MOVEM	3,NAME
		;PUT INTO RUN BLOCK
	JRST	RUNP
		;GO LOGOUT
	HALT
RUNBLK: SIXBIT/DSK/
		;TAKE IT FROM DSK:
NAME:	Z
		;TO BE ENTERED FROM CALL ARGUMENT
	Z
		;NOT INTERESTED IN EXT
	Z
	Z
	Z
FRPOIN: POINT	7,(3)
		;TAKE FROM WHAT REG 3 POINTS TO
TOPOIN: POINT	6,NAME
		;AND PLACE IN NAME
;THE PROGRAM IS NEVER USED AGAIN-SO WE CAN DESTROY POINTERS
	END











			APPENDIX F

		   SAMPLE GNOSIS PROGRAM



     Given a normal  implementation  GNOSIS,  the  following
demonstration program should be runable from your account by
typing "R  HOW<CR><LF>".   If  not,  check  with  a  systems
programmer  to discover where the program resides and how to
run it.  If this also fails, you may wish to get the HOW.SAV
file  off  the GNOSIS distribution tape so that you can both
run and study it.  In order to learn the inner	workings  of
GNOSIS,  it  really is essential to do both.  You might also
want to study the ALGOL translation of the  HOW.GNO  lesson.
It  is called HOW.ALG, of course, and it too is available on
the distribution tape.	(Of course, you  could	always	make
your own ".ALG" version by submitting HOW.GNO to GNOSIS.) Do
not forget to have the HOW.DTA and HOW.SRT  files  ready  in
your account before you run the HOW program!

     The program has been used to teach first-time  computer
users  --  mainly  students -- how to use the computer.  The
objective of the lesson was to	teach  enough  to  enable  a
student  to  run  stored  GNOSIS  programs with a minimum of
frustration.   Thus,  HOW  stresses  erasing,  the  log   in
procedure, and so on.

     The text of the program follows immediately below.   It
has been altered slightly to fit this 60 column format.

------------------------------------------------------------



%NEXTLESSON r("quolst");
!These lines, beginning with a "!" in column 1,
!will be treated as comments by the GNOSIS processor
!and ignored.  Note that "!" must not be the FIRST
!character in the lesson, since GNOSIS would then
!take "!" as a command indicator.
!
!Note that all commands in this lesson could have been
!abbreviated to three letters.
!
!If you would like to use this lesson, to teach your
SAMPLE GNOSIS PROGRAM				    Page F-2



!students about the computer, then you should go
!through the lesson with an editor and replace
!all the occurrences of "<password>" with the
!account's real password, and all the occurrences of
!"<account number>" with the actual account number.
!
%NOCONTROLC
%COPYRIGHT (c) 1978 by Walter Maner
%TEACHER Dr. Walter Maner, Philosophy Department, A&L 428
(489-6517)
%NAME
%DISK
%BELL
%JUSTIFY
%PROCEDURE PROCEDURE echoinput;
BEGIN
Write("Your last response, as received by the computer after
you pushed RETURN,[N]");
Write("was as follows:	");
Write(answercopy);
Newline
END;
%QUESTION
Is this your first time to use a computer?
%NEUTRAL yes
Well, then, congratulations for having made it this far.
I'm going to celebrate a little...
%ALGOL
BEGIN
INTEGER i;
FOR i:= 1 STEP 1 UNTIL 500 DO Outsymbol(controlg)
END;
%NEUTRAL no
Then I'll skip the gala welcome party I had planned.
%NEUTRAL
%GOTO repeat;
%QUESTION
Would you like to review the log-in procedure with me, just
to be sure
you will remember how to do it the next time you want to
log in?
%NEUTRAL yes
Alright.  We will review the essential steps.
%NEUTRAL no
Fine. I won't bother to rehearse the steps for you.
%GOTO skipreview;
%NEUTRAL
I was expecting a simple 'yes' or 'no' response from you.
%GOTO repeat;
%TEXT nopause:=true;
%QUESTION nopause:=true;
What is the very first thing you should do at the terminal?
%RIGHT Push the RETURN button
The computer will then respond with a period PROMPT '.' for
SAMPLE GNOSIS PROGRAM				    Page F-3



you on the bottom left.
By this simple token, the computer indicates to you that
the terminal IS connected
and waiting on you to type  something in.

If for some reason you do NOT get a period prompt after you
push the RETURN
button, ask anybody you see around you for advice or
assistance.

There are several reasons why you might fail to get the
prompt, none of them
your fault:  (1) the terminal could be out of
order, (2) the terminal may not be turned on, (3) the
terminal might not be
connected the computer, (4) the computer itself might not
be running, or (5)
the transmit or receive speed of the terminal might need to
be adjusted.
You don't need to remember any of this, however.

Almost ANYONE you are likely to see in a terminal room will
be more than
willing to help you
when you encounter a problem such as this (it makes them
feel important), so PLEASE DO ASK FOR HELP.
%RIGHT connect
%SAME
%RIGHT return
%SAME
%NEUTRAL turn on
Technically, you are right.
But let's assume that the terminal is switched on and
proceed from that point.
%GOTO repeat;
%WRONG log
You can't log in unless the terminal is connected to the
computer. The
best way to tell whether or not  the terminal is patched in
is to push
the RETURN key. If the terminal IS connected properly and
the computer
IS operating, the period PROMPT '.' will appear at the
bottom left.
This is  the computer's way of	saying it is ready to
receive
input from your terminal.
%WRONG
Hint:  You push a single button located on the right side
of the keyboard.
%QUESTION
What is the second thing you should do?
%RIGHT Type 'LOG'
This causes  the computer  to check and  to see whether any
SAMPLE GNOSIS PROGRAM				    Page F-4



logins are
going to be allowed at this time. There might be too many
jobs already
logged	in.  Or the system  may be temporarily restricted
for various
kinds of maintenance. But, if all goes well, the computer
will proceed to log you in.
%RIGHT Log
%SAME
%WRONG account
That will be entered later.
First, the computer has to see if there is enough room for
you on the system.
%WRONG number
%SAMEE
%WRONG ppn
%SAME
%WRONG account
%SAME
%WRONG pass
%SAME
%WRONG
%QUESTION
After accepting  the 'LOG' command,  the computer will
respond with a
'#' prompt in the lower left side of the screen.  What do
you do next?
%RIGHT Type '<account number>'
That, of course, is our 'account number,'
'project-programmer number,'
or 'ppn' (for short).
%RIGHT <account number>
%SAME
%RIGHT project programmer
Our account number is <account number>, of course.
%RIGHT number
%SAME
%RIGHT ppn
%SAME
%RIGHT account
%SAME
%WRONG pass
The password is filed UNDER our account number.  So the
computer can't
validate your password	until it  knows where to look
(i.e., the account
number).  Our account number is '<account number>.'
%WRONG <password>
%SAME
%WRONG
Hint: It is expecting you to type in two fields of digits,
separated only
by a comma.
%WRONG
SAMPLE GNOSIS PROGRAM				    Page F-5



Hint: This number has a name but, if you forgot the name,
just type in the
number itself.
%QUESTION
Alright.  Let's suppose the computer is in the process of
logging you in.  It  already knows
the account number.  What is the next thing it needs to
know?
%RIGHT password
Our password is '<password>', of course.
%RIGHT pass word
%SAME
%RIGHT <password>
This, of course, is known as our 'password.
%WRONG
Hint: This is the secret 'code' that opens your account.
%WRONG
%QUESTION
One last review question:  In which order do we do the
following things?

[T](1) Push the RETURN button

[T](2) Type in the PASSWORD

[T](3) Type 'LOG'

[T](4) Type in the ACCOUNT NUMBER

Your response should be a series of four digits.
%NOEXTRA
%ORDER
%RIGHT 1 3 4 2
%RIGHT 1 , 3 , 4 , 2
%WRONG
Number 1 is first.
%WRONG
Number 3 is second.
%WRONG
Number 4 is third.
%WRONG
Number 2 is fourth.
%WRONG
%NOORDER
%EXTRA
%TEXT skipreview:
All you do to run one of the lessons is type 'RUN ',
followed immediately by the name of the lesson
you want, and finish with a push of the RETURN button.
The computer takes over from that point, and the rest
should be self-explanatory.
%TEXT erase:
If you type like your professor does,  then you're going to
make a few
SAMPLE GNOSIS PROGRAM				    Page F-6



mistakes from time to time.  How do you correct them?

Well, you can take advantage of  the fact that	the
computer (usually,
at least)  doesn't pay attention to what you have typed
until you push
the return button.  Until you push that button, you have
the chance to
'erase' whatever it is that you have mistyped.

The simplest erasing command is the CTRL-U or '^U'.
Typing in this character causes everything you have typed
on a line to be
erased--instantly.

To type a CTRL-U, depress the 'CTRL' key and--while
continuing to hold it
down--depress the 'U' key.
Then release both keys.

Now I'll let you get some practice using the '^U' command.
%QUESTION
Following the arrow prompt, type in some garbage.
Then use the '^U' to erase it all.
Then, before you push RETURN, type in something
else--something sensible.
When you have experimented enough, type 'GO ON'.
%NEUTRAL go on
%NEUTRAL
%ALGOL echoinput;
%GOTO repeat;
%EXTRA
%TEXT
Of course, you will not want to erase the ENTIRE line just
to get rid of,
say, the last character you typed in.
So, you'll need some way to erase just one character at a
time.

To do this, you push the 'DELETE' or 'RUB OUT' key. The
first time you
push it,  the computer types a back-slash  ('\')  and  then
erases the
last character you typed.  The second time, the
next-to-the-last
character is erased,  and so on.

NOTE: Every time an erasure is made,  the computer RE-TYPES
the character it  has deleted.
It does not actually erase the character physically from
the display.

Thus you can erase your response all the way back to the
start of the line if necessary and start over.
SAMPLE GNOSIS PROGRAM				    Page F-7




If you typed  'sciences'  when you meant  to type
'science', then you
should push  the 'RUB OUT' key or the 'DELETE' key once.
The computer
will respond  by typing a '\s' to let you know it  has
deleted the 's'
(your word will then look  like this: 'sciences\s').  When
you hit the
'RETURN' the computer will react as if you had	typed in
'science' and
the 's\s' which appears at  the end of	the word 'science'
will NOT be
transmitted to the computer.

Before I ask you some questions about the use of the 'RUB
OUT' or 'DELETE'
key, I will give you an opportunity to experiment with it.
%QUESTION
Following the arrow prompt, type in some garbage.
Then, before you push RETURN, use the 'RUB OUT' or 'DELETE'
key to erase one
or more of the characters you typed.
Then--still before you push RETURN--type in a couple of
additional characters.
THEN (finally) push the RETURN.
You'll notice the computer is TOTALLY IGNORANT of whatever
you erased (i.e., the
characters BETWEEN the two back-slash marks).

Type 'GO ON' when you are ready to proceed with the lesson.
%NEUTRAL go on
%NEUTRAL
%ALGOL echoinput;
%GOTO repeat;
%QUESTION
What will your response look  like after you have typed
'politicall' for
'political' and used  the 'RUB OUT' key to delete the 'l'?

(Note:	When you answer this question, DO  NOT	actually
depress the
'RUB OUT' or 'DELETE' key.  Rather, IMITATE what the
computer would do
and what the answer would look like IF you had used that
key.

CHECK THE KEYBOARD for the BACK-slash '\'.
With that key--NOT the OTHER slash '/'--you can imitate
what the computer does.
%NOEXTRA
%ORDER
%RIGHT politicall\l
%LACK \
SAMPLE GNOSIS PROGRAM				    Page F-8



The computer types a back-slash automatically before it
types whatever
letter you are deleting.  Perhaps you typed  the wrong kind
 of slash.
The back-slash runs from northwest to southeast, so to
speak.	Or
perhaps you actually USED  the 'RUB OUT' or 'DELETE' key.
(Of course, if
you were  REALLY  erasing a character instead of merely
faking how it
would look when you did so, then you WOULD use that key.)

%ALGOL echoinput;
%EXTRA
%WRONG \ \
The computer will type only ONE back-slash at this point.
It will not type the SECOND back-slash until both these
conditions
hold:

[T](1) you have finished using the RUB OUT key;; and

[T](2) you have begun to type the rest of the word or line.
%WRONG /
That's not the kind of slash you should be using if you
intend to imitate
EXACTLY what the computer does.
%WRONG
Remember: It will re-type the character it is deleting. It
doesn't REALLY
erase it.

%ALGOL echoinput;
%WRONG
Hint: It's going to look like the last character is
doubled. And don't
forget to put the back-slash ('\') in your answer.

%ALGOL echoinput;
%WRONG

%ALGOL echoinput;
%QUESTION
Suppose you had typed 'logzical.' How many times would you
depress the
'RUB OUT' key?
%RIGHT 5
%RIGHT five
%WRONG 4
That deletes the 'l', 'a', 'c', and 'i' but it leaves the
'z'.
%WRONG four
Hint: You'll need to delete some of the good characters to
get back to
SAMPLE GNOSIS PROGRAM				    Page F-9



the one which is wrong.
%WRONG
%QUESTION
What does your answer look like after you have deleted
'logzical' back
to the 'z'?  (Note: DO NOT actually use the 'RUB OUT' or
'DELETE' key.
Just type a series of  characters which imitates  how the
answer would
look if you HAD USED IT.)
%NOEXTRA
%ORDER
%RIGHT logzical\laciz
%LACK \
The computer types a back-slash before it types the first
character it
is deleting. Perhaps you typed the wrong kind of slash. The
back-slash
runs from northwest to southeast, so to speak. Or perhaps
you actually
used the 'RUB OUT' or 'DELETE' KEY,  thus causing the
computer to type
the slash.  THIS WILL NOT work!!!!!  Type the back-slash
yourself, and
DO NOT use  the 'RUB OUT' or 'DELETE' key!!!!  (Of course,
if you were
REALLY erasing a character instead of merely faking how it
would  look
when you did so, then you WOULD use that key.)

%ALGOL echoinput;
%NEUTRAL logzical\laciz\ical
That's exactly how it would look after you had both erased
the incorrect
characters and typed in the correct ones.
But I wanted to know how it would look after you erased but
BEFORE
you started typing in the correct characters.
%ALGOL echoinput;
%GOTO repeat;
%EXTRA
%WRONG \ \
It only types ONE  back-slash  as long as you are deleting
characters.
It's true, of course, that it types a SECOND  back-slash
when you push
some other key besides the 'RUB OUT' or 'DELETE' key.
%WRONG
Hint:  It will appear that each character is  'added'  to
the original
word as they are deleted.

%ALGOL echoinput;
%WRONG
SAMPLE GNOSIS PROGRAM				   Page F-10



Hint:  If the word was	'universixty'  then, after using
the 'RUB OUT'
key three times, the answer would appear to be
'universixty\ytx'.

%ALGOL echoinput;
%WRONG
To see how your answer should look,  type the word
'logzical' and then
push  the 'RUB OUT' or 'DELETE' key five times just as you
were doing earlier
when you were experimenting with the key.
REMEMBER HOW IT LOOKS
AT THIS POINT because that is exactly how you will  have to
type it in.
Then erase the whole line with a '^U', and re-type the line
just as it looked
before you erased it.
This should be a piece of cake since the erased line is
still visible to
you--but not to the computer.
%ALGOL echoinput;
%WRONG

%ALGOL echoinput;
%WRONG

%ALGOL echoinput;
%TEXT
Well, you are finished with the hardest section of this
lesson.
Congratulations!

Before we leave erasing entirely, however, I want to teach
you about one
other useful command, the '^R' or CTRL-R.
Suppose you want to know how your answer is going to look
to the computer
before you actually push the RETURN key.
(You might want to know, for example, that you actually
SUCCEEDED in correcting
a misspelled word.)
The CTRL-R gives you this computer's eye view.
Try it out now and see.

The procedure is the same as before:  Hold the CTRL key
down while you push the
'R' key.  Then release both.
%EXTRA
%QUESTION nopause:= TRUE;
Following the arrow prompt, deliberately misspell a word.
Then, using 'RUB OUT' or 'DELETE', correct it.
Next, type a CTRL-R to be sure you succeeded.
Finally, push RETURN to get the computer to tell you how it
SAMPLE GNOSIS PROGRAM				   Page F-11



'sees' your answer.

When you are ready to move on, type 'GO ON'.
%NEUTRAL go on
%NEUTRAL
%ALGOL echoinput;
%GOTO repeat;
%TEXT
When you want  to leave the computer for a while, you
cannot just walk
away or unplug it. Since the computer can't see you, it
thinks you are
still there.......

Therefore, it will wait patiently (forever) for you to give
it some more input.
Since others are waiting to use the machine, this kind of
loyalty
is not a virtue.

To prevent this, when you leave the terminal,  you M-U-S-T
have the computer perform a 'LOGOUT'
for you. The correct way to do this is to type 'K/F'.

ALTHOUGH WE CAN PRACTICE THIS OPERATION DURING THE LESSON,
IN REALITY YOU WILL NOT
REALLY BE LOGGING OFF UNTIL LATER.

Here is why.
Before we can ACTUALLY log off,  we need to have our old
friend from the
first part of the lesson--the period prompt--in the lower
left corner
of the screen.
%TEXT
The 'K/F' command is the one required to log you off.

Here is the procedure to follow:

1.  Wait until you see a period prompt at the bottom left.

2.  When you do (assuming you want to log out), type 'K/F'.

3.  Stand by until the computer actually logs you off the
system.
This may take a while during peak loads but, eventually,
the computer
will inform you that it has logged you off and, just for
the record,
will throw in a bunch of statistics.

4.  If, after a reasonable wait, the computer has not
logged you off,
ask someone around you for help or advice.
SAMPLE GNOSIS PROGRAM				   Page F-12



%NOEXTRA
%QUESTION
What do you type to log off, saving all the lessons?
%RIGHT K/F
In just a moment  (upon completion of this lesson) you will
get to log
off of your terminal.

Never leave the terminal--not even momentarily--without
logging off.
Even if the computer has 'CRASHED' (i.e., stopped
running),  at least TRY to log off.  It may not react in
the normal  fashion to
your log off attempt. However, when it comes 'UP' again,
it will log
you off if it hasn't forgotten all about you in the
meantime.

Here is one final reminder.
A  'K/F'  will not  log you off while the lesson program is
still in progress.
First, the
the lesson will have to finish running all the way to the
end.
When it has ended,  the computer will
type 'Leaving the lesson <lessonname>' followed (after a
pause) by the words
'End of execution' and -- finally -- will give you a period
prompt.
After THIS prompt you will be able to log off -- but not
before!
%RIGHT KJOB/F
%SAME
%RIGHT K
%SAME
%EXTRA
%NEUTRAL kiss
We call it 'kissing off,' but what do we actually TYPE when
it is time to
'kiss off'?
%GOTO repeat;
%LACK /
You forgot the slash character. It looks like this: '/'.
Do not type the BACK-slash by mistake. It looks like this:
'\'.
%WRONG
Hint: The command is an abbreviation for Kill (my job) Fast.
%WRONG
%WRONG
%END
/*











			APPENDIX G

	    FORMATTING THE <LESSONNAME>.ALG FILE



     Sophisticated GNOSIS programmers  may  find  that	they
need  to  study  the  <lessonname>.ALG file GNOSIS writes in
order to track down bugs.  This file will be much easier  to
read  if  it  is  first  run through the formatting program,
ALGED.	ALGED was written in SIMULA,  originally  to  format
SIMULA	files,	but  has been modified by the author for use
with ALGOL files.  Nevertheless, ALGED	still  requires  the
SIMULA run-time environment and, in any case, cannot be used
at non-SIMULA installations without violation of  copyright.
Consequently, ALGED may not be available on your system.  If
it is, however, the command  "R  ALGED"  runs  the  program,
producing   a	beautifully   formatted  output  file.	 The
GNOSIS.ALG file was prepared by ALGED.

     ALGED.SIM, ALGED.SAV and ALGED.HLP are  furnished	with
the  GNOSIS  distribution  tape.   The	help  file for ALGED
follows.

------------------------------------------------------------

			[ALGED.HLP]



		      ALGED Version 1
	  An ALGOL Editor and Indentation Program
		  Date:  27 February 1976
	 Original Author:  Mats Ohlin, FOA 1, Fack,
		 S-104 50 STOCKHOLM, SWEDEN

	     Modified for ALGOL:  4 April 1978
		    by Dr. Walter Maner
		  Department of Philosophy
		  Old Dominion University
		     Norfolk, VA  23508
FORMATTING THE <LESSONNAME>.ALG FILE		    Page G-2



     The ALGED program formats ALGOL source  program  files.
If  program  defaults  are  accepted,  ALGED will indent the
program to bring out its structure, nesting pairs of  BEGINs
and  ENDs,  and will upcase ALGOL reserved words, upcase the
first character of ALGOL standard identifiers,	and  lowcase
user identifiers.  Line numbers will be removed!

     Lines which become too  long  at  indentation  will  be
split	at   an  appropriate  position	(e.g.,	at  a  blank
character).   A  warning  message   is	 issued   when	 the
text-splitting	algorithm must divide a line in an arbitrary
fashion.  The algorithm is, for example, reluctant to insert
a  <CR><LF>  in  the middle of a long text constant.  By the
same token, if it detects a <CR><LF> inside a text  constant
(i.e.,	before	the  constant  was  closed  off  by  a	free
doublequote), then ALGED  aborts  rather  than	risk  making
garbage of the file it is editing.  Lines in the source file
longer than the record length specified for output will also
cause an error.

     The following information is requested from the user:

     1.  the name of the file to be formatted.

     2.  the name of the output file (ALGED defaults to same
	 file as the one specified for input).

     3.  the maximum record (line)  length  for  the  output
	 file (ALGED defaults to 132).

     4.  the indentation value (ALGED defaults to 3 spaces).

     5.  the  value  of  the  column  beyond  which  further
	 indentation  nesting  must cease (ALGED defaults to
	 60).

     6.  whether TABS can be used  to  indent,	thus  saving
	 some  character  storage  space  (ALGED defaults to
	 "NO"  since  the  presence  of   TABS	 can   cause
	 formatting   difficulties   if  the  file  is	ever
	 resubmitted to ALGED).

     7.  the conversion mode for ALGOL reserved words (ALGED
	 defaults to ALL CAPS).

     8.  the conversion mode for ALGOL standard  identifiers
	 (ALGED   defaults   to   capitalizing	 the   first
	 character).

     9.  the conversion mode  for  user  identifiers  (ALGED
	 defaults to lower case).
FORMATTING THE <LESSONNAME>.ALG FILE		    Page G-3



    10.  the  conversion  mode	for  comments	and   option
	 statements  (ALGED  defaults  to leaving them as it
	 found them).

    11.  the  conversion  mode	for  text  constants  (ALGED
	 defaults to leaving them as it found them).


     The user will get the default values for  each  of  the
questions  2  through  11  if he responds with <CR><LF> when
asked about them.  Moreover if, at the end of the file	name
for  input  to	ALGED  the  user types <ALTMODE> or <ESCAPE>
instead of <CR><LF>, then the program will assume he  wishes
to  accept  ALL remaining default values and will go to work
immediately.  For further help, the user can type a  '?'  at
run-time.

     For the most attractive results, BEGINs and ENDs should
appear	on  lines entirely to themselves in the source file.
Aesthetic considerations would also seem to dictate that the
source file not contain more than one statement per line.

     ALGED expects to find the file  ALGED.DAT	in  SYS  and
will   complain   if  it  has  to  look  for  it  elsewhere.
(ALGED.DAT contains a  list  of  ALGOL	reserved  words  and
standard identifiers.)



	      [End of ALGED.HLP 4 April 1978]











			APPENDIX H

	    CONTENTS OF GNOSIS DISTRIBUTION TAPE



     This 1600 BPI 9-track tape is a BACKUP  2(216)-2  tape,
Format	1,  written  in  INTERCHANGE  mode.  It was prepared
under a 6.03+VM TOPS-10  Monitor  603(15717).	The  VID  is
"GNOSIS   VERSION   2".   Saves  were  made  under  the  PPN
[5642,1001].  Note that two independent GNOSIS	"save  sets"
exist  on the tape, one called "ALGOL VER 7" (which is valid
under ALGOL Version 7) and the other called "ALGOL  VER  10"
(which is valid under ALGOL Version 10).

     1.  ALGED.DAT

	      This is the required data file for ALGED.   It
	 contains  list of ALGOL reserved words and standard
	 identifiers.  ALGED expects to find  this  file  in
	 SYS.

     2.  ALGED.HLP

	      This is the system help file for ALGED.	Also
	 appears in an appendix to GNOSIS.DOC.

     3.  ALGED.SAV

	      This is the OSAVEd version of ALGED.SIM

     4.  ALGED.SIM

	      This is the text formatting program for ".ALG"
	 files.   ALGED will indent the program to bring out
	 its logical structure, nesting pairs of BEGINs  and
	 ENDs,	and will upcase ALGOL reserved words, upcase
	 the first character of ALGOL standard	identifiers,
	 and lowcase user identifiers.

     5.  GNOLIB.REL

	      This file contains  essential  GNOSIS  library
	 procedures.   It  is required for all lessons using
	 the %NEXTLESSON or %NOCONTROLC command.
CONTENTS OF GNOSIS DISTRIBUTION TAPE		    Page H-2



     6.  GNOSIS.ALG

	      This  is	the  GNOSIS  source  program.	 The
	 internal documentation is lavish.

     7.  GNOSIS.DOC

	      This is the 102-page GNOSIS manual.

     8.  GNOSIS.HLP

	      This is the system help file for GNOSIS.

     9.  GNOSIS.LST

	      This is  a  CREF	listing  of  the  GNOSIS.ALG
	 source program.

    10.  GNOSIS.MIC

	      This  is	the  MIC   program   which   greatly
	 simplifies the preparation of GNOSIS lessons.

    11.  GNOSIS.REL

	      This is relocatable code for GNOSIS.ALG.

    12.  GNOSIS.RNH

	      This is the RUNOFF source file for GNOSIS.HLP.

    13.  GNOSIS.SAV

	      This is the OSAVEd version of GNOSIS.ALG.   It
	 was compiled with /NOSYMBOLS/PRODUCTION switches in
	 effect.

    14.  GNOSIS.TWO

	      This  is	the  manual,  GNOSIS.DOC,  in	dual
	 format.   If  you  queue  ten copies of this to the
	 LPT, you will have 20 copies  of  GNOSIS.DOC.	 The
	 LPT output must be cut down the middle.

    15.  HOW.ALG

	      When HOW.GNO  was  submitted  to	GNOSIS,  the
	 translator  wrote this file.  It has been formatted
	 using the ALGED program.

    16.  HOW.GNO
CONTENTS OF GNOSIS DISTRIBUTION TAPE		    Page H-3



	      This is the script form of  the  demonstration
	 lesson "HOW".

    17.  HOW.SAV

	      This is the OSAVEd  version  of  HOW.ALG.   It
	 functions as a demonstration lesson for GNOSIS.

    18.  INTRUT.MAC

	      This  is	the  MACRO  code   associated	with
	 %NOCONTROLC command.

    19.  INTRUT.REL

	      This is  the  relocatable  code  generated  by
	 MACRO for the above file.

    20.  MIC.DOC

	      This is the standard documentation for MIC.

    21.  PUB.MAC

	      This is the MACRO  code  associated  with  the
	 %NEXTLESSON  command  for installations with a PUB:
	 area.

    22.  PUB.REL

	      This is  the  relocatable  code  generated  by
	 MACRO for the above file.

    23.  R.MAC

	      This is the MACRO  code  associated  with  the
	 %NEXTLESSON command.

    24.  R.REL

	      This is  the  relocatable  code  generated  by
	 MACRO for the above file.

    25.  READ.ME

	      GNOSIS   implementation	 instructions	 are
	 contained in this file.

    26.  RUN.MAC

	      This  is	the  MACRO  code   associated	with
	 %NEXTLESSON command.
CONTENTS OF GNOSIS DISTRIBUTION TAPE		    Page H-4



    27.  RUN.REL

	      This is  the  relocatable  code  generated  by
	 MACRO for above.

    28.  SORT.MIC

	      This is a simple MIC program which can be used
	 to sort <lessonname>.SRT files.

    29.  TAPE.DIR

	      This listing.











			APPENDIX I

		  IMPLEMENTATION CHECKLIST



     Note that two complete  and  independent  GNOSIS  "save
sets"  exist on the tape, one called "ALGOL VER 7" (which is
valid under ALGOL Version 7) and the other called "ALGOL VER
10"  (which  is  valid	under ALGOL Version 10).  Be sure to
RESTORE files from the appropriate save set.



I.1  ESSENTIAL STEPS

     1.  [ ]Store  GNOSIS.SAV,	HOW.SAV  and  GNOLIB.REL  in
	 "SYS:".

     2.  [ ]Store GNOSIS.MIC in "MIC:" if  your  monitor  is
	 Version  6.03 or later;  otherwise store GNOSIS.MIC
	 in "SYS:".

     3.  [ ]Store GNOSIS.DOC<555> in "DOC:".

     4.  [ ]Store GNOSIS.HLP in "HLP:".



I.2  OTHER DESIRABLE STEPS

     1.  [ ]Store ALGED.SAV and ALGED.DAT in "SYS:".

     2.  [ ]Store ALGED.HLP in "HLP:".



I.3  TESTING

     1.  [ ]Restore HOW.GNO from the distribution tape	into
	 your account.

     2.  [ ]Execute the GNOSIS.MIC file with the command "DO
	 GNOSIS  HOW"  or  "DO SYS:GNOSIS HOW", whichever is
	 appropriate.  Note that it is normal for GNOSIS  to
	 issue a few WARNING messages but abnormal for it to
IMPLEMENTATION CHECKLIST			    Page I-2



	 issue ERROR messages.

     3.  [ ]Create files in  your  account  with  the  names
	 HOW.SRT  and HOW.DTA.	(HOW will dump data in these
	 at program exit.)

     4.  [ ]Type  "RUN	HOW"  and  verify  that  the  lesson
	 executes.

     5.  [ ]Type "R HOW" to verify that the system  copy  of
	 "HOW" will execute.

     6.  [ ]Delete "HOW.*" from your account.
'