Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [imp-dev] Connecting PDB to IMP discussion

Hi,

On Tue, Nov 24, 2009 at 3:08 PM, Robert M. Fuhrer
<rfuhrer@xxxxxxxxxxxxxx> wrote:
> Ok, for reference resolution, silly me, of course you're right - and the
> schema "map[loc, loc]" could be considered a composition of the
> IReferenceResolver API with the ISourcePositionLocator API.

yup.

> That said, the schema "map[loc, loc]" is still so generic that it could mean
> many things, so if the hyperlink controller simply looked for a fact of the
> schema "map[loc, loc]" for the given language, it could pick up relations
> that aren't really ref => def. Another example is "rel[loc, loc]", which is
> basically the signature of "mark occurrences", which by design permits
> multiple interpretations.

It's a matter of adding more naming. Either we add a 'String
getName()' method  to IFactGenerator, such
that we can lookup by name, or we use a type alias to document which
interpretation
for map[loc,loc] we intended. E.g.

type SourceReferenceMap = map[loc, loc];  (In Java:
typeFactory.aliasType("SourceReferenceMap",
typeFactory.mapType(typeFactory.locationType(),
typeFactory.locationType()))

Now we can look up the corrrect IFactGenerator by searching for
SourceReferenceMap, which is just a map[loc,loc].

Of course, I'd also like to have a SourceReferenceRelation as soon as
the IMP reference resolving feature can deal with multiple targets.

> But perhaps we could define an extension point in pdb2imp that identifies
> the specific fact ID to use for, e.g., hyperlinking (or perhaps reference
> resolution?), for a given language. Then the developer only writes a tiny
> bit of XML to hook things up.

Lovely!

Cheers,

Jurgen

-- 
Jurgen Vinju
- Centrum Wiskunde & Informatica - SEN1
- Universiteit van Amsterdam

  www: http://www.cwi.nl, http://www.meta-environment.nl,
http://homepages.cwi.nl/~jurgenv, http://twitter.com/jurgenvinju
skype: jurgen.vinju


Back to the top