Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes and improvements to SHRDLU #2327

Merged
merged 4 commits into from
Aug 23, 2024
Merged

Conversation

eswenson1
Copy link
Member

@eswenson1 eswenson1 commented Aug 23, 2024

Fixed issue with incorrect indefinite name when no antecedent is found.

Fixed issue with the word ISN'T being output incorrectly in a message.

Updated shrdlu build script to pass the file to compile in JCL and to use new load functions.

Made it so that either DEBUGMODE or USERMODE could be used, and so that both modes would not display annoying timer messages.

Got rid of hack of setting CAR and CDR values to T.

The old Maclisp used when SHRDLU was created allowed one to take the CAR
and CDR of atoms. The former returned internal bits associated with the
symbol, and the latter returned the property list of the symbol.

This was disabled in later verisons of MacLISP, but allowed to be enabled
by setting the value of CAR to T (and the value of CDR to T).

However, doing this masked coding errors that resulted from unintentionally
taking the CAR or CDR of a symbol, when a list or NUL was actually expected.

This commit removes the hack of setting CAR and CDR to T, and adds macros
to replace the use of CAR and CDR in this cases in PLNR and associated PLNR
logic. These macros are found in the MACROS module. Making this change,
and removing the duplicated $ reader macro from PLNR (it is already in
MACROS for the benefit of other files), required making changes to the
loader of SHRDLU and PLNR. I removed the obsolete use of UREAD to load
interpreted files, and replaced with a new NEW-LOAD function. UREAD was
unable to handle the (status macro $ 'thread) code that needed to be included.

Fixed issue with the word ISN'T being output incorrectly in a message.
The old Maclisp used when SHRDLU was created allowed one to take the CAR
and CDR of atoms.  The former returned internal bits associated wih the
symbol, and the latter returned the property list of the symbol.

This was disabled in later verisons of MacLISP, but allowed to be enabled
by setting the value of CAR to T (and the value of CDR to T).

However, doing this masked coding errors that resulted from unintentionally
taking the CAR or CDR of a symbol, when a list or NUL was actually expected.

This commit removes the hack of setting CAR and CDR to T, and adds macros
to replace the use of CAR and CDR in this cases in PLNR and associated PLNR
logic.  These macros are found in the MACROS module.  Making this change,
and removing the duplicated $ reader macro from PLNR (it is already in
MACROS for the benefit of other files), required making changes to the
loader of SHRDLU and PLNR.  I removed the obsolete use of UREAD to load
interpreted files, and replaced with a new NEW-LOAD function.  UREAD was
unable to handle the (status macro $ 'thread) code that needed to be included.
that both modes would not display annoying timer messages.
Copy link
Member

@larsbrinkhoff larsbrinkhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice; approved!

@eswenson1 eswenson1 merged commit bafb0c1 into master Aug 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants