Skip to content

Commit dcf5f08

Browse files
committed
merge
2 parents 4929b76 + b94fdbe commit dcf5f08

77 files changed

Lines changed: 3377 additions & 2079 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/misc.xml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/vcs.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Introduction
2+
This repository includes Alk, an educational platform designed to help in learning algorithms and acquiring algorithmic thinking.
3+
Some references:
4+
1. Lungu, A., Lucanu, D.: _A matching logic foundation for Alk_. In: Seidl, H., Liu, Z., Pasareanu, C.S. (eds.) Theoretical Aspects of Computing -
5+
ICTAC 2022 - 19th International Colloquium, Tbilisi, Georgia, September 27-29, 2022, Proceedings. Lecture Notes in Computer Science, vol. 13572, pp. 290–304. Springer (2022). https://doi.org/10.1007/978-3-031-17715-6“ ̇19
6+
2. Lungu, A., Lucanu, D.: _Supporting algorithm analysis with symbolic execution in Alk_. In: Ameur, Y.A., Craciun, F. (eds.) Theoretical Aspects of Software Engineering - 16th International Symposium, TASE 2022, Proceedings. Lecture Notes in Computer Science, vol. 13299, pp. 406–423. Springer (2022), https://doi.org/10.1007/978-3-031-10363-6 27
7+
8+
Read the [reference manual](../../wiki/Reference-Manual) to review the Alk syntax.
9+
Also consider the [Alk-by example](../../wiki/Alk-by-examples) wiki to understand how Alk behaves in real-scenarios.
10+
111
# Using the Alk VS Code Extension
212
1. Install VS Code from the official [page](https://code.visualstudio.com/download).
313
2. In the Extensions tag in the left side, check for the "Alk Visual Studio Code Extension" and install.
@@ -47,8 +57,6 @@ Optionally (and remmended) is to create a symbolic link named `alki`:
4757
```
4858
ln -s ../../bin/alki.sh ../../bin/alki
4959
```
50-
Read the [reference manual](../../wiki/Reference-Manual) to review the Alk syntax.
51-
Also consider the [Alk-by example](../../wiki/Alk-by-examples) wiki to understand how Alk behaves in real-scenarios.
5260
5361
# Set Alk in PATH system variable
5462
* Linux/Mac OS:

bin/alk.jar

-8.2 KB
Binary file not shown.

doc/alk-comp-model.pdf

237 KB
Binary file not shown.

input/symb/set0/choose.alk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@havoc A : array<int>;
2+
@assume A.size() == 10;
3+
@assume forall x : int :: 0 <= x && x < 10 ==> A[x] == 2;
4+
5+
choose x from A;
6+
7+
@assert x == 2;

input/symb/set0/choose2.alk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@havoc A : set<int>;
2+
@assume forall x : int :: x in A ==> x == 2;
3+
4+
choose x from A;
5+
6+
@assert x == 2;

input/symb/set0/do.alk

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@havoc n : int;
2+
@assume n > 1;
3+
4+
sum = 0;
5+
i = 1;
6+
7+
do
8+
{
9+
sum += i;
10+
i++;
11+
} while (i <= n)
12+
@invariant sum == i * (i - 1) / 2;
13+
@invariant i <= n + 1;
14+
15+
@assert sum == n * (n + 1) / 2;

input/symb/set0/for.alk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@havoc n : int;
2+
@assume n > 1;
3+
sum = 0;
4+
for (i = 1; i <= n; i++)
5+
@invariant sum == i * (i - 1) / 2
6+
@invariant i <= n + 1
7+
{
8+
sum += i;
9+
}
10+
11+
@assert sum == n * (n + 1) / 2;

0 commit comments

Comments
 (0)