No description
  • C++ 97.6%
  • Makefile 2.4%
Find a file
Charlène_Gros 128ce86095
Merge pull request #2 from Lucccyo/add_mul_store
Add mul operator and changing the goal of the project
2026-03-16 22:28:57 +01:00
.gitignore Initial commit 2026-02-26 09:34:37 +01:00
expr.cpp add mul and add store and interval 2026-03-16 22:28:14 +01:00
expr.hpp add mul and add store and interval 2026-03-16 22:28:14 +01:00
interval.cpp add mul and add store and interval 2026-03-16 22:28:14 +01:00
interval.hpp add mul and add store and interval 2026-03-16 22:28:14 +01:00
LICENSE Initial commit 2026-02-26 09:34:37 +01:00
main.cpp add mul and add store and interval 2026-03-16 22:28:14 +01:00
Makefile add mul and add store and interval 2026-03-16 22:28:14 +01:00
parser.cpp add mul and add store and interval 2026-03-16 22:28:14 +01:00
parser.hpp add mul and add store and interval 2026-03-16 22:28:14 +01:00
README.md Update readme 2026-03-16 22:28:34 +01:00
sign.cpp Sign definition and tests 2026-02-26 12:53:04 +01:00
sign.hpp Use visit and adjust includes 2026-02-27 15:07:48 +01:00
test_sign.cpp Sign definition and tests 2026-02-26 12:53:04 +01:00

ascpp

L'objectif de ce projet est de réaliser un analyseur statique pour le mini-langage WHILE en utilisant l'interprétation abstraite.

L'analyseur calcule, pour chaque variable d'un programme, un intervalle abstrait sur-approximant l'ensemble des valeurs qu'elle peut prendre à la sortie du programme.

Par exemple, le programme ci-dessous :

n = n * n + 4;
i = 1;
while 10 > i do
  if i > 5 then
    n = n + 1
  else
    n = n + 2;
  i = i + 1;
x = 10 / n

avec n initialement inconnu (TOP = (-∞, +∞)), produit :

n -> [4; +inf)
i -> [1; +inf)

Puisque n ∈ [4, +∞) au point de division, l'analyseur prouve formellement que la division par n est toujours sûre, pour toutes les valeurs possibles de n.

Analyse statique

⚠️ TODO

Interprétation abstraite

⚠️ TODO

Mini-langage

Le mini-langage s'inspire du langage While. Ci-dessous la grammaire du langage utilisé ici.

expression arithmétique
a ::= n
    | x
    | a + a
    | -a
expression booléenne
b ::= true
    | false
    | a > a
    | a = a
statement
s ::= skip
    | x = a
    | s ; s
    | if b then s else s
    | while b do s

Sources