• Nem Talált Eredményt

10 Conclusion

In document Acta 2502 y (Pldal 79-84)

Table 1: Error metrics of the different DSDF representations.

test #1 test #2

median mean sign median mean sign

A0 0.0399 0.1053 2.14% 0.0399 0.0871 1.23%

A1 0.0411 0.1119 1.84% 0.0413 0.0861 0.98%

G1 0.0411 0.1119 1.84% 0.0413 0.0861 0.98%

A2 0.0029 0.1002 1.52% 0.0121 0.0785 0.83%

G2 0.0015 0.0869 1.39% 0.0098 0.0743 0.87%

Table 2: Average render times of full screen test texts.

A0 A1 G1 A2 G2

0.306 ms 0.325 ms 0.319 ms 0.370 ms 0.349 ms

distance field (A0), but they always improve the sign correctness metric. This can be seen on Figure 7 as well: the average error values might be close, but visually the first order fields perform better. Similarly, the second order fields always outperform the first order ones. Other test cases have shown similar relative1 numbers for all constructions.

Table 2 shows averaged render times for the different DSDF constructions from FullHD full screen tests. The sampling of higher order distance fields always costs more than the traditional fields, but they provide the possibility to use lower reso- lution fields or have better precision at the same resolution. G2 rendering is faster than A2 despite the extra calculations needed. This can be explained by the fact that A2 needs two textures for its 6 coefficients.

in render times compared to using traditional signed distance fields, assuming the same field resolution.

In the future, we plan to extend our geometric construction to three dimensional signed distance fields. Three dimensional first order algebraic distance fields already proved their applicability [3].


[1] Aaltonen, Sebastian. GPU-based clay simulation and ray-tracing tech in Clay- book, Game Developers Conference 2018. InGame Developers Conference, San Francisco, CA, March 2018.

[2] Bala, Kavita, Walter, Bruce, and Greenberg, Donald P. Combining edges and points for interactive high-quality rendering. ACM Trans. Graph., 22(3):631–640, July 2003. DOI: 10.1145/882262.882318.

[3] B´an, R´obert and Valasek, G´abor. First order signed distance fields. In Wilkie, Alexander and Banterle, Francesco, editors,Eurographics 2020 - Short Papers.

The Eurographics Association, 2020. DOI: 10.2312/egs.20201011.

[4] Ellis, A., Hunt, W., and Hart, J. Real-time analytic antialiased text for 3-D environments.Computer Graphics Forum, 38(8):23–32, 2019. DOI: 10.1111/


[5] Evans, Alex. Learning from failure: a survey of promising, unconventional and mostly abandoned renderers for ‘Dreams PS4’, a geometrically dense, painterly UGC game. InAdvances in Real-Time Rendering in Games. MediaMolecule, SIGGRAPH, 2015.

[6] Fuhrmann, Arnulph, Sobottka, Gerrit, and Groß, Clemens. Distance fields for rapid collision detection in physically based modeling. InProceedings of the International Conference Graphicon, 2003.

[7] Green, Chris. Improved alpha-tested magnification for vector textures and special effects. In ACM SIGGRAPH 2007 Courses, SIGGRAPH ’07, pages 9–18, New York, NY, USA, 2007. ACM. DOI: 10.1145/1281500.1281665.

[8] Kaasila, Sampo. Method and apparatus for moving control points in displaying digital typeface on raster output devices, 1994. United States Patent No.


[9] Loop, Charles and Blinn, Jim. Rendering Vector Art on the GPU. In GPU Gems 3, chapter 25. Addison-Wesley Professional, 2007.

[10] Michail, Ashraf A., Teitlebaum, David B., and Furtwangler, Brandon C. Arc spline GPU rasterization for cubic Bezier drawing, 2010. United States Patent No. US8624899B2.

[11] Osher, S. and Fedkiw, R. Level Set Methods and Dynamic Implicit Surfaces.

Springer Verlag, 2003. DOI: 10.1007/b98879.

[12] Prokopov, Nikita. Fira code: free monospaced font with programming liga- tures. GitHub URL:https://github.com/tonsky/FiraCode.

[13] Ramanarayanan, G., Bala, K., and Walter, B. Feature-Based Textures. In Keller, Alexander and Jensen, Henrik Wann, editors,Eurographics Workshop on Rendering. The Eurographics Association, 2004. DOI: 10.2312/EGWR/


[14] Turner, David, Wilhelm, Robert, and Lemberg, Werner. The FreeType Project. URL:https://www.freetype.org/index.html.

[15] Valasek, G´abor. Nonlinear Geometric Models. PhD thesis, E¨otv¨os Lor´and University, 2016. DOI: 10.15476/ELTE.2015.123.

[16] Valasek, G´abor. Generating distance fields from parametric plane curves. In Annales Mathematicae et Informaticae 48, pages 83–91, 03 2018. http://


[17] Wright, Daniel. Dynamic occlusion with signed distance fields. InAdvances in Real-Time Rendering in Games. Epic Games (Unreal Engine), SIGGRAPH, 2015.

Towards Version Controlling in RefactorErl

Jenifer Tabita Ciuciu-Kiss


, Melinda T´ oth


, and Istv´ an Boz´ o



Static source code analyser tools are operating on an intermediate rep- resentation of the source code that is usually a tree or a graph. Those rep- resentations need to be updated according to the different versions of the source code. However, the developers might be interested in the changes or might need information about previous versions, therefore, keeping different versions of the source code analysed by the tools are required. RefactorErl is an open-source static analysis and transformation tool for Erlang that uses a graph representation to store and manipulate the source code. The aim of our research was to create an extension of the Semantic Program Graph of RefactorErl that is able to store different versions of the source code in a single graph. The new method resulted in 30% memory footprint decrease compared to the available workaround solutions.

Keywords: Erlang, RefactorErl, graph version control, optimisation

1 Introduction

Static program analysis [3] is a method of debugging of the source code of a program performed before the execution. It is used early in development before any other testing. The benefits of static analysis need to be mentioned: speed (compared to manual code reviews automated tools are way faster and the early found coding errors are less costly to fix); depth (static code analysers can cover every possible code execution path); accuracy (human errors can be eliminated).

The research has been supported by the project ”Integr´alt kutat´oi ut´anp´otl´as-k´epz´esi program az informatika ´es sz´am´ıt´astudom´any diszciplin´aris ter¨uletein (Integrated program for training new generation of researchers in the disciplinary fields of computer science)”, No. EFOP-3.6.3- VEKOP-16-2017-00002. The project has been supported by the European Union and co-funded by the European Social Fund. The research is part of the ”Application Domain Specific Highly Reliable IT Solutions” project that has been implemented with the support provided from the National Research, Development and Innovation Fund of Hungary, financed under the Thematic Excellence Programme TKP2020-6 (National Challenges Subprogramme) funding scheme.

aELTE, E¨otv¨os Lor´and University, Budapest, Hungary

bE-mail:kuefmz@inf.elte.hu, ORCID:0000-0002-3170-6730

cE-mail:toth m@inf.elte.hu, ORCID:0000-0001-6300-7945

dE-mail:bozo i@inf.elte.hu, ORCID:0000-0001-5145-9688


Version control [18] (also known as revision control or source control) is a com- ponent of software configuration management. It is used for managing changes to programs, documents and other data. The idea of storing the differences between different versions of a document is as old as writing is but it became more important in the last two decades when the area of computing has started. In software engi- neering, version control is any kind of tracks that provides control over the changes between the different version of source code. Version controlling tools make the process easier and much faster, so it is very convenient to use them. One of the most famous tools for that is Git [8], which is known by most software developers.

RefactorErl [4, 19] is a static source code analyzer and transformation tool for Erlang programs. Beyond that RefactorErl does thorough static analysis on the given source code, it has many other features to support code comprehension: it finds the dependencies between the modules, provides a query language to gather semantic information about the source code, performs clustering, etc. Some source code analysers have their own built-in version controlling systems. RefactorErl does not provide version controlling, it works on a given snapshot of a software.

The internal representation of RefactorErl gives us the opportunity to build the version control over that. The tool represents the source code in a Semantic Program Graph (SPG) [12] which will be explained in detail later. The graph is stored in a database to make the results of the source code analysis permanently available. The tool can work with different databases (i.e. the distributed, relational Mnesia database [14], or the key-value Kyoto database [10]), but it builds the same internal representation, the SPG, in any cases. All the analyses and the transformations are performed on the graph layer, thus our version controlling is defined on the top of the SPG and not on the database layer.

The main contribution of this paper are the algorithms as an extension of Refac- torErl to handle different versions of the source code. Our first tests on open source repositories provided a memory saving for about 30%.

In Section 2, we introduce some information about the RefactorErl tool and the data structure used by the tool. In Section 3, the algorithm of finding the differences between different versions is presented which is followed by Section 4, where the algorithm of storing the found differences is discussed. Then, in Section 5, we present some usage of the version control. In Section 6 the evaluation is explained. Section 7, contains information about the related work. Finally, Section 8 concludes the paper.

In document Acta 2502 y (Pldal 79-84)