Skip to content

set_token

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

Syntax:

set_token(Token) % Sets a token in the current platform. %
Token: <integer + >

Description:

Whenever a platform is started a token value is assigned to it. This is used as a ticket to enter the platform. Unless an agent has this token within itself, it is not permitted entry into the platform. Agents can thus migrate to only those platforms whose tokens they carry within themselves. Tokens thus can be used to restrict /allow entry of agents to specific platforms and constitute a level of security.

Example:

?- set_token(9595).

Any incoming mobile agent should have 9595 as one of its tokens else it will not be allowed to enter this platform.

Clone this wiki locally