diff --git a/report/UF_FRED_paper_style.sty b/report/UF_FRED_paper_style.sty new file mode 100644 index 0000000..6668526 --- /dev/null +++ b/report/UF_FRED_paper_style.sty @@ -0,0 +1,24 @@ +\usepackage[utf8]{inputenc} +\usepackage{hyperref} +\usepackage{setspace} +\usepackage{palatino} +\usepackage{graphicx} +\usepackage{float} +\usepackage{titling} % drop vertical space before the title +\usepackage{multirow} +\usepackage{lscape} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{subcaption} +\usepackage[a4paper, total={6in, 9.5in}]{geometry} +\fontfamily{ppl}\selectfont + +\usepackage[american]{babel} + +\usepackage{setspace} +\renewcommand{\baselinestretch}{1.5} + +% BIBLIOGRAPHY %%%%%%%%%%%%%% +\usepackage[natbibapa]{apacite} % to enable '\citet' and '\citep' macros +\bibliographystyle{apacite} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file diff --git a/report/main.aux b/report/main.aux new file mode 100644 index 0000000..0e65cdb --- /dev/null +++ b/report/main.aux @@ -0,0 +1,29 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\bibstyle{apacite} +\babel@aux{american}{} +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction to the new constructs}{1}{section.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Scanner}{2}{section.2}} +\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}} +\newlabel{tab:1}{{\caption@xref {tab:1}{ on input line 111}}{2}{Scanner}{table.caption.1}{}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Parser}{3}{section.3}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Code Generation}{4}{section.4}} +\@writefile{toc}{\contentsline {section}{\numberline {5}An example Program}{6}{section.5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Computation of the n-th Fibonacci number}{6}{subsection.5.1}} +\@writefile{toc}{\contentsline {section}{\numberline {6}Optimization and static analysis}{6}{section.6}} diff --git a/report/main.log b/report/main.log new file mode 100644 index 0000000..acfa9b8 --- /dev/null +++ b/report/main.log @@ -0,0 +1,1043 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex 2018.10.11) 1 MAR 2020 12:56 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**main.tex +(./main.tex +LaTeX2e <2017-04-15> +Babel <3.18> and hyphenation patterns for 84 language(s) loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo +File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(./UF_FRED_paper_style.sty +(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty +Package: inputenc 2015/03/17 v1.2c Input encoding file +\inpenc@prehook=\toks14 +\inpenc@posthook=\toks15 + +(/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def +File: utf8.def 2017/01/28 v1.1t UTF-8 support for inputenc +Now handling font encoding OML ... +... no UTF-8 mapping file for font encoding OML +Now handling font encoding T1 ... +... processing UTF-8 mapping file for font encoding T1 + +(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu +File: t1enc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc + defining Unicode char U+00A0 (decimal 160) + defining Unicode char U+00A1 (decimal 161) + defining Unicode char U+00A3 (decimal 163) + defining Unicode char U+00AB (decimal 171) + defining Unicode char U+00AD (decimal 173) + defining Unicode char U+00BB (decimal 187) + defining Unicode char U+00BF (decimal 191) + defining Unicode char U+00C0 (decimal 192) + defining Unicode char U+00C1 (decimal 193) + defining Unicode char U+00C2 (decimal 194) + defining Unicode char U+00C3 (decimal 195) + defining Unicode char U+00C4 (decimal 196) + defining Unicode char U+00C5 (decimal 197) + defining Unicode char U+00C6 (decimal 198) + defining Unicode char U+00C7 (decimal 199) + defining Unicode char U+00C8 (decimal 200) + defining Unicode char U+00C9 (decimal 201) + defining Unicode char U+00CA (decimal 202) + defining Unicode char U+00CB (decimal 203) + defining Unicode char U+00CC (decimal 204) + defining Unicode char U+00CD (decimal 205) + defining Unicode char U+00CE (decimal 206) + defining Unicode char U+00CF (decimal 207) + defining Unicode char U+00D0 (decimal 208) + defining Unicode char U+00D1 (decimal 209) + defining Unicode char U+00D2 (decimal 210) + defining Unicode char U+00D3 (decimal 211) + defining Unicode char U+00D4 (decimal 212) + defining Unicode char U+00D5 (decimal 213) + defining Unicode char U+00D6 (decimal 214) + defining Unicode char U+00D8 (decimal 216) + defining Unicode char U+00D9 (decimal 217) + defining Unicode char U+00DA (decimal 218) + defining Unicode char U+00DB (decimal 219) + defining Unicode char U+00DC (decimal 220) + defining Unicode char U+00DD (decimal 221) + defining Unicode char U+00DE (decimal 222) + defining Unicode char U+00DF (decimal 223) + defining Unicode char U+00E0 (decimal 224) + defining Unicode char U+00E1 (decimal 225) + defining Unicode char U+00E2 (decimal 226) + defining Unicode char U+00E3 (decimal 227) + defining Unicode char U+00E4 (decimal 228) + defining Unicode char U+00E5 (decimal 229) + defining Unicode char U+00E6 (decimal 230) + defining Unicode char U+00E7 (decimal 231) + defining Unicode char U+00E8 (decimal 232) + defining Unicode char U+00E9 (decimal 233) + defining Unicode char U+00EA (decimal 234) + defining Unicode char U+00EB (decimal 235) + defining Unicode char U+00EC (decimal 236) + defining Unicode char U+00ED (decimal 237) + defining Unicode char U+00EE (decimal 238) + defining Unicode char U+00EF (decimal 239) + defining Unicode char U+00F0 (decimal 240) + defining Unicode char U+00F1 (decimal 241) + defining Unicode char U+00F2 (decimal 242) + defining Unicode char U+00F3 (decimal 243) + defining Unicode char U+00F4 (decimal 244) + defining Unicode char U+00F5 (decimal 245) + defining Unicode char U+00F6 (decimal 246) + defining Unicode char U+00F8 (decimal 248) + defining Unicode char U+00F9 (decimal 249) + defining Unicode char U+00FA (decimal 250) + defining Unicode char U+00FB (decimal 251) + defining Unicode char U+00FC (decimal 252) + defining Unicode char U+00FD (decimal 253) + defining Unicode char U+00FE (decimal 254) + defining Unicode char U+00FF (decimal 255) + defining Unicode char U+0100 (decimal 256) + defining Unicode char U+0101 (decimal 257) + defining Unicode char U+0102 (decimal 258) + defining Unicode char U+0103 (decimal 259) + defining Unicode char U+0104 (decimal 260) + defining Unicode char U+0105 (decimal 261) + defining Unicode char U+0106 (decimal 262) + defining Unicode char U+0107 (decimal 263) + defining Unicode char U+0108 (decimal 264) + defining Unicode char U+0109 (decimal 265) + defining Unicode char U+010A (decimal 266) + defining Unicode char U+010B (decimal 267) + defining Unicode char U+010C (decimal 268) + defining Unicode char U+010D (decimal 269) + defining Unicode char U+010E (decimal 270) + defining Unicode char U+010F (decimal 271) + defining Unicode char U+0110 (decimal 272) + defining Unicode char U+0111 (decimal 273) + defining Unicode char U+0112 (decimal 274) + defining Unicode char U+0113 (decimal 275) + defining Unicode char U+0114 (decimal 276) + defining Unicode char U+0115 (decimal 277) + defining Unicode char U+0116 (decimal 278) + defining Unicode char U+0117 (decimal 279) + defining Unicode char U+0118 (decimal 280) + defining Unicode char U+0119 (decimal 281) + defining Unicode char U+011A (decimal 282) + defining Unicode char U+011B (decimal 283) + defining Unicode char U+011C (decimal 284) + defining Unicode char U+011D (decimal 285) + defining Unicode char U+011E (decimal 286) + defining Unicode char U+011F (decimal 287) + defining Unicode char U+0120 (decimal 288) + defining Unicode char U+0121 (decimal 289) + defining Unicode char U+0122 (decimal 290) + defining Unicode char U+0123 (decimal 291) + defining Unicode char U+0124 (decimal 292) + defining Unicode char U+0125 (decimal 293) + defining Unicode char U+0128 (decimal 296) + defining Unicode char U+0129 (decimal 297) + defining Unicode char U+012A (decimal 298) + defining Unicode char U+012B (decimal 299) + defining Unicode char U+012C (decimal 300) + defining Unicode char U+012D (decimal 301) + defining Unicode char U+012E (decimal 302) + defining Unicode char U+012F (decimal 303) + defining Unicode char U+0130 (decimal 304) + defining Unicode char U+0131 (decimal 305) + defining Unicode char U+0132 (decimal 306) + defining Unicode char U+0133 (decimal 307) + defining Unicode char U+0134 (decimal 308) + defining Unicode char U+0135 (decimal 309) + defining Unicode char U+0136 (decimal 310) + defining Unicode char U+0137 (decimal 311) + defining Unicode char U+0139 (decimal 313) + defining Unicode char U+013A (decimal 314) + defining Unicode char U+013B (decimal 315) + defining Unicode char U+013C (decimal 316) + defining Unicode char U+013D (decimal 317) + defining Unicode char U+013E (decimal 318) + defining Unicode char U+0141 (decimal 321) + defining Unicode char U+0142 (decimal 322) + defining Unicode char U+0143 (decimal 323) + defining Unicode char U+0144 (decimal 324) + defining Unicode char U+0145 (decimal 325) + defining Unicode char U+0146 (decimal 326) + defining Unicode char U+0147 (decimal 327) + defining Unicode char U+0148 (decimal 328) + defining Unicode char U+014A (decimal 330) + defining Unicode char U+014B (decimal 331) + defining Unicode char U+014C (decimal 332) + defining Unicode char U+014D (decimal 333) + defining Unicode char U+014E (decimal 334) + defining Unicode char U+014F (decimal 335) + defining Unicode char U+0150 (decimal 336) + defining Unicode char U+0151 (decimal 337) + defining Unicode char U+0152 (decimal 338) + defining Unicode char U+0153 (decimal 339) + defining Unicode char U+0154 (decimal 340) + defining Unicode char U+0155 (decimal 341) + defining Unicode char U+0156 (decimal 342) + defining Unicode char U+0157 (decimal 343) + defining Unicode char U+0158 (decimal 344) + defining Unicode char U+0159 (decimal 345) + defining Unicode char U+015A (decimal 346) + defining Unicode char U+015B (decimal 347) + defining Unicode char U+015C (decimal 348) + defining Unicode char U+015D (decimal 349) + defining Unicode char U+015E (decimal 350) + defining Unicode char U+015F (decimal 351) + defining Unicode char U+0160 (decimal 352) + defining Unicode char U+0161 (decimal 353) + defining Unicode char U+0162 (decimal 354) + defining Unicode char U+0163 (decimal 355) + defining Unicode char U+0164 (decimal 356) + defining Unicode char U+0165 (decimal 357) + defining Unicode char U+0168 (decimal 360) + defining Unicode char U+0169 (decimal 361) + defining Unicode char U+016A (decimal 362) + defining Unicode char U+016B (decimal 363) + defining Unicode char U+016C (decimal 364) + defining Unicode char U+016D (decimal 365) + defining Unicode char U+016E (decimal 366) + defining Unicode char U+016F (decimal 367) + defining Unicode char U+0170 (decimal 368) + defining Unicode char U+0171 (decimal 369) + defining Unicode char U+0172 (decimal 370) + defining Unicode char U+0173 (decimal 371) + defining Unicode char U+0174 (decimal 372) + defining Unicode char U+0175 (decimal 373) + defining Unicode char U+0176 (decimal 374) + defining Unicode char U+0177 (decimal 375) + defining Unicode char U+0178 (decimal 376) + defining Unicode char U+0179 (decimal 377) + defining Unicode char U+017A (decimal 378) + defining Unicode char U+017B (decimal 379) + defining Unicode char U+017C (decimal 380) + defining Unicode char U+017D (decimal 381) + defining Unicode char U+017E (decimal 382) + defining Unicode char U+01CD (decimal 461) + defining Unicode char U+01CE (decimal 462) + defining Unicode char U+01CF (decimal 463) + defining Unicode char U+01D0 (decimal 464) + defining Unicode char U+01D1 (decimal 465) + defining Unicode char U+01D2 (decimal 466) + defining Unicode char U+01D3 (decimal 467) + defining Unicode char U+01D4 (decimal 468) + defining Unicode char U+01E2 (decimal 482) + defining Unicode char U+01E3 (decimal 483) + defining Unicode char U+01E6 (decimal 486) + defining Unicode char U+01E7 (decimal 487) + defining Unicode char U+01E8 (decimal 488) + defining Unicode char U+01E9 (decimal 489) + defining Unicode char U+01EA (decimal 490) + defining Unicode char U+01EB (decimal 491) + defining Unicode char U+01F0 (decimal 496) + defining Unicode char U+01F4 (decimal 500) + defining Unicode char U+01F5 (decimal 501) + defining Unicode char U+0218 (decimal 536) + defining Unicode char U+0219 (decimal 537) + defining Unicode char U+021A (decimal 538) + defining Unicode char U+021B (decimal 539) + defining Unicode char U+0232 (decimal 562) + defining Unicode char U+0233 (decimal 563) + defining Unicode char U+1E02 (decimal 7682) + defining Unicode char U+1E03 (decimal 7683) + defining Unicode char U+200C (decimal 8204) + defining Unicode char U+2010 (decimal 8208) + defining Unicode char U+2011 (decimal 8209) + defining Unicode char U+2012 (decimal 8210) + defining Unicode char U+2013 (decimal 8211) + defining Unicode char U+2014 (decimal 8212) + defining Unicode char U+2015 (decimal 8213) + defining Unicode char U+2018 (decimal 8216) + defining Unicode char U+2019 (decimal 8217) + defining Unicode char U+201A (decimal 8218) + defining Unicode char U+201C (decimal 8220) + defining Unicode char U+201D (decimal 8221) + defining Unicode char U+201E (decimal 8222) + defining Unicode char U+2030 (decimal 8240) + defining Unicode char U+2031 (decimal 8241) + defining Unicode char U+2039 (decimal 8249) + defining Unicode char U+203A (decimal 8250) + defining Unicode char U+2423 (decimal 9251) + defining Unicode char U+1E20 (decimal 7712) + defining Unicode char U+1E21 (decimal 7713) +) +Now handling font encoding OT1 ... +... processing UTF-8 mapping file for font encoding OT1 + +(/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu +File: ot1enc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc + defining Unicode char U+00A0 (decimal 160) + defining Unicode char U+00A1 (decimal 161) + defining Unicode char U+00A3 (decimal 163) + defining Unicode char U+00AD (decimal 173) + defining Unicode char U+00B8 (decimal 184) + defining Unicode char U+00BF (decimal 191) + defining Unicode char U+00C5 (decimal 197) + defining Unicode char U+00C6 (decimal 198) + defining Unicode char U+00D8 (decimal 216) + defining Unicode char U+00DF (decimal 223) + defining Unicode char U+00E6 (decimal 230) + defining Unicode char U+00EC (decimal 236) + defining Unicode char U+00ED (decimal 237) + defining Unicode char U+00EE (decimal 238) + defining Unicode char U+00EF (decimal 239) + defining Unicode char U+00F8 (decimal 248) + defining Unicode char U+0131 (decimal 305) + defining Unicode char U+0141 (decimal 321) + defining Unicode char U+0142 (decimal 322) + defining Unicode char U+0152 (decimal 338) + defining Unicode char U+0153 (decimal 339) + defining Unicode char U+0174 (decimal 372) + defining Unicode char U+0175 (decimal 373) + defining Unicode char U+0176 (decimal 374) + defining Unicode char U+0177 (decimal 375) + defining Unicode char U+0218 (decimal 536) + defining Unicode char U+0219 (decimal 537) + defining Unicode char U+021A (decimal 538) + defining Unicode char U+021B (decimal 539) + defining Unicode char U+2013 (decimal 8211) + defining Unicode char U+2014 (decimal 8212) + defining Unicode char U+2018 (decimal 8216) + defining Unicode char U+2019 (decimal 8217) + defining Unicode char U+201C (decimal 8220) + defining Unicode char U+201D (decimal 8221) +) +Now handling font encoding OMS ... +... processing UTF-8 mapping file for font encoding OMS + +(/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu +File: omsenc.dfu 2017/01/28 v1.1t UTF-8 support for inputenc + defining Unicode char U+00A7 (decimal 167) + defining Unicode char U+00B6 (decimal 182) + defining Unicode char U+00B7 (decimal 183) + defining Unicode char U+2020 (decimal 8224) + defining Unicode char U+2021 (decimal 8225) + defining Unicode char U+2022 (decimal 8226) +) +Now handling font encoding OMX ... +... no UTF-8 mapping file for font encoding OMX +Now handling font encoding U ... +... no UTF-8 mapping file for font encoding U + defining Unicode char U+00A9 (decimal 169) + defining Unicode char U+00AA (decimal 170) + defining Unicode char U+00AE (decimal 174) + defining Unicode char U+00BA (decimal 186) + defining Unicode char U+02C6 (decimal 710) + defining Unicode char U+02DC (decimal 732) + defining Unicode char U+200C (decimal 8204) + defining Unicode char U+2026 (decimal 8230) + defining Unicode char U+2122 (decimal 8482) + defining Unicode char U+2423 (decimal 9251) +)) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2018/02/06 v6.86b Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO) + + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO) +Package: hobsub 2016/05/16 v1.14 Construct package bundles (HO) +Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) +Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) +Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2016/05/16 v1.2 Expandable calculations with integers (HO) +Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch +Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO) +Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO) +Package: pdftexcmds 2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +Package: pdfescape 2016/05/16 v1.14 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2016/05/16 v1.4 Expandable calculations on big integers (HO +) +Package: bitset 2016/05/16 v1.2 Handle bit-vector datatype (HO) +Package: uniquecounter 2016/05/16 v1.3 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2016/05/16 v1.5 Let assignment for LaTeX macros (HO) +Package: hopatch 2016/05/16 v1.3 Wrapper for package hooks (HO) +Package: xcolor-patch 2016/05/16 xcolor patch +Package: atveryend 2016/05/16 v1.9 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2016/06/09 v1.18 At begin shipout hook (HO) +Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO) +Package: hycolor 2016/05/16 v1.8 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks16 +) +(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2016/05/16 v1.4 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO) +) +\@linkdim=\dimen103 +\Hy@linkcounter=\count87 +\Hy@pagecounter=\count88 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO) +Now handling font encoding PD1 ... +... no UTF-8 mapping file for font encoding PD1 +) +\Hy@SavedSpaceFactor=\count89 + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4509. +Package hyperref Info: Link nesting OFF on input line 4514. +Package hyperref Info: Hyper index ON on input line 4517. +Package hyperref Info: Plain pages OFF on input line 4524. +Package hyperref Info: Backreferencing OFF on input line 4529. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4762. +\c@Hy@tempcnt=\count90 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5115. +\XeTeXLinkMargin=\dimen104 +\Fld@menulength=\count91 +\Field@Width=\dimen105 +\Fld@charsize=\dimen106 +Package hyperref Info: Hyper figures OFF on input line 6369. +Package hyperref Info: Link nesting OFF on input line 6374. +Package hyperref Info: Hyper index ON on input line 6377. +Package hyperref Info: backreferencing OFF on input line 6384. +Package hyperref Info: Link coloring OFF on input line 6389. +Package hyperref Info: Link coloring with OCG OFF on input line 6394. +Package hyperref Info: PDF/A mode OFF on input line 6399. +LaTeX Info: Redefining \ref on input line 6439. +LaTeX Info: Redefining \pageref on input line 6443. +\Hy@abspage=\count92 +\c@Item=\count93 +\c@Hfootnote=\count94 +) +Package hyperref Info: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2018/02/06 v6.86b Hyperref driver for pdfTeX +\Fld@listcount=\count95 +\c@bookmark@seq@number=\count96 + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2016/05/16 v1.8 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +) +(/usr/share/texlive/texmf-dist/tex/latex/setspace/setspace.sty +Package: setspace 2011/12/19 v6.7a set line spacing +) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/palatino.sty +Package: palatino 2005/04/12 PSNFSS-v9.2a (SPQR) +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: pdftex.def on input line 99. + +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def +File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex +)) +\Gin@req@height=\dimen107 +\Gin@req@width=\dimen108 +) +(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty +Package: float 2001/11/08 v1.3d Float enhancements (AL) +\c@float@type=\count97 +\float@exts=\toks17 +\float@box=\box26 +\@float@everytoks=\toks18 +\@floatcapt=\box27 +) +(/usr/share/texlive/texmf-dist/tex/latex/titling/titling.sty +Package: titling 2009/09/04 v2.1d maketitle typesetting +\thanksmarkwidth=\skip44 +\thanksmargin=\skip45 +\droptitle=\skip46 +) +(/usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty +Package: multirow 2016/11/25 v2.2 Span multiple rows of a table +\multirow@colwidth=\skip47 +\multirow@cntb=\count98 +\multirow@dima=\skip48 +\bigstrutjot=\dimen109 +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/lscape.sty +Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +Package: amsmath 2017/09/02 v2.17a AMS math features +\@mathmargin=\skip49 + +For additional information on amsmath, use the `?' option. +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +Package: amstext 2000/06/29 v2.01 AMS text + +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 generic functions +\@emptytoks=\toks19 +\ex@=\dimen110 +)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d Bold Symbols +\pmbraise@=\dimen111 +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty +Package: amsopn 2016/03/08 v2.02 operator names +) +\inf@bad=\count99 +LaTeX Info: Redefining \frac on input line 213. +\uproot@=\count100 +\leftroot@=\count101 +LaTeX Info: Redefining \overline on input line 375. +\classnum@=\count102 +\DOTSCASE@=\count103 +LaTeX Info: Redefining \ldots on input line 472. +LaTeX Info: Redefining \dots on input line 475. +LaTeX Info: Redefining \cdots on input line 596. +\Mathstrutbox@=\box28 +\strutbox@=\box29 +\big@size=\dimen112 +LaTeX Font Info: Redeclaring font encoding OML on input line 712. +LaTeX Font Info: Redeclaring font encoding OMS on input line 713. +\macc@depth=\count104 +\c@MaxMatrixCols=\count105 +\dotsspace@=\muskip11 +\c@parentequation=\count106 +\dspbrk@lvl=\count107 +\tag@help=\toks20 +\row@=\count108 +\column@=\count109 +\maxfields@=\count110 +\andhelp@=\toks21 +\eqnshift@=\dimen113 +\alignsep@=\dimen114 +\tagshift@=\dimen115 +\tagwidth@=\dimen116 +\totwidth@=\dimen117 +\lineht@=\dimen118 +\@envbody=\toks22 +\multlinegap=\skip50 +\multlinetaggap=\skip51 +\mathdisplay@stack=\toks23 +LaTeX Info: Redefining \[ on input line 2817. +LaTeX Info: Redefining \] on input line 2818. +) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty +Package: amssymb 2013/01/14 v3.01 AMS font symbols + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty +Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support +\symAMSa=\mathgroup4 +\symAMSb=\mathgroup5 +LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' +(Font) U/euf/m/n --> U/euf/b/n on input line 106. +)) +(/usr/share/texlive/texmf-dist/tex/latex/caption/subcaption.sty +Package: subcaption 2016/05/22 v1.1-161 Sub-captions (AR) + +(/usr/share/texlive/texmf-dist/tex/latex/caption/caption.sty +Package: caption 2016/02/21 v3.3-144 Customizing captions (AR) + +(/usr/share/texlive/texmf-dist/tex/latex/caption/caption3.sty +Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR) +Package caption3 Info: TeX engine: e-TeX on input line 67. +\captionmargin=\dimen119 +\captionmargin@=\dimen120 +\captionwidth=\dimen121 +\caption@tempdima=\dimen122 +\caption@indent=\dimen123 +\caption@parindent=\dimen124 +\caption@hangindent=\dimen125 +) +\c@ContinuedFloat=\count111 +Package caption Info: float package is loaded. +Package caption Info: hyperref package is loaded. +) +\c@subfigure=\count112 +\c@subtable=\count113 +) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2010/09/12 v5.6 Page Geometry +\Gm@cnth=\count114 +\Gm@cntv=\count115 +\c@Gm@tempcnt=\count116 +\Gm@bindingoffset=\dimen126 +\Gm@wd@mp=\dimen127 +\Gm@odd@mp=\dimen128 +\Gm@even@mp=\dimen129 +\Gm@layoutwidth=\dimen130 +\Gm@layoutheight=\dimen131 +\Gm@layouthoffset=\dimen132 +\Gm@layoutvoffset=\dimen133 +\Gm@dimlist=\toks24 +) +LaTeX Font Info: Try loading font information for OT1+ppl on input line 14. + +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1ppl.fd +File: ot1ppl.fd 2001/06/04 font definitions for OT1/ppl. +) +(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.sty +Package: babel 2018/02/14 3.18 The Babel package + +(/usr/share/texlive/texmf-dist/tex/generic/babel/switch.def +File: switch.def 2018/02/14 3.18 Babel switching mechanism +) +(/usr/share/texlive/texmf-dist/tex/generic/babel-english/american.ldf +Language: american 2017/06/06 v3.3r English support from the babel system + +(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf +Language: english 2017/06/06 v3.3r English support from the babel system + +(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def +File: babel.def 2018/02/14 3.18 Babel common definitions +\babel@savecnt=\count117 +\U@D=\dimen134 + +(/usr/share/texlive/texmf-dist/tex/generic/babel/txtbabel.def) +\bbl@dirlevel=\count118 +) +\l@canadian = a dialect from \language\l@american +\l@australian = a dialect from \language\l@british +\l@newzealand = a dialect from \language\l@british +))) +(/usr/share/texlive/texmf-dist/tex/latex/apacite/apacite.sty +Package: apacite 2013/07/21 v6.03 APA citation +\c@BibCnt=\count119 +\bibleftmargin=\skip52 +\bibindent=\skip53 +\bibparsep=\skip54 +\bibitemsep=\skip55 +\biblabelsep=\skip56 +) +(/usr/share/texlive/texmf-dist/tex/latex/natbib/natbib.sty +Package: natbib 2010/09/13 8.31b (PWD, AO) +\bibhang=\skip57 +\bibsep=\skip58 +LaTeX Info: Redefining \cite on input line 694. +\c@NAT@ctr=\count120 +) +LaTeX Info: Redefining \BBA on input line 23. +) (./main.aux) +\openout1 = `main.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 27. +LaTeX Font Info: ... okay on input line 27. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 27. +LaTeX Font Info: ... okay on input line 27. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 27. +LaTeX Font Info: ... okay on input line 27. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 27. +LaTeX Font Info: ... okay on input line 27. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 27. +LaTeX Font Info: ... okay on input line 27. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 27. +LaTeX Font Info: ... okay on input line 27. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 27. +LaTeX Font Info: ... okay on input line 27. +\AtBeginShipoutBox=\box30 +Package hyperref Info: Link coloring OFF on input line 27. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO) +) +\c@section@level=\count121 +) +LaTeX Info: Redefining \ref on input line 27. +LaTeX Info: Redefining \pageref on input line 27. +LaTeX Info: Redefining \nameref on input line 27. + +(./main.out) (./main.out) +\@outlinefile=\write3 +\openout3 = `main.out'. + + +(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count122 +\scratchdimen=\dimen135 +\scratchbox=\box31 +\nofMPsegments=\count123 +\nofMParguments=\count124 +\everyMPshowfont=\toks25 +\MPscratchCnt=\count125 +\MPscratchDim=\dimen136 +\MPnumerator=\count126 +\makeMPintoPDFobject=\count127 +\everyMPtoPDFconversion=\toks26 +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty +Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty +Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO) +) +Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 +38. +Package grfext Info: Graphics extension search list: +(grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE +G,.JBIG2,.JB2,.eps] +(grfext) \AppendGraphicsExtensions on input line 456. + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +Package caption Info: Begin \AtBeginDocument code. +Package caption Info: End \AtBeginDocument code. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(81.94394pt, 433.62pt, 81.94394pt) +* v-part:(T,H,B)=(63.39273pt, 686.56499pt, 95.08913pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=433.62pt +* \textheight=686.56499pt +* \oddsidemargin=9.67395pt +* \evensidemargin=9.67395pt +* \topmargin=-45.87726pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=11.0pt +* \footskip=30.0pt +* \marginparwidth=59.0pt +* \marginparsep=10.0pt +* \columnsep=10.0pt +* \skip\footins=10.0pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +\c@maskedRefs=\count128 +(/usr/share/texlive/texmf-dist/tex/latex/apacite/english.apc +File: english.apc 2013/07/21 v6.03 apacite language file +LaTeX Info: Redefining \BPBI on input line 129. +LaTeX Info: Redefining \BHBI on input line 130. +) +LaTeX Font Info: Try loading font information for U+msa on input line 33. + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd +File: umsa.fd 2013/01/14 v3.01 AMS symbols A +) +LaTeX Font Info: Try loading font information for U+msb on input line 33. + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd +File: umsb.fd 2013/01/14 v3.01 AMS symbols B +) +LaTeX Font Info: Try loading font information for OT1+pcr on input line 33. + +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1pcr.fd +File: ot1pcr.fd 2001/06/04 font definitions for OT1/pcr. +) +LaTeX Font Info: Font shape `OT1/ppl/bx/n' in size <14.4> not available +(Font) Font shape `OT1/ppl/b/n' tried instead on input line 43. + + +Package hyperref Warning: Suppressing link with empty target on input line 45. + +LaTeX Font Info: Font shape `OT1/ppl/bx/n' in size <10.95> not available +(Font) Font shape `OT1/ppl/b/n' tried instead on input line 46. +LaTeX Font Info: Try loading font information for OMS+ppl on input line 50. +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/omsppl.fd +File: omsppl.fd +) +LaTeX Font Info: Font shape `OMS/ppl/m/n' in size <10.95> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 50. + [1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +Overfull \hbox (60.2245pt too wide) in paragraph at lines 83--83 + [] \OT1/pcr/m/n/10.95 [[1,2,3]] times 10 // gives a list of 10 lists whos +e elements are[] + [] + +! Missing $ inserted. + + $ +l.124 \end{tabular}} + +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Extra }, or forgotten $. +\@preamble ...ignorespaces \@sharp \unskip \hfil } + \hskip \tabcolsep +l.124 \end{tabular}} + +I've deleted a group-closing symbol because it seems to be +spurious, as in `$x}$'. But perhaps the } is legitimate and +you forgot something else, as in `\hbox{$x}'. In such cases +the way to recover is to insert both the forgotten and the +deleted material, e.g., by typing `I$}'. + +! Missing $ inserted. + + $ +l.124 \end{tabular}} + +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + +! Missing } inserted. + + } +l.124 \end{tabular}} + +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + +! Missing $ inserted. + + $ +l.131 ...ew non-terminal symbol \textbf{vect_elem} + , delimited by square brac... +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Extra }, or forgotten $. + \egroup + +l.131 ...ew non-terminal symbol \textbf{vect_elem} + , delimited by square brac... +I've deleted a group-closing symbol because it seems to be +spurious, as in `$x}$'. But perhaps the } is legitimate and +you forgot something else, as in `\hbox{$x}'. In such cases +the way to recover is to insert both the forgotten and the +deleted material, e.g., by typing `I$}'. + +! Missing $ inserted. + + $ +l.132 \begin{verbatim} + +I've inserted a begin-math/end-math symbol since I think +you left one out. Proceed, with fingers crossed. + +! Missing \endgroup inserted. + + \endgroup +l.132 \begin{verbatim} + +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + + +Overfull \hbox (108.26802pt too wide) in paragraph at lines 130--132 +\OT1/ppl/m/n/10.95 of ex-pres-sions. An ex-pres-sion may now de-rive a new non- +terminal sym-bol \OT1/ppl/b/n/10.95 vect$[]\OML/cmm/m/it/10.95 lem; delimitedby +squarebrackets \OT1/cmr/m/n/10.95 :$ + [] + +[2] + +! LaTeX Error: \begin{document} ended by \end{verbatim}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.135 \end{verbatim} + {} +Your command was ignored. +Type I to replace it with another command, +or to continue without it. + +! Missing } inserted. + + } +l.135 \end{verbatim} + {} +I've inserted something that you may have forgotten. +(See the above.) +With luck, this will get me unwedged. But if you +really didn't forget anything, try typing `2' now; then +my insertion and my current dilemma will both disappear. + +! Extra \endgroup. + \endgroup + +l.135 \end{verbatim} + {} +Things are pretty mixed up, but I think the worst is over. + + +Underfull \hbox (badness 10000) in paragraph at lines 137--139 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 140--141 + + [] + + +Underfull \hbox (badness 10000) in paragraph at lines 151--152 + + [] + +[3] +Underfull \hbox (badness 10000) in paragraph at lines 180--181 + + [] + +[4] +Underfull \hbox (badness 10000) in paragraph at lines 199--212 + + [] + +[5] +LaTeX Font Info: Font shape `OT1/ppl/bx/n' in size <12> not available +(Font) Font shape `OT1/ppl/b/n' tried instead on input line 215. + [6] +Overfull \hbox (13.13947pt too wide) in paragraph at lines 285--285 +[] \OT1/pcr/m/n/10.95 %6 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i3 +2 0, i32 1[] + [] + + +Overfull \hbox (13.13947pt too wide) in paragraph at lines 285--285 +[] \OT1/pcr/m/n/10.95 %8 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i3 +2 0, i32 0[] + [] + + +Overfull \hbox (19.70946pt too wide) in paragraph at lines 285--285 +[] \OT1/pcr/m/n/10.95 %10 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i +32 0, i32 0[] + [] + + +Overfull \hbox (13.13947pt too wide) in paragraph at lines 285--285 +[] \OT1/pcr/m/n/10.95 %4 = getelementptr inbounds [3 x i32], [3 x i32]* %0, i6 +4 0, i64 1[] + [] + + +Overfull \hbox (13.13947pt too wide) in paragraph at lines 285--285 +[] \OT1/pcr/m/n/10.95 %6 = getelementptr inbounds [3 x i32], [3 x i32]* %0, i6 +4 0, i64 0[] + [] + +[7] +Overfull \hbox (45.98943pt too wide) in paragraph at lines 374--374 +[]\OT1/pcr/m/n/10.95 cond: ; preds += %body, %entry[] + [] + +[8] +Overfull \hbox (45.98943pt too wide) in paragraph at lines 374--374 +[]\OT1/pcr/m/n/10.95 cond: ; preds += %body, %entry[] + [] + +[9] +Overfull \hbox (39.41943pt too wide) in paragraph at lines 405--405 +[]\OT1/pcr/m/n/10.95 cont: ; preds += %else, %then[] + [] + +[10] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 412. + [11] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 412. + (./main.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 412. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 412. +Package rerunfilecheck Info: File `main.out' has not changed. +(rerunfilecheck) Checksum: 2F211749E6802B5BF5AB2CFCFE806119;411. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 412. + ) +Here is how much of TeX's memory you used: + 9260 strings out of 492982 + 133622 string characters out of 6134895 + 241377 words of memory out of 5000000 + 12651 multiletter control sequences out of 15000+600000 + 23059 words of font info for 70 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 49i,11n,42p,434b,458s stack positions out of 5000i,500n,10000p,200000b,80000s +pdfTeX warning (dest): name{Hfootnote.1} has been referenced but does not exi +st, replaced by a fixed one + +{/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc} +Output written on main.pdf (11 pages, 114517 bytes). +PDF statistics: + 121 PDF objects out of 1000 (max. 8388607) + 100 compressed objects within 1 object stream + 21 named destinations out of 1000 (max. 500000) + 57 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/report/main.out b/report/main.out new file mode 100644 index 0000000..dcd2ffb --- /dev/null +++ b/report/main.out @@ -0,0 +1,7 @@ +\BOOKMARK [1][-]{section.1}{Introduction to the new constructs}{}% 1 +\BOOKMARK [1][-]{section.2}{Scanner}{}% 2 +\BOOKMARK [1][-]{section.3}{Parser}{}% 3 +\BOOKMARK [1][-]{section.4}{Code Generation}{}% 4 +\BOOKMARK [1][-]{section.5}{An example Program}{}% 5 +\BOOKMARK [2][-]{subsection.5.1}{Computation of the n-th Fibonacci number}{section.5}% 6 +\BOOKMARK [1][-]{section.6}{Optimization and static analysis}{}% 7 diff --git a/report/main.pdf b/report/main.pdf new file mode 100644 index 0000000..e0ba6cf Binary files /dev/null and b/report/main.pdf differ diff --git a/report/main.synctex.gz b/report/main.synctex.gz new file mode 100644 index 0000000..a8f5b83 Binary files /dev/null and b/report/main.synctex.gz differ diff --git a/report/main.tex b/report/main.tex new file mode 100644 index 0000000..73f7df5 --- /dev/null +++ b/report/main.tex @@ -0,0 +1,412 @@ +\documentclass[11pt]{article} +\usepackage{UF_FRED_paper_style} + +\onehalfspacing +%% =============================================== + +\setlength{\droptitle}{-5em} %% Don't touch + + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% SET THE TITLE +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% TITLE: +\title{Introducing array-like structures in an expression-based toy-programming language} + +% AUTHORS: +\author{Lapo Toloni \\% Name author + \href{l.toloni-at-studenti.unipi.it}{\texttt{l.toloni-at-studenti.unipi.it}}} + + +% DATE: +\date{\today} + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ABSTRACT +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\maketitle +% %%%%%%%%%%%%%%%%%% + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BODY OF THE DOCUMENT +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% -------------------- +\section{Introduction to the new constructs} +% -------------------- +The focus of this project is to introduce in the language array-like structures and operations to play with them. All along the codebase\footnote{\href{}{https://github.com/lapotolo/languages-interpreters-compilers-unipi}} +and in this report we will refer to these linear structures as \textbf{vectors}. In particular the newly implemented features are: + +\begin{itemize} + + \item Declaration and evaluation of a vector of expressions. Multidimensional vectors are supported too.\\ + As an example we are now allowed to write and have evaluated: + \begin{verbatim} + [1,2,3] + [let x = 5 in if ( x < 5) then x-2 else x+1, 1*4-2, 42] + let base = 1 in [base+1, base+2, base+3] + \end{verbatim}{} + The only constraint is that every element must evaluate to a value of the same type. + + \item Vector access. For example: + \begin{verbatim} + let ve = [1,2,3,4,5,6] in ve[0] - ve[5] + let mat = [[1,2,3],[4,5,6],[7,8,9]] in mat[1][2] + \end{verbatim}{} + Note that in this status any check is performed on indices out of bounds. LLVM library calls returns 0 when we access a not allocated piece of memory + + \item Vector update. For example: + \begin{verbatim} + var mat = [[1,2,3],[4,5,6],[7,8,9]] in + mat[0]:= [42,42,42] + \end{verbatim}{} + + \item vector concatenation. For example: + \begin{verbatim} + let ve1 = [0,1,1,2] in + let ve2 = [3,5,8] in + ve1 ++ ve2 // gives the list [0,1,1,2,3,5,8] + \end{verbatim}{} + + \item syntactic sugar to ease the declaration of a vector. For example: + \begin{verbatim} + [[1,2,3]] times 10 // gives a list of 10 lists whose elements are + // [1,2,3] + \end{verbatim}{} + + \item shortcircuit evaluation model for boolean AND and OR. For example: + \begin{verbatim} + (10 < 3) & (1 = 1) // right-hand-side is not evaluated + (5 != 3) | (false) // right-hand-side is not evaluated + \end{verbatim}{} + + \item evaluation of a sequence of expressions. For example: + \begin{verbatim} + var i = 0 in + var c = 1 in + while (i < 10) do + seq + c := c * c + i; + i := i + 1. + \end{verbatim}{} + + \item support for the modulo binary operation. For example: + \begin{verbatim} + 42 mod 9 + \end{verbatim}{} +\end{itemize} + +\section{Scanner} +Here the extension is trivial. The following table subsumes the addition to the lex scanner: +\begin{table}[H] + \centering + \label{tab:1} + \scalebox{.8}{ + \begin{tabular}{rll} + \hline + \multicolumn{1}{c}{\textbf{lexeme}} & \multicolumn{1}{c}{\textbf{token}} & \multicolumn{1}{c}{\textbf{associated semantics}}\\ \hline + \multicolumn{1}{l}{++} & CONCAT\_KW & vector concatenation\\ + + \multicolumn{1}{l}{times} & TIMES\_KW & syntactic sugar for vector declaration\\ + \multicolumn{1}{l}{\&} & AND\_SC & short-circuited AND\\ + \multicolumn{1}{l}{\|} & OR\_SC & short-circuited OR\\ + \multicolumn{1}{l}{seq} & SEQ\_KW & expression sequence\\ + \multicolumn{1}{l}{mod} & MOD & modulo operation\\ + \hline + \end{tabular}} +\end{table} +Moreover, square brackets are used to delimit vectors and to access them; commas separate vector elements, semicolons separate expressions in a sequence while dots terminate an expression sequence. + + +\section{Parser} +Regarding the syntactic analysis phase, the only non-trivial extensions are those implemented to parse vectors and related operations.\\ +The LALR(1) parser built with Bison is enhanced with new productions recognizing vector of expressions. An expression may now derive a new non-terminal symbol \textbf{vect_elem}, delimited by square brackets: +\begin{verbatim} +expr : ... + | '[' vect_elem ']' { $$ = make_vect($2); } +\end{verbatim}{} + +The computation associated with this production is the call to +\textbf{make\_vect()}, an internal function taking as argument a value of type \textbf{struct expr\_vect} and producing a value of type \textbf{expr} with type tag \textbf{VECT}.\\ + +\textbf{struct expr\_vect} is a new possible form of the internal struct used to represent a node of the abstract syntax tree. This kind of node holds the result of the evaluation of the current expression and a pointer to the following expression of the vector.\\ + +Four other new productions are related with it. These encode vector elements and vector continuation (and termination): +\begin{verbatim} +vect_elem: expr vect_elem_continuation + | %empty + +vect_elem_continuation: ',' expr vect_elem_continuation + | %empty +\end{verbatim}{} + +The two \%empty productions produces a \textbf{NULL} and are respectively used to deal with empty vectors and termination of vectors. More interestingly both the first productions of the two rules have as associated computation a call to \textbf{make\_expr\_vect()} that is the function that produce the value of type \textbf{struct expr\_vect} that will be eaten by the function \textbf{make\_vect()}.\\ + +The possibility of binding a vector to a name using the \textbf{let} construct or of storing it in memory as a variable using the \textbf{var} construct comes for free because of a vector of expressions is an expression itself. +\\ +\medskip +To support the standard operations of arrays we add two more possible productions starting from the non-terminal expr: +\begin{verbatim} +expr: ... + | expr '[' expr ']' + | expr '[' expr ']' ASSIGN_OP expr +\end{verbatim}{} +By not specifying that we require an IDENT token standing in front of a square bracket and a VAL token to index a vector, we keep the representation homogeneus at the syntactic level. In addition, we let the back-end of the compiler decide how to interpret malformed phrases. \\ +For example, if the first expression in the vector access rule does not evaluate to a valid name, then the compilation will fail because of the failure of the C function that resolves the names in the environment (arguments will not match!). \\ +A less typing intensive form used to obtain an expression yielding a vector of a desired size is associated to the production. +\begin{verbatim} +expr: ... + | '[' vect_elem ']' TIMES_KW expr +\end{verbatim}{} + +The last thing to note about syntactic design choices is related to how we can sequence a block of expressions: +\begin{verbatim} +expr: ... + | SEQ_KW expr_sequence + +expr_sequence : expr expr_seq_cont + +expr_seq_cont : ';' expr expr_seq_cont + | '.' +\end{verbatim}{} +We can note that this solution is almost the same as the one used for vectors of expressions. However to keep a functional flavour in the language we decided to avoid using curl brackets to enclose a sequence of expressions.\\ + +Internally at the level of the abstract syntax tree a sequence of expressions is represented just as a vector of expression. Deeper in the back-end, when LLVM API comes into play, this two features cannot be the same anymore since a vector is represented through a LLVMArrayType and so every element must evaluate to an object of the same type, while in a sequence every element can evaluate to a different type. +\\ +Finally note that every possible check on types (integers, booleans, vectors) is left to the back-end. It is a waste of time to make the front-end more complex to deal with them while being quite sure that the chosen back-end library will perform a better job. + +\section{Code Generation} +The code generation phase consists in translating to some intermediate representation the tree structure generated by the parser. In this project this is achieved via calls to the LLVM API.\\ +In particular to generate the IR code for a vector of expressions it is needed to: +\begin{itemize} + \item compute the length of the vector; + \item create a C array to temporarily keep in memory the result of the evaluation of each expression in the vector together with its IR code; + \item use a LLVMBuildAlloca call to allocate the required space to store that vector of expressions in memory and obtain the base address of the allocated space; + \item for each expression in the vector (already evaluated and whose result is stored in the C array "expressions"): + \begin{itemize} + \item use LLVMBuildInBoundsGEP to compute the offset indicating the location of memory where to store the current expression. The return value of LLVMBuildInBoundsGEP is the pointer to the memory location indicating the next free block in a contiguous segment of memory bounded by $base\ address$ and $base\ address+vector\ length$. + \item use LLVMBuildStore to generate code to actually store that expression to the correct location. + \end{itemize}{} +\end{itemize}{} +Both for vector accesses and vector updates the pattern to generate the code is similar to the one used to create a vector of expressions. In fact in LLVM, every time we have to deal with array-like structures, the crucial point is the computation of the correct pointer to the required element indicated by a given index. This is always done via LLVMBuildInBoundsGEP and similar library calls.\\ +Code generation for the "seq" construct is based on a simple loop over the internal C structure holding the sequence of expressions. In this case we do not have to generate code to store contiguously in memory the results of each evaluation since every expression is evaluated but only the result of the evaluation of the last expression in the sequence is returned.\\ +Then we extended the "codegen\_expr" function for the "bin\_op" case to make the compiler capable of generating IR code for short-circuited AND and OR and for vector concatenation.\\ +Let's take as an example the implementation of the short-circuited AND. We have to create LLVM basic blocks that encode the fact that the first operand is true or false and one last basic block representing the continuation of the program. +Since we have to evaluate the second operand only in the case that the first is true, we conditionally branch on the result of the evaluation of the left-hand-side expression.\\ +If it is true, then we continue the computation in the basic block that contains the calls to generate the code for the right-hand side. +Otherwise, from the branching point the computation follows a path going through an empty basic blocks, encoding the fact that the left-hand-side expression was false and no code has to be generated. +Both blocks have a single outgoing edge sinking in the continuation basic block. +The last thing to note is the presence of a LLVMBuildPhi call as the first instruction of the continuation basic block. \\ +Vector concatenation instead follows a pattern similar to the one used for vector creation. Some more effort is required to compute the length of the concatenated vector starting from an integer that is wrapped into a LLVMValueRef. +Next, we perform two loops to draw first from the left-hand-side vector and then from the right-hand-side. The body of these two loops is almost the same as the one used in the vector creation part. The single difference regards the use of LLVMBuildStructGEP and LLVMBuildLoad to load from memory the elements of the two vectors that will be concatenated. \\ +Excluding future optimization passes, these sets of load are present even if the two vectors were not previously stored in memory, since the model of computation is eager and every expression is always evaluated as soon as it is encountered. +Note that a unique form of laziness is introduced in the language through short-circuited boolean operations. \\ +\section{An example Program} +We list a simple program to show the new features of the language. + +\subsection{Computation of the n-th Fibonacci number} +This is a standard example of a dynamic programming algorithm to compute in linear time and space the n-th Fibonacci number: +\begin{verbatim} +let n = 10 in +var i = 2 in +var x = [0] times n in + seq + x[0] := 0; + x[1] := 1; + while i < n do + seq + x[i] := x[i-1] + x[i-2]; + i := i+1.; + x[n-1]. \\ n := 10 implies x[n-1] = 34 +\end{verbatim} + +\section{Optimization and static analysis} +LLVM provides optimization and static analysis through an object called LLVMPassManager. Optimizations are realized as passes traversing some portion of the program to gather information or to transform it. Transform passes mutate the generated IR code mantaining its semantics. +One common optimization pass is the one provided by \textbf{LLVMAddInstructionCombiningPass}. A first example of the transformation performed by this pass is the following: +\begin{verbatim} +var x = [1,2,3] in + seq + x[0] := x[1]; + x[0]. + +generating code... + +define i32 @main() { +entry: + %x = alloca [3 x i32]* + %0 = alloca [3 x i32] + %1 = getelementptr inbounds i32, [3 x i32]* %0, i32 0 + store i32 1, i32* %1 + %2 = getelementptr inbounds i32, [3 x i32]* %0, i32 1 + store i32 2, i32* %2 + %3 = getelementptr inbounds i32, [3 x i32]* %0, i32 2 + store i32 3, i32* %3 + store [3 x i32]* %0, [3 x i32]** %x + %4 = load [3 x i32]*, [3 x i32]** %x + %5 = load [3 x i32]*, [3 x i32]** %x + %6 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i32 0, i32 1 + %7 = load i32, i32* %6 + %8 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i32 0, i32 0 + store i32 %7, i32* %8 + %9 = load [3 x i32]*, [3 x i32]** %x + %10 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i32 0, i32 0 + %11 = load i32, i32* %10 + ret i32 %11 +} + +generating optimised code... + +define i32 @main() { +entry: + %0 = alloca [3 x i32], align 4 + %1 = getelementptr inbounds i32, [3 x i32]* %0, i64 0 + store i32 1, i32* %1, align 4 + %2 = getelementptr inbounds i32, [3 x i32]* %0, i64 1 + store i32 2, i32* %2, align 4 + %3 = getelementptr inbounds i32, [3 x i32]* %0, i64 2 + store i32 3, i32* %3, align 4 + %4 = getelementptr inbounds [3 x i32], [3 x i32]* %0, i64 0, i64 1 + %5 = load i32, i32* %4, align 4 + %6 = getelementptr inbounds [3 x i32], [3 x i32]* %0, i64 0, i64 0 + store i32 %5, i32* %6, align 4 + ret i32 %5 +} + +running... +-> 2 +\end{verbatim} + +Note that the two virtual registers \textbf{\%4} and \textbf{\%5} holds the same address in the non optimised code. In the end, by avoiding repeated computation of already known addresses and reducing registers spilling, we spare five virtual registers. \\ +The same pass also enables the elimination of redudant variables as if it is performing a live variable data-flow analysis: +\begin{verbatim} +var n = 10 in +var c = 1 in +var b = 0 in +var a = 0 in +seq + while a < n do + seq + b:= a+1; + c:= c+b; + a:= b*2.; + c. + +generating code... + +define i32 @main() { +entry: + %a = alloca i32 + %b = alloca i32 + %c = alloca i32 + %n = alloca i32 + store i32 10, i32* %n + store i32 1, i32* %c + store i32 0, i32* %b + store i32 0, i32* %a + br label %cond + +cond: ; preds = %body, %entry + %0 = load i32, i32* %a + %1 = load i32, i32* %n + %2 = icmp slt i32 %0, %1 + br i1 %2, label %body, label %cont + +body: ; preds = %cond + %3 = load i32, i32* %a + %4 = add i32 %3, 1 + store i32 %4, i32* %b + %5 = load i32, i32* %c + %6 = load i32, i32* %b + %7 = add i32 %5, %6 + store i32 %7, i32* %c + %8 = load i32, i32* %b + %9 = mul i32 %8, 2 + store i32 %9, i32* %a + br label %cond + +cont: ; preds = %cond + %10 = load i32, i32* %c + ret i32 %10 +} + +generating optimised code... + +define i32 @main() { +entry: + %a = alloca i32, align 4 + %c = alloca i32, align 4 + %n = alloca i32, align 4 + store i32 10, i32* %n, align 4 + store i32 1, i32* %c, align 4 + br label %cond + +cond: ; preds = %body, %entry + %storemerge = phi i32 [ %6, %body ], [ 0, %entry ] + store i32 %storemerge, i32* %a, align 4 + %0 = load i32, i32* %n, align 4 + %1 = icmp slt i32 %storemerge, %0 + br i1 %1, label %body, label %cont + +body: ; preds = %cond + %2 = load i32, i32* %a, align 4 + %3 = add i32 %2, 1 + %4 = load i32, i32* %c, align 4 + %5 = add i32 %4, %3 + store i32 %5, i32* %c, align 4 + %6 = shl i32 %3, 1 + br label %cond + +cont: ; preds = %cond + %7 = load i32, i32* %c, align 4 + ret i32 %7 +} + +running... +-> 12 +\end{verbatim} +We can see how the two variables $a$ and $b$ are merged in the single variable/register $a$ in the optimized code. \\ +In addition the LLVMAddInstructionCombiningPass forces 4-byte aligned address, the replacement of multiplications and divisions with shifts and other simple peephole optimizations. \\ +Another possible pass to add is LLVMAddCFGSimplificationPass. This extension makes LLVM delete unreachable blocks by simplifying the control flow graph of the program, as we can see in: +\begin{verbatim} +let x = 5 in +if x < 2 then x+1 else x-1 + +generating code... + +define i32 @main() { +entry: + br i1 false, label %then, label %else + +then: ; preds = %entry + br label %cont + +else: ; preds = %entry + br label %cont + +cont: ; preds = %else, %then + %0 = phi i32 [ 6, %then ], [ 4, %else ] + ret i32 %0 +} + +generating optimised code... + +define i32 @main() { +entry: + ret i32 4 +} +\end{verbatim} +Since the value of $x$ is known at compile time, it can be propagated forward through the program. This implies that the compiler is be able to infer that the "then" branch will never be an actual computation path and so that portion of code is useless and will not be generated. +% ========================== +% ========================== +% ========================== + + +\end{document} \ No newline at end of file diff --git a/src/ast.c b/src/ast.c index fa356b3..2cfbe43 100644 --- a/src/ast.c +++ b/src/ast.c @@ -474,7 +474,7 @@ LLVMValueRef codegen_expr( // left_true and left_false as possible successors blocks LLVMBuildCondBr(builder, left_val, left_true_bb, left_false_bb); - // in the case left is true it is left to evaluate the right hand side + // in the case left is true we need to evaluate the right hand side LLVMPositionBuilderAtEnd(builder, left_true_bb); LLVMValueRef right_val = codegen_expr(e->binop.rhs, env, module, builder); LLVMBuildBr(builder, cont_bb); @@ -761,14 +761,23 @@ void jit_eval(struct expr *expr) // NEW // Setup optimizations using a pass manager + LLVMPassManagerRef pass_manager = LLVMCreateFunctionPassManagerForModule(module); - LLVMAddPromoteMemoryToRegisterPass(pass_manager); - //LLVMAddInstructionCombiningPass(pass_manager); - LLVMInitializeFunctionPassManager(pass_manager);; - //LLVMAddReassociatePass(pass_manager); - //LLVMAddGVNPass(pass_manager); - //LLVMAddCFGSimplificationPass(pass_manager); + // Do simple "peephole" optimizations and bit-twiddling opti. + // LLVMAddInstructionCombiningPass(pass_manager); + + // Reassociate expressions. + // LLVMAddReassociatePass(pass_manager); + + // Eliminate Common SubExpressions. + // LLVMAddGVNPass(pass_manager); + + // Simplify the control flow graph (deleting unreachable blocks, etc). + LLVMAddCFGSimplificationPass(pass_manager); + + //LLVMAddPromoteMemoryToRegisterPass(pass_manager); + LLVMInitializeFunctionPassManager(pass_manager);; char *error; if (LLVMCreateExecutionEngineForModule(&engine, module, &error)) { @@ -783,7 +792,6 @@ void jit_eval(struct expr *expr) // visit expression to get its LLVM type LLVMTypeRef bad_f_type = LLVMFunctionType(LLVMVoidType(), NULL, 0, 0); - LLVMValueRef typing_f = LLVMAddFunction(module, "typing_f", bad_f_type); LLVMBasicBlockRef typing_entry_bb = LLVMAppendBasicBlock(typing_f, "entry"); @@ -796,7 +804,7 @@ void jit_eval(struct expr *expr) // emit expression as function body LLVMTypeRef actual_f_type = LLVMFunctionType(type, NULL, 0, 0); - LLVMValueRef f = LLVMAddFunction(module, "f", actual_f_type); + LLVMValueRef f = LLVMAddFunction(module, "main", actual_f_type); LLVMBasicBlockRef entry_bb = LLVMAppendBasicBlock(f, "entry"); LLVMPositionBuilderAtEnd(builder, entry_bb); LLVMValueRef ret = codegen_expr(expr, NULL, module, builder); diff --git a/src/examples/code/sugared-fibo.code b/src/examples/code/sugared-fibo.code index d7e7a83..67e2642 100644 --- a/src/examples/code/sugared-fibo.code +++ b/src/examples/code/sugared-fibo.code @@ -8,4 +8,4 @@ var x = [0] times n in seq x[i] := x[i-1] + x[i-2]; i := i+1.; - x[9]. \ No newline at end of file + x[n-1]. \ No newline at end of file diff --git a/src/examples/transformations/dead-code-elimination.code b/src/examples/transformations/dead-code-elimination.code new file mode 100644 index 0000000..49a92d7 --- /dev/null +++ b/src/examples/transformations/dead-code-elimination.code @@ -0,0 +1,2 @@ +let x = 5 in +if x < 2 then x+1 else x-1 \ No newline at end of file diff --git a/src/examples/transformations/liveness-ab-merge.code b/src/examples/transformations/liveness-ab-merge.code new file mode 100644 index 0000000..f334fe0 --- /dev/null +++ b/src/examples/transformations/liveness-ab-merge.code @@ -0,0 +1,11 @@ +var n = 10 in +var c = 1 in +var b = 0 in +var a = 0 in +seq + while a < n do + seq + b:= a+1; + c:=c+b; + a:= b*2.; + c. \ No newline at end of file diff --git a/src/examples/transformations/opt-test-vect-vect.code b/src/examples/transformations/opt-test-vect-vect.code deleted file mode 100644 index b3bcd23..0000000 --- a/src/examples/transformations/opt-test-vect-vect.code +++ /dev/null @@ -1,46 +0,0 @@ -let x = [1,2,3] in [x,x,x] - -generating code... - -define [3 x [3 x i32]*]* @f() { -entry: - %0 = alloca [3 x i32] - %1 = getelementptr inbounds i32, [3 x i32]* %0, i32 0 - store i32 1, i32* %1 - %2 = getelementptr inbounds i32, [3 x i32]* %0, i32 1 - store i32 2, i32* %2 - %3 = getelementptr inbounds i32, [3 x i32]* %0, i32 2 - store i32 3, i32* %3 - %4 = alloca [3 x [3 x i32]*] - %5 = getelementptr inbounds [3 x i32]*, [3 x [3 x i32]*]* %4, i32 0 - store [3 x i32]* %0, [3 x i32]** %5 - %6 = getelementptr inbounds [3 x i32]*, [3 x [3 x i32]*]* %4, i32 1 - store [3 x i32]* %0, [3 x i32]** %6 - %7 = getelementptr inbounds [3 x i32]*, [3 x [3 x i32]*]* %4, i32 2 - store [3 x i32]* %0, [3 x i32]** %7 - ret [3 x [3 x i32]*]* %4 -} - -generating optimised code... - -define [3 x [3 x i32]*]* @f() { -entry: - %0 = alloca [3 x i32], align 4 - %1 = getelementptr inbounds i32, [3 x i32]* %0, i64 0 - store i32 1, i32* %1, align 4 - %2 = getelementptr inbounds i32, [3 x i32]* %0, i64 1 - store i32 2, i32* %2, align 4 - %3 = getelementptr inbounds i32, [3 x i32]* %0, i64 2 - store i32 3, i32* %3, align 4 - %4 = alloca [3 x [3 x i32]*], align 8 - %5 = getelementptr inbounds [3 x i32]*, [3 x [3 x i32]*]* %4, i64 0 - store [3 x i32]* %0, [3 x i32]** %5, align 8 - %6 = getelementptr inbounds [3 x i32]*, [3 x [3 x i32]*]* %4, i64 1 - store [3 x i32]* %0, [3 x i32]** %6, align 8 - %7 = getelementptr inbounds [3 x i32]*, [3 x [3 x i32]*]* %4, i64 2 - store [3 x i32]* %0, [3 x i32]** %7, align 8 - ret [3 x [3 x i32]*]* %4 -} - -running... --> 0 \ No newline at end of file diff --git a/src/examples/transformations/test-instr-comb.code b/src/examples/transformations/test-instr-comb.code index d313020..c3140e7 100644 --- a/src/examples/transformations/test-instr-comb.code +++ b/src/examples/transformations/test-instr-comb.code @@ -1,15 +1,4 @@ -let x = [1,2,3] in -[x[0]+1,x[0]+2] - -var x = 5 in -x + x - -define i32 @f() { -entry: - %x = alloca i32 - store i32 5, i32* %x - %0 = load i32, i32* %x - %1 = load i32, i32* %x - %2 = add i32 %0, %1 - ret i32 %2 -} \ No newline at end of file +var x = [1,2,3] in + seq + x[0] := x[1]; + x[0]. \ No newline at end of file