jmadem
Class construct_allocations

java.lang.Object
  extended by jason.asSemantics.DefaultInternalAction
      extended by jmadem.construct_allocations
All Implemented Interfaces:
jason.asSemantics.InternalAction, java.io.Serializable

public class construct_allocations
extends jason.asSemantics.DefaultInternalAction

Internal function for constructing a set of allocations by instantiating task slots to element values.

Use:

jmadem.construct_allocations(TaskWithAllParameters,
[Slots],
[ [ElementValues] | ListOfElementValues ],
AllocationsOut )

Example:

jmadem.construct_allocations(use(coffeeMachine, age),
[age],
[ [doug, norman] ],
[use(cofeeMachine, doug), use(cofeeMachine, norman)] )

Author:
Francisco Grimaldo
See Also:
Serialized Form

Field Summary
(package private)  jason.asSyntax.ListTermImpl allocs
           
(package private)  java.util.List<jason.asSyntax.Term> elements
           
(package private)  jason.asSyntax.Literal instantiated_task
           
(package private)  java.util.logging.Logger logger
           
private static long serialVersionUID
           
(package private)  java.util.List<jason.asSyntax.Term> slots
           
(package private)  jason.asSyntax.Literal task
           
 
Constructor Summary
construct_allocations()
           
 
Method Summary
 java.lang.Object execute(jason.asSemantics.TransitionSystem ts, jason.asSemantics.Unifier un, jason.asSyntax.Term[] args)
           
(package private)  void instantiate_task(int id_params, int id_slots)
          Constructs the set of allocations by instantiating the slots with the elements passed to the internal action.
 
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, getMaxArgs, getMinArgs, suspendIntention
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

logger

java.util.logging.Logger logger

task

jason.asSyntax.Literal task

instantiated_task

jason.asSyntax.Literal instantiated_task

slots

java.util.List<jason.asSyntax.Term> slots

elements

java.util.List<jason.asSyntax.Term> elements

allocs

jason.asSyntax.ListTermImpl allocs
Constructor Detail

construct_allocations

public construct_allocations()
Method Detail

execute

public java.lang.Object execute(jason.asSemantics.TransitionSystem ts,
                                jason.asSemantics.Unifier un,
                                jason.asSyntax.Term[] args)
                         throws java.lang.Exception
Specified by:
execute in interface jason.asSemantics.InternalAction
Overrides:
execute in class jason.asSemantics.DefaultInternalAction
Throws:
java.lang.Exception

instantiate_task

void instantiate_task(int id_params,
                      int id_slots)
Constructs the set of allocations by instantiating the slots with the elements passed to the internal action.

Parameters:
id_params - index over the parameters of the task
id_slots - index over the slots being considered