-
Notifications
You must be signed in to change notification settings - Fork 0
Alk Platform
Dorel Lucanu edited this page Oct 4, 2023
·
1 revision
Alk is an educational platform designed for writing, executing, and analyzing algorithms. The platform consists of an algorithmic language, an interpreter able to execute algorithms, and tools to understand, analyze, and evaluate algorithms, and to acquire rigorous algorithm thinking.
Annotated algorithms.
Alk language, a very simple dynamic typed algorithmic language.
Properties like loop invariants, contracts, for algorithms or pieces of algorithms.
The verification process is via Matching Logic [1,2] and symbolic execution [3].
Now, it uses the Z3 prover in the backend.
https://github.com/alk-language/java-semantics
@havoc a : array<int>;
slp = 1;
i = 1;
@assume a.size() > 0;
@assume forall i : int :: 0 <= i && i < a.size() - 1 ==> a[i] <= a[i + 1];
while (i < a.size())
@invariant 1 <= slp && i <= a.size();
@invariant (exists k:int :: slp - 1 <= k && k < i && a[k] == a[k - slp + 1]);
@modifies slp, i;
{
if (a[i] == a[i - slp])
slp = slp + 1;
i = i + 1;
}
- Xiaohong Chen, Dorel Lucanu, Grigore Rosu: Matching logic explained. J. Log. Algebraic Methods Program. 120, 2021, https://www.sciencedirect.com/science/article/abs/pii/S2352220821000018?via%3Dihub
- Lungu, A., Lucanu, D.: A matching logic foundation for Alk. In: Seidl, H., Liu, Z., Pasareanu, C.S. (eds.) Theoretical Aspects of Computing - 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
- 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