From a0396f07e4cf1e7e5d1fc301095070ee54e838a8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Thu, 11 Jan 2024 16:22:18 +0100 Subject: [PATCH] feat: added elevator example --- WebSocketClient/assets/uvlExamples.ts | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/WebSocketClient/assets/uvlExamples.ts b/WebSocketClient/assets/uvlExamples.ts index 922f5f2..1475a13 100644 --- a/WebSocketClient/assets/uvlExamples.ts +++ b/WebSocketClient/assets/uvlExamples.ts @@ -9,6 +9,7 @@ export function initExamples(editor: editor.IStandaloneCodeEditor) { initExample("Default", defaultExampleText); initExample("Ice Cream", iceCreamExampleText); initExample("Computer", computerExampleText); + initExample("Elevator", elevatorExampleText); } const defaultExampleText = `features @@ -75,6 +76,45 @@ constraints Dedicated => Liquid sum(powerConsumption) > 300 => StrongPSU` +const elevatorExampleText = `//Example from FeatureIDE Book +features + Elevator {abstract} + mandatory + Behavior {abstract} + mandatory + Modes {abstract} + alternative + Sabbath + FIFO + ShortestPath + optional + Service + Priorities {abstract} + or + RushHour + FloorPriority + PersonPriority + optional + VoiceOutput + CallButtons {abstract} + alternative + DirectedCall + UndirectedCall + Security {abstract} + mandatory + Permission {abstract} + or + FloorPermission + PermissionControl + Safety {abstract} + optional + Overloaded + +constraints + CallButtons | Sabbath + DirectedCall => ShortestPath + UndirectedCall => FIFO | ShortestPath` + function initExample(name: string, content: string){ const dropdown = document.getElementById("examples-dropdown"); const button = document.createElement("button");