devs-eval-2026/DEVS-Eval huggingface dataset:
Task (FDDEVS / Basic State): Define a passive state called 'IDLE'.
Solution: passivate in IDLE!
Task (FDDEVS / Basic State): Define a hold state called 'PROCESSING' for 5.7 time units.
Solution: hold in PROCESSING for time 5.7!
Task (FDDEVS / Initial State): Define the initial state of the model as a passive state called 'READY'.
Solution: to start passivate in READY!
Task (FDDEVS / Transition): Define an internal transition from state 'ACTIVE' to state 'FINISHED'.
Solution: from ACTIVE go to NEXT_STATE!
Task (FDDEVS / Output): Configure the model to send the message 'DONE' after state 'TASK_COMPLETED'.
Solution: after TASK_COMPLETED output DONE!
Task (FDDEVS / External Transition): Configure the model that when in state 'WAITING' and receiving the message 'START', transition to state 'RUNNING'.
Solution: when in WAITING and receive START go to RUNNING!
Task (SES / Decomposition): Configure the model that under the 'music' perspective, 'JazzBand' is composed of: 'BandLeader', 'RhythmSection', 'HornSection', and 'ReedSection'.
Solution: From the music perspective, JazzBand is made of BandLeader, RhythmSection, HornSection, and ReedSection!
Task (SES / Coupling): Configure the model that in the 'music' perspective, the 'BandLeader' sends the message 'PlayBeat' to the 'RhythmSection'.
Solution: From the music perspective, BandLeader sends PlayBeat to RhythmSection!
Task (SES / Hierarchical): Define that, under the 'dataGather' perspective, 'DataGatherPhase' is composed of 'getData' and 'validateData'.
Solution: From the dataGather perspective, DataGatherPhase is made of getData and validateData!
Task (SES / External Input Coupling): Configure the model that in the 'dataGather' perspective, the parent entity 'DataGatherPhase' sends 'ClearObjectives' to the component 'getData'.
Solution: From the dataGather perspective, DataGatherPhase sends ClearObjectives to getData!
Task (Elaboration / Data Type): Define an object 'Command' with attributes 'Mode' (String) and 'Duration' (TimeInterval).
Solution: A Command has a Mode and Duration! The range of Command’s Mode is String! The range of Command’s Duration is TimeInterval with default "new TimeInterval()"!
Task (Elaboration / Variables): Declare the use of a variable 'count' of type 'int' with default value "0".
Solution: use count with type int and default "0"!
Task (Elaboration / Tagged Block (Init)): Create an initialization block to set 'count' to 0 and instantiate 'wtd' as a new 'WorkToDo'.
Solution: Initialize variables <% count =0; wtd = new WorkToDo(); wtd.setId(count); wtd.setprocessingTime (20+count); %>!
Task (Elaboration / Tagged Block (Output)): Create in the output event of state 'generate', add 'wtd' to port 'outJob'.
Solution: output event for generate <% output.add(outJob, wtd); %>!
Task (Elaboration / Non-deterministic): Implement internal logic for state 'generate': increment 'count', and if 'count' is greater than or equal to 'numberOfJobs', transition to 'passive'; otherwise, create a new 'WorkToDo'.
Solution: Internal event for generate <% count ++; if (count>=numberOfJobs) passivateIn("passive"); else{ wtd = new WorkToDo(); wtd.setId(count); wtd.setProcessingTime(20+count); } %>!
Task (Specialization / Taxonomy): Create the component 'getData' can be 'immediateAccess', 'findInDataBase', or 'startResearch' in the 'meansToGetData' specialization.
Solution: getData can be immediateAccess, findInDataBase, or startResearch in meansToGetData!
Task (Specialization / Aspect Modification): Indicate that 'DataGatherPhase' can be 'Present' or 'NotPresent' in the 'presence' specialization.
Solution: DataGatherPhase can be Present or NotPresent in presence!
Task (Specialization / Multiple Specializations): Define that 'reuseFromRepository' can be 'local' or 'internet' (location) and also 'open' or 'restricted' (accessRights).
Solution: reuseFromRepository can be local or internet in location! reuseFromRepository can be open or restricted in accessRights!
Task (Variables / Range Constraints): Define that the height range of a 'boy' is of type double with values between 20 and 72.
Solution: The range of a boy’s height is double with values!
Task (Specialization / Pruning Values): Assign the range for the height of a 'short_boy' and the eye color 'grey'.
Solution: Set short_boy’s height to! Set short_boy’s eyeColor to grey!
Task (SES / Multi-Aspect): Define that, under the 'fastProcess' perspective, the system 'MSProcessSystem' is decomposed into: 'User', 'ClarifyObjectivesPhase', 'getModelFromRepository', 'ExecuteModelPhase', and 'InterpretResultsPhase'.
Solution: From the fastProcess perspective, MSProcessSystem is made of User, ClarifyObjectivesPhase, getModelFromRepository, ExecuteModelPhase, and InterpretResultsPhase!
Task (SES / Multi-Entity): In the 'multiPerson' aspect, define that the entity 'People' is composed of more than one 'Person'.
Solution: From the multiPerson perspective, People are made of more than one Person!
Task (SES / Uniform Coupling): Using uniform coupling, define that all 'Person' send the message 'Bye' to the instance 'id0_Person'.
Solution: From the top perspective, all Person sends Bye to id0_Person!
Task (SES / Broadcast Coupling): In the 'top' perspective, define that all 'Person' send the message 'Hello' to all 'Person' (except themselves).
Solution: From the top perspective, all Person sends Hello to all Person!
Task (SES / Pairwise Coupling): In the 'dating' perspective, define that each 'Boy' sends an 'Invitation' to each 'Girl'.
Solution: From the dating perspective, each Boy sends Invitation to each Girl!
Task (SES / One-to-All): In the 'dating' perspective, define that the component 'MatchMaker' sends 'MakeInvitation' to all 'Boy'.
Solution: From the dating perspective, MatchMaker sends MakeInvitation to all Boy!
Task (SES / All-to-One): In the 'dating' perspective, define that all 'Boy' send their 'Preference' to the 'MatchMaker'.
Solution: From the dating perspective, all Boy sends Preference to MatchMaker!
Task (SES / Specialized Restructuring): Perform multi-aspect restructuring using the 'index' specialization and define multiplicity for 4 instances of 'MonorailStation'.
Solution: restructure multi-aspects using index! set multiplicity of index as for MonorailStation!
Task (SES / Graph Coupling): Write a cyclic coupling specification for 'MonorailStation' based on the 'circle' graph using the 'index' specialization.
Solution: write cyclic specification for MonorailStation and index based on circle!
Task (SES / Directed Graph Logic): For the 'circle' graph, define that the left node (leftnode) sends 'Car' to the right node (rightnode).
Solution: for circle leftnode sends Car to rightnode!
Task (Inheritance / Instance Creation): In the 'SimpleWorkFlow' system, create two instances of 'GeneratorOfJobs' named 'First_GeneratorOfJobs' and 'Second_GeneratorOfJobs'.
Solution: From the top perspective, SimpleWorkFlow is made of First_GeneratorOfJobs, Second_GeneratorOfJobs, and ProcessorOfJobs!
Task (Inheritance / Explicit Base): In the pruning file, specify that the generated class should directly inherit from the 'Reactive' behavior.
Solution: inherit from Reactive!
Task (Elaboration / Method Override (Java)): Implement the method 'interpretNameAsPeriod' in Java to set the period to 50 if the name starts with "Slow" and 10 if it starts with "Fast".
Solution: private double Period; public void interpretNameAsPeriod() { if (name.startsWith("Slow")) { Period = 50; } else if (name.startsWith("Fast")) { Period = 10; } else { Period = 20; } }
Task (Protocol / Interface Def.): Define an object 'NamedMessage' with 'myName' (String) and 'myMessage' (MessageBag).
Solution: A NamedMessage has myName and myMessage! The range of NamedMessage’s myName is String! The range of NamedMessage’s myMessage is MessageBag!
Task (Protocol / Port Configuration): Configure the 'Simulator' to accept input on 'GetOutput' (type DoubleEnt) and produce output on 'MyOutput' (type NamedMessage).
Solution: accepts input on GetOutput with type DoubleEnt! generates output on MyOutput with type NamedMessage!
Task (FDDEVS / Protocol Logic (Coord)): In state 'sendGetTN', the Coordinator should send 'GetTN' and transition to 'waitForAllTN'.
Solution: after sendGetTN output GetTN! from sendGetTN go to waitForAllTN! passivate in waitForAllTN!
Task (FDDEVS / Protocol Logic (Sim)): The Simulator, upon receiving 'GetTN' in 'waitForGetTN', should transition to 'sendMyTN' and, after 0 seconds, send 'MyTN'.
Solution: when in waitForGetTN and receive GetTN go to sendMyTN! hold in sendMyTN for time 0! after sendMyTN output MyTN!
Task (FDDEVS / P/S Router Logic): Define the initial state of the router as 'waitForInput' and the transition upon receiving a 'PublishRequest'.
Solution: to start passivate in waitForInput! when in waitForInput and receive PublishRequest go to handlePublishRequest!
Task (FDDEVS / P/S Router Timing): Configure the processing time for 'handleSubscribeRequest' as 0.1 seconds, returning to 'waitForInput'.
Solution: hold in handleSubscribeRequest for time .1! from handleSubscribeRequest go to waitForInput!
Task (Elaboration / Relation Declarations): Declare the use of three relations ('Relation') for the router: 'PublisherTopic', 'TopicSubscriber', and 'TopicValue'.
Solution: use PublisherTopic with type Relation and default "new Relation()"! use TopicSubscriber with type Relation and default "new Relation()"! use TopicValue with type Relation and default "new Relation()"!
Task (Elaboration / External Event (P/S)): Implement Java logic to process a 'SubscribeRequest': extract the subscriber and topic, store them in the relation, and add dynamic coupling in the parent model.
Solution: external event for waitForInput with SubscribeRequest <% for (int j = 0; j < messageList.size(); j++){ SubscribeRequest = messageList.get(j).getData(); String subscriber = (String) SubscribeRequest.getKey(); String topic = (String) SubscribeRequest.getValue(); TopicSubscriber.put(new PairOfString(topic, subscriber)); CoupledModelImpl parent = (CoupledModelImpl)this.getParent(); parent.addCoupling(this.getName(),"out"+topic,subscriber,"in"+topic); } %>!
Task (SES / Attribute Domains): In the car purchasing SES, define that 'Vehicle' has attributes 'VIN' (int) and 'Weight' (double).
Solution: Vehicle has VIN and Weight! The range of Vehicle’s VIN is int! The range of Vehicle’s Weight is double!
Task (SES / Hierarchy & Logic): Define that 'Ford' can be of models 'Fusion' or 'Focus', and 'Buyer' has 'Name', 'SSN', and 'Address' as strings.
Solution: Ford can be Fusion or Focus in model! Buyer has Name, SSN, and Address! The range of Buyer’s Name is string! The range of Buyer’s SSN is string! The range of Buyer’s Address is string!
Task (Mapping / Value Transfer): Map the value of attribute 'EventTime' from SES 'PacketInfo' to attribute 'EventTime' of SES 'EventInfo'.
Solution: transfer PacketInfo’s EventTime value to EventInfo’s EventTime
Task (Mapping / Contextual Transfer): Transfer the 'IPAddress' from 'AddressSection' specifically under 'DestHost' to the 'IPAddress' of 'DestIp'.
Solution: transfer AddressSection’s IPAddress under DestHost to DestIp’s IPAddress
Task (Mapping / Multi-Entity Index): Transfer the 'portNumber' from the first instance (index 0) of 'Port' under 'SrcHost' to the 'portNumber' of 'SrcPort'.
Solution: transfer Port.0’s portNumber under Ports under SrcHost to SrcPort’s portNumber
Task (Mapping / Multi-aspect Pairing): Establish a correspondence between occurrences of the 'source' entity and those of the 'target'.
Solution: pairUp <source>’s <entity> with <target>’s <entity>
Task (Elaboration / XML Generation): Implement the internal event to generate a new PES and XML instance from a packet SES file, incrementing the counter.
Solution: Internal event for sendOutput <% generatePrunings.setSeed(6879345 + count * 9); String XMLFile = util.ContentsWork.createNewXMLInst("DataHandling", "PacketInfoSes.txt", "PacketInfoPrune.txt"); sp = new SesPesPair(); sp.setXMLFile(XMLFile); count ++; %>!
Task (FDDEVS / Distributed Logic): In the 'MapNDistribute' model, define the transition: upon receiving 'DataRequest' in state 'waitforDataRequest', transition to 'sendLANDXML'.
Solution: when in waitforDataRequest and receive DataRequest go to sendLANDXML! hold in sendLANDXML for time 1! after sendLANDXML output LANDXML!
Task (Elaboration / Dynamic Model Mgmt): Implement Java logic to dynamically add a child model ('storedActor') and create its couplings upon receiving a message.
Solution: external event for waitForActor with Actor <% storedActor = messageList.get(0).getData(); CoupledModelImpl parent = (CoupledModelImpl) this.getParent(); parent.addChildModel(storedActor); parent.addCoupling(this.getName(),"outHello","Actor","inHello"); %>!
Task (SES / Multi-level Decomp): In the satellite SES, define that under the 'activity' perspective, 'SatelliteModule' is composed of: 'Energizing', 'Propulsing', 'Communicating', 'Navigating', 'Controlling', and 'Sensing'.
Solution: From the activity perspective, SatelliteModule is made of Energizing, Propulsing, Communicating, Navigating, Controlling, and Sensing!
Task (SES / Nested Spec): Define that 'Sensor' can be 'Visual', 'InfraRed', 'Radar', or 'MultiCapability' in the 'EMType' specialization.
Solution: Sensor can be Visual, InfraRed, Radar, or MultiCapability in EMType!
Task (Pruning / Context Selection): Perform a pruning operation to select 'Radar' from the 'EMType' specialization for all 'Sensor'.
Solution: select Radar from EMType for Sensor!
Task (Pruning / Restructuring): Use a restructuring operation to eliminate the 'Radar' option wherever 'Sensor' occurs in the SES.
Solution: don’t select Radar under Sensor!
Task (Pruning / Count Bounds): Establish a constraint to accept only PESs that have between 0 and 2 instances of 'Visual_Sensor'.
Solution: set count bounds for Visual_Sensor as!
Task (Pruning / Monolithic vs Cluster): Define count bounds for 'SatelliteModule' as exactly 1 for a monolithic case and between 3 and 6 for a cluster.
Solution: set count bounds for SatelliteModule as! set count bounds for SatelliteModule as!
Task (Pruning / Presence Logic): Use the 'presence' specialization to ensure that 'CommInterSatelliteLink' is present in the PES.
Solution: select Present from presence for CommInterSatelliteLink!
Task (SES / Physical Model Def): In the SES of the physical model 'FrontierPMS', define that 'SatelliteModule' has an attribute 'ID' of type int.
Solution: SatelliteModule has ID! The range of SatelliteModule’s ID is int!
Task (SES / Module Taxonomy): Define that a 'SatelliteModule' can be an 'ImageSat' or a 'RelaySat' in the 'moduleType' specialization.
Solution: SatelliteModule can be ImageSat or RelaySat in moduleType!
Task (SES / Domain Attributes): In the 'image' perspective, define that 'ImageSat' is composed of 'SensorModule', 'CommModule', and 'Orbit', and assign to 'SensorModule' the fields 'fov', 'viewRange', and 'imageBits'.
Solution: From the image perspective, ImageSat is made of SensorModule, CommModule, and Orbit! SensorModule has fov, viewRange, and imageBits!
Task (SES / Distributed Protocol): In the 'DEVSDistributedSim' SES, define that the 'Coordinator' sends 'GetTN', 'GetOutput', 'StoreInput', and 'DoDelta' to all 'Simulator' (all).
Solution: From the protocol perspective, Coordinator sends GetTN to all Simulator! From the protocol perspective, Coordinator sends GetOutput to all Simulator! From the protocol perspective, Coordinator sends StoreInput to all Simulator! From the protocol perspective, Coordinator sends DoDelta to all Simulator!
Task (FDDEVS / Peer Coordinator): In the 'CoordinatorPeer', after receiving 'MyTN', the model should transition to 'sendSendOutput' with time 0 and generate output 'SendOutput'.
Solution: when in waitForAllTN and receive MyTN go to sendSendOutput! hold in sendSendOutput for time 0! after sendSendOutput output SendOutput!
Task (FDDEVS / Peer Simulator): The 'SimulatorPeer', upon receiving 'SendOutput', should transition to 'sendMyOutput', wait 0 seconds, and transition to 'waitForStoreInput'.
Solution: when in waitForGetSendOutput and receive SendOutput go to sendMyOutput! hold in sendMyOutput for time 0! after sendMyOutput output MyOutput! from sendMyOutput go to waitForStoreInput!
Task (SES / P2P Coupling): In the 'protocolPeer' perspective, define direct coupling where all 'SimulatorPeer' send 'outMyOutput' to all others as 'inStoreInput'.
Solution: From the protocolPeer perspective, all SimulatorPeer sends outMyOutput to all SimulatorPeer as inStoreInput!
Task (FDDEVS / Real-Time Sim): In 'SimulatorRTPeer', define that the model waits in 'sendMyOutput' for 'modelTimeAdvance' time and, upon receiving 'Stop', returns to 'waitForStart'.
Solution: hold in sendMyOutput for time "modelTimeAdvance"! after sendMyOutput output MyOutput! when in sendMyOutput and receive Stop go to waitForStart!
Task (Elaboration / Sim Variables): Declare state variables 'tN', 'tL', and 't' as double, and 'myModel' as 'AtomicModelImpl'.
Solution: use tN with type double! use tL with type double! use t with type double! use myModel with type AtomicModelImpl!
Task (Elaboration / Sim Initialization): Implement Simulator initialization: instantiate 'myModel', call 'initialize()', set 'tL' to 0, and compute 'tN' as 'tL' plus the model time advance.
Solution: Initialize variables <% myModel = new AtomicModelImpl("MyModel"); myModel.initialize(); tL = 0; tN = tL + myModel.getTimeAdvance(); t = 0; %>!
Task (Elaboration / Sim External Event): In the Simulator, upon receiving 'GetOutput', extract the current time value from the message and store it in variable 't'.
Solution: external event for waitForGetOutput with GetOutput <% $t = messageList.get(0).getData().getValue();$ %>!
Task (Elaboration / Sim Output Event): Implement the output event 'sendMyOutput': create a 'NamedMessage' with the model name and the result of 'computeOutput(t)', adding it to the output port.
Solution: output event for sendMyOutput <% NamedMessage sm = new NamedMessage(getName(),computeOutput(t)); output.add(outMyOutput,sm); %>!
Task (Elaboration / Coord External Event): In the Coordinator, implement logic to reset 'tN' to the maximum value when starting to collect next-event times from simulators.
Solution: external event for waitForAllTN with MyTN <% tN = Double.MAX_VALUE; %>!
Task (SES / Dynamic Structure): Set the SES to 'AgentAndActor' in the 'dynamic' perspective, where the coupling allows the system to send an 'Actor' to the 'Agent' and vice versa.
Solution: From the dynamic perspective, AgentAndActor is made of Agent! From the dynamic perspective, AgentAndActor sends Actor to Agent! From the dynamic perspective, Agent sends Actor to AgentAndActor!
Task (Elaboration / Dynamic Model Mgmt): Use the dynamic structure method to add the 'Actor' model as a child of the current coupled model.
Implement the command to create a coupling between the output port 'outHello' of the current Agent (this) and the input port 'inHello' of the 'Actor' component.
Solution: addChildModel(Actor);
Task (Elaboration / Dynamic Coupling): Implement the command to create a coupling between the output port 'outHello' of the current Agent (this) and the input port 'inHello' of the 'Actor' component.
Solution: addCoupling(this.getName(), "outHello", "Actor", "inHello");
Task (Elaboration / Model Removal): Use the correct method to remove the 'Actor' model from the simulation system.
Solution: removeChildModel(Actor);
Task (FDDEVS / Publisher Init): Set the initial state of a 'Publisher' that waits 0 seconds to issue a 'PublishRequest'.
Solution: to start hold in doPublishRequest for time 0.0! after doPublishRequest output PublishRequest!
Task (FDDEVS / Topic Update): In 'Publisher', after the publication request, move to 'sendTopicUpdate' with an update cycle of 10 time units.
Solution: from doPublishRequest go to sendTopicUpdate! hold in sendTopicUpdate for time 10.0! after sendTopicUpdate output TopicUpdate! from sendTopicUpdate go to sendTopicUpdate!
Task (FDDEVS / Subscriber Init): Set the initial behavior of a 'Subscriber': wait 1 second and then generate a 'SubscribeRequest'.
Solution: to start hold in doSubscribeRequest for time 1! after doSubscribeRequest output SubscribeRequest!
Task (FDDEVS / Subscriber Passive): After the registration request, the 'Subscriber' must remain idle in the 'waitForUpdateToSubscribers' state until it receives an update.
Solution: from doSubscribeRequest go to waitForUpdateToSubscribers! passivate in waitForUpdateToSubscribers!
Task (FDDEVS / Subscriber Loop): Set the 'Subscriber' to return to the waiting state whenever it receives the 'UpdateToSubscribers' message.
Solution: when in waitForUpdateToSubscribers and receive UpdateToSubscribers go to waitForUpdateToSubscribers!
Task (Elaboration / Data Type): Define an Abscissa object with the attribute value of type Integer and declare a variable abscissa of this type.
Solution: A Abscissa has a value! the range of Abscissa's value is Integer! use abscissa with type Abscissa!
Task (Elaboration / Data Type): Define an Ordinate object with the attribute value of type Integer and declare a variable ordinate of this type.
Solution: A Ordinate has a value! the range of Ordinate's value is Integer! use ordinate with type Ordinate!
Task (Elaboration / Data Type): Define a composite object CrowdCoordinate with the attributes x (Abscissa) and y (Ordinate), and declare the corresponding variable.
Solution: A CrowdCoordinate has x and y! the range of CrowdCoordinate's x is Abscissa! the range of CrowdCoordinate's y is Ordinate! use crowdCoordinate with type CrowdCoordinate!
Task (Elaboration / Data Type): Define an Image object with the attributes name and extension of type String, and declare the corresponding variable.
Solution: A Image has name and extension! the range of Image's name is String! the range of Image's extension is String! use image with type Image!
Task (Elaboration / Data Type): Define the PowerLevel and PowerThreshold objects, both with an attribute value of type Integer, and declare their variables.
Solution: A PowerLevel has a value! use powerLevel with type PowerLevel! A PowerThreshold has a value! use powerThreshold with type PowerThreshold!
Task (Elaboration / Data Type): Define a Perception object with the attributes value, valueMin, and valueMax of type Integer, and a PerceptionThreshold with an integer value.
Solution: A Perception has a value, valueMin and valueMax! ... use perceptionThreshold with type PerceptionThreshold!
Task (Elaboration / Tagged Block (Init)): Initialize the sensor variables: generate random numbers and instantiate objects with initial values (Perception valueMax=6, Threshold 0).
Solution: <%
java.util.Random generator = new java.util.Random(); //in case of necessity to coordinate generation
int number1 = generator.nextInt(10);
int number2 = generator.nextInt(10);
 abscissa = new Abscissa(new Integer(0));
 ordinate = new Ordinate(new Integer(0));
 crowdCoordinate = new CrowdCoordinate(new Abscissa(new Integer(0)),new Ordinate(new Integer(0)));
 image = new Image(new String(),new String());
 powerLevel = new PowerLevel(new Integer(0));
 powerThreshold = new PowerThreshold(new Integer(0));
 perception = new Perception(new Integer(0), new Integer(0),new Integer(6));
 perceptionThreshold = new PerceptionThreshold(new Integer(0));
%>!
Task (Protocol / Port Configuration): Set the sensor to generate output on the PowerLevel, VisualPerception, Capture, and Coordinate ports with their respective types.
Solution: generates output on PowerLevel with type PowerLevel!
generates output on VisualPerception with type Perception!
generates output on Capture with type Image!
generates output on Coordinate with type CrowdCoordinate!
Task (FDEVS / Cyclic State Machine): Define a cycle of states s0→s1→s2→s3→s4→s0, with specific durations and outputs mapped for each initial state.
Solution: to start hold in s0 for time 2!
after s0 output PowerLevel!
from s0 go to s1!
hold in s1 for time 1!
after s1 output VisualPerception!
from s1 go to s2!
hold in s2 for time 1!
after s2 output Capture!
from s2 go to s3!
hold in s3 for time 1!
after s3 output Coordinate!
from s3 go to s4!
hold in s4 for time 1!
from s4 go to s0!
output event for s0