Changeset 633
- Timestamp:
- 03/04/11 17:38:45 (2 years ago)
- Files:
-
- 1 modified
-
Deliverables/D1.1/Presentations/WP2-roberto.tex (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D1.1/Presentations/WP2-roberto.tex
r626 r633 495 495 \institute{Universit\'e Paris Diderot} 496 496 497 \title{ CerCoWork Package 2: Untrusted Compiler Prototype (part 1)}497 \title{$\cerco$ Work Package 2: Untrusted Compiler Prototype (part 1)} 498 498 \date{March 11, 2011} 499 499 … … 530 530 531 531 \end{description} 532 {\small This first part is an {\bf introduction} to Tasks 2.1 and 2.2. The532 {\small \Red{\NB} This first part is an {\bf introduction} to Tasks 2.1 and 2.2. The 533 533 second part will give more details on Task 2.2, discuss Task 2.3 (with demo), 534 534 and provide some perspectives on Task 2.4 and WP5.} … … 539 539 \begin{frame} 540 540 541 \frametitle{People involved at Paris site} 542 543 541 \frametitle{People involved at UPD site} 542 543 544 {\small 544 545 \begin{tabular}{|c|c|c|} 545 546 546 547 \hline 547 548 {\bf Name} &{\bf Status} &{\bf Rough Allocated Time} \\\hline 548 Roberto Amadio &Professor &1 day/week \\ 549 Yann R\'egis-Gianas &Assistant Professor &1 day/week \\ 550 Nicolas Ayache &Post-doc &full time, 11 months \\ 551 Ronan Saillard &Internship+PhD &full time, 8 months \\ 552 Kayvan Memarian &Internship &1.5 days/week, 4 months \\ \hline 553 \end{tabular} 549 Roberto \textsc{Amadio} &Professor &1 day/week \\ 550 Yann \textsc{R\'egis-Gianas} &Assistant Professor &1 day/week \\ 551 Nicolas \textsc{Ayache} &Post-doc &full time, 11 months \\ 552 Ronan \textsc{Saillard} &Internship+PhD &full time, 8 months \\ 553 Kayvan \textsc{Memarian} &Internship &1.5 days/week, 4 months \\ \hline 554 \end{tabular}} 555 556 557 ~\\~\\ 558 \Red{{\bf NB}} Internships are very important: dissemination, speed up development, 559 explore side paths, preliminary training towards research (PhD),$\ldots$ 554 560 555 561 \end{frame} … … 589 595 \begin{frame} 590 596 591 \frametitle{ CerCogoals and approach}597 \frametitle{$\cerco$ goals and approach} 592 598 593 599 \begin{itemize} … … 596 602 given piece of code on a given processor with a given compiler. 597 603 598 \item Target {\bf C programs}, and in particular the kind of C604 \item Target {\bf $\C$ programs}, and in particular the kind of $\C$ 599 605 programs produced for embedded applications 600 (such as those generated by the SCADEcompiler).606 (such as those generated by the $\scade$ compiler). 601 607 602 608 \item {\bf Reflect the cost information} obtained at the machine level 603 back into the Csource code.609 back into the $\C$ source code. 604 610 605 611 \item {\bf Extract synthetic bounds} by reasoning on 606 the annotated Cprograms (for which several general purpose tools now exist).612 the annotated $\C$ programs (for which several general purpose tools now exist). 607 613 608 614 \end{itemize} 609 615 610 \ NBTechnically, this can be seen as a refinement of ongoing work on {\bf compiler certification}611 (see, e.g., CompCertproject).616 \Red{\NB} Technically, this can be seen as a refinement of ongoing work on {\bf compiler certification} 617 (see, e.g., $\compcert$ project). 612 618 613 619 \end{frame} … … 624 630 but not formally checked with a proof assistant. 625 631 \[ 626 \ textsc{Lustre} \arrow \textsc{C}\arrow \textsc{binary~ code}632 \lustre \arrow \C \arrow \textsc{binary~ code} 627 633 \] 628 634 \item Binary code must be {\bf annotated} with (uncertified) … … 634 640 \end{itemize} 635 641 636 \noindent {\bf Our challenge}637 Lift in a certified waywhathever information we have on the execution638 cost of the binary code to an information on the Csource code (a kind642 \noindent \Red{{\bf Our challenge}} 643 Lift in a {\em certified way} whathever information we have on the execution 644 cost of the binary code to an information on the $\C$ source code (a kind 639 645 of {\bf decompilation}). 640 646 … … 647 653 \frametitle{A potential connection} 648 654 Could use this work as a {\bf platform} to experiment with 649 `implicit complexity programming languages'.655 \Blu{{\em implicit complexity programming languages}}. 650 656 651 657 {\small 652 658 \begin{enumerate} 653 659 654 \item Write a program in your preferred implicit -complexity programming language.655 \item Compile it to C.656 \item CerCo compiles C to machine code and provides precise and certified information on execution time of Ccode.660 \item Write a program in your preferred implicit complexity programming language. 661 \item Compile it to $\C$. 662 \item $\cerco$ compiles $\C$ to machine code and provides precise and certified information on execution time of $\C$ code. 657 663 \item Use your implicit complexity analysis to produce automatically a synthetic bound on the resources used by the program. 658 \item If you want to push this further, try to lift the assertions about the Ccode to assertions on your source program.664 \item If you want to push this further, try to lift the assertions about the $\C$ code to assertions on your source program. 659 665 \end{enumerate}} 660 666 \end{frame} … … 702 708 \item 703 709 Starting from the annotated source program apply standard tools 704 to reason about Cprograms in order to {\bf extract synthetic bounds}.710 to reason about $\C$ programs in order to {\bf extract synthetic bounds}. 705 711 706 712 \end{itemize} … … 818 824 {\small 819 825 \[ 820 \infer{(\w{An}_{i}(S),s[0/\w{cost}])\eval s'[c/\w{cost}]} 821 {\begin{array}{c} 822 (\w{An}_{i+1}(\cl{C}_{i,i+1}(S)),s[0/\w{cost}]) \eval s'[d/\w{cost}] \\ 823 d \leq c 824 \end{array}} 826 \begin{array}{lc} 827 \mbox{`Predicted' cost} &(\w{An}_{i}(S),s[0/\w{cost}])\eval s'[c/\w{cost}]\\\hline 828 \mbox{`Real' cost} &(\w{An}_{i+1}(\cl{C}_{i,i+1}(S)),s[0/\w{cost}]) \eval s'[d/\w{cost}] \quad d \leq c 829 \end{array} 825 830 \]} 826 831 … … 1003 1008 \]} 1004 1009 1005 {\bf Simulation} 1006 The simulation properties of the compilation functions are lifted to the labelled languages. 1007 1008 With a proper design of the labelled languages this just means taking into account the rules that 1009 generate labelled transitions. 1010 1011 Let $\lambda$ denote a sequence of labels. Then we have: 1010 \begin{description} 1011 1012 \item[Simulation] 1013 The simulation properties of the compilation functions are {\em lifted} to the labelled languages. 1014 %With a proper design of the labelled languages this just means taking into account the rules that 1015 %generate labelled transitions. 1016 Let $\lambda$ denote a sequence of labels. Then:% we have: 1017 \end{description} 1012 1018 \[ 1013 1019 (S,s)\eval (s',\lambda) \quad \Arrow \quad … … 1045 1051 \]} 1046 1052 1047 By {\bf diagram chasing} we get: 1053 \begin{description} 1054 1055 \item[Numerical vs. Symbolic cost] By {\bf diagram chasing} we derive: 1048 1056 \[ 1049 1057 \infer{(\w{An}(S),s[c/\w{cost}]) \eval s'[c+\delta/\w{cost}]} 1050 {(\cl{C }(\cl{L}(S)),s[c/\w{cost}]) \eval (s'[c/\w{cost}],\lambda)}1058 {(\cl{C'}(\cl{C}(\cl{L}(S))),s[c/\w{cost}]) \eval (s'[c/\w{cost}],\lambda)} 1051 1059 \] 1052 where $\delta$ is an `arbitrary additive cost' 1053 of the sequence of labels $\lambda$. 1060 where $\delta$ is the numerical (additive) cost associated with $\lambda$. 1061 1062 \end{description} 1054 1063 1055 1064 \end{frame} … … 1082 1091 \]} 1083 1092 1084 Knowing that 1093 \begin{description} 1094 1095 \item[When is the labelling $\cl{L}$ interesting?] 1096 I.e., knowing that 1085 1097 \[ 1086 1098 \cl{C'}(\cl{C}(S)) = \w{er}_{\mips}(\cl{C'}(\cl{C}(\cl{L}(S))) 1087 1099 \] 1088 {\bf under which conditions} can we conclude that $\lambda$, {\em i.e.}, $\delta$, is a sound and possibly precise description of the real execution cost? 1089 1100 {\bf under which conditions} can we conclude that $\lambda$, {\em i.e.}, 1101 $\delta$, is a sound and possibly precise description of the real execution cost? 1102 \end{description} 1090 1103 \end{frame} 1091 1104 … … 1094 1107 1095 1108 \frametitle{Labelling approach (7/7)} 1109 Conditions to be checked on the labelled binary code. 1096 1110 1097 1111 {\small … … 1146 1160 \begin{frame} 1147 1161 1148 \frametitle{A larger experiment: a $ C$ to $\mips$ compiler}1162 \frametitle{A larger experiment: a $\C$ to $\mips$ compiler} 1149 1163 {\footnotesize 1150 1164 \[ … … 1163 1177 1164 1178 \item Roughly, we implement the labelling approach on top of a compiler quite 1165 close to {\sc CompCert}.1179 close to $\compcert$. 1166 1180 1167 1181 \item Around 10K lines of $\ocaml$ code. No proofs, just code inspection and test. We used the software in a master level compilation course. … … 1182 1196 \item The first situation never arises in the considered compilation chain. 1183 1197 1184 \item The second situation can be handled by some pre-processing of the Ccode1198 \item The second situation can be handled by some pre-processing of the $\C$ code 1185 1199 (e.g., logical \bem{and} compiled as a conditional expression). 1186 1200 … … 1195 1209 \frametitle{What comes next} 1196 1210 This work was completed in the first 7 months of the project. 1197 The following months have been spent: 1198 1199 1200 \begin{itemize} 1211 The following 5 months have been spent: 1212 1213 1214 \begin{itemize} 1215 \item Enhancing and debugging the compiler. 1201 1216 1202 1217 \item Extending the formal proofs on the toy compiler. 1203 1218 1204 \item Enhancing and debugging the compiler. 1205 1206 \item Porting it to the 8051 processor. 1207 1208 \item Integrating the {\sc Ocaml/Matita} description of 8051. 1219 \item Porting the compiler from $\mips$ to $\eighty$ (and teaching this). 1220 1221 \item Integrating the {\sc Ocaml/Matita} description of $\eighty$. 1209 1222 1210 1223 \end{itemize} 1211 1224 1212 This is discussedin the second part of the talk.1225 This is covered in the second part of the talk. 1213 1226 1214 1227 \end{frame}
