Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: undocumented

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71005] Re: [mg70148] Re: [mg70109] undocumented
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sat, 4 Nov 2006 23:06:58 -0500 (EST)
  • References: <200610040958.FAA07148@smc.vnet.net> <200610050733.DAA06166@smc.vnet.net>

There are several contexts that aren't on $ContextPath but that are
loaded at startup. (and many more that just aren't loaded at all)

This should be some kind of benchmark. It takes three minutes on my
measly old PC.

There are some interesting commands in there. I posted one at the end.

In[1]:=
start=SessionTime[];
nameSet=Flatten[Names[#<>"*"]&/@DeleteCases[Contexts[],"Global`"]];
usageNames=
    Select[nameSet,
      ToExpression[#1,InputForm,
          Function[symb,StringQ@MessageName[Unevaluated[symb],"usage"],
            HoldFirst]]&];
opts=ToExpression[#1,InputForm,
          Function[symb,Options[Unevaluated[symb]],HoldFirst]]&/@nameSet;
defOptNames=
    Select[nameSet,
      ToExpression[#1,InputForm,
          Function[symb,!FreeQ[opts,Unevaluated[symb]],HoldFirst]]&];
descOptNames=
  Select[nameSet,
    ToExpression[#1,InputForm,
        Function[symb,
          Module[{usage=MessageName[Unevaluated[symb],"usage"]},
            StringQ@usage&&
              StringMatchQ[usage,___~~"option"~~___,IgnoreCase\[Rule]True]],
          HoldFirst]]&];refNames=
  Select[nameSet,!FreeQ[
          System`Dump`doinformation[#,System`Dump`generaterandomtag[],False,
            False,False],ButtonBox]&];
finish=SessionTime[];

In[8]:=
{IntegerPart[#],FractionalPart[#]*60}&[(finish-start)/60]

Out[8]=
{3,4.5625000}

In[9]:=
Length@Intersection[refNames,Complement[nameSet,usageNames]]

Out[9]=
0

In[10]:=
Length[partiallyDocumentedNonOptions=
    Intersection[usageNames,
      Complement[usageNames,Union[defOptNames,descOptNames,refNames]]]]

Out[10]=
136

In[11]:=
Length[unDocumentedNonOptions=
    Complement[nameSet,Union[defOptNames,descOptNames,refNames,usageNames]]]

Out[11]=
2667

In[12]:=
Pick[partiallyDocumentedNonOptions,Context/@partiallyDocumentedNonOptions,
  Except[Alternatives@@$ContextPath,_String]]

Out[12]=
{Algebra`PolynomialPowerMod,BoxForm`AddCommas,Developer`PartitionMap,\
Developer`$MaxMachineInteger,Experimental`RegisterConverter,Experimental`$\
BinaryExportFormats,Experimental`$BinaryImportFormats,Internal`BlockFlatten,\
XML`FromSymbolicXML,XML`MathML`BoxesToMathML,XML`MathML`BoxesToSymbolicMathML,\
XML`MathML`ExpressionToMathML,XML`MathML`ExpressionToSymbolicMathML,XML`\
MathML`MathMLToBoxes,XML`MathML`MathMLToExpression,XML`MathML`\
SymbolicMathMLToBoxes,XML`MathML`SymbolicMathMLToExpression,XML`NotebookML`\
ExpressionToSymbolicExpressionML,XML`NotebookML`NotebookToSymbolicNotebookML,\
XML`NotebookML`SymbolicExpressionMLToExpression,XML`NotebookML`\
SymbolicNotebookMLToNotebook,XML`Parser`InitializeXMLParser,XML`Parser`\
ReleaseXMLParser,XML`Parser`XMLGet,XML`Parser`XMLGetString,XML`Parser`\
XMLParser,XML`RawXML,XML`SVG`SVGToGraphics,XML`SVG`SymbolicSVGToGraphics,XML`\
SymbolicXMLErrors,XML`SymbolicXMLQ,XML`ToCompactXML,XML`ToSymbolicXML,XML`\
ToVerboseXML}

In[13]:=
?Internal`BlockFlatten
BlockFlatten[tensor, {{p11, p12, ...}, {p21, p22, ...}, {pk1, pk2, ...}}] is \
a generalization of Flatten which collapses each of several sets of levels to \
a single level, without loss of elements.  The levels {p11, p12, ...} are \
collapsed to a single level, the levels {p21, p22, ...} are collapsed to \
another single level, and so on. All the pij must be distinct nonzero \
integers representing levels from 1 to TensorRank[tensor].  A negative pij \
simply specifies a level counting from the bottom level of the tensor, i.e. R \
= TensorRank[tensor].  Thus, -1 is equivalent to R, -2 is equivalent to (R - \
1), and -k is equivalent to (R + 1 + k).  The pij need not span all levels of \
the tensor; levels not listed will not be merged with other levels, so will \
emerge unscathed.


On 10/5/06, Chris Chiasson <chris at chiasson.name> wrote:
> A little more characterization can be added. It is possible to detect
> symbols that have a hyperlink to the help browser and those that do
> not. It is also possible to detect symbols which are part of the set
> of default options (of other symbols) as well as symbols which have
> the word "option" in their description. These could be loosely
> considered option symbols.
>
> It turns out that all messages which have a help browser hyperlink
> also have a usage message (AFAIK).
>
> There are 102 symbols with usage messages that are not option symbols
> and that do not have reference hyperlinks.
>
> There are 336 symbols without usage messages that are not option symbols.
>
> In[1]:=
> SessionTime[]
> nameSet=Names["System`*"];
> usageNames=
>     Select[nameSet,
>       ToExpression[#1,InputForm,
>           Function[symb,StringQ@MessageName[Unevaluated[symb],"usage"],
>             HoldFirst]]&];
> opts=ToExpression[#1,InputForm,
>           Function[symb,Options[Unevaluated[symb]],HoldFirst]]&/@nameSet;
> defOptNames=
>     Select[nameSet,
>       ToExpression[#1,InputForm,
>           Function[symb,!FreeQ[opts,Unevaluated[symb]],HoldFirst]]&];
> descOptNames=
>   Select[nameSet,
>     ToExpression[#1,InputForm,
>         Function[symb,
>           Module[{usage=MessageName[Unevaluated[symb],"usage"]},
>             StringQ@usage&&
>               StringMatchQ[usage,___~~"option"~~___,IgnoreCase\[Rule]True]],
>           HoldFirst]]&];refNames=
>   Select[nameSet,!FreeQ[
>           System`Dump`doinformation[#,System`Dump`generaterandomtag[],False,
>             False,False],ButtonBox]&];
> SessionTime[]
>
> Out[1]=
> 0.4531250
>
> Out[7]=
> 55.3281250
>
> In[8]:=
> Length@Intersection[refNames,Complement[nameSet,usageNames]]
>
> Out[8]=
> 0
>
> In[9]:=
> Length@Intersection[usageNames,
>     Complement[nameSet,Union[defOptNames,descOptNames,refNames]]]
>
> Out[9]=
> 102
>
> In[10]:=
> Length@Complement[nameSet,Union[defOptNames,descOptNames,refNames,usageNames]]
>
> Out[10]=
> 336
>
> On 10/4/06, dimmechan at yahoo.com <dimmechan at yahoo.com> wrote:
> > Hello.
> > The following questions are not for a particular reasons.
> > My queries just appeared after some recent posts of mine.
> >
> > $Version
> > "5.2 for Microsoft Windows (June 20, 2005)"
> >
> > Consider the Built-in function ArgumentCountQ.
> > This function is undocumented in the Help Broser.
> >
> > However,
> >
> > Information[ArgumentCountQ]
> > "ArgumentCountQ[head, len, min, max] tests whether the number len of
> > arguments of a function head is between min and max."
> > Attributes[ArgumentCountQ] = {Protected, ReadProtected}
> >
> > My first question is where this definition of this Built -in function
> > is stored and why it cannot be appeared in the Help Browser?
> >
> > Of course I have encountered and other functions exhibit this behavior
> > likeTraceInternal
> >
> > Information["TraceInternal"]
> > "TraceInternal is an option for Trace and related functions which, if
> > True or False, specifies whether to trace evaluations of \
> > expressions generated internally by Mathematica. The intermediate
> > Automatic setting traces a selected set of internal \
> > evaluations including Messages and sets or unsets of visible symbols."
> > Attributes[TraceInternal] = {Protected}
> >
> > Consider now
> >
> > Information["InexactNumberQ"]
> > System`InexactNumberQ
> > Attributes[InexactNumberQ] = {Protected}
> >
> > and
> >
> > Options[FrameBox]
> > (Information[Evaluate[#1[[1]]]] & ) /@ %;
> > {BoxFrame -> True, BoxMargins -> {{0.4000000059604645,
> > 0.4000000059604645}, {0.5, 0.5}}}
> > "System`BoxFrame"
> > Attributes[BoxFrame] = {Protected}
> > "System`BoxMargins"
> > Attributes[BoxMargins] = {Protected}
> >
> > It seems that InexactNumberQ and the options of FrameBox are
> > undocumented.
> > For the the first this is true.
> > For the latter...to my surprise not.
> >
> > Just press the cursor next to BoxFrame for example and then press F1
> > and you will see that you are gone to the desired documtation (as part
> > of the
> > FrontEnd documentation).
> >
> > How is this possible?
> >
> > Is it a way to get the "real" undocumented functions/symbols?
> >
> > I search (a little I must admit) the archives and I found the following
> > command
> >
> > Block[{$Urgent = {}}, Select[Names["System`*"], (#1;
> > !StringQ[MessageName @@ Append[ToHeldExpression[#1], "usage"]]) & ]]
> >
> > I get a list of almost 500 functions.
> > These list includes just undocumented functions?
> > If yes what is the reason of the existence of this
> > situation?
> >
> > In old post of Ted Esrek I read that one reason was
> > that some functions were not well tested but this
> > was for the 3.0 version.
> >
> > If the answer in the last question is no and the
> > returning list is a mix of undocumnated functions
> > and functions that are obsolete how I can
> > find just the undocumnated functions?
> >
> >
> > Regards
> >
> >
>
>
> --
> http://chris.chiasson.name/
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: Matrix Output
  • Next by Date: RE: Tricky visualization of maximization problem
  • Previous by thread: Re: Lists and polynomials
  • Next by thread: Insertion into sorted list