Hi all, I have a big probleme with agent library. I tried to transform it more generic, using genericity.<br><br>So, I defined a prototype PENCIL which inherit from AGENT(PENCIL).<br><br>(All the code is in the git repo application, branch master, in directory application/examples/standard/agent)<br>

<br>I have a Section Header<br><br>  + name      := PENCIL;<br><br>  - copyright := &quot;2003-2010 Sonntag Benoit; P-A&quot;;<br><br>  - author    := &quot;Pierre-Alexandre Voye&quot;;<br>  - comment   := &quot;Pencil agent&quot;;<br>

<br>Section Inherit<br><br>  + parent_agent:Expanded AGENT(PENCIL);<br><br>Section Public<br>    <br>  + step:INTEGER;<br>  <br>  + x:INTEGER;<br>  <br>  + y:INTEGER;<br><br>  + dx:INTEGER;<br>  + dy:INTEGER;<br><br clear="all">

...<br><br><br>Agent is defined like this :<br><br>Section Header<br>  <br>  + name      := AGENT(V);<br><br><br>Maybe because PENCIL inherit from AGENT(PENCIL), I have an error from the compiler :<br><br>$ lisaac  <a href="http://example.li">example.li</a><br>

Load lip file: ./../make.lip<br>Warning: Slot `output_extension&#39; not found.<br>Warning: Slot `is_library&#39; not found.<br>Warning: Slot `output_extension&#39; not found.<br>Depending pass: ....--SEMANTIC---------<br>

Invariance type argument invalid.<br>Line 62 column 10 in PENCIL(.../application/examples/standard/agent/<a href="http://pencil.li">pencil.li</a>):<br>  - make s:STATE(PENCIL) &lt;-<br>          ^<br><br>Line 44 column 10 in AGENT(.../application/examples/standard/agent/<a href="http://agent.li">agent.li</a>):<br>

  - make s:STATE(V) &lt;-<br>          ^<br><br><br>I&#39;m unable to understand what&#39;s the problem...<br><br>Surprasingly when I change<br><br> + parent_agent:Expanded AGENT(PENCIL)<br><br>to<br><br>  + parent_agent:Expanded AGENT(SELF);<br>

<br>I have :<br><br>$ lisaac  <a href="http://example.li">example.li</a><br>Load lip file: ./../make.lip<br>Warning: Slot `output_extension&#39; not found.<br>Warning: Slot `is_library&#39; not found.<br>Warning: Slot `output_extension&#39; not found.<br>

Depending pass: ..--SEMANTIC---------<br>Cannot resolve type for type parameter SELF<br>Line 23 column 8 in PENCIL(.../application/examples/standard/agent/<a href="http://pencil.li">pencil.li</a>):<br>  + name      := PENCIL;<br>

        ^<br><br><br>Thanks for your help,<br><br>regards, <br>P-A<br><br>-- <br>---------------------<br>Isaac Project - <a href="http://www.lisaac.org/">http://www.lisaac.org/</a><br>