Talk:Agent wrapper generation

Revision as of 13:30, 27 April 2007 by Juliant (Talk | contribs)

--Juliant 21:17, 27 April 2007 (CEST)

You can already now use the target as an open argument. If you define your agent as agent {AEROPLANE}.refuel than this agent has the target as first open argument. What you cannot do at the moment is having the target at another position than the first, so an example with agent {A_TYPE}(?2).a_feature (?1) might make more sense.

One problem you have with only caring for a part of the arguments is the conformance rules for generics which are applied to agents as well. If you define your agent as agent notify_button_press (?3) (which is my favorite syntax untill now) then what is the type of this agent? It has to be something like PROCEDURE [ANY, TUPLE [*, *, INTEGER]], but then it won't conform to the event handler you have given since the argument tuple does not have enough elements. This is a problem with the conformance of tuples which is not correctly applicable to agents.

See this paper for more information. The problem with the paper is that they don't reason about open targets which have to be handled differently than open arguments.

--Juliant 23:30, 27 April 2007 (CEST)

Also I don't see the reason why you need a special syntax to drop arguments. If you want an agent which does not get any arguments, you just provide a feature which doesn't take any. As long as you provide a feature which takes a number of arguments, all of them will be open since you cannot pass nothing in this spot. You can always close arguments if you have a reasonable default value which you can pass.