-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
660 lines (567 loc) · 48.9 KB
/
index.html
File metadata and controls
660 lines (567 loc) · 48.9 KB
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
<!--
Author: W3layouts
Author URL: http://w3layouts.com
-->
<!doctype html>
<html lang="en">
<head>
<link rel="icon" type="image/jpg" href="assets/images/iconLJ.png" sizes="228x228" />
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Liquid Java</title>
<!-- web fonts -->
<link href="//fonts.googleapis.com/css?family=Nunito:400,600,700,800,900&display=swap" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Hind&display=swap" rel="stylesheet">
<!-- //web fonts -->
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Template CSS -->
<link rel="stylesheet" href="assets/css/style-starter.css">
</head>
<body>
<!-- <section class="w3l-bootstrap-header">
<nav class="navbar navbar-expand-lg navbar-light py-lg-3 py-2">
<div class="container">
<a class="navbar-brand" href="index.html">Catarina Gamboa</a> -->
<!-- if logo is image enable this
<a class="navbar-brand" href="#index.html">
<img src="image-path" alt="Your logo" title="Your logo" style="height:35px;" />
</a> -->
<!-- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon fa fa-bars"></span>
</button> -->
<!-- <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="projects.html">Papers</a>
</li>
<li class="nav-item">
<a class="nav-link" href="activities.html">Other Activities</a>
</li>
</ul>
</div> -->
<!-- </div>
</nav>
</section> -->
<!-- <section class="w3l-about-breadcrum">
<div class="breadcrum-bg">
<div class="container py-5">
<p> <br/><!--<a href="index.html">Home</a> / About--></p>
</div>
</div>
</section>
<!-- w3l-content-photo-5 -->
<div class="w3l-content-photo-5 py-5" id="about">
<div class="content-main pt-lg-5 pt-md-3 pb-0" style='padding-top: 0rem !important;'>
<div class="container">
<div style='text-align: right;'>
<p>Project developed at
<img src="assets/images/logos.png" alt="Logo" width="50%">
<!-- <img src="assets/images/normal.png" alt="Lasige logo" width="150" height="55">
<img src="assets/images/ciencias_ul_azul_h_s-ass.png" alt="FCUL logo" width="100" height="40"> -->
<!-- Add lasige and FCUL logo -->
</p>
</div>
<br/><br/><br/>
<div class="row">
<div class="col-lg-5 content-photo">
<a href="#"><img src="assets/images/Liquid2.png" class="img-fluid" alt="content-photo"></a>
</div>
<div class="col-lg-7 content-left mt-lg-0 mt-5 pl-lg-5">
<h3>Extending Java with <br/>Liquid Types</h3>
<p class="mb-0">
<b>Extend your Java code with Refinement Types and catch bugs earlier!</b><br/>
LiquidJava implements an additional type system with Refinement Types on top of Java.
It allows developers to express better restrictions on the code and discover more bugs before executing the program.
</p>
</div>
</div>
<br/><br/>
<br/>
<div class="row">
<div class="col-lg-2 content-left mt-lg-0 mt-5 pl-lg-5">
</div>
<div class="col-lg-7 content-left mt-lg-0 mt-5 pl-lg-5">
<div class="iframe_container">
<iframe class="responsive-iframe" src="https://www.youtube-nocookie.com/embed/MOZESsOtUAU" title="YouTube video player" style="border:0;" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
</div>
</div>
<br/><br/><br/>
<div class="row">
<div class="col-lg-12 content-left mt-lg-0 mt-5 pl-lg-5">
<h4><b>Learn more</b> about LiquidJava!</br></h4>
<div>
<h5 class="small_p"><span class="fa fa-file"></span> Papers:</h5>
<p class="small_p"><b><a href="https://dl.acm.org/doi/abs/10.1109/ICSE48619.2023.00132">Usability-Oriented Design of Liquid Types for Java</a>, </b>
by Catarina Gamboa, Paulo Canelas, Christopher Timperley and Alcides Fonseca, ICSE 2023</p>
</div>
</br>
<div class="row">
<div class = "col-lg-6">
<h5 class="small_p"><span class="fa fa-image"></span> Posters:</h5>
<p class="small_p"><b><a href="https://icse2023.paperlessevents.com.au/share/Gamboa-85">Usability-Oriented Design of Liquid Types for Java</a>, </b>
by Catarina Gamboa, Paulo Canelas, Christopher Timperley and Alcides Fonseca, ICSE digital poster session.</p>
<p class="small_p"><b><a href="https://catarinagamboa.github.io/assets/docs/poster_LiquidJava.pdf">LiquidJava: Adding Lightweight Verification to Java</a>, </b>
by Catarina Gamboa, Paulo Canelas, Christopher Timperley and Alcides Fonseca, INForum 2021 - Informatics Symposium, Lisbon, Portugal. Award for Best Student Poster.</p>
</div>
<div class = "col-lg-6">
<h5 class="small_p"><span class="fa fa-github"></span> GitHub Repositories:</h5>
<p class="small_p"><b><a href="https://github.com/liquid-java/liquidjava">liquidjava</a> </b>
- main repository with api, verifier and examples.</p>
<p class="small_p"><b><a href="https://github.com/liquid-java/liquidjava-examples">liquidjava-examples</a> </b> - usage examples </p>
<p class="small_p"><b><a href="https://github.com/liquid-java/liquid-java-external-libs">liquid-java-external-libs</a> </b> - annotations in Java standard libraries</p>
<p class="small_p"><b><a href="https://github.com/liquid-java/vscode-liquidjava">vscode-liquidjava</a> </b>
- vscode extension for liquidjava using LSP
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<section class="w3l-feature-code" id="features">
<div class="grid top-bottom">
<div class="container">
<div class="heading text-center mx-auto">
<h3 class="head text-white">Install the LiquidJava Plugin</h3>
<h5 class="head text-white mt-3">Download the <a href="https://marketplace.visualstudio.com/items?itemName=AlcidesFonseca.liquid-java" style='color:white;'><span style='color: #ffb3d9'>Visual Studio Code plugin</span></a></h5>
<p class="my-3 head text-white">Also available in the <a href="https://open-vsx.org/extension/AlcidesFonseca/liquid-java" style='color:white;'><span style='color: #ffb3d9'>Open VSX Registry</span></a></p>
<p p class="my-3 head text-white">
<strong>Requirements:</strong>
<br/>Visual Studio Code <a href='https://code.visualstudio.com/#alt-downloads'><span class="fa fa-external-link-square" style='color:#959595'></span></a></li>
<br/>JDK 20 <a href='https://www.oracle.com/java/technologies/downloads/#java20'><span class="fa fa-external-link-square" style='color:#959595'></span> </a></li>
<br/>Language Support for Java by Red Hat plugin <a href='https://marketplace.visualstudio.com/items?itemName=redhat.java'><span class="fa fa-external-link-square" style='color:#959595'></span></a></li>
</p>
<!-- <p class="my-3 head text-white"> <a href="./assets/extension/liquid-java-0.0.14.vsix" style='color:white;'>Download it here</a></p> -->
</div>
<p class="my-3 text-white text-center">To use the LiquidJava annotations, include the LiquidJava API in your project. Maven and Gradle setup instructions are available <a href="https://github.com/liquid-java/vscode-liquidjava" style='color:white;'><span style='color: #ffb3d9'>here</span></a>.</p>
<p class="my-3 text-white text-center">To learn how to use LiquidJava and its capabilities, you can follow the <a href="https://github.com/liquid-java/liquidjava-tutorial" style='color:white;'><span style='color: #ffb3d9'>LiquidJava tutorial guide</span></a>.</p>
</div>
</div>
</div>
</section>
<section class="w3l-about ">
<div class="skills-bars py-5">
<div class="container py-md-3">
<div class="row mt-5 pt-3">
<h3>Predicates</h3>
<p style=" padding-bottom: 17px;">
Refinement Types extend a language with predicates over the basic types.
<code>@Refinement("x > 0") int x;</code> is an example of a variable <code>x</code> that
has the basic type <code>int</code>, and is refined with the predicate <code>x > 0</code>.<br/>
The predicates allowed inside the refinement belong to <i>quantifier-free linear integer arithmetic</i> logic.
Some examples can be seen below.<br/>
</p>
<!-- <h5>Predicate examples:</h5> -->
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Equals ==</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"x == 0"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">x</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Different != </h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"x != 0"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">x</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Inequality Symbols > >= < <=</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"y <= 0"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">y</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">0</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Negate !</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"!(y > 0)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">y</span> <span style="color: #f92672">=</span> <span style="color: #f92672">-</span><span style="color: #ae81ff">200</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>And &&</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"(0 <= y) && (y <= 100)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">y</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">25</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Or ||</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"(x == 0) || (x == 100)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">y</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">100</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Arithmetic Operators + - * / %</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"(v + 20) < 100"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">v</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">79</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Arithmetic Operators * / %</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"(odd % 2) != 0"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">odd</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">5</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Represent Variable _ </h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"_ > 0 "</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">y</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">100</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>If then else ()? ():()</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"(a > b)? (_ == a) : (_ == b)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">int</span> <span style="color: #a6e22e">max</span><span style="color: #f92672">(</span><span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">a</span><span style="color: #f92672">,</span> <span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">b</span><span style="color: #f92672">){...}</span>
</pre></div>
</div>
<p style=" padding-bottom: 17px;">
To simplify the usage of refinements, we can create <b>Predicate Aliases</b>
and apply them to the variables inside a <code>@Refinement</code>.
<br/>
</p>
<br/>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Alias</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@RefinementAlias</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Percentage(int v) { 0 <= v && v <= 100 }"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">class</span> <span style="color: #a6e22e">X</span> <span style="color: #f92672">{...}</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Alias Usage</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Percentage(y)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">y</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">25</span><span style="color: #f92672">;</span>
</pre></div>
</div>
<p style=" padding-bottom: 17px;">
Refinements can also be used to model <b>Object State</b> by adding the possible
states and transitions to the class and the desired <i>Ghost</i> predicates to model
class properties.<br/>
</p>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Class States</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@StateSet</span><span style="color: #f92672">({</span><span style="color: #e6db74">"open"</span><span style="color: #f92672">,</span> <span style="color: #e6db74">"close"</span><span style="color: #f92672">})</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">class</span> <span style="color: #a6e22e">ReadFile</span><span style="color: #f92672">{...}</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Use States</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@StateRefinement</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">from</span><span style="color: #f92672">=</span><span style="color: #e6db74">"open(this)"</span><span style="color: #f92672">,</span> <span style="color: #f8f8f2">to</span><span style="color: #f92672">=</span><span style="color: #e6db74">"close(this)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">void</span> <span style="color: #a6e22e">closeFile</span><span style="color: #f92672">(){...}</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Class Ghost</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Ghost</span><span style="color: #f92672">(</span><span style="color: #e6db74">"int size"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">class</span> <span style="color: #a6e22e">List</span><span style="color: #f92672">{...}</span>
</pre></div>
</div>
<!-- ##### Predicate Example ##### -->
<div class="col-lg-4 col-md-4 col-sm-6 skills-bar-grids mb-4 pb-2-code">
<h4>Use Ghost</h4>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@StateRefinement</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">to</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"size(this) == (size(old(this)) + 1)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">void</span> <span style="color: #a6e22e">add</span><span style="color: #f92672">(</span><span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">elem</span><span style="color: #f92672">){...}</span>
</pre></div>
</div>
</div>
</div>
</div>
</section>
<section class="w3l-feature-code" id="features">
<div class="grid top-bottom">
<div class="container">
<div class="heading text-center mx-auto">
<h3 class="head text-white">LiquidJava Examples</h3>
<p class="my-3 head text-white"> Find examples of LiquidJava in different parts of code.</p>
</div>
<div class="middle-section grid-column text-center mt-5 pt-3">
<a href="#refinementVariables"><div class="three-grids-columns">
<span class="fa fa-bullseye"></span>
<h4>Variables</h4>
<p>Examples of refinements in variables and class fields</p>
</div></a>
<a href="#refinementMethods"><div class="three-grids-columns">
<span class="fa fa-cogs"></span>
<h4>Methods</h4>
<p>Examples of methods with refinements in their parameters and return value.</p>
</div></a>
<a href="#refinementClasses"><div class="three-grids-columns">
<span class="fa fa-puzzle-piece"></span>
<h4>Classes</h4>
<p>Examples of object type state modelling using State Sets and Ghost attributes</p>
</div></a>
</div>
</div>
</div>
</section>
<section class="w3l-about ">
<div class="skills-bars py-5" style="background-color: #fff;">
</div>
</section>
<section class="w3l-feature-code" id="features">
<div class="grid top-bottom" style="padding: 25px 0px;">
<div class="container">
<div class="heading text-center mx-auto">
<h3 class="head text-white">Refinements in Variables</h3>
<p class="my-3 head text-white">We can add a <code>@Refinement</code> in any place we already have a basic type in the code. Hence, in declarations of variable or class fields it is possible to add a refinement type.</p>
</div>
</div>
</div>
</section>
<section class="w3l-about ">
<a id="refinementVariables">
<div class="skills-bars py-5" style="background-color: #fff;">
<div class="container py-md-3">
<div class="heading mx-auto">
<!-- ################ VARIABLES ################ -->
<!-- <div class="papers text-center"> -->
<!-- Example -->
<h5>Positive</h5>
<p>The variable has a value greater than zero.</p>
<!-- HTML generated using hilite.me -->
<div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;">
<pre style="margin: 0; line-height: 125%">
<span class='codeline'><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"positive > 0"</span><span style="color: #f92672">)</span></span>
<span class='codeline'><span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">positive</span><span style="color: #f92672">;</span></span>
<span class='codeline'><span style="color: #f8f8f2">positive</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">50</span><span style="color: #f92672">;</span> <span style="color: #75715e">//Correct</span></span>
<span class='codeline'><span style="color: #f8f8f2">positive</span> <span style="color: #f92672">=</span> <span style="color: #f92672">-</span><span style="color: #ae81ff">1</span><span style="color: #f92672">;</span> <span style="color: #75715e">//Error</span></span>
</pre>
</div>
<br/>
<!-- Example -->
<h5>Percentage</h5>
<p>Lower and upper bounds are set to the variable. The <code>_</code> represents the variable on which the refinement is being applied, in this case <code>_ >= 0</code> is the same as <code>percentage >= 0</code>.</p>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">
<span class='codeline'><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"_ >= 0 && _ <= 100"</span><span style="color: #f92672">)</span></span>
<span class='codeline'><span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">percentage</span><span style="color: #f92672">;</span></span>
<span class='codeline'><span style="color: #f8f8f2">percentage</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">50</span><span style="color: #f92672">;</span> <span style="color: #75715e">//Correct</span></span>
<span class='codeline'><span style="color: #f8f8f2">percentage</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">10</span> <span style="color: #f92672">+</span> <span style="color: #ae81ff">99</span><span style="color: #f92672">;</span> <span style="color: #75715e">//Error</span></span>
</pre></div>
<!-- Example -->
<br/>
<h5>RGB fields</h5>
<p> Class fields can have refinements just like any local variable. This example shows the use of the Alias <code>RGB</code> in the fields of <code>MyColor</code> class. The alias limits the values that an rgb color can have (an interval between 0 and 255) ensuring that each field only has values that belong to the correct interval.
</p>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@RefinementAlias</span><span style="color: #f92672">(</span><span style="color: #e6db74">"RGB(int x) {x >= 0 && x <= 255}"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">class</span> <span style="color: #a6e22e">MyColor</span><span style="color: #f92672">{</span>
<span style="color: #a6e22e">@Refinememt</span><span style="color: #f92672">(</span><span style="color: #e6db74">"RGB(r)"</span><span style="color: #f92672">)</span> <span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">r</span><span style="color: #f92672">;</span>
<span style="color: #a6e22e">@Refinememt</span><span style="color: #f92672">(</span><span style="color: #e6db74">"RGB(_)"</span><span style="color: #f92672">)</span> <span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">g</span><span style="color: #f92672">;</span>
<span style="color: #a6e22e">@Refinememt</span><span style="color: #f92672">(</span><span style="color: #e6db74">"RGB(_)"</span><span style="color: #f92672">)</span> <span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">b</span><span style="color: #f92672">;</span>
<span style="color: #f92672">}</span>
</pre></div>
<!-- ################ END VARIABLES ################ -->
<br/><br/><br/>
</div>
</div>
</div>
</a>
</section>
<section class="w3l-feature-code" id="features">
<a id="refinementMethods">
<div class="grid top-bottom" style="padding: 25px 0px;">
<div class="container">
<div class="heading text-center mx-auto">
<h3 class="head text-white">Refinements in Methods</h3>
<p class="my-3 head text-white">
In methods, both the parameters and the return value can have refined types.<br/>The parameters refinements will ensure that the method is only invoked with the expected types. <br/>The return refinement guarantees that the return inside the method's body corresponds to the expected type.
</p>
</div>
</div>
</div>
</a>
</section>
<section class="w3l-about ">
<div class="skills-bars py-5" style="background-color: #fff;">
<div class="container py-md-3">
<div class="heading mx-auto">
<!-- ################ METHODS ################ -->
<!-- <div class="papers text-center"> -->
<!-- Example -->
<h5>Absolute</h5>
<p>To refine the <b>return type</b> of a method, we can add the <code>@Refinement</code> annotation above the method. We use the <code>_</code> wild variable to refer to the return value. In this example, we state that the return of <code>absolute</code> has a value between 0 and the parameter <code>n</code>.</p><br/>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"_ >= 0 && _ >= n"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">static</span> <span style="color: #66d9ef">int</span> <span style="color: #a6e22e">absolute</span><span style="color: #f92672">(</span><span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">n</span><span style="color: #f92672">)</span> <span style="color: #f92672">{</span>
<span style="color: #66d9ef">if</span><span style="color: #f92672">(</span><span style="color: #ae81ff">0</span> <span style="color: #f92672"><=</span> <span style="color: #f8f8f2">n</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">return</span> <span style="color: #f8f8f2">n</span><span style="color: #f92672">;</span>
<span style="color: #66d9ef">else</span>
<span style="color: #66d9ef">return</span> <span style="color: #ae81ff">0</span> <span style="color: #f92672">-</span> <span style="color: #f8f8f2">n</span><span style="color: #f92672">;</span>
<span style="color: #f92672">}</span>
</pre></div>
<br/>
<!-- Example -->
<h5>Add Bonus - Grade</h5>
<p>We can also refine the type of the method's <b>parameters</b>. In this example, both parameters have to be a <code>Percentage</code> (alias for <code>_ >= 0 && _ <= 100</code>) and <code>bonus</code> must be lesser than <code>grade</code>. <br/>We can refer to a previous parameter in the current parameter's refinement, but not the other way around. For example, <code>bonus</code> can refer to <code>grade</code> but <code>grade</code> cannot use <code>bonus</code> in its refinement.</p><br/>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@RefinementAlias</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Percentage(int x) { x >= 0 && x <= 100}"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">class</span> <span style="color: #a6e22e">Grade</span><span style="color: #f92672">{</span>
<span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Percentage(_)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">static</span> <span style="color: #66d9ef">int</span> <span style="color: #a6e22e">addBonus</span><span style="color: #f92672">(</span><span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Percentage(_)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">grade</span><span style="color: #f92672">,</span>
<span style="color: #a6e22e">@Refinement</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Percentage(_) && bonus < grade"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">int</span> <span style="color: #f8f8f2">bonus</span><span style="color: #f92672">){</span>
<span style="color: #66d9ef">if</span><span style="color: #f92672">((</span><span style="color: #f8f8f2">bonus</span> <span style="color: #f92672">+</span> <span style="color: #f8f8f2">grade</span><span style="color: #f92672">)</span> <span style="color: #f92672">></span> <span style="color: #ae81ff">100</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">return</span> <span style="color: #ae81ff">100</span><span style="color: #f92672">;</span>
<span style="color: #66d9ef">else</span>
<span style="color: #66d9ef">return</span> <span style="color: #f8f8f2">grade</span> <span style="color: #f92672">+</span> <span style="color: #f8f8f2">bonus</span><span style="color: #f92672">;</span>
<span style="color: #f92672">}</span>
<span style="color: #f92672">}</span>
</pre></div>
<!-- ################ END METHODS ################ -->
</div>
</div>
</div>
</section>
<section class="w3l-feature-code" id="features">
<a id="refinementClasses">
<div class="grid top-bottom" style="padding: 25px 0px;">
<div class="container">
<div class="heading text-center mx-auto">
<h3 class="head text-white">Refinements in Classes</h3>
<p class="my-3 head text-white">LiquidJava contains the mechanisms to model Object Type State.
<br/>
Since class methods can have effects on the internal state of objects, each method can be annotated with the allowed state transitions using the <code>@StateRefinement(from = "...", to = "...")</code> annotation. In this annotation, the <code>from</code> argument represents the object states in which the method can be invoked, whereas the <code>to</code> argument represents the state the object will have at the end of the method execution. <br/>
There are two possibilities of modelling object state:<br/>
<b>State Sets:</b> If a class has a defined set of states, it is possible to create multiple <code>@StateSet</code> that include the allowed object states.<br/>
<b>Ghost Properties:</b> To model other properties (int or boolean) it is possible to create <code>@Ghost</code> properties that work as uninterpreted functions.<br/>
In either case, whenever there is a need to refer to the previous state of the object, it is possible to use the <code>old</code> keyword.
</p>
</div>
</div>
</div>
</a>
</section>
<section class="w3l-about ">
<div class="skills-bars py-5" style="background-color: #fff;">
<div class="container py-md-3">
<div class="heading mx-auto">
<!-- ################ CLASSES ################ -->
<!-- <div class="papers text-center"> -->
<!-- Example -->
<h5></h5>
<p>If a class follows an implicit protocol that can be described by a DFA, then the protocol can be described in LiquidJava to ensure that the different methods are invoked in the correct order. <br/>To define the possible object states we create a string array with their names inside the <code>@StateSet</code> annotation.
<br/>Then these states can be used inside <code>@StateRefinement</code> annotations to ensure the object state of the object in the beginning of the method call (<code>from</code>) and change the state at the end of the invocation (<code>to</code>).
<br/>
This example implements an order for the composition of an email:
<br/>
- <b>Constructor</b> - constructor starts the object with emptyEmail state<br/>
- <b>From Method</b> - changes state from emptyEmail to senderSet<br/>
- <b>To Method</b> - can accept the object in senderSet state or receiverSet state</br>
- <b>Subject Method</b> - the object needs to be in receiverSet state but does not transition to another, staying in the same state. The invocation of this method is optional to complete the protocol</br>
- <b> Method Body</b> - once the receiver is set the body of the email also be set, changing the object state to bodySet.
</p>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #a6e22e">@StateSet</span><span style="color: #f92672">({</span><span style="color: #e6db74">"emptyEmail"</span><span style="color: #f92672">,</span> <span style="color: #e6db74">"receiverSet"</span><span style="color: #f92672">,</span> <span style="color: #e6db74">"senderSet"</span><span style="color: #f92672">,</span> <span style="color: #e6db74">"bodySet"</span><span style="color: #f92672">})</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">class</span> <span style="color: #a6e22e">Email</span> <span style="color: #f92672">{</span>
<span style="color: #a6e22e">@StateRefinement</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">to</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"emptyEmail(this)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #a6e22e">Email</span><span style="color: #f92672">()</span> <span style="color: #f92672">{...}</span>
<span style="color: #a6e22e">@StateRefinement</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">from</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"emptyEmail(this)"</span><span style="color: #f92672">,</span> <span style="color: #f8f8f2">to</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"senderSet(this)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">void</span> <span style="color: #a6e22e">from</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">String</span> <span style="color: #f8f8f2">s</span><span style="color: #f92672">)</span> <span style="color: #f92672">{...}</span>
<span style="color: #a6e22e">@StateRefinement</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">from</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"(senderSet(this)) || (receiverSet(this))"</span><span style="color: #f92672">,</span>
<span style="color: #f8f8f2">to</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"receiverSet(this)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">void</span> <span style="color: #a6e22e">to</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">String</span> <span style="color: #f8f8f2">s</span><span style="color: #f92672">)</span> <span style="color: #f92672">{...}</span>
<span style="color: #a6e22e">@StateRefinement</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">from</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"receiverSet(this)"</span><span style="color: #f92672">,</span> <span style="color: #f8f8f2">to</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"receiverSet(this)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">void</span> <span style="color: #a6e22e">subject</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">String</span> <span style="color: #f8f8f2">s</span><span style="color: #f92672">)</span> <span style="color: #f92672">{...}</span>
<span style="color: #a6e22e">@StateRefinement</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">from</span><span style="color: #f92672">=</span> <span style="color: #e6db74">"receiverSet(this)"</span><span style="color: #f92672">,</span> <span style="color: #f8f8f2">to</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">"bodySet(this)"</span><span style="color: #f92672">)</span>
<span style="color: #66d9ef">public</span> <span style="color: #66d9ef">void</span> <span style="color: #a6e22e">body</span><span style="color: #f92672">(</span><span style="color: #f8f8f2">String</span> <span style="color: #f8f8f2">s</span><span style="color: #f92672">)</span> <span style="color: #f92672">{...}</span>
<span style="color: #f92672">}</span>
</pre></div>
<p>Invocation</p>
<!-- HTML generated using hilite.me --><div style="background: #272822; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #75715e">//Correct</span>
<span style="color: #f8f8f2">Email</span> <span style="color: #f8f8f2">e</span> <span style="color: #f92672">=</span> <span style="color: #66d9ef">new</span> <span style="color: #f8f8f2">Email</span><span style="color: #f92672">();</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">from</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Alice"</span><span style="color: #f92672">);</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">to</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Bob"</span><span style="color: #f92672">);</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">to</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Carol"</span><span style="color: #f92672">);</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">body</span><span style="color: #f92672">();</span>
<span style="color: #75715e">//Error</span>
<span style="color: #f8f8f2">Email</span> <span style="color: #f8f8f2">e</span> <span style="color: #f92672">=</span> <span style="color: #66d9ef">new</span> <span style="color: #f8f8f2">Email</span><span style="color: #f92672">();</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">to</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Bob"</span><span style="color: #f92672">);</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">from</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Alice"</span><span style="color: #f92672">);</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">to</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Carol"</span><span style="color: #f92672">);</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">subject</span><span style="color: #f92672">(</span><span style="color: #e6db74">"Hello World!"</span><span style="color: #f92672">);</span>
<span style="color: #f8f8f2">e</span><span style="color: #f92672">.</span><span style="color: #a6e22e">body</span><span style="color: #f92672">();</span>
</pre></div>
<!-- </div> -->
</div>
</div>
</div>
</div>
</section>
<!-- grids block 5 -->
<section class="w3l-footer-29-main" id="footer">
<div class="footer-29 text-center">
<div class="container">
<div class="main-social-footer-29">
<a href="mailto:cgamboa@andrew.cmu.edu" class="email"><span class="fa fa-envelope-o"></span></a>
<a href="https://github.com/liquid-java" class="github"><span class="fa fa-github"></span></a>
<a href="https://www.linkedin.com/in/catarina-ventura-gamboa-518151172/" class="linkedin"><span class="fa fa-linkedin"></span></a>
</div>
<div class="bottom-copies text-center">
<p class="copy-footer-29">© <span id="year"></span> LiquidJava Website. All rights reserved | Designed by <a href="https://w3layouts.com">W3layouts</a></p>
</div>
</div>
</div>
<!-- move top -->
<button onclick="topFunction()" id="movetop" title="Go to top">
<span class="fa fa-angle-up"></span>
</button>
<script>
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function () {
scrollFunction()
};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
document.getElementById("movetop").style.display = "block";
} else {
document.getElementById("movetop").style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<!-- /move top -->
</section>
<!-- // grids block 5 -->
<script src="assets/js/jquery-3.3.1.min.js"></script>
<!-- //footer-28 block -->
</section>
<script>
$(function () {
$('.navbar-toggler').click(function () {
$('body').toggleClass('noscroll');
})
});
</script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous">
</script>
<script>
document.getElementById('year').textContent = new Date().getFullYear();
</script>
<!-- Smooth scrolling -->
</body>
</html>
<!-- // grids block 5 -->