• In Phase 1, LLM1 extracts the useful information in an accident report and records them into an interactive pattern sequence (IPS);
• In Phase 2, taking an IPS as input, LLM2 translates it into a logical scenario represented in Domain Specific Language (DSL).
• DI is a sequence initial actions, where Vi is a vehicle, followed by a natural language description about the states and the intended action of Vi .
⟨Vi⟩ : { initial states and actions of Vi }
• DP is a sequence of interactive patterns, where Vi and Vj are two vehicles, followed by a description about the actions of Vi and Vj w.r.t. their interaction:
⟨Vi ,Vj⟩ : {actions of Vi and Vj related to interaction}
Additionally, the extracted interactive pattern sequences undergo a syntactic legality check to ensure correct formatting as stated above. This step primarily verifies that the elements in ⟨⟩ and ⟨,⟩ are all vehicles and that there are two vehicles participating in interactive patterns. This is necessary because the LLM might incorrectly extract interactive patterns, e.g., involving one vehicle and a static object such as a stone or road boundary.
• We first check if the parameter ranges generated by the LLM are valid. This mainly involves checking the validity of initial positions of vehicles: if two vehicles are in the same lane, we require that the minimum possible distance between them exceeds a certain threshold to avoid an initial collision; if two vehicles are not in the same lane, there is no such constraint;