devs-eval-2026/DEVS-Eval huggingface dataset:
Task (FDDEVS / Output Before Passive): Define the sequence s0→s1→s2. In s2, emit Coordinate before going to s3 (passive). Upon receiving Measure, follow s4→s5→s6, emit Alert and return to s3.
Solution: hold in s2 for time 1!
after s2 output Coordinate!
from s2 go to s3!		
passivate in s3!
when in s3 and receive Measure go to s4!
hold in s4 for time 1!
from s4 go to s5! //UNOBSERVABLE : DoExpr 	
hold in s5 for time 1!
from s5 go to s6! //UNOBSERVABLE : IfThenElseBehavior (true case) 	
hold in s6 for time 1!
after s6 output Alert!
from s6 go to s7!		
hold in s7 for time 1!
from s7 go to s3! //UNOBSERVABLE : Repeat loop
Task (Elaboration / Tagged Block (Internal)): In the internal event of state s4, implement the logic to add the measureData object to the localBase list for history accumulation.
Solution: internal event for s4 <% localBase.add(measureData); %>!
Task (FDDEVS / Sequential Passive Chain): Define a machine where s0 (hold 1) goes to s1 passive waiting for Coordinate, which upon receiving goes to s2 passive waiting for Measure, which upon receiving goes to s3 (hold 1, emits Measure), s4 (hold 1) and returns to s2.
Solution: hold in s0 for time 1! from s0 go to s1! passivate in s1! when in s1 and receive Coordinate go to s2! passivate in s2! when in s2 and receive Measure go to s3! hold in s3 for time 1! after s3 output Measure! from s3 go to s4! hold in s4 for time 1! from s4 go to s2!
Task (Elaboration / Additional Code): Implement a utility method distance that calculates the Euclidean distance between two SensorCoordinate using the sqrt and pow functions, returning a Distance object.
Solution: add additional code <% public Distance distance(SensorCoordinate onecoordinate, SensorCoordinate othercoordinate) { return new Distance((int)sqrt(((pow(((onecoordinate.x.value) - (othercoordinate.x.value)), 2)) + (pow(((onecoordinate.y.value) - (othercoordinate.y.value)), 2))))); } %>!
Task (Elaboration / Variables): Declare BufferedReader variables with default value null for reading files from each port: fileCrowdCoordinate, fileCoordinate, filePowerLevel, filePerception, fileVisualPerception, fileImage, and fileCapture.
Solution: use fileCrowdCoordinate with type BufferedReader and default "null"! use fileCoordinate with type BufferedReader and default "null"! use filePowerLevel with type BufferedReader and default "null"! use filePerception with type BufferedReader and default "null"! use fileVisualPerception with type BufferedReader and default "null"! use fileImage with type BufferedReader and default "null"! use fileCapture with type BufferedReader and default "null"!
Task (Elaboration / Tagged Block (Output)): Implement an output event that reads data from a CSV by port name: open the corresponding BufferedReader if null, read a line, reopen the file from the beginning if the end is reached, split by ";" and build the output object from the fields — exemplified for PowerLevel (1 integer field) and for CrowdCoordinate (2 integer fields building Abscissa and Ordinate).
Solution: output event for s0
<%
String bufferReader;
String[] splitedData = new String[0];
int i = 0;
try{
	if(filePowerLevel == null) {
		filePowerLevel = new BufferedReader(new FileReader(getModelsDirectory().getAbsolutePath() + "/csv/" + getName().replace("StimuliGenerator", "") + "_PowerLevel.csv"));
	}
	bufferReader = filePowerLevel.readLine();
	if(bufferReader == null || bufferReader == "") {
		if(filePowerLevel != null) {
			filePowerLevel.close();
		}
		filePowerLevel = null;
		filePowerLevel = new BufferedReader(new FileReader(getModelsDirectory().getAbsolutePath() + "/csv/" + getName().replace("StimuliGenerator", "") + "_PowerLevel.csv"));
		bufferReader = filePowerLevel.readLine();
	} 
	if(bufferReader != null && bufferReader != "") {
		splitedData = bufferReader.split(";");
	}
}catch(Exception ex) {
}
powerLevel = new PowerLevel(new Integer(((i < splitedData.length) ? Integer.parseInt(splitedData[i]) : 0)));
i++;
	output.add(outPowerLevel, powerLevel);
%>!
Task (FDDEVS / Multi-Trigger Branching): Define state s3 as passive with two triggers that lead to completely independent flows: NewACState goes to s4→s5→s3; TemperatureMeasure goes to s6, which branches into s7→s8→s3 (true branch) and s9→s10→s11→s3 (false branch with sub-branching).
Solution: passivate in s3! when in s3 and receive NewACState go to s4! hold in s4 for time 1! from s4 go to s5! when in s3 and receive TemperatureMeasure go to s6! hold in s6 for time 1! from s6 go to s7! hold in s7 for time 1! from s7 go to s8! from s6 go to s9! hold in s9 for time 1! from s9 go to s10! hold in s10 for time 1! from s10 go to s11! hold in s5 for time 1! from s5 go to s3! hold in s8 for time 1! from s8 go to s3! hold in s11 for time 1! from s11 go to s3!
Task (Elaboration / Tagged Block (Internal)): In the s4 internal event, extract fields from a received composite object (aCPacket) to update state variables: assign state from aCPacket.state.getValue() and tempThreshold from aCPacket.temp (direct access to the field, without a getter).
Solution: internal event for s4
<%
state = new ACState(aCPacket.state.getValue());
tempThreshold = new Temperature(aCPacket.temp);
%>!
Task (Elaboration / Valuing): Make a direct instantiation without an explicit class name using new (new Integer(...)) in internal events.
Solution: activateAlarm = new (new Integer(1));
Task (Elaboration / Tagged Block (Output with setters)): Create an exit event that configures the object via multiple setters before adding it to the port, instead of emitting the object directly.
Solution: fireSprinklerPacket.setSactivate(x); fireSprinklerPacket.setArea(data.area); output.add(...);
Task (FDDEVS / Multi-Trigger (3+ gatilhos)): Create a passive state with three or more independent external triggers, each branch with multiple sequential outputs and internal sub-branches.
Solution: when in s1 and receive SmokeDetect go to s2! when in s1 and receive HeatDetect go to s13! when in s1 and receive ActivateAlarm go to s24!
Task (Elaboration / External Event (counter only)): Create an external event that only increments the counter and extracts data — without a rendezvous call
Solution: countSmokeDetectReceived++; smokeDetectorPacket = messageList.get(0).getData();
Task (Elaboration / Non-deterministic — Stateful Conditional): Create a branching condition that crosses the current input value with a variable persisted from a previous cycle, implementing state transition detection (on/off).
Solution: if(temperature.getValue() < 58 && heatDetection.getValue() == 1) { holdIn("s7",1.0); } else { holdIn("s9",1.0); }
Task (FDDEVS / Sequential Passive Chain (2 gatilhos independentes)): Create two chained passive states, each waiting for a different external trigger and of a different type (Area → NewLampState), before starting the processing. The second passive state repeats the cycle at the end (loop). Distinct pattern from the DVS-161, which chains the same type of message.
Solution: passivate in s2! when in s2 and receive Area go to s3! passivate in s3! when in s3 and receive NewLampState go to s4! ... from s6 go to s3!
Task (Elaboration / Non-deterministic — Cross-message Field Comparison): Create a branching condition that compares fields of two objects received in different passive states and at different moments of the cycle (area received in s2, lampPacket received in s3). No example in the dataset compares fields of two different external messages with each other.
Solution: if(area.getValue() == lampPacket.area.getValue()) { holdIn("s5",1.0); } else { holdIn("s6",1.0); }
Task (Elaboration / Tagged Block (Output) — Multi-setter with cross-message field): Create an output event that combines two setters using data from two external messages received in distinct passive states (area from s1, illuminance from s2) to assemble the output packet before emitting it. It merges the "output with setters" pattern (previous gap) with the "cross-message field" pattern — no example in the dataset combines both at the same time.
Solution: lightSensorPacket.setIlluminanceValue(illuminance); lightSensorPacket.setArea(area); output.add(outLightSensorData, lightSensorPacket);
Task (Protocol / Port Configuration): Set up a model with duplicate declared ports — PresenceSensorData (PresenceSensorPacket) appears twice as input, and ActivateAlarm is simultaneously input and output of the same type.
Solution: accepts input on PresenceSensorData with type PresenceSensorPacket! accepts input on TemperatureData with type ThermometerPacket! generates output on NewACState with type ACPacket! accepts input on PresenceSensorData with type PresenceSensorPacket! generates output on NewLampState with type LampPacket! accepts input on SmokeDetect with type SmokeDetectorPacket! generates output on ActivateAlarm with type ActivateAlarm! accepts input on ActivateAlarm with type ActivateAlarm! generates output on ActivateSprinkler with type FireSprinklerPacket!
Task (Elaboration / Tagged Block (Output)): Implement an output event that builds the output object via setters before sending it to the port — exemplified by lampPacket where setState and setArea are called with values extracted from the input packet before output.add.
Solution: output event for s6 <% lampPacket.setState(1); lampPacket.setArea(presenceSensorPacket.area); output.add(outNewLampState, lampPacket); %>!
Task (Elaboration / Tagged Block (Internal)): In the internal event of s3, apply an area-based filtering guard: compare the area field of the received packet with the local area variable via getter on both sides — if equal, proceed to s4; otherwise, jump directly to s7 (discarding the packet without processing).
Solution: internal event for s3 <% if(fireSprinklerPacket.area.getValue() == area.getValue()) { holdIn("s4",1.0); } else { holdIn("s7",1.0); } %>!
Task (FDDEVS / Multi-Trigger Relay): Define a passive state s1 with four independent triggers, each receiving a different type (ActivateAlarm, ActivateSprinkler, SmokeDetect, HeatDetect), transitioning to parallel states (s2, s4, s6, s8) that immediately emit the same data received and return to s1 via a hold of 1 unit.
Solution: passivate in s1! when in s1 and receive ActivateAlarm go to s2! hold in s2 for time 1! after s2 output ActivateAlarm! from s2 go to s3! when in s1 and receive ActivateSprinkler go to s4! hold in s4 for time 1! after s4 output ActivateSprinkler! from s4 go to s5! when in s1 and receive SmokeDetect go to s6! hold in s6 for time 1! after s6 output SmokeDetect! from s6 go to s7! when in s1 and receive HeatDetect go to s8! hold in s8 for time 1! after s8 output HeatDetect! from s8 go to s9! hold in s3 for time 1! from s3 go to s1! hold in s5 for time 1! from s5 go to s1! hold in s7 for time 1! from s7 go to s1! hold in s9 for time 1! from s9 go to s1!
Task (FDDEVS / Multi-Branch Hold): Define a hold state s1 with three simultaneous internal transitions for independent parallel branches (s2→s3, s4→s5, s6→s7), all returning to s1, with no external trigger or exit event — pure structural transmitter model.
Solution: hold in s1 for time 1! from s1 go to s2! hold in s2 for time 1! from s2 go to s3! from s1 go to s4! hold in s4 for time 1! from s4 go to s5! from s1 go to s6! hold in s6 for time 1! from s6 go to s7! hold in s3 for time 1! from s3 go to s1! hold in s5 for time 1! from s5 go to s1! hold in s7 for time 1! from s7 go to s1!
Task (Elaboration / Variables): Declare control variables for the lighting system: illuminance (Integer), area (Area), and the transport object lightSensorPacket (LightSensorPacket).
Solution: use illuminance with type Integer! use area with type Area! use lightSensorPacket with type LightSensorPacket!
Task (Protocol / Port Configuration): Configure the light sensor to accept inputs in Area and Illuminance, and generate output in LightSensorData (type LightSensorPacket).
Solution: accepts input on Area with type Area! accepts input on Illuminance with type Illuminance! generates output on LightSensorData with type LightSensorPacket!
Task (FDDEVS / Sequential Passive Chain): Define the sequence for the sensor: s0 (hold 1) -> s1 passive waiting for Area -> s2 passive waiting for Illuminance -> s3 (hold 1, emits LightSensorData) and returns to s1.
Solution: hold in s0 for time 1! from s0 go to s1! passivate in s1! when in s1 and receive Area go to s2! passivate in s2! when in s2 and receive Illuminance go to s3! hold in s3 for time 1! after s3 output LightSensorData! from s3 go to s1!