ISPL is a programming language used to describe multi-agent systems for verification with MCMAS. An ISPL program models a system of agents that can interact, communicate, and evolve over time.
An ISPL program consists of several main sections:
Overview: Defines how variable assignments are handled during evolution.
The semantics section appears at the beginning of the file and specifies how the evolution functions should be interpreted:
Semantics = MultiAssignment | SingleAssignmentIf omitted, MultiAssignment is used by default.
Overview: Models the shared infrastructure and boundary conditions that all standard agents can observe.
The Environment is a special agent that represents the system's external conditions, communication channels, or shared resources. Unlike standard agents, the Environment can have observable variables that other agents can read (but not modify).
Agent Environment
Obsvars:
// Observable variables - can be seen by other agents
end Obsvars
Vars:
// Private variables - only the Environment can access
end Vars
RedStates:
// Definition of "bad" states for correctness properties
end RedStates
Actions = {...};
Protocol:
// Rules for when actions can be performed
end Protocol
Evolution:
// How variables change based on actions
end Evolution
end AgentKey Features:
Environment.variableNameOverview: Represents individual entities in the multi-agent system with private state and behavior.
Standard agents are the main actors in the system. Each agent has private local state, can perform actions, and evolves according to protocols and evolution functions.
Agent AgentName
Lobsvars = {...}; // Local observable variables from Environment
Vars:
// Private local variables
end Vars
RedStates:
// Definition of incorrect/bad states
end RedStates
Actions = {...};
Protocol:
// Action selection rules
end Protocol
Evolution:
// State transition rules
end Evolution
end AgentKey Features:
Overview: ISPL supports three types of variables for modeling agent state.
variableName : boolean;true or false~ (not), & (and), | (or), ^ (xor)=, !=variableName : {value1, value2, value3};=, !=variableName : lowerBound .. upperBound;+, -, *, /=, !=, <, <=, >, >=Overview: Defines the set of actions an agent can perform, which are visible to all other agents.
Actions = {action1, action2, action3};Key Features:
AgentName.Action = actionNameOverview: Defines the rules for when an agent can perform specific actions based on its current state.
Protocol:
condition1 : {action1, action2};
condition2 : {action3};
Other : {defaultAction};
end ProtocolKey Features:
Other keyword handles all states not covered by explicit conditionsExample:
Protocol:
state=ready and Environment.channel=open : {send, wait};
state=busy : {process};
Other : {idle};
end ProtocolOverview: Defines how an agent's local variables change in response to the actions performed by all agents.
Evolution:
var1=newValue1 and var2=newValue2 if condition1;
var3=newValue3 if condition2;
end EvolutionEvolution:
var1=newValue1 if condition1;
var2=newValue2 if condition2;
end EvolutionKey Features:
AgentName.Action = actionNameOverview: Defines "incorrect" or "bad" states for an agent, used in correctness verification.
RedStates:
booleanCondition;
end RedStatesKey Features:
O (ought) in formulaeOverview: Defines atomic propositions (boolean predicates) over global system state for use in verification formulae.
Evaluation
propositionName if booleanCondition;
anotherProp if Agent1.var1 = value and Agent2.var2 > threshold;
end EvaluationKey Features:
AgentName.variableName syntaxEnvironment.variableNameOverview: Specifies the initial global states of the system when verification begins.
InitStates
Agent1.var1 = value1 and Agent2.var2 = value2 and Environment.var3 = value3;
end InitStatesKey Features:
Agent1.var = Agent2.varOverview: Defines collections of agents for use in group-based verification formulae.
Groups
groupName = {Agent1, Agent2, Environment};
anotherGroup = {Agent3, Agent4};
end GroupsKey Features:
GK (group knowledge), GCK (common knowledge), DK (distributed knowledge)<groupName>X, <groupName>F, etc.Overview: Specifies conditions that must hold infinitely often along all execution paths, used to rule out unrealistic behaviors.
Fairness
proposition1;
proposition2 -> proposition3;
AG someCondition;
end FairnessKey Features:
Overview: Contains the properties to be verified against the model, written in temporal and epistemic logic.
Formulae
AG(proposition1 -> AF proposition2);
K(Agent1, proposition3);
<group1>F proposition4;
end FormulaeSupported Logics:
AG, EG, AX, EX, AF, EF, AU, EUG, F, X, U (with LTL prefix)CTL* prefix)K(agent, φ) (knowledge), GK(group, φ) (group knowledge), GCK(group, φ) (common knowledge), DK(group, φ) (distributed knowledge)<group>X φ, <group>F φ, <group>G φ, <group>(φ U ψ) (strategic operators)O(agent, φ) (correctness - agent ought to satisfy φ)Key Features:
AgentName.GreenStates, AgentName.RedStates