-
Notifications
You must be signed in to change notification settings - Fork 0
/
presentasi.cmd
executable file
·1493 lines (1377 loc) · 44 KB
/
presentasi.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
::/*#! 2> /dev/null #
@ 2>/dev/null # 2>nul & echo off & goto BOF #
if [ -z ${SIREUM_HOME} ]; then #
echo "Please set SIREUM_HOME env var" #
exit -1 #
fi #
exec ${SIREUM_HOME}/bin/sireum slang run "$0" "$@" #
:BOF
setlocal
if not defined SIREUM_HOME (
echo Please set SIREUM_HOME env var
exit /B -1
)
%SIREUM_HOME%\bin\sireum.bat slang run "%0" %*
exit /B %errorlevel%
::!#*/
// #Sireum
import org.sireum._
import org.sireum.presentasi._
import org.sireum.presentasi.Presentation._
val home = Os.slashDir.up.canon
val resources = home / "jvm" / "src" / "main" / "resources"
val image = resources / "image"
val video = resources / "video"
val audio = resources / "audio"
val delay = 700
val isRyan: B = Os.cliArgs match {
case ISZ(string"Azure", "default", _*) => T
case _ => F
}
val sireumW = "Seereum"
val logikaW = "Logeeka"
val hamrW = "Hammer"
val camkesW = "Cam Keys"
val intellijW = "IntelliJay"
val sel4W: String = if (isRyan) "S.E.L. 4" else "essy L4"
val aadlW: String = if (isRyan) "A.A.D.L." else "A A D L"
val dodW: String = if (isRyan) "DoD" else "D O D"
val smtW: String = if (isRyan) "SMT" else "S M T"
val sbirW = "sibber"
val unswW: String = if (isRyan) "U.N.S.W." else "U N S W"
val cW: String = if (isRyan) "C" else "see"
val ideW: String = if (isRyan) "I.D.E." else "I D E"
val intro = Slide(
path = (image / "01-intro.png").string,
delay = 0,
text =
s"""
[1000]
Hello!
[250]
We'd like to share with you some tools that we are developing for building verified applications on top of $sel4W.
[250]
This work is funded primarily by a DARPA Phase 2 $sbirW, along with other related $dodW projects.
"""
)
val vision1 = Slide(
path = (image / "02-vision-01-sel4-1.png").string,
delay = 0,
text =
s"""
This conference series got started due to the success of $sel4W, whose formal verification
has been a significant success story in the formal methods and security communities.
[250]
In this talk, we are interested in exploring how we can continue to build on this great foundation.
"""
)
val vision2 = Slide(
path = (image / "02-vision-02-sel4-2.png").string,
delay = 0,
text =
s"""
In particular, how can we provide tools to build verified applications on top of the $sel4W verified infrastructure?
What are characteristics of the programming languages that we might use?
[250]
$sel4W is written in $cW. Can we, or should we, use something else for applications?
[250]
What types of formal methods should be used?
[250]
$sel4W verification translated C code into representations in the Isabelle theorem prover,
and verification was done within the theorem prover itself. Might we do something different for applications?
[250]
Moreover, development is not just getting code right, it involves connecting to designs requirements
and a host of other artifacts, so how should we accomplish that?
[250]
And how should we engineer our verification tools for continuous integrated delivery of formal verification?
"""
)
val vision3 = Slide(
path = (image / "02-vision-03-hamr-1.png").string,
delay = 0,
text =
s"""
In a tutorial session on Monday, we presented part of our vision for building verified applications on $sel4W.
[250]
In particular, we showed how our $hamrW framework, developed under the DARPA CASE program with
Collins Aerospace and $unswW, enables engineers to design their systems using the $aadlW
industry standard modeling language, that provides key abstractions for building analyzable real-time embedded systems.
"""
)
val vision4 = Slide(
path = (image / "02-vision-04-hamr-2.png").string,
delay = 0,
text =
s"""
To summarize, $hamrW enables engineers to use those models to automatically configure $sel4W to enforce spatial and temporal partitioning.
"""
)
val vision5 = Slide(
path = (image / "02-vision-05-hamr-3.png").string,
delay = -500,
text =
s"""
[-800]
It also generates application code skeletons to help developers program their application logic in a way that guarantees that the system is aligned with the structure and semantics of the design.
"""
)
val vision6 = Slide(
path = (image / "02-vision-06-hamr-4.png").string,
delay = -500,
text =
s"""
[-800]
and then automatically generate system builds for deployment on $sel4W
"""
)
val vision7 = Slide(
path = (image / "02-vision-07-hamr-aspects-1.png").string,
delay = 0,
text =
s"""
To a large extent, $hamrW already provides some key aspects of our vision for verified application development on $sel4W
"""
)
val vision8 = Slide(
path = (image / "02-vision-08-hamr-aspects-2.png").string,
delay = -500,
text =
s"""
[-800]
Firstly, it connects $sel4W deployments to formal and analyzable architecture models in a standardized modeling language
"""
)
val vision9 = Slide(
path = (image / "02-vision-09-hamr-aspects-3.png").string,
delay = -500,
text =
s"""
[-800]
System builds are organized, in part via the model, as an easy-to-understand and exchangeable visual artifact that
provides a true picture of the system’s structure
"""
)
val vision10 = Slide(
path = (image / "02-vision-10-hamr-aspects-4.png").string,
delay = -500,
text =
s"""
[-800]
Safety and security aspects such as partitioning, information flow controls, and correctness properties
reflected in the model, are guaranteed to be manifested in the deployed system
"""
)
val vision11 = Slide(
path = (image / "02-vision-11-hamr-aspects-5.png").string,
delay = -500,
text =
s"""
[-800]
System updates, reflected as changes to the model, can be rapidly reflected as a change
in the build and deployment via automated code regeneration, which is a DARPA CASE theme
"""
)
val vision12 = Slide(
path = (image / "02-vision-12-pl-1.png").string,
delay = 0,
text =
s"""
Given that $hamrW is beginning to address connections to designs models and the broader development context,
in this talk, we want to share some of our vision for the remaining aspects circled below.
"""
)
val vision13 = Slide(
path = (image / "02-vision-13-pl-2.png").string,
delay = 0,
text =
s"""
On Monday, we illustrated that $hamrW application logic can be programmed in $cW to help start the integration
with legacy development practices.
[250]
However, our vision for programming new high-assurance applications leverages capabilities afforded by
more modern languages.
[250]
In particular, developing high assurance applications for $sel4W
can benefit from modern languages that have the following characteristics.
[250]
It is amenable to highly-automated, usable, and scalable formal verification, and
effective for programming embedded safety and security critical systems.
[250]
It integrates easily with existing languages such as $cW, and
with model-driven development as emphasized by the $dodW Digital Transformation.
"""
)
val vision14 = Slide(
path = (image / "02-vision-14-tool.png").string,
delay = 0,
text =
s"""
So today we are going to tell you about out vision for this space based on a programming language called
Slang, and an accompanying verification environment called $logikaW.
[250]
These tools are all part of Kansas State’s $sireumW high assurance system engineering platform.
"""
)
val slang1 = Slide(
path = (image / "03-slang-1.png").string,
delay = 0,
text =
s"""
Slang is a safety critical subset of Scala with a simplified semantics.
[250]
Due to Scala's tight relation with Java, Slang benefits from the Java and Scala ecosystems which have
strong tool support such as integrated development environments.
[250]
Moreover, Slang can be cross-compiled to Javascript via Scala J S, which is handy to develop
rich web applications such as standalone and browsable interactive analysis reports and system simulations.
[250]
In addition, Slang can also be compiled ahead-of-time to native using Oracle's Graal V M, which avoids
JVM boot up time and reduces footprint costs.
[250]
Slang offers a clean and unified facility to interoperate with existing libraries and host languages
on all of its supported target platforms.
[250]
Another reason for building on Scala is that it has an extensible compiler architecture,
and this enabled us to insert custom program transformations phases in the standard
Scala compiler to implement the simplified Slang semantics.
"""
)
val slang2 = Slide(
path = (image / "03-slang-2.png").string,
delay = 0,
text =
s"""
Due to its careful design, Slang is also effective for programming embedded systems.
[250]
The Slang embedded subset can be translated to $cW without garbage collection runtime,
which helps ensure predictable run-time behavior.
[250]
For achieving a higher level of assurance, the generated $cW code can be compiled
using the CompCert Verified $cW compiler.
[250]
The generated $cW code can also be used to generate hardware by using
available high level hardware synthesis toolchains.
"""
)
val slang3 = Slide(
path = (image / "03-slang-3.png").string,
delay = 0,
text =
s"""
To support formal verification,
Slang includes both developer-friendly contract and proof languages,
which have full support within the development environment.
"""
)
val slang4 = Slide(
path = (image / "03-slang-4.png").string,
delay = 0,
text =
s"""
To support automated verification of contracts and proofs,
Slang is designed from the outset for program verification and other safety
and security analyses.
[250]
Simplification of language features is key to reduce the developer's reasoning burden and formal analysis costs.
[250]
For example, we restrict where aliasing can be introduced to a single programming language
construct, that is, method invocation, which is also the typical target boundary for
compositional reasoning.
[250]
Thus, aliasing can be analyzed hand-in-hand with other program properties of interests.
"""
)
val logika1 = Slide(
path = (image / "04-logika-1.png").string,
delay = 0,
text =
s"""
To support developer-friendly Slang verification,
$logikaW provides code-level $ideW integrated verification of Slang's contract and proof languages.
"""
)
val logika2 = Slide(
path = (image / "04-logika-2.png").string,
delay = 0,
text =
s"""
Verification is highly automated by using a suite of state-of-art $smtW solvers
that work in the background to provide continuous delivery of program checking
"""
)
val logika3 = Slide(
path = (image / "04-logika-3.png").string,
delay = 0,
text =
s"""
This continuous, always on, verification is enabled by a significant tool engineering effort.
In particular, $logikaW is able to provide smart incremental checking that is triggered by editor
actions.
"""
)
val logika4 = Slide(
path = (image / "04-logika-4.png").string,
delay = 0,
text =
s"""
This incremental checking is key to scalability.
[250]
When updates are made in the editor, it enables $logikaW to re-check only the code changed.
[250]
Scalability is also enabled by a powerful server-based architecture that provides massive
parallelization of the formal verification.
[250]
This provides a foundation for scalable cloud-based delivery of verification resources for on-demand
servicing of verification needs.
"""
)
val logika5 = Slide(
path = (image / "04-logika-5.png").string,
delay = 0,
text =
s"""
Finally, since we realize that not all verification can be automated,
$logikaW provides what we call deep-dive gateways in both the verification
tool and in the proof notations to allow expert-level engineers to
drill down into verification details and to introduce
manual proof engineering when needed.
"""
)
val logikaThemes1 = Slide(
path = (image / "05-logika-themes-1.png").string,
delay = 0,
text =
s"""
We'll now provide a series of demos illustrating Logika Themes.
"""
)
val logikaThemes2 = Slide(
path = (image / "05-logika-themes-2.png").string,
delay = 0,
text =
s"""
Let's start with these first three themes.
Democratization of Formal Methods,
Integration into Industrial Tools, and
Continuous Delivery of Formal Verification.
"""
)
val demoLogika01 = Video(
path = (video / "06-demo-logika-intro.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 0.0,
end = 0.0,
textOpt = Some(
s"""
We'll see how these are addressed by integrating Logika into $intellijW,
the most widely used industrial $ideW for Scala development.
[250]
$intellijW provides extension points for customizing its Scala type checker, so we can adapt it to work nicely with Slang.
"""
)
)
val demoLogika02 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = -3000,
volume = 0.0,
rate = 1.0,
start = 15066.7,
end = 24000.0,
textOpt = Some(
s"""
Slang analysis engines, such as $logikaW, runs as a $sireumW micro service in the background.
[250]
Here, we have some example code with data structures inspired from an unmanned aerial vehicle mission control system.
[250]
The example declares an immutable Waypoint datatype that holds coordinate information.
[250]
A mission typically consists of a sequence of waypoints such as what is stored in S one, which is of mutable sequence type.
[250]
As $logikaW works, it decorates program editors to communicate its analysis feedback.
"""
)
)
val demoLogika03 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 26500.0,
end = 30000.0,
textOpt = Some(
s"""
It decorates each statement with its precondition state claims that it computes,
"""
)
)
val demoLogika04 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = -2000,
volume = 0.0,
rate = 1.5,
start = 30000.0,
end = 47000.0,
textOpt = Some(
s"""
[${-2 * delay}]
which aids program reasoning while also serving as auditable evidence.
[250]
The state claims are naturally represented at the Slang source level,
[0]
and as you can observe, the claims are intuitive as there is no heap object representation, pointers, or references.
[250]
This is the direct result of Slang language simplification, which both reduces our reasoning mental model burden
and helps scale Slang analyses.
"""
)
)
val demoLogika05 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 54500.0,
end = 57500.0,
textOpt = Some(
s"""
$logikaW also decorates the editors with verification condition checking results, in this case, by using $smtW query solving.
[250]
Each query is annotated with solving result, as well as its solving parameters, which can be configured by users.
"""
)
)
val demoLogika06 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 63000.0,
end = 69000.0,
textOpt = Some(
s"""
Each sequence or array access is implicitly bound-checked to ensure that it does not produce runtime error or buffer overflow.
"""
)
)
val demoLogika07 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 69000.0,
end = 80000.0,
textOpt = Some(
s"""
Suppose that we seed an out of bound access. $logikaW analysis in the background continuously give direct verification feedback upon code change.
[250]
We believe such seamless integration into typical development workflow is key to formal method success.
"""
)
)
val demoLogika08 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 92000.0,
end = 102000.0,
textOpt = Some(
s"""
As issues are fixed, $logikaW re-verifies the code and can confirm that such issues have been properly addressed.
[250]
We like this line editor decoration feedback mechanism because it gives a sense of analysis coverage,
which feels familiar to the line coverage information in testing.
"""
)
)
val demoLogika09 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 103750.0,
end = 118250.0,
textOpt = Some(
s"""
Let us now start adding some explicit assertions to confirm our understanding of the program behaviors.
[250]
For example, we can assert that the first element of S two is a waypoint holding the coordinate one, two, and three, as assigned at line fourteen.
[250]
Obviously, such assertion should hold and it is confirmed by $logikaW as the feedback decoration does not indicate that there is an issue.
"""
)
)
val demoLogika10 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 118250.0,
end = 135000.0,
textOpt = Some(
s"""
Suppose that we assert the same for the first element of S one.
[250]
This is where Slang differs from Scala or Java where a deep copy of S one was made at line eleven before assigning to S two.
[250]
Thus, the assertion is invalid.
"""
)
)
val demoLogika11 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 142500.0,
end = 153500.0,
textOpt = Some(
s"""
We can confirm such behavior by running the program,
by clicking the green play icon at the top of the program editor,
and it will trigger code compilation.
[250]
Once it finishes, the resulting code is then run, which in this case, triggers an assertion error, as $logikaW has warned us.
[250]
This illustrates how one can test and prove their code in the same $sireumW verification environment.
"""
)
)
val demoLogika12 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 161500.0,
end = 173750.0,
textOpt = Some(
s"""
Due to the deep copy, the value of S one should not be affected, and it is the same as what assigned at line ten.
[250]
We can ask $logikaW to confirm it for us by asserting it.
[250]
One might think that such deep copying might produce less than ideal performant code,
however, in many cases, the performance differences do not matter as much as what we might have thought.
[250]
On cases where they do matter, there are effective programming patterns and principles that can be applied,
which are discussed in the Slang Isola paper appeared last year.
"""
)
)
val demoLogika13 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 2.0,
start = 173750.0,
end = 179500.0,
textOpt = Some(
s"""
Let us now look at more interesting properties.
"""
)
)
val demoLogika14 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 181000.0,
end = 197500.0,
textOpt = Some(
s"""
I am going to copy and paste some prepared code to save time.
[250]
You can observe that the added methods have some contract annotations.
[250]
Both inZone and W P diff are strictly pure methods, which do not make side effects.
[250]
Such methods can be directly used in contract specifications, as shown in move waypoint X,
which has the typical pre and post conditions.
[250]
Move waypoint X itself is a pure method, which means that
there is no observable side-effect from the outside of the method.
[250]
As can be observed, we leverage Scala syntax to express specification.
The Contract specification at line 28 is implemented by using a Scala macro
which is erased before code generation, thus,
the specification does not affect the code runtime behaviors.
[250]
In the future, it is possible to introduce a runtime assertion checker tool
that weaves in contracts as assertions for testing purposes, or dynamic enforcement.
"""
)
)
val education = Slide(
path = (image / "07-education.png").string,
delay = 0,
text =
s"""
Regarding democratization of formal methods, it is interesting to note that
the first version of $logikaW, which was much less ambitious,
was developed to support teaching of a required undergraduate course at Kansas State
on logic and program verification.
"""
)
val educationWeb = Video(
path = (video / "08-education-web.mp4").string,
delay = -2000,
volume = 0.0,
rate = 1.00,
start = 0.0,
end = 0.0,
textOpt = Some(
s"""
It has proven very fruitful. For the past five years, the tool has been used to teach
over one thousand K-State undergraduates.
[250]
Moreover, $logikaW has been adopted by others, for example, to teach undergraduate and
graduate courses at Aarhus University in Denmark.
[250]
The accompanying course notes are publicly available online.
[250]
Here you can observe the manual program proofs which we then switch students to automated
verification via symbolic execution and SMT2 solving.
[250]
This teaching experience demonstrates that it is possible to lower the barrier of entry
for proving program safety and security even to the undergraduate level,
with proper training and good tool support.
"""
)
)
val logikaThemes3 = Slide(
path = (image / "09-logika-themes-incremental.png").string,
delay = 0,
text =
s"""
Now let's consider the theme of incremental checking by first discussing
some of the details of the $sireumW code base.
"""
)
val codebase1 = Slide(
path = (image / "10-codebase-1.png").string,
delay = 0,
text =
s"""
Up to this point, we’ve been demoing Slang and $logikaW on some small script files.
[250]
So you may be wondering, does all of this work “at scale”?
[250]
The answer is Yes!
"""
)
val codebase2 = Slide(
path = (image / "10-codebase-2.png").string,
delay = 0,
text =
s"""
In addition to applying Slang and $logikaW with our industrial partners on various $dodW projects,
we also validate the design and scalability of Slang tooling by applying them when developing the $sireumW code base itself,
which includes Slang, $hamrW, and $logikaW.
[250]
The code base is around two hundred and ten thousand lines of code, with eighty five percent of the code base,
or around one hundred and eighty thousand lines of code, is written in Slang.
[250]
So not only does that validate the effectiveness of Slang for coding large applications,
"""
)
val codebase3 = Slide(
path = (image / "10-codebase-3.png").string,
delay = -2000,
text =
s"""
[-1500]
it means that we can also apply $logikaW to verify portions of $sireumW,
including our $hamrW code generation pipelines for $sel4W as well as the $logikaW implementation itself.
"""
)
val codebase4 = Slide(
path = (image / "10-codebase-4.png").string,
delay = 0,
text =
s"""
This provides a pathway for eventually mechanizing the proofs of correctness
of our own verification, analysis, and code generation tools.
[250]
We're currently applying these idea to $hamrW infrastructure code generated for $sel4W.
"""
)
val codebase5 = Slide(
path = (image / "10-codebase-5.png").string,
delay = 0,
text =
s"""
We're now going to demonstrate that the same continuous integrated verification that worked for small programs
also works when $logikaW is applied to this large code base.
[250]
This is possible due to our carefully engineered approach for incremental and focused checking.
"""
)
val demoOption1 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 3.0,
start = 366000.0,
end = 370000.0,
textOpt = Some(
s"""
Let's look at the implementation of the option type.
[250]
Option is part of the Slang runtime library that is part of $sireumW.
"""
)
)
val demoOption2 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 380000.0,
end = 380500.0,
textOpt = Some(
s"""
Here you can see that the Slang implementations include some very basic contracts.
[250]
For this example, the size of the contract and associated code is not important.
"""
)
)
val demoOption3 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = -1000,
volume = 0.0,
rate = 1.0,
start = 380500.0,
end = 385000.0,
textOpt = Some(
s"""
The main point is that $logikaW verification will be triggered by
edits in the file to start the checking process.
[250]
Then, the $logikaW incremental analysis framework will use module dependency information for
the entire code base and figure out a minimal amount of work to verify the body of this method.
[250]
You just saw a moment ago that $logikaW was able to quickly conclude its checking to find a contract violation in less than a second.
"""
)
)
val demoOption4 = Video(
path = (video / "06-demo-logika.mp4").string,
delay = -1000,
volume = 0.0,
rate = 1.0,
start = 386250.0,
end = 390000.0,
textOpt = Some(
s"""
Then, when we correct the error, $logikaW can conclude almost immediately that method satisfies its contract.
"""
)
)
val codebaseGraph = Slide(
path = (image / "11-codebase-graph.png").string,
delay = 0,
text =
s"""
[1500]
$logikaW incremental checking leverages project codebase modularity for scaling its analysis
and optimizing user interactions.
[250]
Just like an incremental build tool, it understands the dependence relationships between modules
as captured in the system's build specification. For example, the modules and
dependences reflected in the $sireumW code base build specification are diagrammed here.
[250]
Using this information, when a file is edited or a current point in the program
is selected for verification, $logikaW can avoid examining code not needed for the
verification of the current section of code.
"""
)
val codebaseIncremental1 = Video(
path = (video / "12-codebase-incremental.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 0.0,
end = 1700.0,
useVideoDuration = T,
textOpt = Some(
s"""
Let me describe how it works, intuitively.
"""
)
)
val codebaseIncremental2 = Video(
path = (video / "12-codebase-incremental.mp4").string,
delay = 0,
volume = 0.0,
rate = 1.0,
start = 1700.0,
end = 2000.0,
textOpt = Some(
s"""
[750]
When a particular file such as Option is analyzed
"""
)
)
val codebaseIncremental3 = Video(
path = (video / "12-codebase-incremental.mp4").string,
delay = -250,
volume = 0.0,
rate = 1.0,
start = 2000.0,
end = 5000.0,
textOpt = Some(
s"""
[${-2 * delay}]
$logikaW starts at the root modules and works downward in the project module dependency graph.
"""
)
)
val incremental1 = Slide(
path = (image / "13-incremental-1.png").string,
delay = -2500,
text =
s"""
[${-2 * delay}]
until it finds the module where the file resides.
"""
)
val incremental2 = Slide(
path = (image / "13-incremental-2.png").string,
delay = 0,
text =
s"""
Along the way, $logikaW only lightly analyzes the relevant
modules.
[250]
That is, $logikaW employs the Slang frontend to parse and
outline class, field, and method type signatures for all
files in the modules, without fully type checking method bodies.
"""
)
val incremental3 = Slide(
path = (image / "13-incremental-3.png").string,
delay = 0,
text =
s"""
Only the Option file is fully type checked, which then
verified.
[250]
In the context where user is editing a particular method,
the process is further optimized by focusing full type
checking and verification to that method.
"""
)
val incremental4 = Slide(
path = (image / "13-incremental-4.png").string,
delay = 0,
text =
s"""
Furthermore, $logikaW aggressively caches intermediate
analysis results to speed up subsequent analyses.
[250]
For example, module-level file type information is soundly
cached by file fingerprinting.
[250]
$smtW queries are also cached to speed up re-verification.
[250]
We found these to be very effective, especially so for
providing continuous verification in an $ideW.
[250]
For less capable machines, $logikaW offers ways to tone
down its caching strategies.
"""
)
val hamrAbstraction1 = Slide(
path = (image / "14-hamr-abstraction-1.png").string,
delay = 0,
text =
s"""
So let’s start making a stronger connection to $sel4W by returning to this diagram from the beginning of the talk.
"""
)
val hamrAbstraction2 = Slide(
path = (image / "14-hamr-abstraction-2.png").string,
delay = 0,
text =
s"""
We now want to show a demo where we use $hamrW, with components written in Slang, which can then be translated to C.
[250]
Recall that if you wish, the Slang code can first be tested in multiple platforms, including JVM and natively in Linux.
[250]
Also, you have the option of compiling the C with the verified CompCert compiler, which guarantees that the produced binary
behaviors faithfully reflect the C source's.
"""
)
val hamrAbstraction3 = Slide(
path = (image / "14-hamr-abstraction-3.png").string,
delay = 0,
text =
s"""
Moreover, we can use the Slang Contracts and Logika verification to formally verify correctness properties of the
application code.
[250]
However, the story doesn’t end there. We can keep scaling up through the abstraction stack.
"""