scholarly journals Development in Vulkan: a domain-specific approach

2021 ◽  
Vol 33 (5) ◽  
pp. 181-204
Author(s):  
Vladimir Frolov ◽  
Vadim Sanzharov ◽  
Vladimir Galaktionov ◽  
Alexander Shcherbakov

In this paper we propose a high-level approach to developing GPU applications based on the Vulkan API. The purpose of the work is to reduce the complexity of developing and debugging applications that implement complex algorithms on the GPU using Vulkan. The proposed approach uses the technology of code generation by translating a C++ program into an optimized implementation in Vulkan, which includes automatic shader generation, resource binding, and the use of synchronization mechanisms (Vulkan barriers). The proposed solution is not a general-purpose programming technology, but specializes in specific tasks. At the same time, it has extensibility, which allows to adapt the solution to new problems. For single input C++ program, we can generate several implementations for different cases (via translator options) or different hardware. For example, a call to virtual functions can be implemented either through a switch construct in a kernel, or through sorting threads and an indirect dispatching via different kernels, or through the so-called callable shaders in Vulkan. Instead of creating a universal programming technology for building various software systems, we offer an extensible technology that can be customized for a specific class of applications. Unlike, for example, Halide, we do not use a domain-specific language, and the necessary knowledge is extracted from ordinary C++ code. Therefore, we do not extend with any new language constructs or directives and the input source code is assumed to be normal C++ source code (albeit with some restrictions) that can be compiled by any C++ compiler. We use pattern matching to find specific patterns (or patterns) in C++ code and convert them to GPU efficient code using Vulkan. Pattern are expressed through classes, member functions, and the relationship between them. Thus, the proposed technology makes it possible to ensure a cross-platform solution by generating different implementations of the same algorithm for different GPUs. At the same time, due to this, it allows you to provide access to specific hardware functionality required in computer graphics applications. Patterns are divided into architectural and algorithmic. The architectural pattern defines the domain and behavior of the translator as a whole (for example, image processing, ray tracing, neural networks, computational fluid dynamics and etc.). Algorithmic pattern express knowledge of data flow and control and define a narrower class of algorithms that can be efficiently implemented in hardware. Algorithmic patterns can occur within architectural patterns. For example, parallel reduction, compaction (parallel append), sorting, prefix sum, histogram calculation, map-reduce, etc. The proposed generator works on the principle of code morphing. The essence of this approach is that, having a certain class in the program and transformation rules, one can automatically generate another class with the desired properties (for example, the implementation of the algorithm on the GPU). The generated class inherits from the input class and thus has access to all data and functions of the input class. Overriding virtual functions in generated class helps user to carefully connect generated code to the other Vulkan code written by hand. Shaders can be generated in two variants: OpenCL shaders for google “clspv” compiler and GLSL shaders for an arbitrary GLSL compiler. Clspv variant is better for code which intensively uses pointers and the GLSL generator is better if specific HW features are used (like hardware ray tracing acceleration). We have demonstrated our technology on several examples related to image processing and ray tracing on which we get 30-100 times acceleration over multithreaded CPU implementation.

Author(s):  
Egons Lavendelis ◽  
Janis Grundspenkis

Multi-Agent Based Intelligent Tutoring System Source Code Generation Using MASITS ToolSeveral agent development tools have been proposed. At the same time, specific tools for agent based Intelligent Tutoring System (ITS) development do not exist. However, ITSs have some specific characteristics that must be taken into consideration during the development. General purpose Agent Oriented Software Engineering (AOSE) methodologies and therefore development tools do not sufficiently correspond to the characteristics of ITSs. Additionally, the general purpose AOSE methodologies and tools do not allow plugging in domain specific rules and diagrams. Thus, usage of knowledge gained in ITS research during the development process is limited. In the absence of general tools that allow plugging in knowledge from ITS research, a specific tool named MASITS has been developed. The tool supports a specific agent based ITS development methodology named MASITS which takes into consideration specific characteristics of ITSs and integrates knowledge from ITS research. The tool supports all phases of ITS development, starting from requirements analysis and ending with deployment. Requirements analysis and design phases are supported by appropriate diagram creation tools. Implementation is supported by source code generation from diagrams created during the design phase. JADE platform is used for agent implementation. Thus, Java classes for ontology, agents and behaviours are generated from the design diagrams. The paper includes a brief overview of diagrams used in the source code generation and detailed algorithms for source code generation from the diagrams.


2013 ◽  
Vol 10 (4) ◽  
pp. 1525-1556 ◽  
Author(s):  
Sebla Demirkol ◽  
Moharram Challenger ◽  
Sinem Getir ◽  
Tomaz Kosar ◽  
Geylani Kardas ◽  
...  

Software agents became popular in the development of complex software systems, especially those requiring autonomous and proactive behavior. Agents interact with each other within a Multi-agent System (MAS), in order to perform certain defined tasks in a collaborative and/or selfish manner. However, the autonomous, proactive and interactive structure of MAS causes difficulties when developing such software systems. It is within this context, that the use of a Domain-specific Language (DSL) may support easier and quicker MAS development methodology. The impact of such DSL usage could be clearer when considering the development of MASs, especially those working on new challenging environments like the Semantic Web. Hence, this paper introduces a new DSL for Semantic Web enabled MASs. This new DSL is called Semantic web Enabled Agent Language (SEA_L). Both the SEA_L user-aspects and the way of implementing SEA_L are discussed in the paper. The practical use of SEA_L is also demonstrated using a case study which considers the modeling of a multi-agent based e-barter system. When considering the language implementation, we first discuss the syntax of SEA_L and we show how the specifications of SEA_L can be utilized during the code generation of real MAS implementations. The syntax of SEA_L is supported by textual modeling toolkits developed with Xtext. Code generation for the instance models are supplied with the Xpand tool.


2011 ◽  
Vol 8 (2) ◽  
pp. 405-426 ◽  
Author(s):  
Branko Perisic ◽  
Gordana Milosavljevic ◽  
Igor Dejanovic ◽  
Branko Milosavljevic

This paper presents an approach to automatic user interface code generation that is based on an internal HCI standard that defines layout and behaviour of coarse-grained objects for enterprise business applications. A domain-specific language (in the form of a UML profile) based on the concepts introduced by the HCI standard facilitates efficient modeling and generation of fully-functional UIs. Being a regular UML extension, this language can be used in any general-purpose UML modeling tool and can easily be integrated with other UML-based models of the application.


2012 ◽  
Vol 263-266 ◽  
pp. 1961-1968
Author(s):  
Yong Chao Song ◽  
Bu Dan Wu ◽  
Jun Liang Chen

According to the feature of the JBPM workflow system development, the target code generated is determined by analyzing the process of JBPM workflow development and the architecture of J2EE. The code generation tool generates code by parsing the static form source code and loading the code generation template. The code generation tool greatly shortens the JBPM workflow system development cycle and reduces the cost of software development which has the good practicality and scalability.


2010 ◽  
Vol 79 (6) ◽  
pp. 383-396 ◽  
Author(s):  
Van Nguyen ◽  
David Kearney ◽  
Gianpaolo Gioiosa
Keyword(s):  

Author(s):  
Baboucar Diatta ◽  
Adrien Basse ◽  
Chérif Bachir Deme ◽  
Samuel Ouya
Keyword(s):  

e-xacta ◽  
2016 ◽  
Vol 9 (1) ◽  
pp. 37
Author(s):  
Cristiano Martins Monteiro ◽  
Flavianne Braga Campos de Lima ◽  
Carlos Renato Storck

<p>A geração automática de código-fonte é uma prática adotada no desenvolvimento de softwares para agilizar, facilitar e padronizar a implementação dos projetos. Embora seja uma prática comum nas fábricas de software, não se conhece uma ferramenta que permita escolher o padrão de projeto a ser usado. O objetivo principal deste trabalho é apresentar um gerador de códigos para o desenvolvimento de sistemas Web a partir de uma modelagem entidade-relacionamento, uma linguagem de programação e um padrão de projeto determinados pelo usuário. Os objetivos específicos são propor uma arquitetura do sistema capaz de adequar e reaproveitar diferentes padrões de projeto, linguagens de programação e projetos cadastrados; permitir que o usuário cadastre, altere, exclua, importe e exporte um projeto; e gerar automaticamente o seu código-fonte e scripts de banco de dados. Este trabalho se justifica pela importância de reduzir erros de codificação; e evitar perca tempo ao realizar atividades rotineiras de implementação de padrões de projeto. Possibilitando assim, maior dedicação no planejamento das regras de negócios e redução de custos. A ferramenta proposta (GCER) foi desenvolvida em linguagem Java com o uso banco de dados Oracle 11g, e seguindo os padrões DAO e MVC. Os resultados foram avaliados através da geração e compilação de códigos de um projeto para cadastro de veículos. A geração com êxito evidencia a viabilidade da ferramenta proposta para a geração automática de códigos no processo de desenvolvimento de software.</p><p>Abstract</p><p>The automatic generation of source code is a practice adopted in the development of software to streamline, facilitate and standardize the implementation of projects. Although it be a common practice in software factories, it is not known a tool able to choose the design pattern to be used. The main objective of this paper is to present a code generator for the development of Web systems from an entity-relationship modeling, a programming language and a design pattern determined by the user. The specific objectives are to propose a system architecture able to suit and reuse different design patterns, programming languages and saved projects; allow the user to insert, update, delete, import and export a project; and automatically generate the source code and database scripts. This work is justified by the importance to reduce errors of coding; and to avoid waste of time in the development of Web systems performing routine tasks. Allowing, then, a greater dedication in the planning of business rules and the reduction of costs. The tool proposed (GCER) was developed in Java with the database using Oracle 11g, and following the DAO and MVC patterns. The results were evaluated by generating and compiling codes of a project for vehicle registration. The successful code generation demonstrate the feasibility of the proposed tool for the automatic generation of code in the software development process.</p>


2020 ◽  
Author(s):  
Eddie C. Davis

This research presents an intermediate compiler representation that is designed for optimization, and emphasizes the temporary storage requirements and execution schedule of a given computation to guide optimization decisions. The representation is expressed as a dataflow graph that describes computational statements and data mappings within the polyhedral compilation model. The targeted applications include both the regular and irregular scientific domains. The intermediate representation can be integrated into existing compiler infrastructures. A specification language implemented as a domain specific language in C++ describes the graph components and the transformations that can be applied. The visual representation allows users to reason about optimizations. Graph variants can be translated into source code or other representation. The language, intermediate representation, and associated transformations have been applied to improve the performance of differential equation solvers, or sparse matrix operations, tensor decomposition, and structured multigrid methods.


Sign in / Sign up

Export Citation Format

Share Document