Fachbereich Informatik Integrierte Schaltungen und Systeme Prof. Dr.-Ing. Sorin Huss. Diplomarbeit. Integration of Domain-Specific Languages

Size: px
Start display at page:

Download "Fachbereich Informatik Integrierte Schaltungen und Systeme Prof. Dr.-Ing. Sorin Huss. Diplomarbeit. Integration of Domain-Specific Languages"

Transcription

1 Fachbereich Informatik Integrierte Schaltungen und Systeme Prof. Dr.-Ing. Sorin Huss Diplomarbeit Integration of Domain-Specific Languages Martin Geisse Matr.-Nr.: Betreuer: Dipl.-Inform. Felix Madlener Abgabe:

2 Zusicherungen zur Diplomarbeit gemäß 19 Abs. 6 der Diplomprüfungsordung Hiermit versichere ich, die vorliegende Diplomarbeit ohne Hilfe Dritter nur mit den angegebenen Quellen und Hilfsmitteln angefertigt zu haben. Alle Stellen, die aus Quellen entnommen wurden, sind als solche kenntlich gemacht worden. Diese Arbeit hat in gleicher oder ähnlicher Form noch keiner Prüfungsbehörde vorgelegen. Gießen, den Martin Geisse 2

3 Abstract Domain-specific programming languages (DSLs) are an increasingly common approach in software engineering. This diploma thesis presents Modelflow, a generic framework for the integration of different DSLs, and illustrates that DSLs can be applied to model digital circuits as well. 3

4 Table of Contents 1. Introduction Problems with Domain-Specific Languages Modelflow Basics Additional Features Compatibility with other IDEs Implementation Issues Model Cache Model Data Copy Policy Implementing Model Types Implementing Model Compilers Implementing Other Tools Support Libraries Example The Problem Creating the Model Type Writing a Compiler Defining a Function Table Another ROM-producing compiler Another ROM-consuming compiler Expanding to Higher Levels Advanced Topics Passing Down Compiler Parameters Abstract Compilers Hardware Simulation Interpreted DSLs Integration of existing DSLs Conclusion Future Work Core System Meta-Models Miscellaneous A. Source Code Organization B. Installation C. User Interface D. Example Source Code Bibliography

5 1. Introduction Complexity is a common problem in engineering. While simple things are simple to design (though they may still be hard to build), complex things soon reach the limits of the abilities of an engineer. This has several negative effects, among them: errors in the final design missing features longer time-to-market higher production cost designs which cannot be adapted to changing requirements One tool to attack complexity is abstraction, which is the key to split a problem into sub-problems and solve one sub-problem at a time. Wikipedia defines abstraction as the process of generalization by reducing the information content of a concept or an observable phenomenon, typically in order to retain only information which is relevant for a particular purpose [1]. In engineering, the details of some sub-problems are reduced to a minimal amount of information to solve the remaining subproblems, ultimately solving all sub-problems one by one. For example, the task to write a program which uses linked lists of data nodes can be split into two sub-problems. One sub-problem is to write an implementation of linked lists, while abstracting from the details of how these lists are used. The second sub-problem is to write the remaining program, while abstracting from the details of how linked lists work. This diploma thesis is concerned with the engineering of both software and digital circuits. It may or may not be possible to transfer the results to other engineering disciplines. The modeling tools used in these two areas are to some extent very similar, and incorporate a great deal of abstraction in themselves. Both use some kind of language to express designs -- a pattern of notation with strictly defined semantics. The abstraction lies in the fact that these languages do not directly resemble the actual building pieces of either software (machine instructions) or digital hardware (logic gates). Instead, they express the same designs in higher-level terms which can be mapped (compiled) to a design expressed in building pieces available in reality. Figure 1, Programming Languages vs. Implementation Results shows the difference between a higher-level language (in this case, VHDL) and the corresponding implementation result. Most software languages (such as C) identify a few usual patterns of control flow and data storage, and let the engineer express these patterns with at most a few keywords. Thus, they hide the details of how these patterns are implemented. Likewise, most digital hardware languages (such as VHDL) identify boolean expressions as a common pattern to specify logical functions. Thus, they hide the details of building actual logic gates and their connections, and let the user think in terms of boolean terms. Figure 1. Programming Languages vs. Implementation Results Both C and VHDL have in common that they are general-purpose languages, meaning that the languages themselves are designed without any specific class of problems in mind (other than being spe- 5

6 cific to software engineering and digital hardware engineering, respectively). There is another class of languages called domain-specific languages (DSLs), which are based on the alternative principle that the languages are built for a specific class of problems and are applied only there. An example for this is the language for makefiles, shown in Figure 2, make: A Domain-Specific Language. This has the obvious consequence that for each class of problems, another domain-specific language is needed. It also means that a DSL is optimized to solve problems that lie within its focus, at the cost of being unable to solve problems outside its focus. Using a DSL or a set of DSLs designed for the problems at hand in some specific task should therefore yield better results than solving the whole task with a general-purpose language. Experience with existing DSLs, such as the parser-generation tool YACC [2], has confirmed this expectation (see e.g. [3]). The advantages of DSLs have led to the suggestion of a new programming paradigm called language oriented programming by Ward [6] and Dmitriev [7]. The same concept is described by Steele in [8]. Figure 2. make: A Domain-Specific Language TOOLDIR =../eco2/eos32-0.9/build/bin SOURCES = start.s $(REGULAR_SOURCES) end.s REGULAR_SOURCES = $(UTIL_SOURCES) $(LOWLEVEL_SOURCES) \ $(GAME_SOURCES) UTIL_SOURCES = util/cpu.s util/kernel.s util/memory.c \ util/random.c LOWLEVEL_SOURCES = lowlevel/timer.c lowlevel/sound.c \ lowlevel/display.c lowlevel/keyboard.c GAME_SOURCES = game/main.c game/draw.c game/engine.c \ game/gamestate.c game/shapes.c game/soundchain.c all: kernel.bin kernel.bin: $(SOURCES) $(TOOLDIR)/lcc -I. -A -Wo-kernel -Wl-m \ -Wlkernel.map -Wl-h -o kernel.bin $(SOURCES) romimage.exo: romimage.bin../bin2exo/bin2exo 0 romimage.bin romimage.exo romimage.bin: $(SOURCES) $(TOOLDIR)/lcc -I. -A -Wo-kernel -Wl-m \ -Wlkernel.map -Wl-h -Wl-rc -Wl0xE \ -Wl-rd -Wl0xC o romimage.bin $(SOURCES) clean: rm -f *~ disk.fsys kernel.bin kernel.map \ romimage.bin romimage.exo A complete discussion of DSLs is beyond the scope of this diploma thesis. A more detailed explanation as well as a bibliography list can be found in [4]. That text also makes a useful distinction between different implementation strategies for DSLs, which yield different levels of freedom in design of the final language. For our purpose, we focus on what they call the classical approach, that is, compilation and/or interpretation. By that we exclude the following domain-specific notations from the term DSL in favor of cleanly designed, uncompromised DSLs: domain-specific libraries, possibly using self-modifying language mechanisms such as the definition of new operator symbols or Lisp-style macro definitions macro preprocessors in general 6

7 extensible compilers for a specific language A description of the negative impact of such DSL implementation strategies can be found in [5]. In a specific scenario, self-extension mechanisms in existing languages can be used in addition to classical DSLs though, and may thus be kept in the engineer's toolbox as yet another possibly helpful tool. An important point that must be regarded throughout the discussion of DSLs is that the term language is used here in the sense of a notation with strictly defined semantics. It does not imply a textual notation, although textual notations are common for programming languages. The sets of valid schematic drawings, state diagrams, or truth tables are also languages in the sense used here. The key point of this definition of the word language is that strictly defined semantics allow us to interpret these languages by algorithms, and thus, computer programs. As a concrete example, a language could be based on the following table structure (which resembles instructions to add HTML markup to a Java source code file): Table 1. A Non-Textual Programming Language (using tables instead of text) Rule Name Pattern Markup Italicalize Identifiers [_a-za-z][_a-za-z0-9]* <i> Boldify class Keyword class <b> Boldify Curly Braces ("{" "}") <b> The remainder is structured as follows: Section 2 discusses the main problems with using DSLs, and draws conclusions how they can be solved. Section 3 then introduces the main subject of this diploma thesis, the Modelflow system, which serves as a foundation for implementation, usage, and integration of different DSLs and aims to implement these solutions. Section 4 describes the programming interface and implementation details of the core system. Section 5 presents an example use case of Modelflow, and is meant as a tutorial for using it. Section 6 gives solutions for some problems that occur in practice when using Modelflow, and shows that the core system is powerful enough to solve those problems. Section 7 summarizes what has been said so far, and section 8 gives an overview of missing features and other future work that is imaginable to improve Modelflow. 7

8 2. Problems with Domain-Specific Languages Most problems with DSLs stem from the fact that for each class of problems, a separate DSL is required. The first, obvious disadvantage is that much work must flow into the creation of the languages themselves as well as into the corresponding tools. An important observation here is that a DSL, like a library in some programming language, constitutes a unit of re-use. Building a DSL to solve a single problem with it may be viable in special cases; in most cases however it is as much a waste of effort as is building a well-encapsulated programming library to solve a single problem. Usually, if a library is well-encapsulated, then it is also built to solve a whole class of problems, whether by intention or by chance, and the same holds for DSLs [4]. It follows immediately that the DSL (or library) can be re-used for any other problem from that class. By doing so, the cost of creating the DSL and its tools is amortized over several problems. Re-use is an important key factor to make DSLs a viable solution. However, the task can be simplified by other means. Like any programming task, the creation of DSL tools can be considered a target for various software engineering means. Among others, this includes the application of DSLs themselves to create other DSLs. For example, YACC is not only an example for a popular DSL, it is also a tool that can be used to implement DSLs (more specifically, the parser of a DSL compiler or interpreter). Other tools include Lex for lexical analysis, make for control flow in the build process, source code generation libraries, binary code generator generators, graph algorithm libraries (e.g. for register allocation), and so on. Some of these tools define and apply their own DSLs, while others are programming libraries. Taken together, they can simplify the creation of a new DSL by a great deal. Figure 3. Traditional Implementation of a DSL The traditional implementation of a DSL (Figure 3, Traditional Implementation of a DSL ) yields stand-alone tool programs such as a compiler or an interpreter for the language. A compiler, for example, would accept command-line arguments that specify its input files as well as additional parameters for code generation. The various tools for different DSLs, general-purpose languages, and other miscellaneous tools are usually hardly integrated: they have different expectations about file names and directories their documentation define commonly used terms differently it is usually impossible to run two interpreters for different DSLs at the same time and have them cooperate, or at least not without immense effort they generate code in different, incompatible output languages 8

9 they use different coding conventions in their output code, which may just look like bad style or actually cause problems some incorporate rules that determine if and when existing output files are re-generated; others always overwrite; still others work in an even more complicated way such as partial overwriting they usually allow to control every little uninteresting detail of code-generation through parameters, because some other tool might require so The remainder of this work will focus on compiled (not interpreted) languages, since multiple interpreted languages would not cooperate well without further effort. Later, in Section 6.4, Interpreted DSLs, the idea of interpretation is picked up again. For now, this leaves code generation as the means to implement DSLs. Even then, one must carefully select those languages and tools that use compatible output languages and coding style. Having done so, one usually needs a lot of glue code that makes the various generated code parts from different DSLs fit together. If this had to be done only once, it might be acceptable. But things are worse: any project, including those that use DSLs, is not written at once. The code must be developed, improved, de-bugged, and extended with new features. Projects also evolve, changing the initial assumptions on which they are based. Therefore, the engineering tools including the DSL compilers must be run every time their input source code has changed. Automation tools exist to detect changes in the input data and re-run the corresponding tools. This includes various integrated development environments (IDEs) as well as the program make. However, while these tools do help, there is still a lot of work left to the user. Tools often do not play well with an IDE or make when they were not written with that in mind. That is, for example, they might employ their own mechanism to determine when recompilation should occur, which then interferes with the one employed by make. It is also often left to the user to decide about file names of intermediate files (files used to pass data from a producing tool program to a consuming one). There is no gain in this freedom of decision -- either the tools agree about file names and things work, or they don't. Moreover, since there is not only freedom but also obligation to choose, beginners have a harder time since they are overloaded with unnecessary decisions. Finally, personal preference of different engineers working on the same project may collide. The icing on the cake is that the details of configuring the tools just to work together vary tremendously from tool to tool. The bottom line is that there are many obstacles in implementing and using DSLs, and their expected advantage is impaired by bad integration. The difficulties in the creation of new DSLs have led to the concept of language workbenches, a term reportedly coined and certainly described well by Fowler [5], and realized by Dmitriev in his Meta Programming System [7]. In a similar vein, this diploma thesis specifically attacks the problem of integration. The ultimate goal is to build a language workbench that solves both problems, and thus opens the road to the envisioned language-oriented approach. The anticipated solution to the DSL integration problems is the definition of strict rules that state how tools are integrated, and demand that the tools follow those rules without exception. For that, the Modelflow system is presented which acts as a foundation for the development and integration of DSL tools. It attacks the integration problems by defining a framework into which tools must be plugged as modules instead of being written as standalone programs by abolishing source code files as the user-visible unit of code management. Data is edited and passed to tools without knowledge about the actual means of data storage by either the user or any tool module by defining a strict naming scheme for source code units which uses a single identifier both to determine its storage place and to refer to the unit from within other code by defining that DSLs are compiled, not interpreted. That is, the result of feeding a DSL code unit to some tool must be comprised of output code units and possibly error messages, and nothing else. Especially, it must not cause any side-effects. 9

10 by abolishing intermediate files. Data is passed between tools by the core system without knowledge of the actual means of data transmission by either the user or any tool module. by defining a strict naming scheme for generated code units which uses a single identifier to determine how the code is generated (i.e. by which tool and from which input units, which can themselves be source code units or generated code units), to determine its storage place, and to refer to the unit from within other code by allowing to compile the same input code unit with different compiler modules to produce different results. For example, some scripting language may be compiled either to produce executable code from it, or to produce documentation from the comments in the source code. by having the core system decide automatically and correctly when some unit of generated code must be re-built because its inputs have been modified by allowing to store code units as structural code, not textual code, to simplify the creation of structural editors and compilers, to avoid even the existence of syntax errors in code, and to prevent disagreement about coding style. The decision whether structural code or textual code is used for some DSL is left to its inventor. Modelflow thus implements the strict rules by which the various editors, compilers, and other tools store and communicate code. It is also a language workbench in the sense that it facilitates the creation of new languages, but the corresponding tools have not yet received the same level of attention as integration. 10

11 3. Modelflow As described in the previous section, Modelflow is a core system for the development and integration of DSLs and DSL tools. The core is written in Java, on top of the Eclipse IDE 1, and must be extended with modules written as Eclipse plug-ins in Java. These modules can extend the core system with new DSLs, DSL compilers, import and export tools, language-specialized editors, and other tools (see Figure 4, Modelflow Architecture ). Although Eclipse already provides a basis for the integration of such tools, Modelflow adds the set of strict rules described in the previous section, as well as code to implement those rules, to alleviate the burden both on the end-user and the tool author. Figure 4. Modelflow Architecture. Extensions build upon both Modelflow and Eclipse Basics The concepts used in the base system are centered around the model, which is the smallest unit of code managed automatically. A model can be defined, meaning that it is entered manually by the user, or it can be generated, meaning that it is produced by a compiler module from other models. The defined models are organized in a hierarchical package structure, like files are organized in folders (see Figure 5, Defined Models, Packages, and Model Types ). Each model is referred to by a unique and unambiguous model identifier. That is, each model has exactly one model identifier, and each model identifier refers to either exactly one model, or to none at all. In the latter case, it can also be said that the identifier refers to an unknown model or non-existing model. Each model carries its main contents, called model data, which is the actual domain-specific information expressed by the model. As is shown in the figure, each model also has a model type describing the domain to which the model data applies and the structure and format in which the data is held. 1 The Eclipse Foundation. 11

12 Figure 5. Defined Models, Packages, and Model Types A model identifier carries in itself the information whether the referred model is defined or generated. The model identifiers for defined models (called defined model identifiers) comprise the name of the model in its sub-package as well as the hierarchical names of the packages in which it is stored, analogous to an absolute file name in a file system. The model identifiers for generated models (called generated model identifiers) comprise the name of the compiler module which is used to generate the model, as well as the identifier of the main input model to that compiler (which can be again either a defined or generated model identifier). Note that the identifiers of secondary models needed for compilation, i.e. models that are referred to by the main input model or other secondary models, are not encoded into the model identifier. This information is stored solely in the model data of the referring model. Figure 6, Defined Models, Compilers, Generated Models, and Model Types shows how generated models are produced by running a compiler on a main input model. Additional models may be consulted to produce the result (called dependencies, since the result depends on them). Either input models may be defined or generated. Figure 6. Defined Models, Compilers, Generated Models, and Model Types The textual syntax of a defined model identifier is the list of package names, from top-level to deepest sub-package and finally the local model name, separated by dots. The textual syntax of a generated model identifier is that of the model identifier of its main input model, followed by character, followed by the name of the compiler module to run on this input. For example, to name the model that is stored in the sub-package b of top-level package a and named c, the model identifier a.b.c 12

13 is used. It can be determined by the missing of character that this identifier is a defined model identifier. To name the model that results from running the compiler X on that model, and then running the compiler Y on the result of X, the model identifier a.b.c@x@y is used. By the existence of character it can be concluded that this is a generated model identifier, and the (immediate) input model and compiler name can be obtained by splitting a generated model identifier around the character it contains, in this case yielding the input model a.b.c@x (which is itself a generated model) and compiler module Y. Each model has a model type, no matter whether the model is defined or generated. Like the model data, the model type is defined by the user for defined models, and decided by a compiler for generated models. The model type defines for a model: The data structures (Java classes) used for model data Creation code for default instances Validator code to check model data for correctness and consistency The file format to store model data on disk Loader and saver code to convert between the two An editor for model data using Eclipse and SWT Additional actions which can be performed on models of that type It is not encoded into a model type by which compilers the model can be consumed; this information is specific to the compilers, not the types. Model types are also organized in a hierarchical folder structure, called the Model Type Registry, but solely to allow choosing a type by a hierarchical user interface (see Figure 7, The Model Type Registry ). In most places where model types are important, the absolute names of types are therefore used. The set of available model types can only be modified by restarting Eclipse with a different set of plug-ins providing them. Figure 7. The Model Type Registry Compiler modules, like types, are organized into a pseudo-hierarchy that exists solely for user interface purposes (see Figure 8, The Model Compiler Registry ). A compiler is referred to by the model identifiers of generated models, by the fact that such a model identifier contains the (absolute) name of that compiler module. A central concept of Modelflow now is that given the set of model types and compiler modules (both of which are built into the running system as Eclipse plug-ins), and a set of defined models supplied by the user, any model -- defined or generated -- can be requested by specifying its model identifier, without assuming a specific state of the system. Specifically, a generated model identifier refers to the result of the corresponding compiler invocation regardless of whether that invocation has already happened. The compiler is invoked automatically as soon as its 13

14 result is first needed, and invoked again when its input models have changed. This is in contrast to the traditional concept of intermediate files, where the name of an intermediate file only refers to that file after it has been generated, and upon source modification refers to outdated results until the compiler is invoked again. Note The full names of models, model types, and compilers must be used almost everywhere in the system. Especially, generated model identifiers contain the full name of the respective input model and compiler, including all model packages and compiler packages. However, figures in this text will sometimes abbreviate those identifiers when unambiguous to keep them readable. Figure 8. The Model Compiler Registry 3.2. Additional Features The basic concepts explained so far are now augmented to solve some practical problems. The first such problem is that models may be loaded and re-loaded excessively by compilers, depending on the way the compilers are used. Also, the user interface often refers to meta-information of a model (such as the model type) for displaying purposes. Taken together, these repeated accesses would put enormous stress on the storage mechanism that keeps defined and generated models -- currently, the file system. (Remember that Modelflow is not about abandoning the file system, but about shielding the engineer from its details). To solve these problems, the meta-information and, as soon as requested, the model data itself, are kept in a cache managed by the base system. This cache also presents the programming interface to request models. Figure 9, The Model Cache shows the model cache. Both defined and generated models can be cached. For implementation purposes, it is often useful to speak of two different caches, one for defined models and one for generated models. In this figure, all models but Helloworld.Util are present in the cache. 14

15 Figure 9. The Model Cache Another practical problem is that the model data, while usually syntactically correct through the means of structural editors, often contains semantic errors. This may be a model reference which refers to an unknown model, or to a model of wrong type. It may also be inconsistent information between two models. An engineer would want to get immediate feedback through the user interface about such problems, and not wait for compilation errors to result from them at some point in the future. Also, if several compilers can consume some model, it would be impractical to implement checks for such semantic errors in each of them. As a solution, each model type defines a validator, a piece of code which can check a model of that type and result either in success, or failure with a set of validation error messages. The results of the validator are used both for visual feedback and to inform compiler modules (upon request of the model) whether it is semantically valid (i.e. has passed some basic checks, which the compiler can then omit). Figure 10, Validating Models illustrates validation. Both defined and generated models are validated. The corresponding validator code is supplied by the respective model type of each model. Compilation fails if one of the input models is invalid. Even if all models are valid for themselves, the combined information from all input models taken together may be inconsistent, and compilation can still fail. What is not shown in this figure is how the result of the successful compilation is validated. 15

16 Figure 10. Validating Models. Invalid models are not even considered for compilation. A third problem that had to be solved in practice is that by invocation of a compiler on some main input model (and indirectly, on referenced models), only a single output model is generated. Depending on the situation, several output models are needed. For example, when generating documentation for some models automatically, the output documentation may need to comprise a model for an index HTML file, and others for section HTML files and yet others for images. A possible though impractical solution would be to define a new model type (called, for example, a web archive ) that is able to hold all that information. This approach would, however, waste the work that has already been accumulated into the model types for HTML pages and for images (assuming for the sake of this example that such model types already exist). Therefore, a mechanism has been added that allows generated models to be augmented by any number of parts in addition to its base model. Each part consists of a model type and model data, and can re-use existing model types. Figure 11, Generated Model Parts shows a compiler that produces an output model with parts (which is just Modelflow's version of several output models, as explained above). Each part has its own model identifier and model type. Also shown in that figure is that parts, like any other model, can be used as the input for a compiler. Figure 11. Generated Model Parts 16

17 Within a generated model, each part is identified by a part name. Parts are externally visible models, and the model identifier of a part consists of the model identifier of its base model, followed by a colon and then the part name. Revisiting the example described above, to identify the model that results from compiling the defined model a.b.c by compiler module X, taking part P, and compiling it with compiler module Z, the model identifier a.b.c@x:p@z has to be used. Omission of the colon and the part identifier selects the generated base model. Another problem was that while a set of models can easily be filtered by allowing only models of one specific type to pass, sometimes any of a set of types is acceptable. As an example, a model compiler may allow any one of a set of types as its inputs. Likewise, a reference contained within a model that refers to another model might be allowed to refer to any instance of any of a set of types. This could easily be allowed by specifying a set of types instead of a single type for filtering in each of those cases. However, the relevant type sets are often the same, and contain types with related meaning. For this, model supertypes were invented. Supertypes, like types, are defined in Modelflow extensions. Each supertype describes a named set of types. The term type filter means type or supertype, since both types and supertypes can be used as a filter to allow or reject types. In the compiler example mentioned above, a compiler now declares a type filter to specify what models it accepts as inputs Compatibility with other IDEs Since Modelflow introduces a new way to handle old problems, some older solutions to those problems become redundant, and do not work well together with Modelflow. In general, using two IDEs at the same time, in the same project, is likely to cause problems. Using them together with tools like make is similar. The reason is that every single of these tools was written to solve (partially) the same problems, to solve them well, and to solve them alone. Any effort to make such programs work together for some project is likely better spent in improving the best-fitting one for that project with the features missing in it. Note that some IDEs do play well with make since they are built specifically around it and are more of a front-end for it than a standalone IDE. The above statement was made with respect to IDEs that aren't. Modelflow has a similar aversion against other IDEs, and even more so because it treats some fundamental issues in a very different way: A project does not contain files, it contains defined models. Though the defined models can be mapped to files (and they are in the current implementation), this mapping occurs automatically without requiring user intervention or additional information. A project does not build (intermediate or resulting) files, it builds generated models. As described above, the set of model types, compilers, and defined models are the background against which a generated model identifier contains all information needed to build its model. Compilation parameters are traditionally handled separate from the actual source code and in a completely different way. In Modelflow, these settings are stored in models just like other source data is. Figure 12, Project Files in Traditional IDEs shows the data flow during compilation in a traditional IDE, and Figure 13, Project Models in Modelflow shows the same for Modelflow. The similarity is obvious, and illustrates that traditional tools could have treated project settings as just another type of regular source data, just like Modelflow does, if only the tool authors decided to do so. The obvious advantage of such a decision is that all input data flowing into compilation is treated in a uniform way. By this, the user avoids having to learn new compilation management mechanisms over and over again for different tools. 17

18 Figure 12. Project Files in Traditional IDEs Figure 13. Project Models in Modelflow 18

19 4. Implementation Issues Having explained the concepts upon which Modelflow is built, this section deals with how the concepts are realized in code, and how extensions to the base system can be created. As said before, all code is written in Java and builds on the framework provided by the Eclipse IDE. Extensions to Modelflow are plugged into the base system through the extension mechanism already present in Eclipse. Programming experience with Eclipse and its plugin architecture are helpful for writing Modelflow extensions. Note This version of Modelflow was developed for version of Eclipse Model Cache Modelflow maintains caches for both defined and generated models. The caches keep track of all existing models including their metadata, and can cache the model data in memory to increase performance. The cache also maps models to files. All interaction with model storage happens through the cache. For defined models, the set of cache entries corresponds exactly to the set of defined models. That is, every defined model has an associated cache entry; the only border case is when Eclipse's resource system has not recognized recent changes to the model files yet. Upon refreshing the resource manager, the changes are recognized and the cache is updated. The cache entry does not hold model data from the beginning; only when actual model data is first requested is the file read, the contents turned into instances of the model data classes (as implemented by the corresponding model type,) and those objects stored in the cache. In theory, data can be evicted at later times to free memory, but no guiding policy has been implemented yet. Changes in the cached model data are immediately saved to the file, i.e. the cache uses a write-through policy. The base system also detects modification of the backing file (as much as supported by Eclipse) and in that case evicts the cached model data without saving it, assuming that the modified file contains recent external modifications made by the user. For generated models, a cache entry is created when it is first requested. This is necessary since the set of all possible generated models is potentially infinite. Just as for defined models, the initial cache entry does not hold any model data. Data is created upon the first request by running the corresponding compiler module, and the result is both kept in the cache and stored to the model file. Whenever compilation dependencies are modified, the model is marked as outdated and its data evicted. The backing file in the case of generated models is intended to store the compilation results across different invocations of Eclipse/Modelflow. A developer would not want to re-build a whole project just because he or she closed and re-opened Eclipse. However, no such mechanism is implemented yet, although storing generated models to files is a key component in doing so. What is missing is similar storage for the state of a generated model, and in particular whether it is outdated (data must be produced by re-running the compiler) or not (data can be read from the file). Modelflow provides two classes which are useful for looking up models when needed: The CacheEntryRequest class looks up a cache entry and can be used whenever meta-data of a model is needed. This is typical for user interface code such as the model browser. The ModelLookup class goes further and also requests model data (loading or generating it when necessary). Both classes provide some support for error handling. The cache also supports notification of external entities of any events through a listener architecture Model Data Copy Policy Model data is not only stored and processed in Modelflow, it is also changed in editors and other tools. As always when modifications are allowed, this requires a certain policy that guides the use, copying, 19

20 sharing (aliasing), and modification of such data to avoid propagating changes in model data to some entity which does not expect so. To be more precise, one example for a problem due to copy policy violation is: Entity A obtains a data object by some means It passes the object to entity B as the input data for some operation B stores (part of) the input object for later reference A modifies the object for other purposes B uses the stored object as the input for another operation, assuming that it still contains the original data the latter operation produces incorrect or inconsistent output data This chain of events is illustrated in Figure 14, Errors due to Aliasing. In the end, entity B is not prepared to handle a modified data object. Since that entity is (unintelligent) code, it would simply perform an invalid operation and/or produce inconsistent result data. Figure 14. Errors due to Aliasing To avoid this chain of events, one of the links must be broken. This yields the following possible solutions: A could never reveal its internally used objects, and instead give a defensive copy of the object to B B never stores its input objects, but instead copies them defensively and only stores the copy A never modifies the copy. Instead, whenever modifications are intended, a copy is made. This leads to a programming style known from functional programming languages B is aware of possible modifications to the object, and can handle them There are other cases in which a similar problem occurs. In general, problems can occur whenever more than one entity has access to an object. Thus, a policy must be established for every shared object scenario in an object-oriented program. This section does so for the case of the model data structures Modifications by Editors An important observation to determine a useful policy is the sequence of actions an editor performs on the model data, since this is by far the most frequent source of modification to the model data. This 20

21 sequence could, for example, be: open, modify, save, modify again, save again. What is important is that the sequence could be stopped at any point, specifically between the modify (again) and save (again) actions. If that happens, and the editor is closed before saving the changes, then the whole modification shall be lost and have no effect on the stored model data. This implies two important rules for the policy: An editor must not modify its initial input data objects before the changes are saved, and that may never happen An editor must not modify the objects returned when saving before the subsequent changes are saved, and that may never happen What is not forbidden so far is to modify the original data objects once the modifications are requested to be saved through the user interface. However, saving a bunch of modifications to already-existing objects is complicated, if not plain impossible. For example, the original model data could contain an array of integer values, and the modified version from the editor could contain an array of different size. Java would not allow to re-size (and thus re-use) the original array to store the modifications. It is therefore sensible to add the following item to the policy, which concludes the two items mentioned above: An editor may never modify its initial input data objects, and it may never modify the objects produced during the save operation. The question whether editors may save their input objects for later reference (without modifying them) has not been answered yet Modifications by Other Tools Having examined editors a bit, we now turn to other possible data-changing entities. The first ones are compilers. A central rule in Modelflow is that compilers never modify their input data. They just use it to produce output data. Therefore, it can never happen that data modifications from a compiler propagate to other users of its inputs. Since a compiler produces its output data upon completion, it cannot propagate later modifications through its output data either. On the other hand, a compiler may always safely share its input data as part of the output data, regardless of the policy: Whenever the input data has changed, the output model is marked as outdated and the compiler is re-run. Figure 15, Indifference of Compilers About the Policy illustrates that the behavior of compilers does not give useful hints to decide about the copy policy. No matter whether compilers copy or share their input data objects, recompilation always restores a consistent state. 21

22 Figure 15. Indifference of Compilers About the Policy Importers and other data-generating tools do not cause any problems: They generate new models, or at most overwrite existing models. However, they do not modify existing data structures, and thus cannot cause unforeseen side effects in any entity sharing those structures. Also, importers usually do not take any input models. When they do, they usually do not share data structures of those models. Thus, importers (while still having to abide to the policy) are unimportant for deciding about a sensible policy. Refactoring tools are a different story. An example for such a tool could be a model re-namer: It would take a defined model and a new name, rename the model (changing its defined model identifier,) and then search through all defined models for the old identifier and replace it with the new one (including uses as the input of a generated model identifier, of course). This kind of operation would benefit from being able to change the model identifiers in place, that is, by modifying existing model data structures Analysis The observations made so far still allow two different policies (shown in Figure 16, In-Place vs. Out- Of-Place Modification ): 1. Model data structures may be modified by entities like the refactoring tool (editors may still not modify data objects in-place since the user might decide to close the editor without saving). Editors and other tools must not keep references to old input data objects unless they are ready to handle later modifications by other entities. Since the changes are applied to the original data objects without moving or replacing objects, we call this a policy of in-place modification. 2. Model data structures are not modified by any entities and can thus be shared freely. Entities like editors or the refactoring tool mentioned above have to create a modified copy and then request 22

23 that this copy is treated as the new up-to-date model data. Since the changes are applied elsewhere than the original data objects, we call this a policy of out-of-place modification. Figure 16. In-Place vs. Out-Of-Place Modification One argument to choose one of those two policies is that in-place modification is more efficient for certain refactoring tools (not all tools can exploit that advantage, for the same reasons editors cannot). On the other hand, such tools are not in use most of the time, so improvements to their efficiency have a lesser overall effect. Also, editors already make out-of-place modifications, so making refactoring tools behave similarly would yield a simpler and more consistent API. Focusing on that last point -- simplicity of the API -- some other useful observations can be made: In-place modifications need not only be made, they must also be signaled to the base system to indicate that each generated model that uses the modified model as one of its inputs must be rebuilt. This is prone to be forgotten by programmers, without immediately visible effects. With out-ofplace modification, application of the changes and signaling are done in a single operation, making it impossible to forget the signaling. With in-place modification, editors must always make a deep copy of their input data objects and never store the original beyond editor initialization, to avoid being affected by later external modification. Again, forgetting to do so is easy and does not produce immediately visible effects. With out-of-place modification, editors may keep their input data since it is known to be immutable. With in-place modification, refactoring tools that allow to copy part of a model's data into another model must take care to make a deep copy of the whole data sub-structure. Any shared sub-object again leads to interference when the corresponding part is modified in one of the models. With in-place modification, the API becomes inconsistent. First, refactoring tools may modify the data in-place, but editors must not. Second, compilers may re-use data objects despite possible later modifications (since they are restarted as soon as modifications occur,) but editors must not. With in-place modification, it is impossible to use the model data of a generated model independently from that model. Since a generated model could share data objects with its sources, any modification in the source model data could carry over to the generated model data due to the assumption that it is re-generated whenever those data objects change. However, this also means that the model data objects of the generated model before the modification become invalid as soon as the sources are changed, and the re-generated model data must be used instead. This can only be avoided by using a copy of the generated model data. On the other hand, out-of-place modification requires an unintuitive programming style in the case of the renaming tool. Conceptually, the renaming tool just replaces the old model identifier with the new one. However, all enclosing data structures have to be reconstructed one after another to contain the changes, from the leaf node containing the model identifier upwards to the root node of the model data. While this style is unintuitive, errors produce immediate effects and are therefore easy to find. It should be noted that some of the negative effects of in-place modification can be mitigated by defining that compilers must copy their input data and must not share any data objects with the output model. However, this would complicate the creation of compiler modules and introduce yet another possible source of hard-to-find errors. It would also have a negative impact on the performance of those compilers that could share objects. 23

24 Result A choice had to be made at this point: Either Modelflow requires an inefficient and unintuitive programming style as much as refactoring tools are affected, or it uses an inconsistent, complex API that allows hard-to-find errors. The final key argument is that while using immutable data objects is unintuitive for many programmers, there is little chance to make errors that are not immediately visible. Given that Modelflow was invented in the first place to make work easier for developers, and that it is run on high-end development machines, this choice can be answered in favor of simplicity, and we can finally establish the model data copy policy: Model data structures are immutable after creation. Whenever possible, their corresponding Java classes should disallow any later modifications, to have the policy enforced by Java's type system. Any entity can freely store references to data objects without having to deal with modifications. This includes compilers and editors, but also other tools. When model data is changed in an editor, those modifications must happen to internal data objects of the editor, never to the original input objects. The changes are not visible until the save operation of the editor is used to yield the modified model data, which is then used instead of the original data, while the original input objects are still unmodified. Also, later changes through the editor must not affect the saved version -- they must again only affect editor-internal objects Implementing Model Types Implementing a new model type is similar to implementing basic tools for a new file type. However, while most operating systems do not demand that any tools are present for a new file type, Modelflow demands that for any model type, the following meta-data and operations are implemented: Type identifier, used to refer to this type throughout the system Human-readable type name and description for user-interface purposes Default model file extension, to store the model in the file system The set of supertypes, used to group types with related meaning The Java class for the top-level data node, used for automated type-checking Creation of default model data which is syntactically correct but need not have any semantic meaning. This is used when creating a new model of this type. This operation may also open a GUI dialog to ask for additional parameters that influence the created model data. Such dialogs should be used sparingly, since they are of no use for further modifications once a model is created. Typically, asking for excessive parameters for model creation indicates the need for a higher-level model type or simply a better editor. Validation of model data for semantic correctness Reading and writing of model data to convert between Java objects and file contents A GUI editor for model data Any number of additional, type-specific operations that can be applied on existing models of that type The corresponding Java interfaces to implement are TypeImplementation as well as the interfaces to which that refers, such as ModelEditor for the editor implementation. It is however cumbersome to write all model type implementations manually and without re-using code from other model types. It is customary for different model types to use the same data classes for parts of their model data. A useful pattern is therefore to implement the data classes as well as the corresponding 24

Managing Variability in Software Architectures 1 Felix Bachmann*

Managing Variability in Software Architectures 1 Felix Bachmann* Managing Variability in Software Architectures Felix Bachmann* Carnegie Bosch Institute Carnegie Mellon University Pittsburgh, Pa 523, USA fb@sei.cmu.edu Len Bass Software Engineering Institute Carnegie

More information

Programming Languages

Programming Languages Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately

More information

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper Parsing Technology and its role in Legacy Modernization A Metaware White Paper 1 INTRODUCTION In the two last decades there has been an explosion of interest in software tools that can automate key tasks

More information

Advantage of Jquery: T his file is downloaded from

Advantage of Jquery: T his file is downloaded from What is JQuery JQuery is lightweight, client side JavaScript library file that supports all browsers. JQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling,

More information

Introduction to Web Services

Introduction to Web Services Department of Computer Science Imperial College London CERN School of Computing (icsc), 2005 Geneva, Switzerland 1 Fundamental Concepts Architectures & escience example 2 Distributed Computing Technologies

More information

Going Interactive: Combining Ad-Hoc and Regression Testing

Going Interactive: Combining Ad-Hoc and Regression Testing Going Interactive: Combining Ad-Hoc and Regression Testing Michael Kölling 1, Andrew Patterson 2 1 Mærsk Mc-Kinney Møller Institute, University of Southern Denmark, Denmark mik@mip.sdu.dk 2 Deakin University,

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

Fourth generation techniques (4GT)

Fourth generation techniques (4GT) Fourth generation techniques (4GT) The term fourth generation techniques (4GT) encompasses a broad array of software tools that have one thing in common. Each enables the software engineer to specify some

More information

Smarter Balanced Assessment Consortium. Recommendation

Smarter Balanced Assessment Consortium. Recommendation Smarter Balanced Assessment Consortium Recommendation Smarter Balanced Quality Assurance Approach Recommendation for the Smarter Balanced Assessment Consortium 20 July 2012 Summary When this document was

More information

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont. Objectives To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system Chapter 2: Operating-System Structures

More information

[Refer Slide Time: 05:10]

[Refer Slide Time: 05:10] Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture

More information

Chapter 5. Regression Testing of Web-Components

Chapter 5. Regression Testing of Web-Components Chapter 5 Regression Testing of Web-Components With emergence of services and information over the internet and intranet, Web sites have become complex. Web components and their underlying parts are evolving

More information

Chapter 1. Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705. CS-4337 Organization of Programming Languages

Chapter 1. Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705. CS-4337 Organization of Programming Languages Chapter 1 CS-4337 Organization of Programming Languages Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705 Chapter 1 Topics Reasons for Studying Concepts of Programming

More information

In this Lecture you will Learn: Implementation. Software Implementation Tools. Software Implementation Tools

In this Lecture you will Learn: Implementation. Software Implementation Tools. Software Implementation Tools In this Lecture you will Learn: Implementation Chapter 19 About tools used in software implementation How to draw component diagrams How to draw deployment diagrams The tasks involved in testing a system

More information

Test Automation Architectures: Planning for Test Automation

Test Automation Architectures: Planning for Test Automation Test Automation Architectures: Planning for Test Automation Douglas Hoffman Software Quality Methods, LLC. 24646 Heather Heights Place Saratoga, California 95070-9710 Phone 408-741-4830 Fax 408-867-4550

More information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

Integrating TAU With Eclipse: A Performance Analysis System in an Integrated Development Environment

Integrating TAU With Eclipse: A Performance Analysis System in an Integrated Development Environment Integrating TAU With Eclipse: A Performance Analysis System in an Integrated Development Environment Wyatt Spear, Allen Malony, Alan Morris, Sameer Shende {wspear, malony, amorris, sameer}@cs.uoregon.edu

More information

estatistik.core: COLLECTING RAW DATA FROM ERP SYSTEMS

estatistik.core: COLLECTING RAW DATA FROM ERP SYSTEMS WP. 2 ENGLISH ONLY UNITED NATIONS STATISTICAL COMMISSION and ECONOMIC COMMISSION FOR EUROPE CONFERENCE OF EUROPEAN STATISTICIANS Work Session on Statistical Data Editing (Bonn, Germany, 25-27 September

More information

Solar Power Systems Web Monitoring

Solar Power Systems Web Monitoring Solar Power Systems Web Monitoring Bimal Aklesh Kumar Department of Computer Science and Information Systems Fiji National University Abstract All over the world the peak demand load is increasing and

More information

Embedded Software Development with MPS

Embedded Software Development with MPS Embedded Software Development with MPS Markus Voelter independent/itemis The Limitations of C and Modeling Tools Embedded software is usually implemented in C. The language is relatively close to the hardware,

More information

Xcode Project Management Guide. (Legacy)

Xcode Project Management Guide. (Legacy) Xcode Project Management Guide (Legacy) Contents Introduction 10 Organization of This Document 10 See Also 11 Part I: Project Organization 12 Overview of an Xcode Project 13 Components of an Xcode Project

More information

Athena Knowledge Base

Athena Knowledge Base Athena Knowledge Base The Athena Visual Studio Knowledge Base contains a number of tips, suggestions and how to s that have been recommended by the users of the software. We will continue to enhance this

More information

Universiteit Leiden. Opleiding Informatica

Universiteit Leiden. Opleiding Informatica Internal Report 2012-08 August 2012 Universiteit Leiden Opleiding Informatica Maintaining a software system with the use of Domain-Specific languages Tyron Offerman BACHELOR THESIS Leiden Institute of

More information

Integrating Quality Assurance into the GIS Project Life Cycle

Integrating Quality Assurance into the GIS Project Life Cycle Integrating Quality Assurance into the GIS Project Life Cycle Abstract GIS databases are an ever-evolving entity. From their humble beginnings as paper maps, through the digital conversion process, to

More information

Logi Ad Hoc Reporting System Administration Guide

Logi Ad Hoc Reporting System Administration Guide Logi Ad Hoc Reporting System Administration Guide Version 11.2 Last Updated: March 2014 Page 2 Table of Contents INTRODUCTION... 4 Target Audience... 4 Application Architecture... 5 Document Overview...

More information

How To Develop A Web Dialog For An Org Database With A Database On A Computer (Oracle)

How To Develop A Web Dialog For An Org Database With A Database On A Computer (Oracle) Designing a Framework to Develop WEB Graphical Interfaces for ORACLE Databases - Web Dialog Georgiana-Petruţa Fîntîneanu Florentina Anica Pintea, Faculty of Computers and Applied Computer Science, Tibiscus

More information

IF The customer should receive priority service THEN Call within 4 hours PCAI 16.4

IF The customer should receive priority service THEN Call within 4 hours PCAI 16.4 Back to Basics Backward Chaining: Expert System Fundamentals By Dustin Huntington Introduction Backward chaining is an incredibly powerful yet widely misunderstood concept, yet it is key to building many

More information

Access Tutorial 2: Tables

Access Tutorial 2: Tables Access Tutorial 2: Tables 2.1 Introduction: The importance of good table design Tables are where data in a database is stored; consequently, tables form the core of any database application. In addition

More information

Operating System Structures

Operating System Structures COP 4610: Introduction to Operating Systems (Spring 2015) Operating System Structures Zhi Wang Florida State University Content Operating system services User interface System calls System programs Operating

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Rational Application Developer Performance Tips Introduction

Rational Application Developer Performance Tips Introduction Rational Application Developer Performance Tips Introduction This article contains a series of hints and tips that you can use to improve the performance of the Rational Application Developer. This article

More information

Bitrix Site Manager 4.1. User Guide

Bitrix Site Manager 4.1. User Guide Bitrix Site Manager 4.1 User Guide 2 Contents REGISTRATION AND AUTHORISATION...3 SITE SECTIONS...5 Creating a section...6 Changing the section properties...8 SITE PAGES...9 Creating a page...10 Editing

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

Writing a Project Report: Style Matters

Writing a Project Report: Style Matters Writing a Project Report: Style Matters Prof. Alan F. Smeaton Centre for Digital Video Processing and School of Computing Writing for Computing Why ask me to do this? I write a lot papers, chapters, project

More information

SFWR 4C03: Computer Networks & Computer Security Jan 3-7, 2005. Lecturer: Kartik Krishnan Lecture 1-3

SFWR 4C03: Computer Networks & Computer Security Jan 3-7, 2005. Lecturer: Kartik Krishnan Lecture 1-3 SFWR 4C03: Computer Networks & Computer Security Jan 3-7, 2005 Lecturer: Kartik Krishnan Lecture 1-3 Communications and Computer Networks The fundamental purpose of a communication network is the exchange

More information

Chapter 12 Programming Concepts and Languages

Chapter 12 Programming Concepts and Languages Chapter 12 Programming Concepts and Languages Chapter 12 Programming Concepts and Languages Paradigm Publishing, Inc. 12-1 Presentation Overview Programming Concepts Problem-Solving Techniques The Evolution

More information

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages ICOM 4036 Programming Languages Preliminaries Dr. Amirhossein Chinaei Dept. of Electrical & Computer Engineering UPRM Spring 2010 Language Evaluation Criteria Readability: the ease with which programs

More information

Implementing reusable software components for SNOMED CT diagram and expression concept representations

Implementing reusable software components for SNOMED CT diagram and expression concept representations 1028 e-health For Continuity of Care C. Lovis et al. (Eds.) 2014 European Federation for Medical Informatics and IOS Press. This article is published online with Open Access by IOS Press and distributed

More information

It is the thinnest layer in the OSI model. At the time the model was formulated, it was not clear that a session layer was needed.

It is the thinnest layer in the OSI model. At the time the model was formulated, it was not clear that a session layer was needed. Session Layer The session layer resides above the transport layer, and provides value added services to the underlying transport layer services. The session layer (along with the presentation layer) add

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code 1 Introduction The purpose of this assignment is to write an interpreter for a small subset of the Lisp programming language. The interpreter should be able to perform simple arithmetic and comparisons

More information

EMC Documentum Composer

EMC Documentum Composer EMC Documentum Composer Version 6.5 User Guide P/N 300 007 217 A02 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748 9103 1 508 435 1000 www.emc.com Copyright 2008 EMC Corporation. All rights

More information

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha Algorithm & Flowchart & Pseudo code Staff Incharge: S.Sasirekha Computer Programming and Languages Computers work on a set of instructions called computer program, which clearly specify the ways to carry

More information

6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.080/6.089 GITCS Feb 12, 2008. Lecture 3 6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

More information

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR Andrey V.Lyamin, State University of IT, Mechanics and Optics St. Petersburg, Russia Oleg E.Vashenkov, State University of IT, Mechanics and Optics, St.Petersburg,

More information

CHAPTER 14 Understanding an App s Architecture

CHAPTER 14 Understanding an App s Architecture CHAPTER 14 Understanding an App s Architecture Figure 14-1. This chapter examines the structure of an app from a programmer s perspective. It begins with the traditional analogy that an app is like a recipe

More information

1 Organization of Operating Systems

1 Organization of Operating Systems COMP 730 (242) Class Notes Section 10: Organization of Operating Systems 1 Organization of Operating Systems We have studied in detail the organization of Xinu. Naturally, this organization is far from

More information

REMOTE DEVELOPMENT OPTION

REMOTE DEVELOPMENT OPTION Leading the Evolution DATA SHEET MICRO FOCUS SERVER EXPRESS TM REMOTE DEVELOPMENT OPTION Executive Overview HIGH PRODUCTIVITY DEVELOPMENT FOR LINUX AND UNIX DEVELOPERS Micro Focus Server Express is the

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

PMOD Installation on Linux Systems

PMOD Installation on Linux Systems User's Guide PMOD Installation on Linux Systems Version 3.7 PMOD Technologies Linux Installation The installation for all types of PMOD systems starts with the software extraction from the installation

More information

Symbol Tables. Introduction

Symbol Tables. Introduction Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

More information

Eclipse with Mac OSX Getting Started Selecting Your Workspace. Creating a Project.

Eclipse with Mac OSX Getting Started Selecting Your Workspace. Creating a Project. Eclipse with Mac OSX Java developers have quickly made Eclipse one of the most popular Java coding tools on Mac OS X. But although Eclipse is a comfortable tool to use every day once you know it, it is

More information

Naming vs. Locating Entities

Naming vs. Locating Entities Naming vs. Locating Entities Till now: resources with fixed locations (hierarchical, caching,...) Problem: some entity may change its location frequently Simple solution: record aliases for the new address

More information

Satisfying business needs while maintaining the

Satisfying business needs while maintaining the Component-Based Development With MQSeries Workflow By Michael S. Pallos Client Application Satisfying business needs while maintaining the flexibility to incorporate new requirements in a timely fashion

More information

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS Embedded Systems White Paper GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS September 2009 ABSTRACT Android is an open source platform built by Google that includes an operating system,

More information

Integrating the Internet into Your Measurement System. DataSocket Technical Overview

Integrating the Internet into Your Measurement System. DataSocket Technical Overview Integrating the Internet into Your Measurement System DataSocket Technical Overview Introduction The Internet continues to become more integrated into our daily lives. This is particularly true for scientists

More information

Improved Software Testing Using McCabe IQ Coverage Analysis

Improved Software Testing Using McCabe IQ Coverage Analysis White Paper Table of Contents Introduction...1 What is Coverage Analysis?...2 The McCabe IQ Approach to Coverage Analysis...3 The Importance of Coverage Analysis...4 Where Coverage Analysis Fits into your

More information

Utilizing Domain-Specific Modelling for Software Testing

Utilizing Domain-Specific Modelling for Software Testing Utilizing Domain-Specific Modelling for Software Testing Olli-Pekka Puolitaival, Teemu Kanstrén VTT Technical Research Centre of Finland Oulu, Finland {olli-pekka.puolitaival, teemu.kanstren}@vtt.fi Abstract

More information

Course MS10975A Introduction to Programming. Length: 5 Days

Course MS10975A Introduction to Programming. Length: 5 Days 3 Riverchase Office Plaza Hoover, Alabama 35244 Phone: 205.989.4944 Fax: 855.317.2187 E-Mail: rwhitney@discoveritt.com Web: www.discoveritt.com Course MS10975A Introduction to Programming Length: 5 Days

More information

Lesson 1 Introduction to Rapid Application Development using Visual Basic

Lesson 1 Introduction to Rapid Application Development using Visual Basic Lesson 1 Introduction to Rapid Application Development using Visual Basic RAD (Rapid Application Development) refers to a development life cycle designed to give much faster development and higher-quality

More information

Co-Creation of Models and Metamodels for Enterprise. Architecture Projects.

Co-Creation of Models and Metamodels for Enterprise. Architecture Projects. Co-Creation of Models and Metamodels for Enterprise Architecture Projects Paola Gómez pa.gomez398@uniandes.edu.co Hector Florez ha.florez39@uniandes.edu.co ABSTRACT The linguistic conformance and the ontological

More information

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA)

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA) České vysoké učení technické v Praze Fakulta elektrotechnická Návrh Uživatelského Rozhraní X36NUR Editors Comparison (NetBeans IDE, Eclipse, ) May 5, 2008 Goal and purpose of test Purpose of this test

More information

How to test and debug an ASP.NET application

How to test and debug an ASP.NET application Chapter 4 How to test and debug an ASP.NET application 113 4 How to test and debug an ASP.NET application If you ve done much programming, you know that testing and debugging are often the most difficult

More information

JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved.

JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved. 1 6 JavaScript: Introduction to Scripting 2 Comment is free, but facts are sacred. C. P. Scott The creditor hath a better memory than the debtor. James Howell When faced with a decision, I always ask,

More information

PTC Integrity Eclipse and IBM Rational Development Platform Guide

PTC Integrity Eclipse and IBM Rational Development Platform Guide PTC Integrity Eclipse and IBM Rational Development Platform Guide The PTC Integrity integration with Eclipse Platform and the IBM Rational Software Development Platform series allows you to access Integrity

More information

Inteset Secure Lockdown ver. 2.0

Inteset Secure Lockdown ver. 2.0 Inteset Secure Lockdown ver. 2.0 for Windows XP, 7, 8, 10 Administrator Guide Table of Contents Administrative Tools and Procedures... 3 Automatic Password Generation... 3 Application Installation Guard

More information

Object Oriented Design

Object Oriented Design Object Oriented Design Kenneth M. Anderson Lecture 20 CSCI 5828: Foundations of Software Engineering OO Design 1 Object-Oriented Design Traditional procedural systems separate data and procedures, and

More information

Toad Data Modeler - Features Matrix

Toad Data Modeler - Features Matrix Toad Data Modeler - Features Matrix Functionality Commercial Trial Freeware Notes General Features Physical Model (database specific) Universal Model (generic physical model) Logical Model (support for

More information

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface File Management Two Parts Filesystem Interface Interface the user sees Organization of the files as seen by the user Operations defined on files Properties that can be read/modified Filesystem design Implementing

More information

Jos Warmer, Independent jos.warmer@openmodeling.nl www.openmodeling.nl

Jos Warmer, Independent jos.warmer@openmodeling.nl www.openmodeling.nl Domain Specific Languages for Business Users Jos Warmer, Independent jos.warmer@openmodeling.nl www.openmodeling.nl Sheet 2 Background Experience Business DSLs Insurance Product Modeling (structure) Pattern

More information

FuseMail- Exchange ControlPanel Admin Guide Feb.27-14 V1.0. Exchange ControlPanel Administration Guide

FuseMail- Exchange ControlPanel Admin Guide Feb.27-14 V1.0. Exchange ControlPanel Administration Guide Exchange ControlPanel Administration Guide Table of Contents Top Level Portal Administration... 4 Signing In to Control Panel... 4 Restoring Account Password... 5 Change Account Details... 7 Viewing Account

More information

Code Qualities and Coding Practices

Code Qualities and Coding Practices Code Qualities and Coding Practices Practices to Achieve Quality Scott L. Bain and the Net Objectives Agile Practice 13 December 2007 Contents Overview... 3 The Code Quality Practices... 5 Write Tests

More information

A New Paradigm for Synchronous State Machine Design in Verilog

A New Paradigm for Synchronous State Machine Design in Verilog A New Paradigm for Synchronous State Machine Design in Verilog Randy Nuss Copyright 1999 Idea Consulting Introduction Synchronous State Machines are one of the most common building blocks in modern digital

More information

Generating Edit Operations for Profiled UML Models

Generating Edit Operations for Profiled UML Models Generating Edit Operations for Profiled UML Models Timo Kehrer, Michaela Rindt, Pit Pietsch, Udo Kelter Software Engineering Group University of Siegen {kehrer,mrindt,pietsch,kelter}@informatik.uni-siegen.de

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

Data Modeling Basics

Data Modeling Basics Information Technology Standard Commonwealth of Pennsylvania Governor's Office of Administration/Office for Information Technology STD Number: STD-INF003B STD Title: Data Modeling Basics Issued by: Deputy

More information

Maven or how to automate java builds, tests and version management with open source tools

Maven or how to automate java builds, tests and version management with open source tools Maven or how to automate java builds, tests and version management with open source tools Erik Putrycz Software Engineer, Apption Software erik.putrycz@gmail.com Outlook What is Maven Maven Concepts and

More information

Preparing a Windows 7 Gold Image for Unidesk

Preparing a Windows 7 Gold Image for Unidesk Preparing a Windows 7 Gold Image for Unidesk What is a Unidesk gold image? In Unidesk, a gold image is, essentially, a virtual machine that contains the base operating system and usually, not much more

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 2: Operating System Structures Prof. Alan Mislove (amislove@ccs.neu.edu) Operating System Services Operating systems provide an environment for

More information

Bitrix Site Manager 4.0. Quick Start Guide to Newsletters and Subscriptions

Bitrix Site Manager 4.0. Quick Start Guide to Newsletters and Subscriptions Bitrix Site Manager 4.0 Quick Start Guide to Newsletters and Subscriptions Contents PREFACE...3 CONFIGURING THE MODULE...4 SETTING UP FOR MANUAL SENDING E-MAIL MESSAGES...6 Creating a newsletter...6 Providing

More information

Authoring for System Center 2012 Operations Manager

Authoring for System Center 2012 Operations Manager Authoring for System Center 2012 Operations Manager Microsoft Corporation Published: November 1, 2013 Authors Byron Ricks Applies To System Center 2012 Operations Manager System Center 2012 Service Pack

More information

ZIMBABWE SCHOOL EXAMINATIONS COUNCIL. COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER

ZIMBABWE SCHOOL EXAMINATIONS COUNCIL. COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER ZIMBABWE SCHOOL EXAMINATIONS COUNCIL General Certificate of Education Ordinary Level COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER Candidates answer on the question paper Additional materials:

More information

Java CPD (I) Frans Coenen Department of Computer Science

Java CPD (I) Frans Coenen Department of Computer Science Java CPD (I) Frans Coenen Department of Computer Science Content Session 1, 12:45-14:30 (First Java Programme, Inheritance, Arithmetic) Session 2, 14:45-16:45 (Input and Programme Constructs) Materials

More information

UOFL SHAREPOINT ADMINISTRATORS GUIDE

UOFL SHAREPOINT ADMINISTRATORS GUIDE UOFL SHAREPOINT ADMINISTRATORS GUIDE WOW What Power! Learn how to administer a SharePoint site. [Type text] SharePoint Administrator Training Table of Contents Basics... 3 Definitions... 3 The Ribbon...

More information

CLC Server Command Line Tools USER MANUAL

CLC Server Command Line Tools USER MANUAL CLC Server Command Line Tools USER MANUAL Manual for CLC Server Command Line Tools 2.5 Windows, Mac OS X and Linux September 4, 2015 This software is for research purposes only. QIAGEN Aarhus A/S Silkeborgvej

More information

Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. http://cevre.beun.edu.tr/zeydan/ CIV 112 Computer Programming Lecture Notes (1)

Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. http://cevre.beun.edu.tr/zeydan/ CIV 112 Computer Programming Lecture Notes (1) Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. http://cevre.beun.edu.tr/zeydan/ CIV 112 Computer Programming Lecture Notes (1) Computer Programming A computer is a programmable machine. This means it

More information

Preservation Handbook

Preservation Handbook Preservation Handbook [Binary Text / Word Processor Documents] Author Rowan Wilson and Martin Wynne Version Draft V3 Date 22 / 08 / 05 Change History Revised by MW 22.8.05; 2.12.05; 7.3.06 Page 1 of 7

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè. CMPT-354-Han-95.3 Lecture Notes September 10, 1995 Chapter 1 Introduction 1.0 Database Management Systems 1. A database management system èdbmsè, or simply a database system èdbsè, consists of æ A collection

More information

CET W/32 Application Builder Version 9

CET W/32 Application Builder Version 9 CET W/32 Application Builder Version 9 Overview of the Product, Technical Specifications, And Installation Guide cet software, incorporated 6595 odell place boulder, colorado, 80301 Table of Contents INSTALLATION

More information

WHITE PAPER. Peter Drucker. intentsoft.com 2014, Intentional Software Corporation

WHITE PAPER. Peter Drucker. intentsoft.com 2014, Intentional Software Corporation We know now that the source of wealth is something specifically human: knowledge. If we apply knowledge to tasks we already know how to do, we call it productivity. If we apply knowledge to tasks that

More information

U.S. FDA Title 21 CFR Part 11 Compliance Assessment of SAP Records Management

U.S. FDA Title 21 CFR Part 11 Compliance Assessment of SAP Records Management U.S. FDA Title 21 CFR Part 11 Compliance Assessment of SAP Records Management Disclaimer These materials are subject to change without notice. SAP AG s compliance analysis with respect to SAP software

More information

Lab Experience 17. Programming Language Translation

Lab Experience 17. Programming Language Translation Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

Cedalion A Language Oriented Programming Language (Extended Abstract)

Cedalion A Language Oriented Programming Language (Extended Abstract) Cedalion A Language Oriented Programming Language (Extended Abstract) David H. Lorenz Boaz Rosenan The Open University of Israel Abstract Implementations of language oriented programming (LOP) are typically

More information

Simple Solution for a Location Service. Naming vs. Locating Entities. Forwarding Pointers (2) Forwarding Pointers (1)

Simple Solution for a Location Service. Naming vs. Locating Entities. Forwarding Pointers (2) Forwarding Pointers (1) Naming vs. Locating Entities Till now: resources with fixed locations (hierarchical, caching,...) Problem: some entity may change its location frequently Simple solution: record aliases for the new address

More information

Archival Data Format Requirements

Archival Data Format Requirements Archival Data Format Requirements July 2004 The Royal Library, Copenhagen, Denmark The State and University Library, Århus, Denmark Main author: Steen S. Christensen The Royal Library Postbox 2149 1016

More information

Compiler I: Syntax Analysis Human Thought

Compiler I: Syntax Analysis Human Thought Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly

More information