code_analyzer/presentation.md

140 lines
2.8 KiB
Markdown
Raw Normal View History

2022-01-07 12:52:33 +01:00
---
title:
- "Analyse d'un programme"
author:
- "Volodymyr Patuta"
fonttheme:
- serif
date:
- "Janvier 2022"
header-includes:
- \definecolor{chocolate}{RGB}{33,33,33}
- \definecolor{dark}{RGB}{23,23,23}
- \definecolor{whitie}{HTML}{DEDEDE}
- \definecolor{ori}{HTML}{ff9712}
- \definecolor{magi}{HTML}{3465a4}
- \useoutertheme{split}
- \useinnertheme{rounded}
- \setbeamercolor{alerted text}{fg=orange}
- \setbeamercolor{author in head/foot}{bg=ori, fg=black} ################
- \setbeamercolor{title in head/foot}{bg=black}
- \setbeamercolor{custom2}{fg=cyan,bg=purple}
- \setbeamercolor{background canvas}{bg=chocolate}
- \setbeamercolor{block body alerted}{bg=normal text.bg!90!black}
- \setbeamercolor{block body}{bg=normal text.bg!90!black}
- \setbeamercolor{block body example}{bg=normal text.bg!90!black}
- \setbeamercolor{block title alerted}{use={normal text,alerted text},fg=green text.fg!75!normal text.fg,bg=normal text.bg!75!black}
- \setbeamercolor{block title}{bg=dark}
- \setbeamercolor{block title example}{use={normal text,example text},fg=green text.fg!75!normal text.fg,bg=normal text.bg!75!black}
- \setbeamercolor{fine separation line}{}
- \setbeamercolor{frametitle}{fg=ori}
- \setbeamercolor{item projected}{fg=black}
- \setbeamercolor{normal text}{bg=black,fg=whitie}
- \setbeamercolor{palette sidebar primary}{fg=green}
- \setbeamercolor{palette sidebar quaternary}{fg=green}
- \setbeamercolor{palette sidebar secondary}{fg=green}
- \setbeamercolor{palette sidebar tertiary}{fg=green}
- \setbeamercolor{section in sidebar}{fg=brown}
- \setbeamercolor{section in sidebar shaded}{fg=grey}
- \setbeamercolor{separation line}{fg=green, bg=green}
- \setbeamercolor{sidebar}{bg=red}
- \setbeamercolor{sidebar}{bg=green, fg = green}
- \setbeamercolor{structure}{bg=dark, fg=ori}
- \setbeamercolor{subsection in sidebar}{fg=brown}
- \setbeamercolor{subsection in sidebar shaded}{fg=grey}
- \setbeamercolor{title}{fg=ori}
- \setbeamercolor{titlelike}{fg=brown}
2022-01-08 16:57:10 +01:00
classoption: "aspectratio=43"
2022-01-07 12:52:33 +01:00
---
2022-01-08 13:54:02 +01:00
# Programme
2022-01-07 12:52:33 +01:00
2022-01-08 13:54:02 +01:00
Dans quel sens un "programme" ?
2022-01-07 12:52:33 +01:00
2022-01-08 13:54:02 +01:00
# Exemple d'un programme
2022-01-07 12:52:33 +01:00
2022-01-08 13:54:02 +01:00
## Neovim
2022-01-07 12:52:33 +01:00
2022-01-08 16:57:10 +01:00
```sh
$ fd --extension c . 'neovim/' | wc -l
174
```
# Exemple d'un programme
## Neovim
2022-01-08 13:54:02 +01:00
```sh
$ fd --extension c . 'neovim/' | wc -l
174
$ wc `fd --extension c . 'neovim/'` -l
...
300347 total
```
2022-01-08 16:57:10 +01:00
# Parsing
## Regex
```
^(\**\w+\s+?\ ?){1,}\([^!@#$+%^]+?\)\s+
([a-zA-Z_0-9]+)\(.*\)
```
# Recherche des CC
Un algo ?
# Recherche des CC
* call
* vu
# Recherche des cycles
# Recherche des cycles
\tiny
## Exemple d'un cycle
```c
void bar(void)
{
toto(1, 1);
}
int foo(void)
{
hello();
bar();
return 1;
}
int toto(int a, int b)
{
if (a != 1)
foo();
else
aurevoir();
return a + b;
}
```
\normalsize
# Recherche des cycles
![](cycle1.png)
# Recherche des cycles
![](cycle2.png)
# Recherche des cycles
![](cycle3.png)
# Fin
2022-01-07 12:52:33 +01:00
2022-01-08 16:57:10 +01:00
|**Demo**|
|:------:|