Open Access. Powered by Scholars. Published by Universities.®

Articles 1 - 3 of 3

Full-Text Articles in Programming Languages and Compilers

Tests As Maintainable Assets Via Auto-Generated Spies: A Case Study Involving The Scala Collections Library's Iterator Trait, Konstantin Läufer, John O'Sullivan, George K. Thiruvathukal Jun 2019

Tests As Maintainable Assets Via Auto-Generated Spies: A Case Study Involving The Scala Collections Library's Iterator Trait, Konstantin Läufer, John O'Sullivan, George K. Thiruvathukal

George K. Thiruvathukal

In testing stateful abstractions, it is often necessary to record interactions, such as method invocations, and express assertions over these interactions. Following the Test Spy design pattern, we can reify such interactions programmatically through additional mutable state. Alternatively, a mocking framework, such as Mockito, can automatically generate test spies that allow us to record the interactions and express our expectations in a declarative domain-specific language. According to our study of the test code for Scala’s Iterator trait, the latter approach can lead to a significant reduction of test code complexity in terms of metrics such as code size (in some …


Experiences With Scala Across The College-Level Curriculum, Konstantin Läufer, George K. Thiruvathukal, Mark C. Lewis Oct 2017

Experiences With Scala Across The College-Level Curriculum, Konstantin Läufer, George K. Thiruvathukal, Mark C. Lewis

Konstantin Läufer

Various hybrid-functional languages, designed to balance compile-time error detection, conciseness, and performance, have emerged. Scala, e.g., is interoperable with Java and has become an early leader in adoption, especially in the start-up and open-source spaces. As educators, we have recognized Scala’s value as a teaching language across the CS curriculum. In CS1, the read-eval-print loop and simple, uniform syntax aid programming in the small. In CS2, higher-order methods allow concise, efficient manipulation of collections. In a programming languages course, advanced constructs facilitate the separation of concerns, program representation and interpretation, and concurrent programming. In advanced applied courses, language mechanisms and …


Experiences With Scala Across The College-Level Curriculum, Konstantin Läufer, George K. Thiruvathukal, Mark C. Lewis Jul 2017

Experiences With Scala Across The College-Level Curriculum, Konstantin Läufer, George K. Thiruvathukal, Mark C. Lewis

George K. Thiruvathukal

Various hybrid-functional languages, designed to balance compile-time error detection, conciseness, and performance, have emerged. Scala, e.g., is interoperable with Java and has become an early leader in adoption, especially in the start-up and open-source spaces. As educators, we have recognized Scala’s value as a teaching language across the CS curriculum. In CS1, the read-eval-print loop and simple, uniform syntax aid programming in the small. In CS2, higher-order methods allow concise, efficient manipulation of collections. In a programming languages course, advanced constructs facilitate the separation of concerns, program representation and interpretation, and concurrent programming. In advanced applied courses, language mechanisms and …