Skip to content

add_token

Tushar Semwal edited this page Oct 15, 2017 · 1 revision

Syntax:

add_token(Agent_name, Token List) % adds a list of tokens to an agent %

Agent_name: <atom +> Token List: <List +>

Description:

This predicate is used to add a list of tokens to a given agent. When a mobile agent enters a platform, the platform first checks the members of this list of tokens with the token of its own platform. If a match is found, the agent is allowed to enter the platform otherwise a negative acknowledgment is given to the sender platform.

Example:

?- add_token(myagent,[1111,2222,3333]).
?- add_token(Agent_name,[7878]).
Clone this wiki locally