Email list hosting service & mailing list manager

(missing)
(missing)
Re: Proposal to add HTML class attributes to SRFIs to aid machine-parsing Marc Nieper-Wißkirchen (06 Mar 2019 10:12 UTC)
Re: Proposal to add HTML class attributes to SRFIs to aid machine-parsing Ciprian Dorin Craciun (11 Mar 2019 13:43 UTC)
(missing)

Re: Proposal to add HTML class attributes to SRFIs to aid machine-parsing Ciprian Dorin Craciun 11 Mar 2019 13:42 UTC

On Mon, Mar 11, 2019 at 3:36 PM Lassi Kortela <xxxxxx@lassi.io> wrote:
>
> >> 3) Search for procedures by argument name. This would not be perfect
> >
> > I think you'll be out of luck as I bet most of the times the name of
> > the parameter is more a hint to its actual type than anything else...
>
> Yes, I meant it mostly as a poor man's type signature search :) E.g.
> search for "filename" to find procedures that deal with files. Obviously
> a better type search can be done with a big manual effort. I wouldn't
> extract type names only to do this, but we'll get this search for free
> if the index has them.

Again, shameless self-promotion, but this is exactly what I managed to
do with my proposed S-expression...  :)

For example bellow you can see which R7RS pocedures accept a port that
is both for input and open:

  https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/types/input-port-open.html#type__r7rs__input-port-open__referent-definitions-input-recursive

Or for example what procedures accept a string that has the semantic of a path:

  https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/types/path-string.html#type__r7rs__path-string__referent-definitions-input

But also which other proceduces could accept a path, given that it is
also a string:

  https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/types/path-string.html#type__r7rs__path-string__referent-definitions-input-recursive

Again all this would be impossible without thorough type information...  :)

> >> That sounds quite advanced :) Is there a circular list detector?
> >
> > In general it can easily be implemented (while recursing over the
> > inputs) by using something like:
>
> I meant static detection knowing just the types and procedures. But I
> guess one could implement design-by-contract (runtime assertions) or
> just annotate types for documentation purposes even if we don't have
> static checking.

Well here is something where a `dyalizer` type of tool would help:  if
a variable is "deduced" to contain perhaps a circular list, then the
"checker" could issue a warning that such a "possible circular" list
is given to a function that is clearly marked not to accept one.

Ciprian.