1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Issues/iss333_w.htm
2024-04-01 10:24:07 +02:00

165 lines
10 KiB
HTML

<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
<HTML>
<HEAD>
<TITLE>CLHS: Issue SUBSETTING-POSITION Writeup</TITLE>
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
<LINK REL=TOP HREF="../Front/index.htm">
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
<LINK REL=PREV HREF="../Issues/iss332_w.htm">
<LINK REL=UP HREF="../Issues/iss333.htm">
<LINK REL=NEXT HREF="../Issues/iss334_w.htm">
</HEAD>
<BODY>
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="../Issues/iss332_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss333.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss334_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue SUBSETTING-POSITION Writeup</H2>
<PRE><B>Issue:</B> <A HREF="iss333.htm">SUBSETTING-POSITION</A><P>
<B>References:</B> X3J13 committee and sub-committee meetings<P>
<B>Category:</B> Policy<P>
<B>Edit history:</B> 12-DEC-88, Version 1 by Chapman<P>
9-JAN-89, Version 2 by Chapman <P>
10-JAN-89, Version 3 by Chapman <P>
20-FEB-89, Version 4 by Chapman <P>
<P>
<P>
<B>Problem Description:<P>
</B> <P>
Should the CL <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> be partitioned such that an implementation<P>
could chose a subset of all the CL facilities to implement and <P>
still be a conforming implementation?<P>
What subsets should be specified in the draft <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> we submit to<P>
ANSI?<P>
What position should we take if someone should propose a subset?<P>
<P>
Subsets might omit syntax, functions, admissable values or arguments<P>
to functions, or data types. For example, a subset might disallow <A REL=DEFINITION HREF="../Body/d_specia.htm#special"><B>SPECIAL</B></A><P>
declarations (a syntactic subset), might omit the <A REL=DEFINITION HREF="../Body/f_sin_c.htm#cos"><B>COS</B></A>, <A REL=DEFINITION HREF="../Body/f_sin_c.htm#sin"><B>SIN</B></A>, <A REL=DEFINITION HREF="../Body/f_asin_.htm#atan"><B>ATAN</B></A> functions,<P>
might disallow the :TEST keyword to <A REL=DEFINITION HREF="../Body/f_mk_has.htm#make-hash-table"><B>MAKE-HASH-TABLE</B></A>, might restrict <A REL=DEFINITION HREF="../Body/f_ldiffc.htm#tailp"><B>TAILP</B></A><P>
to work on proper lists, or might omit complex numbers. Each of these is a<P>
&quot;subset&quot; in the sense that a subset of correct programs for the &quot;full&quot;<P>
language would be correct for the &quot;subset&quot; language.<P>
<P>
Subsets can have various levels of &quot;determinability&quot; for programs. The<P>
issue is: how easy is it to tell whether a program written in the &quot;full&quot;<P>
language would run in a &quot;subset&quot; implementation? Except for the<P>
(non-trivial) issue of macro expansions, some subsets are &quot;lexically&quot;<P>
determinable, e.g., if a function is omitted, you can tell if the program<P>
uses it by scanning the program. Some subsets are &quot;dynamically&quot;<P>
determinable, e.g, a subset might signal an error if the :TEST argument to<P>
<A REL=DEFINITION HREF="../Body/f_mk_has.htm#make-hash-table"><B>MAKE-HASH-TABLE</B></A> is <A REL=DEFINITION HREF="../Body/f_equalp.htm#equalp"><B>EQUALP</B></A>. Some subsets are neither lexically nor<P>
dynamically determinable, e.g., if the subset implements dynamic extent for<P>
rest lists, it may be impossible to tell even with run-type checks whether<P>
the a program written in the &quot;full&quot; language would conform.<P>
<P>
Some &quot;subsets&quot; might be merely restrictive interpretations, e.g., a<P>
&quot;run-time&quot; implementation that made <A REL=DEFINITION HREF="../Body/f_ed.htm#ed"><B>ED</B></A>, <A REL=DEFINITION HREF="../Body/m_tracec.htm#trace"><B>TRACE</B></A>, <A REL=DEFINITION HREF="../Body/m_tracec.htm#untrace"><B>UNTRACE</B></A> into no-ops and made<P>
<A REL=DEFINITION HREF="../Body/f_break.htm#break"><B>BREAK</B></A> halt the program execution rather than &quot;enter the debugger&quot;; since we<P>
cannot define what &quot;enter the debugger&quot; means, we might want to define<P>
explicitly this subset as a reasonable one for embedded systems.<P>
<P>
Proposal (<A HREF="iss333.htm">SUBSETTING-POSITION:NONE</A>)<P>
<P>
The draft <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> we submit to ANSI contains *no* subsets. <P>
In the section on &quot;subsetting&quot; it should be mentioned<P>
that Lisp is a &quot;small&quot; language with a &quot;big&quot; library.<P>
<P>
We are not opposed in principle to one or more subset definitions.<P>
<P>
<P>
<B>Rationale:<P>
</B><P>
We have no well-defined proposals for subset definitions, and didn't have<P>
the time or energy to pursue their definition, or confidence that we could<P>
reach convergence on a reasonable definition.<P>
<P>
There are several properties that a subset definition must have to be<P>
considered: it must be well defined in terms of conformance of code, programs, <P>
and implementations; all valid programs in the subset must be valid programs in<P>
the full language; the subset definition should address how it can be<P>
determined if a program in the full language is valid in the subset. <P>
<P>
<P>
<P>
<B>Current Practice:<P>
</B> <P>
Pascal has two levels of conforming implementations -- level 1 contains<P>
level 0 and conformant arrays. This was a compromise necessary to achieve<P>
international agreement. The 1981 PL/I was subsetted and the <P>
results were a range of implementations between the<P>
subset and the full language; nobody wanted to use the subset so vendors<P>
were forced to implement the full language eventually anyway.<P>
Cobol had multiple levels of subsets. However, <P>
the only two levels that were important were the minimum <P>
subset and the full language. The middle levels were<P>
seldom used other than transient points to the full language.<P>
Fortran was subsetted. It was felt that subsetting encouraged<P>
vendors to implement Fortran and therefore proliferate its usage,<P>
but users were quite annoyed that one Fortran was considerably<P>
different from another. <P>
The new Fortran language standards committee is<P>
banning subsetting.<P>
At one point, there was an ANSI <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> for &quot;Minimal Basic&quot;. It was <P>
too minimal. Later work on ANSI Basic involved a rather different-looking <P>
language and a number of optional extensions for such things as real-time process control. <P>
SPARC feels that subsets aren't good for facilitating interchange, but serve the<P>
purpose of allowing timely implementation of the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A>.<P>
<P>
<P>
<B>Adoption Cost:<P>
</B> <P>
None.<P>
<P>
<B>Benefits:<P>
</B> <P>
This policy will <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>provide</B></A> a basis for making decisions in X3J13.<P>
<P>
<B>Conversion Cost:<P>
</B> <P>
None.<P>
<P>
<B>Aesthetics:<P>
</B> <P>
None.<P>
<P>
<B>Discussion:<P>
</B>Jeff Dalton says: <P>
&quot;I'd be happier if it were fairly easy for someone reading the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A><P>
to determine which part was the &quot;library&quot; and which the core language.<P>
For example, where do we find <A REL=DEFINITION HREF="../Body/f_funcal.htm#funcall"><B>FUNCALL</B></A> and APPLY?<P>
The draft C <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> has an explicit division. Section 3 is<P>
&quot;Language&quot; and section 4 is &quot;Library&quot;. It may not be necessary<P>
to go that far for Common Lisp.&quot;<P>
<P>
GLS says: &quot;I am in agreement with <A HREF="iss333.htm">SUBSETTING-POSITION:NONE</A>.&quot;<P>
<P>
Loosemore says: &quot;... even if the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> doesn't define<P>
any subsets, that is not going to prevent subsets from happening, and<P>
perhaps the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> ought to define some terminology to describe such<P>
implementations (even if it's only to say that they can't call<P>
themselves Common Lisps at all).&quot;<P>
<P>
<P>
RPG says: &quot;One point worth making might be that a conforming program that is<P>
delivered may not also be a conforming implementation.&quot;<P>
<B>Paraphrased: <P>
</B>A conforming implementation does not have to be present in order to deliver<P>
a conforming program.<P>
One could produce a linkable version of an application that would <P>
include almost no part of the Lisp environment.<P>
Therefore, subsets are not mandated for this case. <P>
</PRE>
<HR>
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
</BODY>
</HTML>