search query: @keyword c / total: 11
reference: 4 / 11
Author: | Sykäri, Antti |
Title: | Compile-time metaprogramming and its implementation |
Käännösaikainen metaohjelmointi ja sen toteutus | |
Publication type: | Master's thesis |
Publication year: | 2010 |
Pages: | [6] + 66 s. + liitt. 10 Language: eng |
Department/School: | Informaatio- ja luonnontieteiden tiedekunta |
Main subject: | Ohjelmistotekniikka (T-106) |
Supervisor: | Tarhio, Jorma |
Instructor: | |
OEVS: | Electronic archive copy is available via Aalto Thesis Database.
Instructions Reading digital theses in the closed network of the Aalto University Harald Herlin Learning CentreIn the closed network of Learning Centre you can read digital and digitized theses not available in the open network. The Learning Centre contact details and opening hours: https://learningcentre.aalto.fi/en/harald-herlin-learning-centre/ You can read theses on the Learning Centre customer computers, which are available on all floors.
Logging on to the customer computers
Opening a thesis
Reading the thesis
Printing the thesis
|
Location: | P1 Ark Aalto | Archive |
Keywords: | compile-time metaprogramming programming language design kernel languages c käännösaikainen metaohjelmointi ohjelmointikielisuunnittelu ydinkielet c |
Abstract (eng): | Metaprogramming is a programming paradigm where programs manipulate, generate, and analyze other programs. A compiler for a programming language can be equipped with a compile-time metaprogramming facility that allows the program to analyze and extend itself. This can raise the level of abstraction in the programming language and make programs faster, more maintainable, and more reliable. This thesis presents KernelC, a programming language derived from C that is equipped with a metalanguage that can be used to manipulate programs written in KernelC. The language consists of from major building blocks. The kernel language, a minimal set of language features that represent the computational core of C, forms the foundation. The extended language, which provides a set of convenient language features familiar from C, builds on the kernel language. The compile-time metaprogramming (CTMP) extension provides Common Lisp-like macros and an explicit operator to run code during compile time. Finally, the syntax extension facility complements the CTMP extension to form a metalanguage that can he used to build language extensions seamlessly into the language. The metalanguage proves powerful enough to implement most of the features in the extended language in terms of the kernel language. Although the resulting language is not ideally suited for everyday programming, KernelC is an interesting experiment in the field of C-derived languages, where metaprogramming facilities are rarely seen. |
Abstract (fin): | Metaohjelmointi on ohjelmointiparadigma, jossa ohjelmat voivat muokata, luoda ja analysoida toisia ohjelmia. Ohjelmointikielen kääntäjä voidaan varustaa käännösaikaisilla metaohjelmointiominaisuuksilla, jotka mahdollistavat sen, että käännettävät ohjelmat voivat analysoida ja laajentaa itseään. Näin ohjelmien abstraktiotasoa voidaan kohottaa ja tehdä niistä ylläpidettävämpiä, nopeampia ja luotettavampia. Tässä diplomityössä esitellään KernelC, C:stä johdettu ohjelmointikieli, jossa on metakieli jolla voidaan käsitellä KernelC:llä kirjoitettuja ohjelmia. Kieli koostuu neljästä pääosasta. Ydinkieli, joka on mahdollisimman pieni joukko C:n laskennalliselle luonteelle ominaisia ominaisuuksia, muodostaa perustan. Laajennettu kieli, joka toteuttaa joukon C:stä tuttuja hyödyllisiä rakenteita, on rakennettu ydinkielen päälle. Käännösaikainen metaohjelmointilaajennus tarjoaa Common Lispin kaltaiset makrot ja operaattorin, jolla voidaan eksplisiittisesti ajaa ohjelmakoodia käännösaikana. Neljäs pääosa, syntaksilaajennustoiminnallisuus, muodostaa käännösaikaisen metaohjelmointilaajennuksen kanssa yhdessä metakielen, jolla kieltä voidaan saumattomasti laajentaa. Metakieli osoittautuu tarpeeksi voimakkaaksi, jotta sillä voidaan toteuttaa useimmat laajennetun kielen ominaisuuksista ydinkielen avulla. Vaikka tuloksena saatava kieli ei ole ihanteellisesti sopiva jokapäiväiseen ohjelmointiin, KernelC on mielenkiintoinen kokeilu C-johdannaisten ohjelmointikielten joukossa, jotka harvoin käyttävät hyödykseen metaohjelmointiominaisuuksia. |
ED: | 2010-09-01 |
INSSI record number: 40372
+ add basket
INSSI