Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
D7050E_2020
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Söderberg
D7050E_2020
Commits
0c508446
Commit
0c508446
authored
4 years ago
by
David Söderberg
Browse files
Options
Downloads
Patches
Plain Diff
Update HOME_EXAM.md
parent
74e9932e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
HOME_EXAM.md
+4
-9
4 additions, 9 deletions
HOME_EXAM.md
with
4 additions
and
9 deletions
HOME_EXAM.md
+
4
−
9
View file @
0c508446
...
@@ -270,7 +270,7 @@ let a:bool = true;
...
@@ -270,7 +270,7 @@ let a:bool = true;
### Operands for integer expressions
### Operands for integer expressions
```
math
```
math
\frac{<e_1,σ> ⇓ i_1 <e_2, σ> ⇓ i_2}{<e_1
+
e2, σ> ⇓ i_1 \text{
pl
us } i_2}
\frac{<e_1,σ> ⇓ i_1 <e_2, σ> ⇓ i_2}{<e_1
-
e2, σ> ⇓ i_1 \text{
min
us } i_2}
```
```
```
rust
```
rust
...
@@ -278,7 +278,7 @@ let a:bool = true;
...
@@ -278,7 +278,7 @@ let a:bool = true;
```
```
The other integer expressions are
Above is a minues operation of two integers, following integer expressions can be described in the same way:
-
-, minus
-
-, minus
-
*
, multiplication
-
*
, multiplication
-
/, division
-
/, division
...
@@ -293,12 +293,7 @@ The other integer expressions are
...
@@ -293,12 +293,7 @@ The other integer expressions are
```
math
```
math
\frac{<e_1,σ> ⇓ b_1 <e_2, σ> ⇓ b_2}{<e_1 == e_2, σ> ⇓ b_1 \text{ equal } b_2}
\frac{<e_1,σ> ⇓ b_1 <e_2, σ> ⇓ b_2}{<e_1 == e_2, σ> ⇓ b_1 \text{ equal } b_2}
```
```
Above is an equals operation of two expessions, following boolean expressions can be described in the same way:
```
math
\frac{<e_1,σ> ⇓ b_1 <e_2,σ> ⇓ b_2}{<e_1 > e_2,σ> ⇓ b_1 \text{greater than } b_2}
```
Other boolean expressions are
-
"==", equal
-
"!=", not equal
-
"!=", not equal
-
"&&", and
-
"&&", and
-
"||", or
-
"||", or
...
@@ -337,7 +332,7 @@ Declares the variable $`v`$ with type $`t`$ to current scope.
...
@@ -337,7 +332,7 @@ Declares the variable $`v`$ with type $`t`$ to current scope.
### If true/false expression
### If true/false expression
```
math
```
math
\frac{<e, σ> ⇓ true <c1, σ> ⇓ σ'}{<
if
\text{ } b \text{
}
then
\text{ }
c1> ⇓ σ}
\frac{<e, σ> ⇓ true <c1, σ> ⇓ σ'}{<\text{
if
} b \text{ then
}
c1> ⇓ σ}
```
```
### While expression
### While expression
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment