Can't find referenced objects

Probably a newb problem, but I made this simple lambda calculus project (available at https://github.com/jankroken/LambdaCalculus), but

in the Reference concept, I refer Definition, and when I insert the Reference in a program, I'm unable to actually link in any of the Definition instances.

Any tips?

0
1 comment
Official comment

However unlikely it may sound, if you remove the alias "r" from Reference, things will start working. Apparently an alias value, if exists, takes precedence over the "smart reference" behavior. Other than that, your declaration as well as the reference are well defined. You will also need to define scope for Reference at some point in order to have them point to Definitions within the same root "Program". I've used the following definition, maybe it will work for you as well:

concepts constraints Reference { 
can be child <none>

can be parent <none>

can be ancestor <none>

<<property constraints>>

link {combinator}
referent set handler:<none>
scope:
(exists, referenceNode, contextNode, containingLink, linkTarget, operationContext, enclosingNode, model, position, contextRole)->Scope {
new ListScope(contextNode.containing root.descendants<concept = Definition>) {
public string getName(node<> child) {
child : INamedConcept.name;
}
};
}
presentation :
<no presentation>
;

default scope
<no default scope>
}

 

Please sign in to leave a comment.