A Double-Level Model Checking Approach for an Agent-Based Autonomous Vehicle and Road Junction Regulations
Abstract
:1. Introduction
1.1. Autonomous Vehicles and the Rules of the Road
- 29% of the vehicles were involved in rear-end crashes;
- 24% of the vehicles were turning or crossing at intersections just before the crashes;
- 19% of the vehicles ran off the edge of the road;
- 12% involved vehicles changing lanes.
1.2. Related Work
1.2.1. Proposal
1.2.2. Contributions
- A complete architecture for the Formal Verification of Agents in the Rules of the Road, which starts at the formalisation of Road Junction rules, passes these to modelling and implementation tools, generates formal verification results, which may be of interest to the given stakeholders.
- The double-level Model Checking approach, which makes it possible to formally verify properties both at design and development levels. As proof-of-concept, we have verified 30 properties, 18 at design level and 12 at development level.
- A set of verified properties, where properties range from time constraints to the analysis of the AV-agent’s behaviour considering all possible actions the agent can take in Road Junction scenarios.
- The creation of an agent’s environment that includes random generation of events (following the methodology outlined in ref. [18]), where different scenarios concerning selected Road Junction rules are simulated.
- The use of a mapping from a given UPPAAL timed automaton to the basic elements of a BDI (Belief-Desire-Intention) agent.
- Implementation of a BDI agent (in Gwendolen), which enables tracing of an agent’s behaviour. Taken with the model-checking process (via AJPF) it is possible to assess what were the choices selected (autonomously) by the agent that led to any given outcome [19]. For example, given a certain scenario with specific perceptions from the environment, did the agent (correctly) choose to follow a given road junction rule?
1.2.3. Remarks and Limitations
- Single Agent: we only model a single agent in our implementation. And this agent has no (internal) concurrency to try to enter the Road Junction.
- No driving behaviour: this single agent has no driving behaviour component, the agent is only concerned with obeying the programmed Road Junction rules. So, we do not verify, for example, the speed or trajectory of the vehicle.
- Intersection Management: we are not trying to deal with the well-known problem of Intersection Management using multiple agents [22]. We consider only the behaviour of a single agent following the desired traffic rules.
- Road Junction environment: The environment is represented in both modelling and simulation as a simple (9 × 9) grid with a few road features such as stop signs, and other road users. This is because this captures the abstract issues and, on a practical level, model-checking does not scale well once the grid size increases dramatically. Our environment model uses as basis the formalised abstract model which captures the temporal elements from the road junction rules. So, we do not represent spatial elements, as seen, for example in [23], where the author uses the Multi-lane Spatial Logic to represent virtual lanes in an urban traffic environment.
- Time constraints: we use time constraints in our model to represent thresholds within or after which actions and events should occur. These constraints are only used in our model, they are not taken from any Highway Code. This illustrates the way modellers need to extract implicit assumptions from rules written for human consumption—in this case that actions such as waiting will take a reasonable amount of time, or will take place within a reasonable space of time.
- Subset of Road Junction Rules: the UK Highway code has a set of 14 rules for Road Junctions. Here, we model and implement only the first three rules from the Road Junction set, specifically rules 170, 171, and 172.
- Modularity of the model checking stages: our two Model Checking stages (using UPPAAL and MCAPL) are loosely coupled, i.e., they take place independently of each other. On the one hand, this independence loses the potential benefit an integrated model checking semantics, where one could verify the whole system (model plus implementation). On the other hand, this modular architecture allows a separation of concerns meaning a user can consider separately the verification of either the timed automata model verification or the agent’s implementation.
- Nature of verified properties: all the verified properties are related to the basic behaviour of our agent against the three selected road junction rules in our simple road junction environment.
- Including two new rules (171 and 172) from the UK Highway Code.
- Modelling the AV-agent and Road Junction environment using timed automata.
- Formal Verification of 18 properties of these timed automata using UPPAAL.
- Implementation of all three rules in Gwendolen.
- Formal Verification of 12 properties of this agent implementation using AJPF.
2. Key Terminology & the Rules of the Road
2.1. Terminology and Abbreviation
- SAE-RoR: is the name of our proposed architecture (seen in Figure 1).
- AV: According to Herrmann et al. [24], the term automated vehicles refers to autonomy levels 1–4, while the terms autonomous, self-driving or driverless vehicles refer to autonomy level 5. Here, for the sake of simplicity, we only use the term Autonomous Vehicles (AV). And in our model, we are not concerned whether our agent represents a vehicle with level 4 or 5, or if the vehicle has a human driver responsible or only passengers inside it.
- AV-agent: is the name of our agent implemented in Gwendolen.
- AV_agent: is the name of the automaton modelled with UPPAAL, which represents the AV-agent.
- RU: according to the UK Highway Code, a Road User (RU) can be any of the following: pedestrian, cyclist, motorcyclist, powered wheelchair/mobility scooter, horse rider, etc.
- ru: control variable that represents a Road User and it is used in the UPPAAL timed automaton model.
- RJ: here we use the term Road Junction (RJ) which has the same meaning as an Intersection.
- RoR: we use the term “Rules of the Road” (RoR) which has the same meaning as traffic rules, Highway Code, traffic laws, or road traffic laws.
- Digital Highway Code: is the version of the Rules of the Road which is intended to work for AVs.
- Cross junction: a crossroad is the place where two roads meet and cross each other. It could be in the form of: a major road crossing a minor road; or two equal roads crossing each other [25].
- T junction: is a place where two roads meet in the shape of letter T [25].
2.2. The Road Junction Rules
- Propositional operators from LTL:∧, ∨, →, ¬.
- where these four propositional logical operations represent conjunction, disjunction, implication, and negation.
□, ◊, ◯, ∪.- where these four future-time operators represent: always, eventually, next, and until.
2.2.1. LTL Formalisation
- Rule 170—UK Highway Code:
- –
- You should watch out for road users (RU).
- –
- Watch out for pedestrians crossing a road junction (JC) into which you are turning. If they have started to cross they have priority, so give way.
- –
- Look all around before emerging (NB: For the sake of clarity, we choose to use the term enter as an action which represents not only a driver entering a road junction, but also emerging from a road junction to another road). Do not cross or join a road until there is a safe gap (SG) large enough for you to do so safely.
- Rule 170, represented in LTL, describes when the autonomous vehicle (AV) may enter the junction (JC):□ ((watch(AV, JC, RU) ∧ (¬ cross(RU, JC) ∧ (exists(SG, JC)))
→ ((exists(SG, JC) ∧ ¬ cross(RU, JC)) ∪ enter(AV, JC))))- Informal Description: it is always the case that the AV is supposed to watch for any road users (RU) at the junction (JC) and there are no road users crossing the junction and there is a safe gap (SG). Then, no road users crossing the junction and the existence of a safe gap should remain true, until the AV may enter the junction.
- Rule 170 represented in LTL, when the autonomous vehicle (AV) should give way at the junction (JC):□ (watch(AV,JC,RU) ∧ (cross(RU,JC)) → give-way(AV,JC))
- Informal Description: it is always necessary to watch out for road users (RU) and check if there is a road user crossing the junction. Then, the AV should give way to traffic.
- Rule 171—UK Highway Code:
- –
- You MUST stop behind the line at a junction with a ‘Stop’ sign (ST) and a solid white line across the road. Wait for a safe gap (SG) in the traffic before you move off.
- Rule 171 represented in LTL:exists(ST,JC) → □ (stop(AV,JC) ∪ (exists(SG,JC)
∧ (exists(SG,JC) ∪ enter(AV,JC))))- Informal Description: when there is a stop sign (ST), then it is always the case the AV should stop at the junction until there is a safe gap (SG). And the safe gap must remain true until the AV enter at the junction.
- Rule 172—UK Highway Code:
- –
- The approach to a junction may have a ‘Give Way’ sign (GW) or a triangle marked on the road (RO). You MUST give way to traffic on the main road (MR) when emerging from a junction with broken white lines (BWL)across the road.
- Rule 172 represented in LTL:□ ((exists(AV,RO) ∧ enter(AV,JC))
∧ ((exists(BWL,JC) ∨ exists(GW,JC)) → give-way(AV,MR)))- Informal Description: It is always the case that when there is an AV driving on a Road (RO) and the AV enters the junction. And there is a Broken White Line (BWL) or a Give Way sign (GW), then the AV should give way to the traffic on the Main Road (MR).
2.2.2. Remarks
3. Background
3.1. Timed Automata, Temporal Logic and UPPAAL
- is a finite set of locations,
- is a set of initial locations,
- is a finite set of actions,
- C is a finite set of clocks,
- is a transition relation,
- : is an invariant-assignment function,
- is a finite set of atomic propositions, and
- L: is a labelling function for the locations.
3.2. BDI Model and Gwendolen Language
3.2.1. BDI Model
- Beliefs are information the agent has about the world.
- Desires are all possible states of events that the agent might want to achieve.
- Intentions are the state of events the agent has decided to commit towards. These events can be goals that are assigned to the agent or the agent may choose among a set of options.
- The trigger_event is given by a new belief or a goal.
- The guard is defined by a set of beliefs.
- The body is represented as a set of actions.
Example
- AV-agent believes it is at the road junction.
- AV-agent selects the intention to enter the road junction.
- AV-agent triggers the following plan:enter-roadjunction : at-roadjunction <- check-sign, watchout-for-road-user;
3.2.2. Gwendolen Language
- +b adds the belief b.
- -b removes the belief b.
- +!g adds the goal g.
- +!g[perform] adds a new goal of type perform. Perform goals are discharged by the execution of an appropriate plan.
- +!g[achieve] adds a new goal of type achieve. Achieve goals are discharged only when they become beliefs.
- B x represents a guard condition, checks if belief x is perceivable.G x represents a guard condition, checks if goal x has been added.
- hello(x) represents that action hello(x) (defined in the agent’s environment) is executed.
Example
3.3. The Property Specification Language
Example
4. Modelling Using Timed Automata
4.1. AV_agent Automaton
Time Constraints
4.2. Road Junction Environment Automaton
4.3. Automata for the Artefacts
5. Agent and Environment Implementation
5.1. Setting-Up the Road Junction Environment Model
- spot (0,0): the start position for the AV-agent, when it is said to be away from the road junction.
- spot (0,1): the position the AV-agent goes when it is supposed to watch for road users.
- spot (0,2): the position where the traffic sign is placed.
- spot (1,1): the position reached by the AV-agent once it enters the RJ. Notice that after reaching (1,1) spot, the AV-agent may go to any of the following spots: {(1,0); (2,1); (1,2)}.
- spots {(1,0)); (1,1)); (2,1); (1,2)} are said to be target spots. That is, spots that can be reached by the AV-agent.
- spots {(0,0); (2,0); (2,2)} are said to be safe spots. That is, spots that can not be reached by the AV-agent, once it arrives at the road junction, i.e., AV-agent is placed at (0,1).
- a given road user may be placed at a safe or a target spot.
5.2. Correspondence: Modelling and Implementation
- Belief: represents an initial belief of the agent.
- Add Belief: represents a new belief acquired by the agent during execution.
- Percept: is a perception obtained by the agent from the environment.
- Action: is an action executed by the agent in the environment.
:Plans: +!at_roadjunction(X,Y) [achieve] : { B av_away(0,0), B roadjunction(X,Y) } <- approach_roadjunction(X,Y); +at_roadjunction(X,Y) : { B sign(Z,W) } <- check_sign(Z,W); +stop_sign(Z,W) : { B sign(Z,W) } <- +stopped, +!enter_roadjunction_rules170_171[perform]; +give_way_sign(Z,W) : { B sign(Z,W) } <- +given_way, +stopped, +!enter_roadjunction_rules170_172[perform]; +!enter_roadjunction_rules170_171[perform] : { B at_roadjunction(X,Y), B stopped, B to_watch(S,T) } <- watch(S,T); +!enter_roadjunction_rules170_172[perform] : { B at_roadjunction(X,Y), B given_way, B stopped, B to_watch(S,T) } <- watch(S,T); +for_road_users(S,T) : { B road_user(S,T) } <- +busy_roadjunction, wait; +waiting(road_user) : { B road_user(S,T) } <- watching(S,T); +for_road_users(S,T) : { B no_road_user(S,T) } <- +free_roadjunction, check_safe_gap(S,T); +try_again(S,T) : { B no_road_user(S,T) } <- +free_roadjunction, -busy_roadjunction, check_safe_gap(S,T); +safe_gap(S,T) : { B no_road_user(S,T) } <- enter; +no_safe_gap(S,T) : { B no_road_user(S,T) } <- checking(S,T); +for_safe_gap(S,T) : { B new_safe_gap(S,T), B no_road_user(S,T) } <- enter; +enter_roadjunction : { True } <- +away_from_roadjunction, done; |
5.3. Implementation Details
5.4. Testing Scenarios
- There are three road users, all at target spots, {(1,0); (1,1); (1,2)}.
- There is one road user at a target spot, (1,0). And two road users at safe spots, {(2,0); (2,2)}.
- There are three road users, all at safe spots, {(0,0); (2,0); (2,2)}.
- which RJ rule has been selected: rule 171 or 172.
- whether the RJ initially is busy or free.
- if initially the RJ has a safe gap or there is no safe gap.
- and whether or not the AV-agent has entered the RJ.
6. Formal Verification Results
6.1. Verification of Properties with UPPAAL
- p1:
- A[] not deadlockDescription: a safety property which verifies if there is no deadlock.
- p2:
- A[] ((RoadJunction.send_stop || RoadJunction.send_stop_and_give_way)imply AV.AV_at_RJ)Description: For all paths always the Road Junction environment when sending the AV to stop or to stop and give way to traffic, then the AV will be at the Road Junction.
- p3:
- A[] (RoadJunction.waiting_for_AV imply A<> AV.watch_out_for_RU)Description: For all paths always when the Road Junction is waiting for the AV, then for all paths at some time the AV watches out for road users.NB: for the sake of clarity we use TCTL notation for this property, see in Section 3.1 the corresponding UPPAAL notation.
- p4:
- A[] (AV.AV_check_for_safe_gap imply (RoadJunction.check_for_safe_gap || RoadJunction.there_is_safe_gap ||RoadJunction.there_is_no_safe_gap))Description: For all paths always when the AV checks for safe gap, then the Road Junction will be checking for a safe gap or it will know if (or not) there is a safe gap.
- p5:
- A[] (RoadJunction.AV_may_enter imply A<> AV.AV_entered_RJ)Description: For all paths always when the Road Junction tells the AV that it may enter the junction, then for all paths at some time the AV will enter the junction.NB: the same remark for p3 is valid for p5.
- p6:
- A[] (AV.AV_entered_RJ imply AV.x >= 2)Description: For all paths always when the AV enters the Road Junction the clock (x) has a value greater or equal than 2.
- p7:
- A[] ((AV.watch_out_for_RU) imply (AV.x >= 0 && AV.x <= 3))Description: For all paths always the when the AV watches for Road Users at the Road Junction the clock (x) has a value between 0 and 3.
- p8:
- A[] ((AV.waiting) imply (AV.x >= 1 && AV.x <= 5))Description: For all paths always when the AV waits at the Road Junction the clock (x) has a value between 1 and 5.
- p9:
- A[] ((AV.AV_check_for_safe_gap) imply (AV.x >= 2 && AV.x <= 4))Description: For all paths always the when the AV checks for a safe gap at the Road Junction the clock (x) has a value between 2 and 4.
- p10:
- A[] ((AV.watch_out_for_RU) imply(RoadUser1.RU_crossing_RJ || RoadUser1.RU_away_from_RJ))Description: For all paths always when the AV watches for (a single) road user, then it is only possible to have the road user crossing or away from the junction.
- p11:
- A[] (RoadUser1.RU_crossing_RJ imply (RoadJunction.is_RJ_free || RoadJunction.busy_RJ || RoadJunction.AV_should_wait || RoadJunction.AV_is_waiting || RoadJunction.check_RU))Description: For all paths always when there is a (single) road user crossing the junction, then it is only possible the Road Junction (environment) is checking for a road user or it is waiting or it should wait or it knows the junction is busy or yet it should check if the junction is free.
- p12:
- A[] (RoadUser1.RU_crossing_RJ imply (not AV.AV_entered_RJ))Description: For all paths always when there is a (single) road user crossing the junction, then it is not possible that the AV will enter the junction.
- p13:
- A[] ((AV.watch_out_for_RU) imply ((RoadUser1.RU_crossing_RJ ||RoadUser1.RU_away_from_RJ) || (RoadUser2.RU_crossing_RJ || RoadUser2.RU_away_from_RJ)))Description: this is basically the same property as p10, except that here there are two Road Users at the Road Junction.
- p14:
- A[] ((RoadUser1.RU_crossing_RJ || RoadUser2.RU_crossing_RJ) imply(RoadJunction.is_RJ_free || RoadJunction.busy_RJ || RoadJunction.AV_should_wait ||RoadJunction.AV_is_waiting || RoadJunction.check_RU))Description: this is basically the same property as p11, except that here there are two Road Users at the Road Junction.
- p15:
- A[] ((RoadUser1.RU_crossing_RJ || RoadUser2.RU_crossing_RJ) imply(not AV.AV_entered_RJ))Description: this is basically the same property as p12, except that here there are two Road Users at the Road Junction.
- p16:
- A[] ((AV.watch_out_for_RU) imply ((RoadUser1.RU_crossing_RJ ||RoadUser1.RU_away_from_RJ) || (RoadUser2.RU_crossing_RJ || RoadUser2.RU_away_from_RJ)|| (RoadUser3.RU_crossing_RJ || RoadUser3.RU_away_from_RJ)))Description: this is basically the same property as p10 and p13, except that here there are three Road Users at the Road Junction.
- p17:
- A[] ((RoadUser1.RU_crossing_RJ || RoadUser2.RU_crossing_RJ ||RoadUser3.RU_crossing_RJ) imply (RoadJunction.is_RJ_free || RoadJunction.busy_RJ ||RoadJunction.AV_should_wait || RoadJunction.AV_is_waiting || RoadJunction.check_RU))Description: this is basically the same property as p11 and p14, except that here there are three Road Users at the Road Junction.
- p18:
- A[] ((RoadUser1.RU_crossing_RJ || RoadUser2.RU_crossing_RJ ||RoadUser3.RU_crossing_RJ) imply (not AV.AV_entered_RJ))Description: this is basically the same property as p12 and p15, except that here there are three Road Users at the Road Junction.
- Road users: no road user at all; one, two, or three road users.
- System properties: two kinds of system properties are considered: temporal correctness and liveness.
- Interaction: that is those properties that present some sort of interaction with the environment.
- Quality: there are two kinds of properties related to quality: security and safety.
- Related Road Junction rules: each property is identified with the correspondent Road Junction rules that are related to the verified property.
- Properties p1 to p5 are related to security, safety, liveness, and interaction. In addition, these properties verify some of the main actions of our model, i.e., when AV-agent watches out for a road user, checks for a safe gap and for a traffic sign as well as will enter the RJ.
- Properties p6 to p9 are responsible for verifying the time constraints included in the AV-agent automaton. With this, we can check temporal correctness for the main actions in our model, i.e., enter the RJ, watch out for road users, wait at RJ, and check for a safe gap.
- Properties p10 to p12 are safety properties used to verify the effect of having a single road user at the RJ in some related actions. These properties formally verify what to expect when the AV-agent watches out road users and also when there is a road user crossing the junction what is allowed (and not) to happen considering the existent actions in the RJ environment.
- Properties p13 to p15 run the same kind of verification from the previous item, except here the scenario considers the existence of two road users.
- Properties p16 to p18 run the same kind of verification from item 3, except here the scenario considers the existence of three road users.
- Related RJ rules: 16 properties are related to rule 170, which is indeed a general road traffic rule handling different possibilities of when and how a vehicle may enter the road junction. Moreover, rules 171 and 172 are also verified in specific properties.
6.2. Verification of Properties with AJPF
- ap1:
- (B(av,sign(0,2)) & B(av,stopped)) -> [] G(av, enter_roadjunction_rules170_171)Description: when AV believes there is a sign at and it has stopped, then it always obtains the goal of entering the road junction using rules 170–171.
- ap2:
- (B(av,sign(0,2)) & B(av,given_way) & B(av,stopped)) ->[] G(av, enter_roadjunction_rules170_172)Description: when AV believes there is a sign at , it has given way and stopped, then it always obtains the goal of entering the road junction using rules 170–172.
- ap3:
- [] (B(av, at_roadjunction(1, 0)) -> <> (B(av, road_user(1, 0)) ||B(av, no_road_user(1, 0)))Description: It is always the case that if the AV is at a road junction at , then eventually it will believe that either there is a road user at the junction at or there is not a road user at the junction at .
- ap4:
- [] (D(av,wait) -> (B(av,road_user(1,0)) & B(av,busy_roadjunction)))Description: It is always the case that if the AV waits at the junction, then it believes there is a road user at and the road junction is busy.
- ap5:
- [] ((B(av,no_road_user(1,0)) & B(av,free_roadjunction)) -> <> (B(av,no_safe_gap(1,0)|| B(av,safe_gap(1,0)) || B(av,new_safe_gap(1,0)) || B(av,try_again(1,0))))Description: It is always the case that when the AV believes there is no road user at and the road junction is free, then eventually the AV will acquire the belief there is no safe gap at or there is a safe gap (or a new safe gap) at or the belief it has tried again at (in the search for road users).
- ap6:
- [] (D(av,check_safe_gap(1,0)) -> ~B(av,busy_roadjunction))Description: It is always the case that if the AV checks for safe gap at , then it should not believe there is a busy road junction.
- ap7:
- [] (D(av,check_safe_gap(1,0)) -> ~B(av,road_user(1,0)))Description: It is always the case that if the AV checks for safe gap at , then it should not believe there is a road user at .
- ap8:
- [] (D(av,check_safe_gap(1,0)) ->(B(av,no_road_user(1,0)) & B(av,free_roadjunction)))Description: It is always the case that if the AV checks for safe gap at , then it believes there is no road user at and the road junction is free.
- ap9:
- [] (D(av,enter) -> ~B(av,busy_roadjunction))Description: It is always the case that if the AV enters the junction, then it should not believe there is busy road junction.
- ap10:
- [] (D(av,enter) -> ~B(av,road_user(1,0)))Description: It is always the case that if the AV enters the junction, then it should not believe there is a road user at .
- ap11:
- [] (D(av,enter) -> ~B(av,try_again(1,0)))Description: It is always the case that if the AV enters the junction, then it should not believe to try again (and watch for a road user) at .
- ap12:
- [] (D(av, enter) -> ( B(av, safe_gap(1,0)) || B(av, new_safe_gap(1,0))& B(av, no_road_user(1, 0)))Description: It is always the case that if the AV enters the junction, then it believes there is a safe gap at (or a new safe gap) and no road user at .
7. Related Work
- Amount of road traffic rules used: some works (including our approach) represents 3 rules, but none represents more than this.
- Formal Verification tools: Ref. [12] and our work are the only ones that use two verification techniques at two different levels: design and development, in the other works a single technique is applied.
- Formalisation: all works use some kind of formalisation, most use temporal or deontic logic.
- Simulation tools: References [11,12,13] present the use of some graphical tool for simulation, which contribute for testing the system. Our approach uses the UPPAAL graphical tool for simulation, but for the agent’s simulation we only use a cli (command line interface) tool.NB: all works described in this table share the same goal of using a formalisation technique to represent an AV, where either the road traffic rules are formalised or some formal verification of agents is used.
7.1. Formal Verification of Agents
7.2. The Formalisation of the Rules of the Road
8. Conclusions
Author Contributions
Funding
Informed Consent Statement
Conflicts of Interest
References
- Avary, M.; Dawkins, T. Safe Drive Initiative: Creating Safe Autonomous Vehicle Policy; World Economic Forum: Geneva, Switzerland, 2020. [Google Scholar]
- Prakken, H. On the problem of making autonomous vehicles conform to traffic law. Artif. Intell. Law 2017, 25, 341–363. [Google Scholar] [CrossRef] [Green Version]
- Alves, G.V.; Dennis, L.; Fisher, M. Formalisation of the Rules of the Road for embedding into an Autonomous Vehicle Agent. In Proceedings of the International Workshop on Verification and Validation of Autonomous Systems, Oxford, UK, 18–19 July 2018; pp. 1–2. [Google Scholar]
- Alves, G.V.; Dennis, L.; Fisher, M. Formalisation and Implementation of Road Junction Rules on an Autonomous Vehicle Modelled as an Agent. In International Symposium on Formal Methods; Lecture Notes in Computer Science; Sekerinski, E., Moreira, N., Oliveira, J.N., Ratiu, D., Guidotti, R., Farrell, M., Luckcuck, M., Marmsoler, D., Campos, J., Astarte, T., et al., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 217–232. [Google Scholar] [CrossRef]
- Philipp, R.; Wittmann, D.; Knobel, C.; Weast, J.; Garbacik, N.; Schnetter, P. Safety First for Automated Driving; Daimler AG: Stuttgart, Germany, 2019. [Google Scholar]
- Law Commission, U. Automated Vehicles: Summary of the Analysis of Responses to Consultation Paper 2 on Passenger Services and Public Transport; Law Commission: London, UK, 2020. [Google Scholar]
- The British Standards Institution. PAS 1882 Data Collection and Management for Automated Vehicle Trials; The British Standards Institution: London, UK, 2020. [Google Scholar]
- Waymo. Safety Report; Waymo LLC: Mountain View, CA, USA, 2020; Available online: https://waymo.com/safety (accessed on 23 June 2021).
- Department for Transport. Using the Road (159 to 203)—The Highway Code— Guidance—GOV.UK. 2017. Available online: https://www.gov.uk/guidance/the-highway-code/using-the-road-159-to-203 (accessed on 23 June 2021).
- Rizaldi, A.; Keinholz, J.; Huber, M.; Feldle, J.; Immler, F.; Althoff, M.; Hilgendorf, E.; Nipkow, T. Formalising and Monitoring Traffic Rules for Autonomous Vehicles in Isabelle/HOL. In Proceedings of the 13th International Conference on Integrated Formal Methods, Turin, Italy, 20–22 September 2017; pp. 50–66. [Google Scholar] [CrossRef]
- Bhuiyan, H.; Governatori, G.; Rakotonirainy, A.; Bond, A.; Demmel, S.; Islam, M.B. Traffic Rules Encoding Using Defeasible Deontic Logic; IOS Press: Amsterdam, The Netherland, 2020. [Google Scholar] [CrossRef]
- Kamali, M.; Dennis, L.A.; McAree, O.; Fisher, M.; Veres, S.M. Formal Verification of Autonomous Vehicle Platooning. Sci. Comput. Program. 2017, 148, 88–106. [Google Scholar] [CrossRef]
- Al-Nuaimi, M.; Qu, H.; Veres, S.M. Computational Framework for Verifiable Decisions of Self-Driving Vehicles. In Proceedings of the 2018 IEEE Conference on Control Technology and Applications (CCTA), Copenhagen, Denmark, 21–24 August 2018; pp. 638–645. [Google Scholar] [CrossRef]
- Bakar, N.A.; Selamat, A. Agent systems verification: Systematic literature review and mapping. Appl. Intell. 2018, 48, 1251–1274. [Google Scholar] [CrossRef]
- Dennis, L.A. Gwendolen Semantics: 2017; Technical Report ULCS-17-001; Department of Computer Science, University of Liverpool: Liverpool, UK, 2017. [Google Scholar]
- Bengtsson, J.; Larsen, K.; Larsson, F.; Pettersson, P.; Yi, W. UPPAAL—A tool suite for automatic verification of real-time systems. In Hybrid Systems III; Alur, R., Henzinger, T.A., Sontag, E.D., Eds.; Number 1066 in Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1996; pp. 232–243. [Google Scholar] [CrossRef]
- Dennis, L.A.; Fisher, M.; Webster, M.P.; Bordini, R.H. Model Checking Agent Programming Languages. Autom. Softw. Eng. 2012, 19, 5–63. [Google Scholar] [CrossRef] [Green Version]
- Dennis, L.A.; Fisher, M.; Lincoln, N.K.; Lisitsa, A.; Veres, S.M. Practical Verification of Decision-Making in Agent-Based Autonomous Systems. Autom. Softw. Eng. 2016, 23, 305–359. [Google Scholar] [CrossRef] [Green Version]
- Koeman, V.J.; Dennis, L.A.; Webster, M.; Fisher, M.; Hindriks, K.V. The “Why Did You Do That?” Button: Answering Why-Questions for End Users of Robotic Systems. Lect. Notes Comput. Sci. 2019, 12058, 152–172. [Google Scholar] [CrossRef]
- Alves, G.V.; Dennis, L.; Fernandes, L.; Fisher, M. Reliable Decision-Making in Autonomous Vehicles. In Validation and Verification of Automated Systems: Results of the ENABLE-S3 Project; Leitner, A., Watzenig, D., Ibanez-Guzman, J., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 105–117. [Google Scholar] [CrossRef]
- Fernandes, L.E.R.; Custodio, V.; Alves, G.V.; Fisher, M. A Rational Agent Controlling an Autonomous Vehicle: Implementation and Formal Verification. Electron. Proc. Theor. Comput. Sci. 2017, 257, 35–42. [Google Scholar] [CrossRef] [Green Version]
- Dresner, K.; Stone, P. A Multiagent Approach to Autonomous Intersection Management. J. Artif. Intell. Res. 2008, 31, 591–656. [Google Scholar] [CrossRef] [Green Version]
- Schwammberger, M. An abstract model for proving safety of autonomous urban traffic. Theor. Comput. Sci. 2018, 744, 143–169. [Google Scholar] [CrossRef]
- Herrmann, A.; Brenner, W.; Stadler, R. Autonomous Driving: How the Driverless Revolution Will Change the World, 1st ed.; Emerald Publishing: Bingley, UK, 2018. [Google Scholar]
- Nigeria, H.C. Nigeria Highway Code—III. ROAD JUNCTIONS. 2019. Available online: http://www.highwaycode.com.ng/iii-road-junctions.html (accessed on 23 June 2021).
- Fisher, M. An Introduction to Practical Formal Methods Using Temporal Logic; Wiley: Hoboken, NJ, USA, 2011. [Google Scholar]
- Baier, C.; Katoen, J.P. Principles of Model Checking (Representation and Mind Series); The MIT Press: Cambridge, MA, USA, 2008. [Google Scholar]
- Bratman, M.E. Intentions, Plans, and Practical Reason; Harvard University Press: Cambridge, MA, USA, 1987. [Google Scholar]
- Hindriks, K.V. Programming Rational Agents in GOAL. In Multi-Agent Programming: Languages, Tools and Applications; El Fallah Seghrouchni, A., Dix, J., Dastani, M., Bordini, R.H., Eds.; Springer: Boston, MA, USA, 2009; pp. 119–157. [Google Scholar]
- Visser, W.; Havelund, K.; Brat, G.; Park, S. Model Checking Programs. In Proceedings of the 15th IEEE International Conference Automated Software Engineering (ASE), Grenoble, France, 11–15 September 2000; pp. 3–12. [Google Scholar]
- Bordini, R.H.; Hübner, J.F.; Wooldridge, M. Programming Multi-Agent Systems in AgentSpeak Using Jason (Wiley Series in Agent Technology); John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2007. [Google Scholar]
- Dennis, L.A.; Fisher, M.; Webster, M. Two-Stage Agent Program Verification. J. Log. Comput. 2018, 28, 499–523. [Google Scholar] [CrossRef] [Green Version]
- Luckcuck, M.; Farrell, M.; Dennis, L.A.; Dixon, C.; Fisher, M. Formal Specification and Verification of Autonomous Robotic Systems: A Survey. ACM Comput. Surv. 2019, 52, 100:1–100:41. [Google Scholar] [CrossRef] [Green Version]
- Althoff, M.; Althoff, D.; Wollherr, D.; Buss, M. Safety verification of autonomous vehicles for coordinated evasive maneuvers. In Proceedings of the 2010 IEEE Intelligent Vehicles Symposium, San Diego, CA, USA, 21–24 June 2010; pp. 1078–1083. [Google Scholar] [CrossRef] [Green Version]
- Pallottino, L.; Scordio, V.G.; Bicchi, A.; Frazzoli, E. Decentralized Cooperative Policy for Conflict Resolution in Multivehicle Systems. IEEE Trans. Robot. 2007, 23, 1170–1183. [Google Scholar] [CrossRef]
- Heß, D.; Althoff, M.; Sattel, T. Formal verification of maneuver automata for parameterized motion primitives. In Proceedings of the 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, Chicago, IL, USA, 14–18 September 2014; pp. 1474–1481. [Google Scholar] [CrossRef] [Green Version]
- Kress-Gazit, H.; Wongpiromsarn, T.; Topcu, U. Correct, Reactive, High-Level Robot Control. IEEE Robot. Autom. Mag. 2011, 18, 65–74. [Google Scholar] [CrossRef]
- Pek, C.; Zahn, P.; Althoff, M. Verifying the safety of lane change maneuvers of self-driving vehicles based on formalized traffic rules. In Proceedings of the 2017 IEEE Intelligent Vehicles Symposium (IV), Redondo Beach, CA, USA, 11–14 June 2017; pp. 1477–1483. [Google Scholar] [CrossRef] [Green Version]
- Quigley, M.; Conley, K.; Gerkey, B.P.; Faust, J.; Foote, T.; Leibs, J.; Wheeler, R.; Ng, A.Y. ROS: An Open-source Robot Operating System. In Proceedings of the ICRA Workshop on Open Source Software, Kobe, Japan, 12–17 May 2009. [Google Scholar]
- Bui, K.H.N.; Jung, J.J. Internet of agents framework for connected vehicles: A case study on distributed traffic control system. J. Parallel Distrib. Comput. 2018, 116, 89–95. [Google Scholar] [CrossRef]
- Alouache, L.; Nguyen, N.; Aliouat, M.; Chelouah, R. Toward a hybrid SDN architecture for V2V communication in IoV environment. In Proceedings of the 2018 Fifth International Conference on Software Defined Systems (SDS), Barcelona, Spain, 23–26 April 2018; pp. 93–99. [Google Scholar] [CrossRef]
- Savaglio, C.; Ganzha, M.; Paprzycki, M.; Bădică, C.; Ivanović, M.; Fortino, G. Agent-based Internet of Things: State-of-the-art and research challenges. Future Gener. Comput. Syst. 2020, 102, 1038–1053. [Google Scholar] [CrossRef]
- Alves, G.V.; Dennis, L.; Fisher, M. First Steps towards an Ethical Agent for Checking Decision and Behaviour for an Autonomous Vehicle on the Rules of the Road. In Proceedings of the Second Workshop on Implementing Machine Ethics, Dublin, Ireland, 30 June 2020; Zenodo: Geneva, Switzerland, 2020; pp. 1–2. [Google Scholar] [CrossRef]
Operator | Meaning |
---|---|
And | |
Or | |
Equivalence | |
imply | Conditional |
not | Negation |
A | Universal quantifier |
E | Existential quantifier |
[] | Always |
<> | Eventually |
--> | Leads to |
Operator | Meaning |
---|---|
<> | temporal logic operator Eventually |
[] | temporal logic operator Always |
B | a Belief of the agent |
G | a Goal of the agent |
I | an Intention of the agent |
D | an Action of the agent |
ItD | an Intention to execute an action of the agent |
P | a Perception from the environment |
& | logical operator And |
|| | logical operator Or |
--> | logical operator Implies |
Model | Implementation | ||
---|---|---|---|
Names | Types | Names | Types |
AV_away_from_RJ | Loc | av_away() | Belief |
AV_approach! | UA1 | approach_roadjunction() | Action |
AV_at_RJ | Loc | at_roadjunction() | Percept |
stop?/is_stop_sign? | UA1-UA2/U2-UA3 | check_sign()/stop_sign()/stopped | Action/Percept/Add Belief |
stop_and_give_way?/is_give_way_sign? | UA1-UA2/U2-UA3 | check_sign()/give_way_sign()/ given_way | Action/Percept/Add Belief |
watch_out_for_RU | Loc | watch() | Action |
watching! | UA1 | watching() | Action |
busy?/RU_crossing? | UA1-UA2/UA2-UA4 | road_user()/busy_roadjunction | Percept/Add Belief |
wait? | UA2 | wait/waiting(road_user) | Action/Percept |
try_again! | UA1 | try_again() | Percept |
free?/RU_away? | UA1-UA2/UA2-UA4 | no_road_user()/free_roadjunction | Percept/Add Belief |
check_for_safe_gap | Loc | check_safe_gap() | Action |
should_wait?/no_safe_gap? | UA1-UA2/UA2-UA5 | no_safe_gap()/checking() | Percept/Action |
enter?/yes_safe_gap? | UA1-UA2/UA2-UA5 | safe_gap() or for_safe_gap()/enter | Percept/Action |
AV_entered_RJ | Loc | enter_roadjunction | Percept |
AV_away! | UA1 | away_from_roadjunction | Add Belief |
Properties | Scenario | Time | Memory |
---|---|---|---|
p1–p12 | with 0 or 1 RU | 0 s to 0.003 s | 5800 KB/49,396 KB |
p13–p15 | with 2 RU | 0.001 s | 6040 KB/48,322 KB |
p16–p18 | with 3 RU | 0.001 s to 0.01 s | 6040 KB/48,322 KB |
System Properties | Interaction | Quality | Related Rules | ||||||
---|---|---|---|---|---|---|---|---|---|
Property # | Road Users? | Temporal Correctness | Liveness | Interaction w/Environment | Safety | Security | R. 170 | R. 171 | R.172 |
p1 | - | • | |||||||
p2 | - | • | • | • | • | ||||
p3 | - | • | • | • | |||||
p4 | - | • | • | • | • | ||||
p5 | - | • | • | • | |||||
p6 | - | • | • | ||||||
p7 | - | • | • | ||||||
p8 | - | • | • | ||||||
p9 | - | • | • | • | |||||
p10 | 1 | • | • | • | |||||
p11 | 1 | • | • | • | |||||
p12 | 1 | • | • | • | |||||
p13 | 2 | • | • | • | |||||
p14 | 2 | • | • | • | |||||
p15 | 2 | • | • | • | |||||
p16 | 3 | • | • | • | |||||
p17 | 3 | • | • | • | |||||
p18 | 3 | • | • | • |
Property # | Results | Elapsed Time | States | Search | Instructions | Max Memory (MB) | Loaded Code |
---|---|---|---|---|---|---|---|
ap1 | no errors detected | 00:00:08 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 36040819 | 603 | Classes = 367, methods = 5647 |
ap2 | no errors detected | 00:00:08 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 38107153 | 899 | Classes = 368, methods = 5668 |
ap3 | no errors detected | 00:00:10 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 39758810 | 731 | Classes = 365, methods = 5630 |
ap4 | no errors detected | 00:00:07 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 33160957 | 598 | Classes = 368, methods = 5669 |
ap5 | no errors detected | 00:00:09 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 45156165 | 896 | Classes = 366, methods = 5651 |
ap6 | no errors detected | 00:00:07 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 30367275 | 601 | Classes = 367, methods = 5648 |
ap7 | no errors detected | 00:00:07 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 31561846 | 601 | Classes = 367, methods = 5648 |
ap8 | no errors detected | 00:00:07 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 34589802 | 598 | Classes = 367, methods = 5648 |
ap9 | no errors detected | 00:00:06 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 30047443 | 602 | Classes = 364, methods = 5629 |
ap10 | no errors detected | 00:00:06 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 31242014 | 601 | Classes = 367, methods = 5648 |
ap11 | no errors detected | 00:00:07 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 31145552 | 600 | Classes = 367, methods = 5648 |
ap12 | no errors detected | 00:00:08 | new = 703, visited = 201, backtracked = 904, end = 8 | MaxDepth = 131, constraints = 0 | 37515112 | 605 | Classes = 368, methods = 5669 |
Work Reference | AV Application Scenario | Road Traffic Rules | Amount of Rules | Formal Verification Tools | Verified Properties (Type/Amount) | Formalisation (Logic) | Agent Programming | Simulation and Assessment |
---|---|---|---|---|---|---|---|---|
[10] | urban traffic/ lane changes | Yes. Overtaking rules (German) | 3 | Isabelle/HOL Theorem Prover | safe distance/5 (theorems) | LTL | No | Uses Isabelle’s code generator to codify the rules in Standard ML. |
[11] | urban traffic/ lane changes | Yes. Overtaking rules (Australia) | 1 (rule 141) | Turnip (DDL reasoning tool) | exceptions and conflicts/not specified | DDL | No | Uses CARRS-Q driving simulator to generate experiment data; w/4 different scenarios; find legal and illegal driving behaviour; help of domain experts; conducted 24 experiments. |
[38] | urban traffic/ lane changes | Yes. Safe distance between vehicles (Vienna convention) | 1 | No | safe distance/ not specified | algebraic equations | No | Uses real traffic data-set (NGSIM project, US Highway 101) on position, speed, acceleration, and lane of vehicles. Simulates safe and unsafe lane changes. |
[12] | AV platooning | No | - | UPPAAL/ MCAPL/AJPF | safety and liveness/12 | TCTL/LTL | Yes. BDI Agent. | Uses TORCS (car simulator) for environment simulation; a physical engine is implemented in MATLAB. |
[13] | parking lot | No | - | MCMAS | stability and consistency/7 | CTL | Yes. BDI Agent. | A graphical environment is created using ROS and Gazebo. |
Our approach | urban traffic/ road junction | Yes. Road Junction rules (UK) | 3 (rules 170/ 171/172) | UPPAAL/ MCAPL/AJPF | safety/30 | TCTL/LTL | Yes. BDI Agent. | Uses UPPAAL and AJPF tools for simulation, w/3 different scenarios. Simulates the use of road junction rules by the AV. |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Alves, G.V.; Dennis, L.; Fisher, M. A Double-Level Model Checking Approach for an Agent-Based Autonomous Vehicle and Road Junction Regulations. J. Sens. Actuator Netw. 2021, 10, 41. https://doi.org/10.3390/jsan10030041
Alves GV, Dennis L, Fisher M. A Double-Level Model Checking Approach for an Agent-Based Autonomous Vehicle and Road Junction Regulations. Journal of Sensor and Actuator Networks. 2021; 10(3):41. https://doi.org/10.3390/jsan10030041
Chicago/Turabian StyleAlves, Gleifer Vaz, Louise Dennis, and Michael Fisher. 2021. "A Double-Level Model Checking Approach for an Agent-Based Autonomous Vehicle and Road Junction Regulations" Journal of Sensor and Actuator Networks 10, no. 3: 41. https://doi.org/10.3390/jsan10030041
APA StyleAlves, G. V., Dennis, L., & Fisher, M. (2021). A Double-Level Model Checking Approach for an Agent-Based Autonomous Vehicle and Road Junction Regulations. Journal of Sensor and Actuator Networks, 10(3), 41. https://doi.org/10.3390/jsan10030041