1,981 research outputs found

    Translating programming languages for intermediate codes

    Get PDF
    Many of the important data structures used in a compiler are intermediate representations of the program being compiled. Often these representations take the form of trees, with several node types, each of which has different attributes. Tree representations can be described with grammars, just like programming languages. For each grammar rule, there is one constructor that belongs to the class for its left-hand-side symbol. I simply extend the abstract class with a concrete class for each grammar rule. Each grammar rule has right hand side components that must be represented in the data structures.compiler, lexical analysis, abstract syntax, intermediate representation, abstract machine language

    Verified compilation and optimization of floating-point kernels

    Get PDF
    When verifying safety-critical code on the level of source code, we trust the compiler to produce machine code that preserves the behavior of the source code. Trusting a verified compiler is easy. A rigorous machine-checked proof shows that the compiler correctly translates source code into machine code. Modern verified compilers (e.g. CompCert and CakeML) have rich input languages, but only rudimentary support for floating-point arithmetic. In fact, state-of-the-art verified compilers only implement and verify an inflexible one-to-one translation from floating-point source code to machine code. This translation completely ignores that floating-point arithmetic is actually a discrete representation of the continuous real numbers. This thesis presents two extensions improving floating-point arithmetic in CakeML. First, the thesis demonstrates verified compilation of elementary functions to floating-point code in: Dandelion, an automatic verifier for polynomial approximations of elementary functions; and libmGen, a proof-producing compiler relating floating-point machine code to the implemented real-numbered elementary function. Second, the thesis demonstrates verified optimization of floating-point code in: Icing, a floating-point language extending standard floating-point arithmetic with optimizations similar to those used by unverified compilers, like GCC and LLVM; and RealCake, an extension of CakeML with Icing into the first fully verified optimizing compiler for floating-point arithmetic.Bei der Verifizierung von sicherheitsrelevantem Quellcode vertrauen wir dem Compiler, dass er Maschinencode ausgibt, der sich wie der Quellcode verhĂ€lt. Man kann ohne weiteres einem verifizierten Compiler vertrauen. Ein rigoroser maschinen-ĂŒ}berprĂŒfter Beweis zeigt, dass der Compiler Quellcode in korrekten Maschinencode ĂŒbersetzt. Moderne verifizierte Compiler (z.B. CompCert und CakeML) haben komplizierte Eingabesprachen, aber unterstĂŒtzen Gleitkommaarithmetik nur rudimentĂ€r. De facto implementieren und verifizieren hochmoderne verifizierte Compiler fĂŒr Gleitkommaarithmetik nur eine starre eins-zu-eins Übersetzung von Quell- zu Maschinencode. Diese Übersetzung ignoriert vollstĂ€ndig, dass Gleitkommaarithmetik eigentlich eine diskrete ReprĂ€sentation der kontinuierlichen reellen Zahlen ist. Diese Dissertation prĂ€sentiert zwei Erweiterungen die Gleitkommaarithmetik in CakeML verbessern. Zuerst demonstriert die Dissertation verifizierte Übersetzung von elementaren Funktionen in Gleitkommacode mit: Dandelion, einem automatischen Verifizierer fĂŒr Polynomapproximierungen von elementaren Funktionen; und libmGen, einen Beweis-erzeugenden Compiler der Gleitkommacode in Relation mit der implementierten elementaren Funktion setzt. Dann demonstriert die Dissertation verifizierte Optimierung von Gleitkommacode mit: Icing, einer Gleitkommasprache die Gleitkommaarithmetik mit Optimierungen erweitert die Ă€hnlich zu denen in unverifizierten Compilern, wie GCC und LLVM, sind; und RealCake, eine Erweiterung von CakeML mit Icing als der erste vollverifizierte Compiler fĂŒr Gleitkommaarithmetik

    Multiobjective optimization of electromagnetic structures based on self-organizing migration

    Get PDF
    PrĂĄce se zabĂœvĂĄ popisem novĂ©ho stochastickĂ©ho vĂ­cekriteriĂĄlnĂ­ho optimalizačnĂ­ho algoritmu MOSOMA (Multiobjective Self-Organizing Migrating Algorithm). Je zde ukĂĄzĂĄno, ĆŸe algoritmus je schopen ƙeĆĄit nejrĆŻznějĆĄĂ­ typy optimalizačnĂ­ch Ășloh (s jakĂœmkoli počtem kritĂ©riĂ­, s i bez omezujĂ­cĂ­ch podmĂ­nek, se spojitĂœm i diskrĂ©tnĂ­m stavovĂœm prostorem). VĂœsledky algoritmu jsou srovnĂĄny s dalĆĄĂ­mi bÄ›ĆŸně pouĆŸĂ­vanĂœmi metodami pro vĂ­cekriteriĂĄlnĂ­ optimalizaci na velkĂ© sadě testovacĂ­ch Ășloh. Uvedli jsme novou techniku pro vĂœpočet metriky rozprostƙenĂ­ (spread) zaloĆŸenĂ© na hledĂĄnĂ­ minimĂĄlnĂ­ kostry grafu (Minimum Spanning Tree) pro problĂ©my majĂ­cĂ­ vĂ­ce neĆŸ dvě kritĂ©ria. DoporučenĂ© hodnoty pro parametry ƙídĂ­cĂ­ běh algoritmu byly určeny na zĂĄkladě vĂœsledkĆŻ jejich citlivostnĂ­ analĂœzy. Algoritmus MOSOMA je dĂĄle Ășspěơně pouĆŸit pro ƙeĆĄenĂ­ rĆŻznĂœch nĂĄvrhovĂœch Ășloh z oblasti elektromagnetismu (nĂĄvrh Yagi-Uda antĂ©ny a dielektrickĂœch filtrĆŻ, adaptivnĂ­ ƙízenĂ­ vyzaƙovanĂ©ho svazku v časovĂ© oblasti
).This thesis describes a novel stochastic multi-objective optimization algorithm called MOSOMA (Multi-Objective Self-Organizing Migrating Algorithm). It is shown that MOSOMA is able to solve various types of multi-objective optimization problems (with any number of objectives, unconstrained or constrained problems, with continuous or discrete decision space). The efficiency of MOSOMA is compared with other commonly used optimization techniques on a large suite of test problems. The new procedure based on finding of minimum spanning tree for computing the spread metric for problems with more than two objectives is proposed. Recommended values of parameters controlling the run of MOSOMA are derived according to their sensitivity analysis. The ability of MOSOMA to solve real-life problems from electromagnetics is shown in a few examples (Yagi-Uda and dielectric filters design, adaptive beam forming in time domain
).
    • 

    corecore