Browse Source

first commit

master
zapashcanon 2 years ago
commit
3e1f1e22c8
Signed by: zapashcanon GPG Key ID: 8981C3C62D1D28F1
  1. 14
      .gitignore
  2. 69
      img/universite-paris-saclay.svg
  3. 14
      scripts/build.sh
  4. 10
      scripts/clean.sh
  5. 9
      scripts/mrproper.sh
  6. 16
      scripts/test.sh
  7. 3
      src/abstract.tex
  8. 3
      src/answer.tex
  9. 5
      src/appendix.tex
  10. 150
      src/bib.bib
  11. 1
      src/conclusion.tex
  12. 28
      src/main.tex
  13. 3
      src/ocp.tex
  14. 67
      src/packages.tex
  15. 1
      src/problem.tex
  16. 29
      src/title.tex

14
.gitignore

@ -0,0 +1,14 @@
*.pdf
*.bbl
*.bcf
*.blg
*.log
*.run.xml
*.aux
*.out
*.cmi
*.cmx
*.toc
*.o
src/svg-inkscape/
*.dot.svg

69
img/universite-paris-saclay.svg

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.1" id="Calque_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 258.6 87.5"
style="enable-background:new 0 0 258.6 87.5;" xml:space="preserve">
<style type="text/css">
.st0{fill:#62003C;}
</style>
<switch>
<g i:extraneous="self">
<g>
<circle class="st0" cx="251.3" cy="7.3" r="7.3"/>
<circle class="st0" cx="235.5" cy="21.1" r="4.5"/>
<path class="st0" d="M53.6,75.4L53.6,75.4c0-3.7-2.5-5.9-6.7-5.9h-8.1v17.7h3.9v-5.6h3.1l3.8,5.6h4.5l-4.3-6.3
C52.1,80,53.6,78.3,53.6,75.4z M49.7,75.6c0,1.5-1.1,2.5-3,2.5h-3.9V73h3.9C48.5,73,49.7,73.9,49.7,75.6L49.7,75.6z"/>
<path class="st0" d="M76.5,76.6c-3.1-0.8-3.8-1.2-3.8-2.3v0c0-0.9,0.8-1.5,2.3-1.5c1.5,0,3,0.7,4.6,1.7l2-2.9
c-1.8-1.4-4-2.2-6.6-2.2c-3.6,0-6.2,2.1-6.2,5.3v0.1c0,3.5,2.3,4.5,5.9,5.4c3,0.8,3.6,1.3,3.6,2.2v0.1c0,1-1,1.7-2.5,1.7
c-2,0-3.7-0.8-5.3-2.1l-2.3,2.8c2.1,1.9,4.8,2.8,7.5,2.8c3.8,0,6.5-2,6.5-5.5v-0.1C82.1,78.8,80.1,77.5,76.5,76.6z"/>
<rect x="86.5" y="77.5" class="st0" width="7.8" height="3.7"/>
<path class="st0" d="M23.1,69.4l-7.6,17.8h4l1.6-4h7.5l1.6,4h4.1l-7.6-17.8H23.1z M22.5,79.8l2.3-5.7l2.3,5.7H22.5z"/>
<path class="st0" d="M7.3,69.5H0.1v17.7H4v-5.3h3c4,0,7.1-2.1,7.1-6.2v0C14.1,72,11.5,69.5,7.3,69.5z M10.1,75.8
c0,1.5-1.1,2.7-3.1,2.7H4V73h3C8.9,73,10.1,74,10.1,75.8L10.1,75.8z"/>
<rect x="59.2" y="69.5" class="st0" width="3.9" height="17.7"/>
<path class="st0" d="M123.3,69.4l-7.6,17.8h4l1.6-4h7.5l1.6,4h4.1l-7.6-17.8H123.3z M122.7,79.8l2.3-5.7l2.3,5.7H122.7z"/>
<polygon class="st0" points="162.3,69.5 158.4,69.5 158.4,87.2 171.1,87.2 171.1,83.6 162.3,83.6 "/>
<path class="st0" d="M146.3,83.9c-3,0-5.1-2.5-5.1-5.5v-0.1c0-3,2.1-5.5,5.1-5.5c1.8,0,3.2,0.8,4.5,2l2.5-2.8
c-1.6-1.6-3.6-2.7-7-2.7c-5.4,0-9.2,4.1-9.2,9.1v0c0,5.1,3.9,9.1,9.1,9.1c3.4,0,5.4-1.2,7.2-3.2l-2.5-2.5
C149.6,83.1,148.3,83.9,146.3,83.9z"/>
<polygon class="st0" points="201.9,76.6 197.7,69.5 193.1,69.5 199.9,80.2 199.9,87.2 203.8,87.2 203.8,80.1 210.6,69.5
206.2,69.5 "/>
<path class="st0" d="M106.7,76.6c-3.1-0.8-3.8-1.2-3.8-2.3v0c0-0.9,0.8-1.5,2.3-1.5c1.5,0,3,0.7,4.6,1.7l2-2.9
c-1.8-1.4-4-2.2-6.6-2.2c-3.6,0-6.2,2.1-6.2,5.3v0.1c0,3.5,2.3,4.5,5.9,5.4c3,0.8,3.6,1.3,3.6,2.2v0.1c0,1-1,1.7-2.5,1.7
c-2,0-3.7-0.8-5.3-2.1l-2.3,2.8c2.1,1.9,4.8,2.8,7.5,2.8c3.8,0,6.5-2,6.5-5.5v-0.1C112.3,78.8,110.3,77.5,106.7,76.6z"/>
<path class="st0" d="M182,69.4l-7.6,17.8h4l1.6-4h7.5l1.6,4h4.1l-7.6-17.8H182z M181.4,79.8l2.3-5.7l2.3,5.7H181.4z"/>
<rect x="65.8" y="33.2" class="st0" width="4.9" height="27.4"/>
<path class="st0" d="M121.4,61.2c4.6,0,8.1-1.6,11.2-5.1l0.3-0.3l-3.1-2.8l-0.3,0.3c-2.3,2.5-4.9,3.6-8,3.6c-4.6,0-8.1-3.2-8.8-8
h20.9l0-0.4c0.1-0.5,0.1-0.9,0.1-1.3c0-8.7-5.1-14.5-12.8-14.5c-7.5,0-13.1,6.1-13.1,14.3C107.8,55.1,113.7,61.2,121.4,61.2z
M120.8,36.9c5.1,0,7.4,4.1,7.9,8.1h-16C113.4,40.2,116.7,36.9,120.8,36.9z"/>
<path class="st0" d="M10.6,61.2c3.6,0,6.4-1.4,8.6-4.2v3.6H24V33.2h-4.8v15.6c0,4.6-3.1,7.8-7.5,7.8c-4.3,0-6.9-2.8-6.9-7.5V33.2
H0v16.9C0,56.8,4.2,61.2,10.6,61.2z"/>
<path class="st0" d="M46.4,32.7c-3.6,0-6.5,1.4-8.6,4.1v-3.6h-4.9v27.4h4.9V45c0-4.6,3.1-7.8,7.5-7.8c4.3,0,6.9,2.8,6.9,7.5v15.9
H57V43.7C57,37,52.8,32.7,46.4,32.7z"/>
<polygon class="st0" points="93,60.8 104.9,33.2 99.7,33.2 91,54.4 82.4,33.2 77.1,33.2 88.9,60.8 "/>
<path class="st0" d="M145.6,38.7v-5.5h-4.9v27.4h4.9v-11c0-7.1,3.9-11.7,10-11.7h0.8v-5.1l-0.4,0
C151.7,32.6,147.9,34.8,145.6,38.7z"/>
<path class="st0" d="M210,24.2l-4.9,2.7v6.3H200v4.4h5.1v15.5c0,5.1,2.8,7.9,7.9,7.9c1.8,0,3.4-0.4,5-1.2l0.2-0.1v-4.4l-0.7,0.3
c-1.3,0.6-2.3,0.9-3.6,0.9c-2.7,0-4-1.3-4-3.9v-15h8.4v-4.4H210V24.2z"/>
<path class="st0" d="M235.8,32.7c-7.5,0-13.1,6.1-13.1,14.3c0,8.1,5.9,14.3,13.7,14.3c4.6,0,8.1-1.6,11.2-5.1l0.3-0.3l-3.1-2.8
l-0.3,0.3c-2.3,2.5-4.9,3.6-8,3.6c-4.6,0-8.1-3.2-8.8-8h20.9l0-0.4c0.1-0.5,0.1-0.9,0.1-1.3C248.6,38.5,243.5,32.7,235.8,32.7z
M227.7,45c0.7-4.8,3.9-8.1,8.1-8.1c5.1,0,7.4,4.1,7.9,8.1H227.7z"/>
<path class="st0" d="M181.5,52.7v-0.1c0-5.4-5.3-7-8.8-8l-0.1,0c-3.3-1-6.4-1.9-6.4-4.2c0-2,1.9-3.4,4.7-3.4
c2.4,0,5.1,0.9,7.6,2.5l0.4,0.3l2.3-3.8l-0.4-0.2c-2.8-1.9-6.5-3-9.8-3c-5.6,0-9.5,3.3-9.5,8v0.1c0,5.3,5.2,6.8,9.1,7.9
c3.5,1,6.3,1.9,6.3,4.3c0,2.2-2,3.7-5,3.7c-2.9,0-6-1.1-8.9-3.3l-0.4-0.3l-2.5,3.6l0.3,0.3c3,2.5,7.3,4,11.2,4
C177.6,61.1,181.5,57.7,181.5,52.7z"/>
<rect x="189.3" y="33.2" class="st0" width="4.9" height="27.4"/>
</g>
</g>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

14
scripts/build.sh

@ -0,0 +1,14 @@
#!/usr/bin/env sh
set -eu
( cd "$(dirname "$0")"/../src
c="texfot xelatex -shell-escape -halt-on-error"
$c main.tex | sed '/Output written/d' | sed '/Rerun to get \/Page/d' | sed '/Warning: Citation/d' | sed '/Warning: Empty bib/d' | sed '/has changed/d' | sed '/Warning: There were/d' | sed '/biblatex Warning/d'
biber -quiet main
$c main.tex | sed '/Output written/d' | sed '/Warning: There were/d' | sed '/biblatex Warning/d'
$c main.tex
mv main.pdf ../main.pdf
) | sed '/This is/d' | sed '/texfot: invoking/d'

10
scripts/clean.sh

@ -0,0 +1,10 @@
#!/usr/bin/env sh
set -eu
( cd "$(dirname "$0")"/../src/
rm -f ./*.log ./*.tuc ./*.out ./*.aux ./*.toc ./*.pyg ./*.bbl ./*.bcf ./*.blg ./*.run.xml
rm -rf ./svg-inkscape/
)

9
scripts/mrproper.sh

@ -0,0 +1,9 @@
#!/usr/bin/env sh
set -eu
( cd "$(dirname "$0")"/../
rm -f ./*.pdf
)

16
scripts/test.sh

@ -0,0 +1,16 @@
#!/usr/bin/env sh
set -eu
(
cd "$(dirname "$0")"/../
# Testing scripts
# shellcheck disable=SC2185
find -O3 . -type f -name '*.sh' -exec shellcheck {} \;
cd src/
# shellcheck disable=SC2185
find -O3 . -type f -name '*.tex' -exec chktex -q --nowarn 26 --nowarn 15 --nowarn 17 {} \;
# shellcheck disable=SC2185
find -O3 . -type f -name '*.tex' -exec lacheck {} \; # TODO: fix lacheck so it's possible to disable some warnings which are incorrects...
)

3
src/abstract.tex

@ -0,0 +1,3 @@
\begin{abstract}
Ce document est un rapport de mon stage sur le sujet \emph{TODO}, effectué dans le cadre de ma formation en Master 2 \bsc{fiil} à l'Université Paris-Saclay. J'y présente TODO. J'ai été encadré par \href{https://dblp.org/pers/c/Chambart:Pierre.html}{Pierre \bsc{Chambart}}.
\end{abstract}

3
src/answer.tex

@ -0,0 +1,3 @@
\section{Answer}
Blablabla

5
src/appendix.tex

@ -0,0 +1,5 @@
\section{Annexes}
\subsection{Type et exemple d'invariant}\label{type_invariant}
\inputminted[bgcolor=darkBackground]{ocaml}{algo1_part.mlw}

150
src/bib.bib

@ -0,0 +1,150 @@
@ARTICLE{Milner78,
author = {Robin Milner},
title = {A theory of type polymorphism in programming},
journal = {Journal of Computer and System Sciences},
year = {1978},
volume = {17},
pages = {348--375}
}
@phdthesis{Filliatre11,
author = {Jean-Christophe Filli\^atre},
title = {Deductive Program Verification},
year = 2011,
month = dec,
type = {Th\`{e}se d'habilitation},
school = {Universit{\'e} Paris-Sud},
type_publi = {these},
url = {http://www.lri.fr/~filliatr/hdr/memoire.pdf},
x-equipes = {demons PROVAL},
x-type = {habilitation},
x-support = {rapport},
topics = {team, proval}
}
@inproceedings{Filliatre13,
author = {Jean-Christophe Filli\^atre and Andrei Paskevich},
title = {Why3 --- Where Programs Meet Provers},
booktitle = {Proceedings of the 22nd European Symposium on Programming},
month = mar,
year = 2013,
volume = {7792},
series = {Lecture Notes in Computer Science},
publisher = {Springer},
editor = {Matthias Felleisen and Philippa Gardner},
pages = {125--128},
hal = {http://hal.inria.fr/hal-00789533},
topics = {team,lri},
keywords = {Why3},
type_publi = {icolcomlec},
x-equipes = {demons PROVAL},
x-type = {article},
x-support = {actes},
x-cle-support = {ESOP},
x-editorial-board = {yes},
x-international-audience = {yes}
}
@inproceedings{Clochard15,
hal = {http://hal.inria.fr/hal-01162661},
author = {Martin Clochard and Jean-Christophe
Filli\^atre and Andrei Paskevich},
title = {How to avoid proving the absence of integer overflows},
pages = {94--109},
crossref = {vstte15},
topics = {team,lri},
keywords = {Why3},
type_publi = {icolcomlec},
x-international-audience = {yes},
x-proceedings = {yes}
}
@techreport{Gondelman16,
topics = {team},
author = {Jean-Christophe Filli\^atre and L\'eon
Gondelman and Andrei Paskevich},
title = {A Pragmatic Type System for Deductive Verification},
type = {Research Report},
institution = {Universit\'e Paris Sud},
year = 2016,
abstract = { In the context of deductive verication, it is customary
today to handle programs with pointers using either
separation logic, dynamic frames, or explicit memory
models. Yet we can observe that in numerous
programs, a large amount of code is within the scope
of Hoare logic, provided we can statically control
aliasing. When this is the case, the code
correctness can be reduced to simpler verication
conditions which do not require any explicit memory
model. This makes verication conditions more
amenable both to automated theorem proving and to
manual inspection and debugging. In this paper, we
devise a method of such static aliasing control for
a programming language featuring nested data
structures with mutable components. Our solution is
based on a type system with singleton regions and
eects, which we prove to be sound.},
hal = {https://hal.archives-ouvertes.fr/hal-01256434v3},
note = {\url{https://hal.archives-ouvertes.fr/hal-01256434v3}}
}
@article{Gondelman16_2,
author = {Jean-Christophe Filli\^atre and L\'eon
Gondelman and Andrei Paskevich},
title = {The Spirit of Ghost Code},
journal = {Formal Methods in System Design},
publisher = {Springer},
year = 2016,
volume = 48,
number = 3,
pages = {152--174},
issn = {1572-8102},
doi = {10.1007/s10703-016-0243-x},
topics = {team},
hal = {https://hal.archives-ouvertes.fr/hal-01396864v1},
keywords = {Why3},
type_publi = {irevcomlec},
x-international-audience = {yes},
x-proceedings = {yes},
x-type = {article},
x-support = {revue},
x-editorial-board = {yes},
abstract = {
In the context of deductive program verification, ghost code is part
of the program that is added for the purpose of specification.
Ghost code must not interfere with regular code, in the sense that
it can be erased without observable difference in the program outcome.
In particular, ghost data cannot participate in regular
computations and ghost code cannot mutate regular data or diverge.
The idea exists in the folklore since the early notion of auxiliary
variables and is implemented in many state-of-the-art program
verification tools. However, a rigorous definition and treatment of
ghost code is surprisingly subtle and few formalizations exist.
In this article, we describe a simple ML-style programming language
with mutable state and ghost code. Non-interference is ensured by a
type system with effects, which allows, notably, the same data types
and functions to be used in both regular and ghost code.
We define the procedure of ghost code erasure and we prove its
safety using bisimulation.
A similar type system, with numerous extensions which we briefly discuss,
is implemented in the program verification environment Why3.
}
}
@techreport{Filliatre18,
author = {Jean-Christophe Filli{\^a}tre and L{\'e}on Gondelman and
Andrei Paskevich and M{\'a}rio Pereira and Sim{\~a}o Melo de Sousa},
title = {A Toolchain to {P}roduce {C}orrect-by-{C}onstruction {OC}aml
{P}rograms},
hal = {https://hal.inria.fr/hal-01783851},
pdf = {https://hal.inria.fr/hal-01783851/file/main.pdf},
note = {artifact: \url{https://www.lri.fr/~mpereira/correct_ocaml.ova}},
year = {2018}
}
@misc{AlgoPS,
title = {Document de présentation des algorithmes de Parcoursup},
year = 2019,
url = {https://framagit.org/parcoursup/algorithmes-de-parcoursup/blob/master/doc/presentation_algorithmes_parcoursup_2019.pdf}
}

1
src/conclusion.tex

@ -0,0 +1 @@
\section{Conclusion}

28
src/main.tex

@ -0,0 +1,28 @@
\documentclass[a4paper,12pt,titlepage]{extarticle}
\input{packages.tex}
\bibliography{bib}
\begin{document}
\input{title.tex}
\input{abstract.tex}
\tableofcontents
\newpage{}
\input{ocp.tex}
\input{problem.tex}
\input{answer.tex}
\input{conclusion.tex}
\appendix
%\input{appendix.tex}
\printbibliography{}
\end{document}

3
src/ocp.tex

@ -0,0 +1,3 @@
\section{OCamlPro}
Blablabla

67
src/packages.tex

@ -0,0 +1,67 @@
\usepackage[french]{babel}
\usepackage{euler}
\usepackage{fontspec} % encoding
\usepackage{graphicx} % to include img
\usepackage{enumitem} % powerful lists
\usepackage{xspace} % correct quotes printing
\usepackage[np]{numprint} % correct numbers printing
\usepackage{amsmath} % maths and better typo
\usepackage{amssymb} % more maths
\usepackage{dsfont} % and even more maths
\usepackage{color} % color power
\usepackage[dvipsnames, table]{xcolor} % more color power
\usepackage{microtype} % better typo
\usepackage{hyperref} % internal and external links (e.g. mail, www)
\usepackage{cleveref}
\usepackage[cache=false, draft=false]{minted} % source code
\usepackage{placeins} % float displaying
\usepackage{csquotes}
\usepackage{ellipsis} % correct ...
\usepackage[notransparent]{svg}
\usepackage[
autolang=other,
backend=biber, % choix de l'outil de traitement
backref=true, % liens dans la bibliographie pour remonter dans le texte
backrefstyle=none, % afficher toutes les utilisations de la référence
bibstyle=alphabetic, % style pour les clés des références dans la bibliographie : [initialesAnnée]
citestyle=alphabetic, % style pour les clés des références dans le texte : [initialesAnnée]
sorting=none, % bibliographie triée par ordre d'utilisation des références
]{biblatex} % support des bibliographies
\usepackage{calligra}
\usepackage[bottom]{footmisc}
\usepackage{wrapfig}
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
%\setmonofont{Source Code Pro}
%\newfontfamily\unicodemonofont{Everson Mono}
\newcommand\myshade{85}
\colorlet{mylinkcolor}{violet}
\colorlet{mycitecolor}{YellowOrange}
\colorlet{myurlcolor}{Aquamarine}
\usemintedstyle{paraiso-dark}
\setminted{bgcolor=lightBackground}
\setminted{linenos, autogobble, breaklines, breakanywhere, breakautoindent, fontseries=m, fontsize=\fontsize{12pt}{12pt}, frame=none, stepnumber=2}
\hypersetup{linkcolor = mylinkcolor!\myshade!black,
citecolor = mycitecolor!\myshade!black,
urlcolor = myurlcolor!\myshade!black,
colorlinks = true,
pdfstartview=FitH
}
\graphicspath{{./../img/}}
\definecolor{darkBackground}{HTML}{282c34} % source code background
\definecolor{darkBackgroundHighlight}{HTML}{2c323c} % source code background
\definecolor{lightBackground}{HTML}{D7D3CB} % source code background
\definecolor{processblue}{cmyk}{0.96,0,0,0}

1
src/problem.tex

@ -0,0 +1 @@
\section{Le problème}

29
src/title.tex

@ -0,0 +1,29 @@
\begin{titlepage}
\begin{center}
\newcommand\important{\huge \scshape }
\newcommand\notimportant{\Large}
\newcommand\vspa[1]{\vspace*{#1\textheight}}
\important{} Dddddml
\vspa{0.1}
\notimportant{} Rapport de stage par\\
\important{} Léo \bsc{Andrès}\\
\vspa{0.02}
\notimportant{} 15 septembre 2020\\
\vspa{0.1}
\notimportant{} Master 2\\
Fondements de l'Informatique\\
et Ingénierie du Logiciel\\
\vspa{0.05}
\includesvg[width=200pt]{universite-paris-saclay.svg}\\
\vspa{0.1}
\notimportant{} Sous la direction de\\
\important{} Pierre~\bsc{Chambart}
\end{center}
\end{titlepage}
Loading…
Cancel
Save