Skip to content

Commit

Permalink
Merge branch 'feat/DiffEdtiorForUvlTutorial' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	WebSocketClient/assets/uvlTutorialContent.ts
  • Loading branch information
JannisDommer committed Jan 10, 2024
2 parents 8d890c9 + eb90b3f commit 34683db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions WebSocketClient/assets/uvlTutorialContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const tutorialContent = [{
text: "<p>Welcome to the UVL Tutorial! </br>All code listings will automatically be placed in the editor on the left. Click <b>'Next'</b> to start the tutorial.</p>"
}, {
title: "Basic Feature Model",
text: "<p>Start with the <b><tt>features</tt></b> key word to start enumerating your features. Indentations matter in UVL and represent the tree structure.</br>We will start with a basic feature model that represents a computer. Every computer needs a CPU and can optionally have some devices connected via SATA.</p>",
text: "<p>Start with the <b><code>features</code></b> key word to start enumerating your features. Indentations matter in UVL and represent the tree structure.</br>We will start with a basic feature model that represents a computer. Every computer needs a CPU and can optionally have some devices connected via SATA.</p>",
codeListing: `features
Computer
mandatory
Expand All @@ -12,7 +12,7 @@ export const tutorialContent = [{
SATADevices`
}, {
title: "Special Feature Names",
text: "<p>To use special characters or spaces in feature names use <b><tt>\"</tt></b> to enclose the names.</br>In this example we write <b><tt>SATA-Devices</tt></b> with a dash instead of <b><tt>SATADevices</tt></b>.</p>",
text: "<p>To use special characters or spaces in feature names use <b><code>\"</code></b> to enclose the names.</br>In this example we write <b><code>SATA-Devices</code></b> with a dash instead of <b><code>SATADevices</code></b>.</p>",
codeListing: `features
Computer
mandatory
Expand All @@ -21,7 +21,7 @@ export const tutorialContent = [{
"SATA-Devices"`
}, {
title: "Basic Constraints",
text: "<p>Use the <b><tt>constraints</tt></b> keyword to start the section of constraints. In its basic form, a constraint uses propositional logic.</br>In this example, we enforce that if a computer contains a dedicated graphics card, it must also use liquid cooling. We do that with the <b><tt>=></tt></b> symbol to represent an implication.</br>Other logic connectors are <b><tt>&</tt></b>, <b><tt>|</tt></b>, <b><tt>not</tt></b></p>",
text: "<p>Use the <b><code>constraints</code></b> keyword to start the section of constraints. In its basic form, a constraint uses propositional logic.</br>In this example, we enforce that if a computer contains a dedicated graphics card, it must also use liquid cooling. We do that with the <b><code>=></code></b> symbol to represent an implication.</br>Other logic connectors are <b><code>&</code></b>, <b><code>|</code></b>, <b><code>not</code></b></p>",
codeListing: `features
Computer
mandatory
Expand All @@ -41,7 +41,7 @@ constraints
Dedicated => Liquid`
}, {
title: "Feature Attributes",
text: "<p>Features can have attributes in curly brackets as key value pairs. The value can be omitted if it is a boolean attribute and the value is true. This is the case for the <b><tt>abstract</tt></b> attribute in the feature <b><tt>Computer</tt></b>. We also use attributes to indicate the power consumption of different parts of the computer.</p>",
text: "<p>Features can have attributes in curly brackets as key value pairs. The value can be omitted if it is a boolean attribute and the value is true. This is the case for the <b><code>abstract</code></b> attribute in the feature <b><code>Computer</code></b>. We also use attributes to indicate the power consumption of different parts of the computer.</p>",
codeListing: `features
Computer {abstract}
mandatory
Expand All @@ -61,7 +61,7 @@ constraints
Dedicated => Liquid`
}, {
title: "Complex Constraints",
text: "<p>We can now create more complex constraints and for example access attributes of features. In this case we use the aggregate function <b><tt>sum</tt></b> to sum over all powerConsumption attributes and check if the overall <b><tt>powerConsumption</tt></b> is larger than a threshold and if so enforce a stronger power supply unit. You could also access feature attributes and perform basic calculations with them.</p>",
text: "<p>We can now create more complex constraints and for example access attributes of features. In this case we use the aggregate function <b><code>sum</code></b> to sum over all powerConsumption attributes and check if the overall <b><code>powerConsumption</code></b> is larger than a threshold and if so enforce a stronger power supply unit. You could also access feature attributes and perform basic calculations with them.</p>",
codeListing: `features
Computer {abstract}
mandatory
Expand All @@ -86,7 +86,7 @@ constraints
sum(powerConsumption) > 300 => StrongPSU`
}, {
title: "Group Cardinality",
text: "<p>Group cardinalities are more generic than <b><tt>or</tt></b> and <b><tt>alternative</tt></b>.</br>In our example, the motherboard only has space for up to 2 SATA-Devices. So we enforce that there are 0, 1, or 2 SATA-Devices.</p>",
text: "<p>Group cardinalities are more generic than <b><code>or</code></b> and <b><code>alternative</code></b>.</br>In our example, the motherboard only has space for up to 2 SATA-Devices. So we enforce that there are 0, 1, or 2 SATA-Devices.</p>",
codeListing: `features
Computer {abstract}
mandatory
Expand Down Expand Up @@ -145,7 +145,7 @@ constraints
sum(powerConsumption) > 300 => StrongPSU`
}, {
title: "Types",
text: "<p>In UVL, you can use types to create special features. In this case, we change the power supply unit. It has a <b><tt>Manufacturer</tt></b> feature of the type <b><tt>String</tt></b> and a <b><tt>Watt</tt></b> feature of the type <b><tt>Integer</tt></b>.</br>This means, when configuring the feature model, the features are not just selected or deselected, but get a value of their corresponding type. We can utilize this for even more complex constraints and check if the manufacturer of the CPU and the PSU match.</p>",
text: "<p>In UVL, you can use types to create special features. In this case, we change the power supply unit. It has a <b><code>Manufacturer</code></b> feature of the type <b><code>String</code></b> and a <b><code>Watt</code></b> feature of the type <b><code>Integer</code></b>.</br>This means, when configuring the feature model, the features are not just selected or deselected, but get a value of their corresponding type. We can utilize this for even more complex constraints and check if the manufacturer of the CPU and the PSU match.</p>",
codeListing: `features
Computer {abstract}
mandatory
Expand Down
2 changes: 1 addition & 1 deletion WebSocketLanguageServer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {createConnection, createServerProcess, forward} from 'vscode-ws-jsonrpc/
import {InitializeParams, InitializeRequest, Message} from 'vscode-languageserver';
import config from './config.js';

const MAX_MESSAGE_SIZE = 11000;
const MAX_MESSAGE_SIZE = 100000;

const launchLanguageServer = (socket: IWebSocket) => {
const serverName: string = 'UVLS';
Expand Down

0 comments on commit 34683db

Please sign in to comment.