{"title":"Extracting QuickCheck specifications from EUnit test cases","authors":"T. Arts, Pablo Lamela Seijas, S. Thompson","doi":"10.1145/2034654.2034666","DOIUrl":"https://doi.org/10.1145/2034654.2034666","url":null,"abstract":"Writing EUnit tests is more common than writing QuickCheck specifications, although QuickCheck specifications potentially explore far more scenarios than manually written unit tests. In particular for implementations that have side-effects, writing a good set of EUnit tests is often difficult and labour intensive. In this paper we report on mechanisms to extract QuickCheck specifications from EUnit test suites. We use the QSM algorithm to infer state machines from sets of positive and negative traces derived from the test suite. These traces can be derived either statically or dynamically and we describe both approaches here. Finally we show how to move from the inferred state machine to a QuickCheck state machine. This QuickCheck state machine can then be used to generate tests, which include the EUnit tests, but also include many new and different combinations that can augment the test suite. In this way, one can achieve substantially better testing with little extra work.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"72 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130561714","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"SFMT pseudo random number generator for Erlang","authors":"K. Rikitake","doi":"10.1145/2034654.2034669","DOIUrl":"https://doi.org/10.1145/2034654.2034669","url":null,"abstract":"The stock implementation of Erlang/OTP pseudo random number generator (PRNG), random module, is based on an algorithm developed in 1980s called AS183, and has known statistic deficiencies for large-scale applications. Using modern PRNG algorithms with longer generation periods reduces the deficiencies. This paper is a case study of sfmt-erlang module, an implementation of SIMD-oriented Fast Mersenne Twister (SFMT) PRNG with the native interface functions (NIFs) of Erlang. The test results show the execution speed of the implementation is approximately three times faster than the random module on the x86 and x86_64 architecture computers, and the execution own time for generating single random number sequences is proportional to the internal state table length.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"252 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122069863","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
T. Arts, John Hughes, U. Norell, Nicholas Smallbone, Hans Svensson
{"title":"Accelerating race condition detection through procrastination","authors":"T. Arts, John Hughes, U. Norell, Nicholas Smallbone, Hans Svensson","doi":"10.1145/2034654.2034659","DOIUrl":"https://doi.org/10.1145/2034654.2034659","url":null,"abstract":"Race conditions are notoriously frustrating to find, and good tools can help. The main difficulty is reliably provoking the race condition. In previous work we presented a randomising scheduler for Erlang that helps with this task. In a language without pervasive shared mutable state, such as Erlang, performing scheduling decisions at random uncovers race conditions surprisingly well. However, it is not always enough. We describe a technique, procrastination, that aims to provoke race conditions more often than by random scheduling alone. It works by running the program and looking for pairs of events that might interfere, such as two message sends to the same process. Having found such a pair of events, we re-run the program but try to provoke a race condition by reversing the order of the two events. We apply our technique to a piece of industrial Erlang code. Compared to random scheduling alone, procrastination allows us to find minimal failing test cases more reliably and more quickly.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"102 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116926808","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"A PropEr integration of types and function specifications with property-based testing","authors":"Manolis Papadakis, Konstantinos Sagonas","doi":"10.1145/2034654.2034663","DOIUrl":"https://doi.org/10.1145/2034654.2034663","url":null,"abstract":"We present a tight integration of the language of types and function specifications of Erlang with property-based testing. To achieve this integration we have developed from scratch PropEr, an open-source QuickCheck-inspired property-based testing tool. We present technical details of this integration, most notably how the conversion of recursive types into appropriate generators takes place and how function specifications can be turned automatically into simple properties in order to exercise the code of these functions. Finally, we present experiences and advice for the proper use of PropEr.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130337948","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Modeling growth and dynamics of neural networks via message passing in Erlang: neural models have a natural home in message passing functional programming languages","authors":"Trevor Bain, Patrick Campbell, Jonas Karlsson","doi":"10.1145/2034654.2034674","DOIUrl":"https://doi.org/10.1145/2034654.2034674","url":null,"abstract":"Erlang is well suited as a platform for modeling neural dynamics and development. We overview similarities between neural architecture and language paradigms in Erlang, specifically functional programming, message passing, distributed computing and concurrency. We present examples of using Erlang to model neural dynamics and development respectively. Finally, we synthesize these two examples into an artificial retina and then we conclude with an overview of ongoing work.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"90 S1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"120841960","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Erlang ETS tables and software transactional memory: how transactions make ETS tables more like ordinary actors","authors":"Patrik Nyblom","doi":"10.1145/2034654.2034658","DOIUrl":"https://doi.org/10.1145/2034654.2034658","url":null,"abstract":"This article describes a way to make the ETS tables of Erlang fit better into the actor programming model. Enhancing the interface of the ETS tables with a concept of transactions is suggested as a means both to achieve increased parallelism, better performance and less error-prone code, while still keeping no less true to the actor model.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"8 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123650382","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Session details: Testing with QuickCheck","authors":"Konstantinos Sagonas","doi":"10.1145/3249221","DOIUrl":"https://doi.org/10.1145/3249221","url":null,"abstract":"","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"82 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132587963","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Model-based testing of data types with side effects","authors":"T. Arts, Laura M. Castro","doi":"10.1145/2034654.2034662","DOIUrl":"https://doi.org/10.1145/2034654.2034662","url":null,"abstract":"Data types are the core of many applications, and libraries offering implementations of data types should better be solid and well tested. Testing purely functional data types with QuickCheck provides a complete test method for data types, but establishing a complete test method for data types with side-effects is still an open issue. In this paper we show how we can use a stateful QuickCheck model to establish a complete test method for any data type. Considering side effects allows us to move from the purely functional world to the imperative world, as needed to face the testing of data types implementations in languages such as C. We therefore applied our method to some of the data types provided by the well-known GNOME Glib library.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"8 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"114374914","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Session details: Implementation and practice","authors":"S. Fritchie","doi":"10.1145/3249222","DOIUrl":"https://doi.org/10.1145/3249222","url":null,"abstract":"","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"33 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129713692","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}