The document discusses different algorithms for polygon clipping, which is a process that identifies the visible portions of a polygon through a clipping window. It describes the Sutherland-Hodgeman algorithm, which clips polygons by extending the edges of a convex clip polygon and selecting only visible vertices. The Weiler-Atherton algorithm modifies this approach to correctly display concave polygons. Polygon clipping is important for video games to maximize frame rate by avoiding rendering calculations for invisible portions of polygons.
In automata theory, a deterministic pushdown automaton (DPDA or DPA) is a variation of the pushdown automaton. The DPDA accepts the deterministic context-free languages, a proper subset of context-free languages. Machine transitions are based on the current state and input symbol, and also the current topmost symbol of the stack. Symbols lower in the stack are not visible and have no immediate effect. Machine actions include pushing, popping, or replacing the stack top. A deterministic pushdown automaton has at most one legal transition for the same combination of input symbol, state, and top stack symbol. This is where it differs from the nondeterministic pushdown automaton.
The document outlines the objectives, topics, and learning outcomes of the CS6660 Compiler Design course. The course aims to teach students about compiler design principles, parsing techniques, translation processes, optimization methods, and code generation. It is divided into 5 units that cover introduction to compilers, lexical analysis, syntax analysis, syntax directed translation and runtime environment, and code optimization and generation. At the end of the course, students should be able to design and implement a prototype compiler, apply optimization techniques, use compiler construction tools, and understand the different levels of translation.
Formal Languages and Automata Theory unit 5Srimatre K
This document summarizes key concepts from Unit 5, including types of Turing machines, undecidability, recursively enumerable languages, Post's correspondence problem, and counter machines. It defines undecidable problems as those with no algorithm to solve them. Examples of undecidable problems include the halting problem and determining if a Turing machine accepts a language that is not recursively enumerable. Post's correspondence problem and its modified version are presented with examples. Recursively enumerable languages are defined and properties like concatenation, Kleene closure, union, and intersection are described. Counter machines are defined as having states, input alphabet, start/final states, and transitions that allow incrementing, decrementing, and checking if a
EBSCO is a large research platform provider with over 3,200 employees and 150,000 library customers worldwide. Kenzan is a consulting firm that helps companies with digital transformation, including application development and cloud migration. EBSCO is working with Kenzan to migrate its platforms to AWS to achieve goals like high velocity value creation and margin protection through a culture and technology transformation. This involves moving to a microservices architecture in AWS, adopting agile methods, and transitioning to a "development centric operating model" where developers build, deploy, and manage their own software. The transformation aims to increase new feature development by 25% and decrease non-developer labor by 80% through practices like continuous delivery, immutable infrastructure, and automated
Finite state automata (deterministic and nondeterministic finite automata) provide decisions regarding the acceptance and rejection of a string while transducers provide some output for a given input. Thus, the two machines are quite useful in language processing tasks.
The document discusses different algorithms for polygon clipping, which is a process that identifies the visible portions of a polygon through a clipping window. It describes the Sutherland-Hodgeman algorithm, which clips polygons by extending the edges of a convex clip polygon and selecting only visible vertices. The Weiler-Atherton algorithm modifies this approach to correctly display concave polygons. Polygon clipping is important for video games to maximize frame rate by avoiding rendering calculations for invisible portions of polygons.
In automata theory, a deterministic pushdown automaton (DPDA or DPA) is a variation of the pushdown automaton. The DPDA accepts the deterministic context-free languages, a proper subset of context-free languages. Machine transitions are based on the current state and input symbol, and also the current topmost symbol of the stack. Symbols lower in the stack are not visible and have no immediate effect. Machine actions include pushing, popping, or replacing the stack top. A deterministic pushdown automaton has at most one legal transition for the same combination of input symbol, state, and top stack symbol. This is where it differs from the nondeterministic pushdown automaton.
The document outlines the objectives, topics, and learning outcomes of the CS6660 Compiler Design course. The course aims to teach students about compiler design principles, parsing techniques, translation processes, optimization methods, and code generation. It is divided into 5 units that cover introduction to compilers, lexical analysis, syntax analysis, syntax directed translation and runtime environment, and code optimization and generation. At the end of the course, students should be able to design and implement a prototype compiler, apply optimization techniques, use compiler construction tools, and understand the different levels of translation.
Formal Languages and Automata Theory unit 5Srimatre K
This document summarizes key concepts from Unit 5, including types of Turing machines, undecidability, recursively enumerable languages, Post's correspondence problem, and counter machines. It defines undecidable problems as those with no algorithm to solve them. Examples of undecidable problems include the halting problem and determining if a Turing machine accepts a language that is not recursively enumerable. Post's correspondence problem and its modified version are presented with examples. Recursively enumerable languages are defined and properties like concatenation, Kleene closure, union, and intersection are described. Counter machines are defined as having states, input alphabet, start/final states, and transitions that allow incrementing, decrementing, and checking if a
EBSCO is a large research platform provider with over 3,200 employees and 150,000 library customers worldwide. Kenzan is a consulting firm that helps companies with digital transformation, including application development and cloud migration. EBSCO is working with Kenzan to migrate its platforms to AWS to achieve goals like high velocity value creation and margin protection through a culture and technology transformation. This involves moving to a microservices architecture in AWS, adopting agile methods, and transitioning to a "development centric operating model" where developers build, deploy, and manage their own software. The transformation aims to increase new feature development by 25% and decrease non-developer labor by 80% through practices like continuous delivery, immutable infrastructure, and automated
Finite state automata (deterministic and nondeterministic finite automata) provide decisions regarding the acceptance and rejection of a string while transducers provide some output for a given input. Thus, the two machines are quite useful in language processing tasks.
This document does not contain any meaningful information to summarize. It consists of random characters and symbols without any context. In 3 sentences or less, a summary cannot be provided as there is no essential information to extract from the given text.
Cuadros, formas de estado, nacionalidad, ciudadania25442462
El documento presenta un cuadro con las características y bases legales y constitucionales de las formas de estado, nacionalidad y ciudadanía. Explica que Venezuela es un estado federal descentralizado donde los estados, municipios y distritos tienen autonomía territorial. Define la nacionalidad como el vínculo jurídico-político entre un individuo y el estado, y la ciudadanía como el vínculo político que permite participar en el sistema político de un estado.
Outfits are what people wear. Clothing includes tops, bottoms, dresses, and shoes. When picking outfits, consider the occasion, your personal style, and how each piece works together to make you look and feel your best.
Vortrag zu ethischen Aspekten digitaler Kommunikation im Rahmen der "Consulting-Akademie Unternehmensethik" der Evangelischen Akademie der Pfalz am 21. November 2015 in Karlsruhe.
[für eine bessere Auflösung bitte das .pdf herunterladen]
Este documento analiza el impacto de la publicidad digital en las tendencias de consumo de los jóvenes. Presenta objetivos, hipótesis, variables y métodos de investigación como encuestas y entrevistas aplicadas a jóvenes y una empresa de publicidad digital. El documento justifica la necesidad de comprender cómo afecta la publicidad digital el consumo juvenil y qué estrategias son más efectivas.
1. El documento discute las lecciones que se pueden aprender del deporte del golf y aplicar a los negocios, inversiones y vida personal. Explorará 12 temas clave como fijar metas realistas, tener una estrategia clara, formar un buen equipo, aceptar derrotas e innovar continuamente.
2. Cada tema se analizará en detalle en futuras ediciones para mostrar paralelismos entre el golf, los negocios y las finanzas personales. Se argumenta que el éxito en el golf requiere habilidades
A recent direction in Business Process Management studied methodologies to control the execution of Business Processes under several sources of uncertainty in order to always get to the end by satisfying all constraints. Current approaches encode business processes into temporal constraint networks or timed game automata in order to exploit their related strategy synthesis algorithms. However, the proposed encodings can only synthesize single-strategies and fail to handle loops. To overcome these limits I will discuss a recent approach based on supervisory control. The approach considers structured business processes with resources, parallel and mutually exclusive branches, loops, and uncertainty. I will discuss an encoding into finite state automata and prove that their concurrent behavior models exactly all possible executions of the process. After that, I will introduce tentative commitment constraints as a new class of constraints restricting the executions of a process. Finally, I will discuss a tree decomposition of the process that plays a central role in modular supervisory control.
In his ignite talk „The Digital Transformation of Education: A Hyper-Disruptive Era through Blockchain and Generative AI,“ Dr. Alexander Pfeiffer delves into the intricate challenges and potential benefits associated with integrating blockchain technologies and generative AI into the educational landscape. He scrutinizes consensus algorithms and explores sustainable methods of operating blockchain systems, while also examining how smart contracts and transactions can be tailored to meet the specific needs of the educational sector. Alexander underscores the importance of establishing secure digital identities and ensuring robust data protection, while simultaneously casting a critical eye on potential risks and vulnerabilities. The topic of digital identities, facilitated through tokenization, forms a bridge between storing data using blockchain-based databases and the increasingly urgent need for content verification of AI-generated material.
Alexander explores the profound alterations occurring in teaching methodologies, assignment creation, and evaluation processes, shedding light on the hyper-disruptive impact these changes are having on both research and practical applications in education. The production of textual content by educators and students is analyzed with a focus on ensuring clear traceability of content sources and editors, and its proper citation, a critical aspect in the responsible use of AI. In addition to generative text and graphics, AI plays a crucial role in future learning and assignment practices, particularly through adaptive game-based learning and assessment. Alexander will provide a brief glimpse into his game „Gallery-Defender,“ a prototype demonstrating how AI and blockchain can be effectively implemented in serious gaming scenarios.
Furthermore, he emphasizes the imperative for ongoing education and professional development for educational personnel, advocating for a proactive stance in addressing the (legal) challenges associated with AI-generated images and text. This ignite talk aims to provide a balanced and critically reflective perspective on hyper-disruptive technologies, setting the stage for further discourse and exploration in the subsequent discussion.
The simulation of melee combat is central to many contemporary and traditional strategic games and simulations. In order to elevate this element of play from mere exercises of stats-comparison and dice rolling to a meaningful experience of play, strategy games rely on a rich plethora of cultural motives as deciding factors of their mechanic design. On the example of Samurai-themed skirmishing games, my talk elaborates on the impact that (popular) culture and other inspirations have on gaming experiences. It provides concrete examples from Japanese history, its traditional cinema, and postmodern Western reflections of Japanese cultural practices. Based on these insights, it compares four tabletop strategy games, muses on which phenomena they have adapted in their mechanics, and asks why or why not they may succeed in capturing a cultural essence via their rules.
Ultimately, this comparative approach shall serve to decipher the interplay of dice mechanics and aesthetic properties as the longing for a dramatic ideal in tabletop gaming and encourage participants to reflect on the idea in a subsequent, shared gaming experience.
This document does not contain any meaningful information to summarize. It consists of random characters and symbols without any context. In 3 sentences or less, a summary cannot be provided as there is no essential information to extract from the given text.
Cuadros, formas de estado, nacionalidad, ciudadania25442462
El documento presenta un cuadro con las características y bases legales y constitucionales de las formas de estado, nacionalidad y ciudadanía. Explica que Venezuela es un estado federal descentralizado donde los estados, municipios y distritos tienen autonomía territorial. Define la nacionalidad como el vínculo jurídico-político entre un individuo y el estado, y la ciudadanía como el vínculo político que permite participar en el sistema político de un estado.
Outfits are what people wear. Clothing includes tops, bottoms, dresses, and shoes. When picking outfits, consider the occasion, your personal style, and how each piece works together to make you look and feel your best.
Vortrag zu ethischen Aspekten digitaler Kommunikation im Rahmen der "Consulting-Akademie Unternehmensethik" der Evangelischen Akademie der Pfalz am 21. November 2015 in Karlsruhe.
[für eine bessere Auflösung bitte das .pdf herunterladen]
Este documento analiza el impacto de la publicidad digital en las tendencias de consumo de los jóvenes. Presenta objetivos, hipótesis, variables y métodos de investigación como encuestas y entrevistas aplicadas a jóvenes y una empresa de publicidad digital. El documento justifica la necesidad de comprender cómo afecta la publicidad digital el consumo juvenil y qué estrategias son más efectivas.
1. El documento discute las lecciones que se pueden aprender del deporte del golf y aplicar a los negocios, inversiones y vida personal. Explorará 12 temas clave como fijar metas realistas, tener una estrategia clara, formar un buen equipo, aceptar derrotas e innovar continuamente.
2. Cada tema se analizará en detalle en futuras ediciones para mostrar paralelismos entre el golf, los negocios y las finanzas personales. Se argumenta que el éxito en el golf requiere habilidades
A recent direction in Business Process Management studied methodologies to control the execution of Business Processes under several sources of uncertainty in order to always get to the end by satisfying all constraints. Current approaches encode business processes into temporal constraint networks or timed game automata in order to exploit their related strategy synthesis algorithms. However, the proposed encodings can only synthesize single-strategies and fail to handle loops. To overcome these limits I will discuss a recent approach based on supervisory control. The approach considers structured business processes with resources, parallel and mutually exclusive branches, loops, and uncertainty. I will discuss an encoding into finite state automata and prove that their concurrent behavior models exactly all possible executions of the process. After that, I will introduce tentative commitment constraints as a new class of constraints restricting the executions of a process. Finally, I will discuss a tree decomposition of the process that plays a central role in modular supervisory control.
In his ignite talk „The Digital Transformation of Education: A Hyper-Disruptive Era through Blockchain and Generative AI,“ Dr. Alexander Pfeiffer delves into the intricate challenges and potential benefits associated with integrating blockchain technologies and generative AI into the educational landscape. He scrutinizes consensus algorithms and explores sustainable methods of operating blockchain systems, while also examining how smart contracts and transactions can be tailored to meet the specific needs of the educational sector. Alexander underscores the importance of establishing secure digital identities and ensuring robust data protection, while simultaneously casting a critical eye on potential risks and vulnerabilities. The topic of digital identities, facilitated through tokenization, forms a bridge between storing data using blockchain-based databases and the increasingly urgent need for content verification of AI-generated material.
Alexander explores the profound alterations occurring in teaching methodologies, assignment creation, and evaluation processes, shedding light on the hyper-disruptive impact these changes are having on both research and practical applications in education. The production of textual content by educators and students is analyzed with a focus on ensuring clear traceability of content sources and editors, and its proper citation, a critical aspect in the responsible use of AI. In addition to generative text and graphics, AI plays a crucial role in future learning and assignment practices, particularly through adaptive game-based learning and assessment. Alexander will provide a brief glimpse into his game „Gallery-Defender,“ a prototype demonstrating how AI and blockchain can be effectively implemented in serious gaming scenarios.
Furthermore, he emphasizes the imperative for ongoing education and professional development for educational personnel, advocating for a proactive stance in addressing the (legal) challenges associated with AI-generated images and text. This ignite talk aims to provide a balanced and critically reflective perspective on hyper-disruptive technologies, setting the stage for further discourse and exploration in the subsequent discussion.
The simulation of melee combat is central to many contemporary and traditional strategic games and simulations. In order to elevate this element of play from mere exercises of stats-comparison and dice rolling to a meaningful experience of play, strategy games rely on a rich plethora of cultural motives as deciding factors of their mechanic design. On the example of Samurai-themed skirmishing games, my talk elaborates on the impact that (popular) culture and other inspirations have on gaming experiences. It provides concrete examples from Japanese history, its traditional cinema, and postmodern Western reflections of Japanese cultural practices. Based on these insights, it compares four tabletop strategy games, muses on which phenomena they have adapted in their mechanics, and asks why or why not they may succeed in capturing a cultural essence via their rules.
Ultimately, this comparative approach shall serve to decipher the interplay of dice mechanics and aesthetic properties as the longing for a dramatic ideal in tabletop gaming and encourage participants to reflect on the idea in a subsequent, shared gaming experience.
How does a development team expand on an already existing game?
We will look at the two community driven and committee led expansions to the abandoned Tabletop game 'GuildBall' and explore the stages of development that the game went through. The art and lore driven approach employed will show us how rough sketches and concept ideas become a fully fledged ruleset and ultimately miniatures that can be put on the table. We will also explore pitfalls in rules design like over complicating abilities, the lack of streamlining across the game or simply creating expansions who break the game instead of the mold.
The document discusses Ben Calvert-Lee's work developing miniatures for tabletop games. It begins with an introduction to Ben's background and current role as a freelance lead sculptor. It then outlines the typical development pipeline for miniatures, from initial concepts and artwork to production. The document also discusses different miniature production methods. A case study details Ben's process for developing the Tengu faction for a game, including exploring species archetypes and incorporating unexpected developments into the designs.
In recent years, we have experienced an exponential growth in the amount of data generated by IoT devices. Data have to be processed strict low latency constraints, that cannot be addressed by conventional computing paradigm and architectures. On top of this, if we consider that we recently hit the limit codified by the Moore’s law, satisfying low-latency requirements of modern applications will become even more challenging in the future. In this talk, we discuss challenges and possibilities of heterogeneous distributed systems in the Post-Moore era.
In the modern world, we are permanently using, leveraging, interacting with, and relying upon systems of ever higher sophistication, ranging from our cars, recommender systems in eCommerce, and networks when we go online, to integrated circuits when using our PCs and smartphones, security-critical software when accessing our bank accounts, and spreadsheets for financial planning and decision making. The complexity of these systems coupled with our high dependency on them implies both a non-negligible likelihood of system failures, and a high potential that such failures have significant negative effects on our everyday life. For that reason, it is a vital requirement to keep the harm of emerging failures to a minimum, which means minimizing the system downtime as well as the cost of system repair. This is where model-based diagnosis comes into play.
Model-based diagnosis is a principled, domain-independent approach that can be generally applied to troubleshoot systems of a wide variety of types, including all the ones mentioned above. It exploits and orchestrates techniques for knowledge representation, automated reasoning, heuristic problem solving, intelligent search, learning, stochastics, statistics, decision making under uncertainty, as well as combinatorics and set theory to detect, localize, and fix faults in abnormally behaving systems.
In this talk, we will give an introduction to the topic of model-based diagnosis, point out the major challenges in the field, and discuss a selection of approaches from our research addressing these challenges. For instance, we will present methods for the optimization of the time and memory performance of diagnosis systems, show efficient techniques for a semi-automatic debugging by interacting with a user or expert, and demonstrate how our algorithms can be effectively leveraged in important application domains such as scheduling or the Semantic Web.
Function-as-a-Service (FaaS) is the latest paradigm of cloud computing in which developers deploy their codes as serverless functions, while the entire underlying platform and infrastructure is completely managed by cloud providers. Each cloud provider offers a huge set of cloud services and many libraries to simplify development and deployment, but only inside their clouds, often in a single cloud region. With such „help“ of cloud providers, users are locked to use resources and services of the selected cloud provider, which are often limited. Moreover, such heterogeneous and distributed environment of multiple cloud regions and providers challenge scientists to engineer cloud applications, often in a form of serverless workflows. In this talk, I will present our design principle „code once, run everywhere, with everything“. In particular, I will present challenges and our approaches and techniques how to program, model, orchestrate, and run distributed serverless workflow applications in federated FaaS.
This document summarizes a presentation on machine learning and fluid network planes. It begins with an agenda and introduction to fluid network planes and instances. It then discusses the role of machine learning in fluid network planes, including applications such as optimization, virtual network embedding problems, run-time operations, and intent-based closed-loop automation. Recent research is presented on machine learning-based YouTube QoE estimation using real 4G/5G network traces to predict video quality and inform control actions. Results are shown comparing 4G and 5G networks in terms of radio parameters, stalling events, handovers, and video resolutions under different mobility conditions.
The dynamics of networks enables the function of a variety of systems we rely on every day, from gene regulation and metabolism in the cell to the distribution of electric power and communication of information. Understanding, steering and predicting the function of interacting nonlinear dynamical systems, in particular if they are externally driven out of equilibrium, relies on obtaining and evaluating suitable models, posing at least two major challenges. First, how can we extract key structural system features of networks if only time series data provide information about the dynamics of (some) units? Second, how can we characterize nonlinear responses of nonlinear multi-dimensional systems externally driven by fluctuations, and consequently, predict tipping points at which normal operational states may be lost? Here we report recent progress on nonlinear response theory extended to predict tipping points and on model-free inference of network structural features from observed dynamics.
When it comes to integrating digital technologies into the classroom in higher education, many teachers face similar challenges. Nevertheless, it is difficult for teachers to share experiences because it is usually not possible to transfer successful teaching scenarios directly from one area to another, as subject-specific characteristics make it difficult to reuse them. To address this problem, instructional scenarios can be described as patterns that have been used previously in educational contexts. Patterns can capture proven teaching strategies and describe instructional scenarios in a consistent structure that can be reused. Because priorities for content, methods, and tools are different in each domain, a consensus-tested taxonomy was first developed with the goal of modeling a domain-independent database to collect digital instructional practices. In addition, this presentation will present preliminary insights into a data-driven approach to identifying effective instructional practices from interdisciplinary data as patterns. A web-based application will be developed for this that can both collect teaching/learning scenarios and individually extract scenarios from patterns for a learning platform.
The document discusses performance characterization across a computing continuum from the edge to the cloud. It evaluates the performance of video encoding and machine learning tasks on different devices. For video encoding, older single-board computers had significantly higher encoding times than other resources but provided lower data transfer times. For machine learning, training a convolutional neural network took much longer than a simpler model. Cloud and fog resources generally outperformed edge devices for more complex tasks. The document recommends offloading large or complex tasks to more powerful resources when possible.
East-west oriented photovoltaic power system is a new trend in orienting photovoltaic system. This lecture presents an evaluation of east–west oriented photovoltaic power system. A comparison between east–west oriented photovoltaic system and south oriented photovoltaic system in terms of cost of energy and technical requirement is conducted is presented in this lecture. In addition to that, the benefits of using east–west oriented photovoltaic system are discussed in this paper.
The document discusses using randomized recurrent neural networks and signature-based methods for machine learning in finance. It proposes splitting the input-output map of a dynamical system into a "reservoir" part and a linear "readout" part. The signature of the input signal provides a natural candidate for the reservoir, as it is point-separating and linear functions on the signature can approximate continuous functionals via the universal approximation theorem. The goal of the talk is to prove how dynamical systems can be approximated using randomized recurrent networks, with precise convergence rates, and to view randomized deep networks through this lens.
We live in a “digital” world, the separation between physical and virtual makes (almost) no sense anymore. Here, the Corona pandemic has also acted as an accelerator/magnifier demonstrating that the future of our digital society is here with all its possibilities, but also shortcomings.
In his talk, Hannes Werthner will briefly reflect on the history of computer science, and then discuss the need for an interdisciplinary response to these shortcomings. Such an answer is the Digital Humanism, which looks at this interplay of technology and humankind, it analyzes, and, most importantly, tries to influence the complex interplay of technology and humankind, for a better society and life. In the second part he will discuss this approach, and show what was achieved since its first workshop in 2019, and what lies ahead.
In the latest years, we have witnessed a growing number of media transmitted and stored on computers and mobile devices. For this reason, there is an actual need to employ smart compression algorithms to reduce the size of our media files. However, such techniques are often responsible for severe reduction of user perceived quality. In this talk we present several approaches we have developed to restore degraded images and videos to match their original quality, making use of Generative Adversarial Networks. The aim of the talk is to highlight the main features of our research work, including the advantages of our solution, the current challenges and the possible directions for future improvements.
Recommendation systems today are widely used across many applications such as in multimedia content platforms, social networks, and ecommerce, to provide suggestions to users that are most likely to fulfill their needs, thereby improving the user experience. Academic research, to date, largely focuses on the performance of recommendation models in terms of ranking quality or accuracy measures, which often don’t directly translate into improvements in the real-world. In this talk, we present some of the most interesting challenges that we face in the personalization efforts at Netflix. The goal of this talk is to sunshine challenging research problems in industrial recommendation systems and start a conversation about exciting areas of future research.
The document discusses the evolution to 5G networks and their benefits. It covers 5G principles like enhanced mobile broadband, massive machine-type communication, and ultra-reliable low-latency communications. Statistics are provided on 5G subscriptions, deployments, and expected growth in mobile data traffic. Use cases like smart cities, VR/AR, and autonomous vehicles are described. The presentation outlines Ericsson's 5G experience and global footprint.
2. Wozu Compiler?
• Eine der ältesten und grundlegendsten Technologien
• Compilertechnologie hat viele Anwendungsgebiete
Übersetzung von Programmiersprachen
Syntaxgetriebene Editoren, Kommandointerpreter
Halbformale Datenbeschreibungen (z.B. XML)
• Wenn wir Compiler nicht verstehen, verstehen wir
kaum, wie Programme am Rechner funktionieren
Was geschieht aufgrund folgender Programmzeilen?
for (i = 0; i < 10; i++) { a[i] = a[i+1]*x.y.z; print(a[i]); }
o.addSalary(float sum);
if (o instance of Student) student = o else person = o;
Wie werden solche Anweisungen ausgeführt?
Laszlo Böszörmenyi Compiler 2 / 22
3. Was ist ein Compiler?
• Transformiert Texte einer „höheren“ formalen
Sprache auf eine “niedrigere” formale Sprache
Quellecode Compiler Zielcode
• Der Quellcode ist üblicherweise lesbar für
Menschen; der Zielcode für Maschinen
C → Intel Assembler; Pascal → Motorola Maschinencode
• Ausführbarer Zielcode
Input Zielcode Output
Laszlo Böszörmenyi Compiler 3 / 22
4. Interpretation, Front-end, Back-end
• Der Quellcode kann direkt interpretiert werden
Kommandointerpreter, Syntaxgetriebene Editoren,
Scriptsprachen
Quellecode
Interpreter Output
Input
• Sprachabhängiges front-end → Zwischensprache
Z.B. Common Language Runtime (CLR in .NET)
• Zielabhängiges back-end
Quelle1 Front-end1 Back-end1 Ziel1
Zwischenspr.
Quelle2 Front-end2 Back-end2 Ziel2
Laszlo Böszörmenyi Compiler 4 / 22
5. Interpretierte Ausführung, JIT Compilation
• Der Zwischencode kann von einer virtuellen
Maschine (z.B. Java VM) interpretiert werden
Z.B. Java Byte Code – JVM läuft etwa im Browser
Zwischencode
Input virtuelle M. Output
• Zwischencode wird “just-in-time” (JIT) übersetzt
Zur Laufzeit (z.B. Java); beim Laden (z.B. im .NET)
Zwischencode JIT Compiler Zielcode Output
Input
Laszlo Böszörmenyi Compiler 5 / 22
6. Formale Sprachen
• Eine formale Sprache wird definiert durch
Ein endliches Alphabet, z.B. {0, 1} oder {a, … z, A, … Z}
Eine Grammatik als eine Menge von Regeln (Syntax)
• Ein Wort (oder Satz) über das Alphabet Σ
wj = xj1 xj2 … xjm, wo Σ = {xi | 1 ≤ i ≤ n}
|wj| = m ist die Länge von wj
Σ+ : Menge der Wörter über Σ – transitive Hülle
Σ* : Σ + + {ε} – transitive und reflexive Hülle (|ε|=0)
Z.B. Σ = {0, 1}; Σ* = {ε, 0, 1, 00, 01, 11, 000, 001, …}
• KEINE menschlichen Sprachen
Ziel ist Eindeutigkeit – schlecht für Humor oder Dichtung
Reife Theorie, relevant für viele Gebiete der Informatik
Laszlo Böszörmenyi Compiler 6 / 22
7. Grammatiken
• Grammatik G ist definiert als: G = (VN, VT, P, S)
VN: Menge der Variablen (non-terminal Symbole )
VT : Menge der Terminale (sind Teil der Sprache)
P: Menge der Produktionen (Regel der Satzbildung,
der Syntax)
S: Start Symbol (S ∊ VN)
VN ∩ VT = Ø (die zwei Mengen sind disjunkt)
VN ∪ VT = V (die Vereinigung beider Mengen ist V)
• P enthält Ausdrücke der folgenden Form
α → β (α ∊ V+ and β ∊ V*)
Wenn α → β ∊ P und γ, δ ∊ V* :
γ α δ ⇒ γ β δ : γ β δ ist eine direkte Ableitung von γ α δ
Laszlo Böszörmenyi Compiler 7 / 22
8. Sprache, erzeugt durch eine Grammatik
• Ableitung
Wenn α1 ⇒ α2, α2 ⇒ α3, … αn-1 ⇒ αn dann
α1 ⇒* αn d.h. αn ist eine Ableitung von α1
⇒* ist die reflexive und transitive Hülle von ⇒
Ableitung in 0 oder mehr Schritten
⇒n Ableitung in n Schritten
• Die Sprache L, generiert durch Grammatik G ist
{w | w ∊ VT* ∧ S ⇒* w}
Die Menge aller Wörter, die aus Terminalen bestehen
und aus dem Startsymbol abgeleitet werden können
Z.B.: G: VN = {S}, VT = {0, 1}, P = {S → 0S1, S → 01}
L(G) = {0n1n | n ≥ 1}
Laszlo Böszörmenyi Compiler 8 / 22
9. Grammatik Typen (Noah Chomsky)
• Typ-3 (regulär)
Wenn A ∊ VN, B ∊ {VN, ε}, w ∊ VT*; Form der Produktionen
A → w B or A → B w (rechtslinear bzw. linkslinear)
• Typ-2 (kontextfrei)
∀ A → β ∊ P A ∊ VN (Einzelvariable) und β # ε (ε ∉ L(G))
A kann in jedem Kontext durch β ersetzt werden
• Typ-1 (kontextsensitiv)
A kann nur in einem bestimmten Kontext
(wie zwischen α1 und α2) durch β ersetzt werden
α1A α2 → α1βα2 (α1,α2,β ∊ V*; β # ε und A ∊ VN)
∀ α → β ∊ P gilt: |β| ≥ |α|.
• Typ-0
Laszlo Böszörmenyi Compiler 9 / 22
10. Mächtigkeit der Grammatiken
• Regulär ⊂ kontextfrei ⊂ kontextsensitiv ⊂ Typ-0
Typ-0 Grammatiken umfassen auch kontextsensitive
Grammatiken, kontextsensitive umfassen kontextfreie
und kontextfreie umfassen reguläre Grammatiken
• Reguläre Grammatiken erzeugen die gleiche
Klasse von Sprachen wie endliche Automaten
• Kontextfreie Grammatiken erzeugen die gleiche
Klasse von Sprachen wie Kellerautomaten
• Zwei Grammatiken sind äquivalent, gdw. (genau
dann, wenn) sie die gleiche Sprache erzeugen
G1 ≡ G2, gdw. L(G1) = L(G2)
Laszlo Böszörmenyi Compiler 10 / 22
11. Regulär vs. kontextfreie Grammatiken
Regulär Kontextfrei
Anwendung Lexikale Analyse Syntaktische Analyse
Erkannt Endliche Automaten Kellerautomaten
durch (Zustände + (Zustände + Übergänge +
Übergänge) Keller)
Produktionen A → a | aB A→α
Grenzen Z.B. Konstruktpaare Z.B. Prüfung von
(was geht (Verschachtelung, Übereinstimmung von
NICHT) Klammerung) Typdeklaration und
(anbn [n1]) Verwendung von Typen)
(anbmcndm [n1, m1])
Laszlo Böszörmenyi Compiler 11 / 22
12. Metasprachen
• Definieren andere – komplexere – formale Sprachen
• EBNF (Extended Backus-Naur Form)
John Backus, Peter Naur, Niklaus Wirth
Variablen: Namen für syntaktische Konstrukte
Terminale: Elemente der Sprache, zwischen “ “
A=xyz Sequenz: A besteht aus x, gefolgt durch y und z
A = x1 | x2 | ... xk Alternative: A ist x1 oder x2 oder ... xk
A = x [y] z Option: A ist xz oder xyz
A = x {y} z Wiederholung: A ist xz oder xyz oder xy...yz
A = x {y}+ z Wiederholung: y zumindest einmal (xz ist illegal)
Laszlo Böszörmenyi Compiler 12 / 22
13. Syntaxdiagramme – EBNF graphisch
Terminale
Seq. (A = x y z) A
x y z
x
Alternative (A = x | y | z ) A
y
Variablen
z
Wiederholung (A = x {y} z) Option (A = x [y] z)
A A
x z x z
y y
Laszlo Böszörmenyi Compiler 13 / 22
14. EBNF Beispiel
• Ziffer = “0“|“1“|“2“|“3“|“4“|“5“|“6“|“7“|“8“|“9“
• Zahl = Ziffer { Ziffer }
• Buchstabe = “a“ | “b“ | ... | “z“ | “A“ | “B“ | ... | “Z“
• Name = Buchstabe { Buchstabe | Ziffer }
• Zahl = Ziffer | Ziffer Zahl (rekursive Definition von Zahl)
Name
Buchstabe
• Diagramme sind leichter Ziffer
zu lesen
• EBNF ist sehr kompakt Buchstabe
Laszlo Böszörmenyi Compiler 14 / 22
16. Phasen der Übersetzung / Ausführung
1. Quelle-zu-Quelle Preprozessor Quellcode
• Z.B. Markos, wie in C++ Preprozessor
2. Compiler erzeugt Assembly Quellcode neu
Code für die Zielmaschine
3. Assembler erzeugt Compiler
verschiebbaren Binärcode Ziel-Assembly
4. Linker und/oder Lader Assembler
berechnen die endgültigen
Adressen. Die sind entweder Verschiebbarer Code
• Absolut oder Linker/Lader
• Relativ zum Wert eines Registers
Code in Zielsprache
Laszlo Böszörmenyi Compiler 16 / 22
17. Struktur eines Compilers – Analyse
1. Lexikalische Analyse (der
Scanner) wandelt den Zeichenstrom
Zeichenstrom in einen Strom
Scanner
von Symbolen (Token) um
2. Der Parser prüft die Syntax Symbolstrom
und erzeugt den Syntaxbaum
Parser
3. Die semantische Analyse Symbol
prüft kontextsensitive Syntaxbaum
Tabelle
Eigenschaften, wie
Typkompatibilität Semantische Analyse
4. Symboltabelle speichert Fehler- Syntaxbaum
die syntaktischen Elemente meldungen
5. Fehler können in jedem
Schritt erzeugt werden
Laszlo Böszörmenyi Compiler 17 / 22
18. Struktur eines Compilers – Synthese
1. Zwischencode wird Syntaxbaum
erzeugt
Zwischencode Generator
• Fehler können auch noch
hier gefunden werden Zwischencode
2. Zielunabhängige
Zielunabhängiger Optimierer
Optimierung
3. Zielcode wird erzeugt Zwischencode neu
4. Zielabhängige Codegenerator
Optimierung Zielcode
“Optimierung” nicht im
Zielabhängiger Optimierer
Sinn von Op. Research:
Bedeutet Verbesserung Zielcode neu
Laszlo Böszörmenyi Compiler 18 / 22
19. “Paradigmas” von Programmiersprachen
• Prozedural (Fortran, Algol-60, C, Pascal)
Parametrisierte Prozeduren, wie P(p1, p2) und globaler Zustand
Im Mittelpunkt steht das „Verb“ (die Prozedur)
• Objekt-orientiert (C++, Java, C#, Modula-3)
Objekte definieren Zustandsraum (Instanz-Variablen)
und Verhalten (Methoden)
Methoden werden dynamisch (zur Laufzeit) gebunden: o.m(p1, p2)
• Funktional (Lisp, ML)
Idempotente Funktionsaufrufe, ohne Seiteneffekte (im Idealfall)
• Logisch (Prolog)
Deklarative Fakten und Einschränkungen definieren das Programm
• Mengen basiert (SET-L, SQL)
• Parallel (High-performance Fortran, Vienna Fortran)
• Verteilt (Orca, Java RMI)
Laszlo Böszörmenyi Compiler 19 / 22
20. Eine kleine Sprachgeschichte (1)
• Fünfziger Jahre
Maschinencode, Assembly-Code
Bedarf an höheren, “abstrakten” Sprachen
Fortran (für Wissenschaft), Cobol (für Wirtschaft)
Syntax + Semantik “definiert” durch den (IBM) Compiler
1958: Übersetzter Code nur zweimal langsamer als händischer
• Sechziger Jahre
Bedarf an wissenschaftlich fundierte Sprachen
Algol-60 – „the birth of computer science“ (N. Wirth)
Formale Syntax; Allgemeine Ausdrücke; Blockstruktur;
Gültigkeitsbereiche; Parameterübergabe, Rekursion; Boolean
Simula-67 (O.-J. Dahl, K. Nygaard)
Erste objekt-orientierte Programmiersprache
“Wiederentdeckt” 15 Jahre später (Smalltalk-80)
Laszlo Böszörmenyi Compiler 20 / 22
21. Eine kleine Sprachgeschichte (2)
• Siebziger Jahre
Bedarf an sicheren (safe) Sprachen
• Pascal (N. Wirth)
Strikte, statische Typprüfung + benutzerdefinierte Typen
Unterstützt „strukturierte Programmierung“ durch
gründlich gewählte Anweisungen und Typkonstruktoren
• C (D. Ritchie)
Entstanden als Implementierungssprache für Unix
Eine Art „höhere“ Assembly-Sprache
Ist nicht sicher (z.B. Pointers ohne Typ)
Merkwürdige Karriere: C als Implementierungssprache
für große Anwendungen – eine grobe Fehlentwicklung
Laszlo Böszörmenyi Compiler 21 / 22
22. Eine kleine Sprachgeschichte (3)
• Achtziger Jahre - Modularität, Objekt-Orientierung
Mesa (Xerox PARC)
Interface- und Implementierungsmodule, Multi-threading
Modula-2 (N. Wirth) – wie Mesa, nur einfacher
Smalltalk-80 (A. Goldmann, Xerox PARC)
Eiffel (B. Meyer), Ada (J. Ichbiah), Modula-3 (DEC SRC)
C++ (B. Stroustrup)
Sehr mächtig, Mehrfachvererbung, nicht typsicher (C-Kompatib.)
• Neunziger Jahre
Java (J. Gosling, Sun)
Typsicher (fast), Multi-threading, Garbage Collection
C# (Microsoft)
Mächtiger, effizienter und sicherer als Java – zu spät?
Laszlo Böszörmenyi Compiler 22 / 22