SlideShare a Scribd company logo
1 of 59
Download to read offline
Your systems. Working as one.
Property-based Testing and Generators
Sumant Tambe
7/29/2015
Agenda
• Property-based Testing
• The need for generators
• Design/Implementation of the generator library
• Using mathematics for API design
• Value constraints in type definitions
• Reactive generators
• Generators at compile-time (type generators)
8/25/2015 © 2015 RTI 2
Why should you care?
• If you write software for living and if you are
serious about any of the following
– Bug-free code
– Productivity
• Modularity
• Reusability
• Extensibility
• Maintainability
– Performance/latency
• Multi-core scalability
– and having fun while doing that!
8/25/2015 © 2015 RTI 3
8/25/2015 © 2015 RTI 4
Source Google images
What’s a Property
• Reversing a linked-list twice has no effect
– reverse(reverse(list)) == list
• Compression can make things smaller
– compress(input).size <= input.size
• Round-trip serialization/deserialization has no
effect
– deserialize(serialize(input)) == input
8/25/2015 © 2015 RTI 5
Property-based Testing
• Complementary to traditional example-based testing
• Specify post-conditions that must hold no matter
what
• Encourages the programmer to think harder about
the code
• More declarative
• Need data generators to produce inputs
• Free reproducers!
– Good property-based testing frameworks shrink inputs to
minimal automatically
• Famous: Haskell’s QuickCheck, Scala’s ScalaTest
8/25/2015 © 2015 RTI 6
A property-test in RefleX
8/25/2015 © 2015 RTI 7
template <class T>
void test_roundtrip_property(const T & in)
{
T out; // empty
DDS::DynamicData dd(...); // empty
reflex::update_dynamicdata(dd, in);
reflex::read_dynamicdata(out, dd)
assert(in == out);
}
• What’s the input data?
• What are the input types?
Data Generators
8/25/2015 © 2015 RTI 8
Lua has less syntactic noise than C++. So, code
examples are in Lua
Data Generators
8/25/2015 © 2015 RTI 9
• Simplest data generator = math.random
math.randomseed(os.time())
local r = math.random(6)
print(r) -- one of 1, 2, 3, 4, 5, 6
r = math.random(20, 25)
print(r) -- one of 20, 21, 22, 23, 24, 25
Data Generators
8/25/2015 © 2015 RTI 10
• A boolean generator
function boolGen()
return math.random(2) > 1
end
• An uppercase character generator
function upperCaseGen() -- A=65, Z=90
return string.char(math.random(65, 90))
end
• An int16 generator
function int16Gen()
return math.random(MIN_INT16, MAX_INT16)
end
Data Generators
8/25/2015 © 2015 RTI 11
• A range generator
function rangeGen(lo, hi)
return math.random(lo, hi)
end
• Inconvenient because args must be passed every time
Use state!
Closure Recap
8/25/2015 © 2015 RTI 12
• A simple closure
local f = function ()
return boolGen()
end
print(f()) -- true or false
• Another closure
local a = 20
local f = function ()
print(a)
end
f() -- 20
a = 30
f() -- 30
Closures capture state
8/25/2015 © 2015 RTI 13
• Back to the range generator
function rangeGen(lo, hi)
return function()
return math.random(lo, hi)
end
end
local f = rangeGen(20, 25)
print(f()) -- one of 20, 21, 22, 23, 24, 25
Closures capture state
8/25/2015 © 2015 RTI 14
• The oneOf generator
function oneOfGen(array)
local len = #array –- get length of the array
return function()
return array[math.random(1, len)]
end
end
local days = { “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat” }
local f = oneOfGen(days)
print(f()) -- one of Sun, Mon, Tue, Wed, Thu, Fri, Sat
8/25/2015 © 2015 RTI 15
“Closures are poor man's
objects; Objects are poor
man's closure”
-- The venerable master Qc Na
Source Google images
Closure vs Object
• Is function a sufficient abstraction for any
generator?
function () {
return blah;
}
• Answer depends upon your language
– No. In Lua, C++, …
– Yes. In Haskell
8/25/2015 © 2015 RTI 16
The Generator Library
8/25/2015 17
local Gen = require(“generator”)
local rangeGen = Gen.rangeGen(20,25)
for i=1, 5 do
print(rangeGen:generate()) –- 5 values in range(20, 25)
end
Github: https://github.com/rticommunity/rticonnextdds-ddsl
local stepperGen = Gen.stepperGen(1, 10)
for i=1, 5 do
print(stepperGen:generate()) –- 1, 2, 3, 4, 5
end
local infiniteGen = Gen.stepperGen(1, 10, 1, true)
while true do
print(infiniteGen:generate()) –- 1, 2, 3, 4, ...
end
The Generator Library
8/25/2015 18
local Gen = require(“generator”)
local charGen = Gen.uppercaseGen()
local maxLen = 64
local strGen = Gen.stringGen(maxLen, charGen)
for i=1, 5 do
print(strGen:generate()) -- 5 uppercase strings upto size 64
end
Github: https://github.com/rticommunity/rticonnextdds-ddsl
sequenceGen is quite similar
The Generator library (batteries included)
8/25/2015 © 2015 RTI 19
boolGen posFloatGen emptyGen
charGen posDoubleGen singleGen
wcharGen floatGen constantGen
octetGen doubleGen oneOfGen
shortGen lowercaseGen inOrderGen
int16Gen uppercaseGen stepperGen
int32Gen alphaGen rangeGen
int64Gen alphaNumGen seqGen
uint16Gen printableGen arrayGen
uint32Gen stringGen aggregateGen
uint64Gen nonEmptyStringGen enumGen
The Generator “Class”
• Lua does not have “classes” but that’s not important
8/25/2015 © 2015 RTI 20
local Generator = {} –- an object that will serve as a class
function Generator:new(generateImpl)
local o = {}
o.genImpl = generateImpl -- A method assignment
-- some additional metatable manipulation here
return o
end
function Generator:generate()
return self.genImpl()
end
function rangeGen(lo, hi)
return Generator:new(function ()
return math.random(lo, hi)
end)
end
8/25/2015 © 2015 RTI 21
Source Google images
Composing Generators
• Producing more complex Generators from one
or more simpler Generators
8/25/2015 © 2015 RTI 22
Generator
map
reduce
append
where
zipMany
concatMap
take
scan
Mapping over a generator
8/25/2015 © 2015 RTI 23
local days = { “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat” }
local fiboGen = Gen.fibonacciGen()
-- 0 1 1 2 3 5 8 ...
local plus1Gen = fiboGen:map(function (i) return i+1 end)
-- 1 2 2 3 4 6 9 ...
local dayGen = plus1Gen:map(function (j) return days[j] end)
-- Sun, Mon, Mon, Tue, Wed, Fri, nil, ...
for i=1, 6 do
print(dayGen:generate()) -- Sun, Mon, Mon, Tue, Wed, Fri
end
Zipping generators
8/25/2015 © 2015 RTI 24
local xGen = Gen.stepperGen(0,100)
local yGen = Gen.stepperGen(0,200,2)
local pointGen =
Gen.zipMany(xGen, yGen, function (x, y)
return { x, y }
end)
for i=1, 5 do
print(pointGen:generate()) –- {0,0}, {1,2}, {3,4}, ...
end
Zipping generators
8/25/2015 © 2015 RTI 25
local xGen = Gen.stepperGen(0,100)
local yGen = Gen.stepperGen(0,200,2)
local colorGen = Gen.oneOfGen({ “RED”, “GREEN”, “BLUE” })
local sizeGen = Gen.constantGen(30)
local shapeGen =
Gen.zipMany(xGen, yGen, colorGen, sizeGen,
function (x, y, color, size)
return { x = x,
y = y,
color = color,
shapesize = size }
end)
• The mandatory Shapes example
Using Data Domain Specific Language (DDSL)
8/25/2015 © 2015 RTI 26
local ShapeType = xtypes.struct{
ShapeType = {
{ x = { xtypes.long } },
{ y = { xtypes.long } },
{ shapesize = { xtypes.long } },
{ color = { xtypes.string(128), xtypes.Key } },
}
}
local shapeGen = Gen.aggregateGen(ShapeType)
for i=1, 5 do
print(shapeGen:generate()) –- output next slide
end
• Use Lua DDSL to define types
Five random shapes
8/25/2015 © 2015 RTI 27
COLOR?!
Use a Collection of Generators
8/25/2015 © 2015 RTI 28
local ShapeType = xtypes.struct{
ShapeType = {
{ x = { xtypes.long } },
{ y = { xtypes.long } },
{ shapesize = { xtypes.long } },
{ color = { xtypes.string(128), xtypes.Key } },
}
}
local shapeGenLib = {}
shapeGenLib.x = Gen.stepperGen(0, 100)
shapeGenLib.y = Gen.stepperGen(0, 200, 2)
shapeGenLib.color = Gen.oneOf({ "RED", "GREEN", "BLUE" })
shapeGenLib.shapesize = Gen.rangeGen(20, 30)
local shapeGen = Gen.aggregateGen(ShapeType, shapeGenLib)
for i=1, 5 do
print(shapeGen:generate()) –- output next slide
end
Five sensible shapes
8/25/2015 © 2015 RTI 29
In not so distant future…
8/25/2015 © 2015 RTI 30
local ShapeType = xtypes.struct{
ShapeType = {
{ x = { xtypes.long,
xtypes.constraint{ “[ x | x <- stepperGen(0,100) ]” }}},
{ y = { xtypes.long,
xtypes.constraint{ “[ x*x | x <- stepperGen(0,200,2) ]” }}},
{ size = { xtypes.long,
xtypes.constraint{ “[ x | x <- rangeGen(20,30) ]” }}},
{ color= { xtypes.string(128),
xtypes.constraint{ “[ x | x <- constantGen('BLUE') ]” }}}
}
}
• Direct applicability in
• MEP  Message Emulation Processes (i.e., generate data)
• MCT  Generator expressions may be specified directly in the UI
8/25/2015 © 2015 RTI 31
The Mathematics of the Generator API
Generators
• General design principal
– Create a language to solve a problem
– API is the language
– Reuse parsing/compilation of the host language (duh!)
• The “language” of Generators
– Primitive values are basic generators
– Complex values are composite generators
– All APIs result in some generator
• Especially, map, zip, reduce, etc.
– I.e., generators form an algebra
8/25/2015 © 2015 RTI 32
Algebra
A first-class abstraction
+
Compositional* API
8/25/2015 © 2015 RTI 33
*Composition based on mathematical concepts
8/25/2015 © 2015 RTI 34
What Math Concepts?
• Algebraic Structures from Category Theory
– Monoid
– Monad
– Functor
– Applicative
– Group
– Endofunctor
• Where to begin?
– Haskell
– But innocent should start with Scala perhaps
8/25/2015 © 2015 RTI 35
Does it have anything to do with DDS?
Yes!
Composable API for DDS exists. It’s Rx4DDS
Also, RPC-over-DDS (futures). Both are humble
beginnings
And remember, sky is the limit
Next Items
• Value constraints in type definitions
• Reactive generators
• Generators at compile-time (type generators)
• (Back to) Testing RefleX API properties
8/25/2015 © 2015 RTI 36
Constraints in Data Models
• Database Schemas
• XSD Restrictions
8/25/2015 © 2015 RTI 37
CREATE TABLE products (
product_no integer UNIQUE NOT NULL,
name text,
price numeric CHECK (price > 0)
);
<xs:element name="age">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="120"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="prodid">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:pattern value="[0-9][0-9][0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Constraints in Data Models
• STANAG 4607
– Ground Moving Target Indicator
• Object Constraint Language
– Defined by OMG: part of the UML standard
– Huge!
8/25/2015 © 2015 RTI 38
In not so distant future…
8/25/2015 © 2015 RTI 39
local ShapeType = xtypes.struct{
ShapeType = {
{ x = { xtypes.long,
xtypes.constraint{ “[ x | x <- stepperGen(0,100) ]” }}},
{ y = { xtypes.long,
xtypes.constraint{ “[ x*x | x <- stepperGen(0,200,2) ]” }}},
{ size = { xtypes.long,
xtypes.constraint{ “[ x | x <- rangeGen(20,30) ]” }}},
{ color= { xtypes.string(128),
xtypes.constraint{ “[ x | x <- constantGen('BLUE') ]” }}}
}
}
• Direct applicability in
• MEP  Message Emulation Processes (i.e., generate data)
• MCT  Generator expressions may be specified directly in the UI
General Syntax for Data Generation
• Mathematical Set Builder Notation
• Suggested Generator Syntax
– [ x | x <- stepperGen() ]
– [ 2*x | x <- fibonacciGen() ]
– [ “ID” .. i | i <- stepperGen(1, 256) ]
• Translated mechanically to the Generator API
– map, flatMap, etc.
– List Comprehension in disguise
• Python, Haskell has it. Lua does not.
8/25/2015 © 2015 RTI 40
Value Dependencies
• List Comprehension alone is not sufficient
• What if data members have value dependencies
– o.y = o.x * o.x
– o.len = length(o.somearray)
– o.min = minimum(o.somearray)
– o.max = maximum(o.somearray)
8/25/2015 © 2015 RTI 41
Syntax for Value Dependencies
• Generator Syntax seems to work for value
dependencies too
• Just refer to the generator of the parent attribute
– [ a*a | a <- $(x) ]
– [ len(a) | a <- $(somearray) ]
– [ min(point.x) | point <- t,
t <- $(trajectory) ]
(Assuming trajectory is an array of points )
8/25/2015 © 2015 RTI 42
Pull Generators aren’t enough
• Pull Generators don’t handle dependencies
well
– At least not without state
– Requires multiple passes through state for every
generated sample
• Seems expensive
– Dependencies must be “interpreted” for every
sample
• I.e., needs to refer type description to do its job
• Dependencies can’t be “compiled” for performance
– A relatively simple and powerful alternative exists
8/25/2015 © 2015 RTI 43
How dependencies break
• The ShapeType generator
asks leaf generators to
produce a new value.
• Dependencies are
immediately lost
8/25/2015 © 2015 RTI 44
X
Y
ShapeType
Y = X2
Circle represents a generator not state
Reactive Generators
• Work “just like DDS!”
• Propagate values “downstream”
– Push-based instead of pull-based
• Subject-Observer (pub/sub) pattern
– A single value is propagated to one or more dependent
attributes
• Dependent generators take the “right” action
– Such as doubling the value, counting min, etc.
• map, flatmap, reduce etc. work exactly like
pull generators
• Composable
– Generator expressions can be mechanically translated to
reactive generator API
8/25/2015 © 2015 RTI 45
Basics of Reactive Generators
8/25/2015 © 2015 RTI 46
class Generator<T>
{
void listen(callback);
};
Where callback is a closure
callback = function (t) {
// provided by the user
}
You can register multiple callbacks
Create Listen Push Dispose
Lifecycle of a reactive (push) generator
n n
Create a
Pull
Generator
Subject
transform,
…
Optional
Composing Reactive Generators
• Producing more complex Generators from one
or more simpler Generators
8/25/2015 © 2015 RTI 48
ReactGen
map
reduce
append
where
zipMany
concatMap
take
scan
Architecture
8/25/2015 © 2015 RTI 49
Back to Property-based Testing in
RefleX
8/25/2015 © 2015 RTI 50
Round-trip property-test for ShapeType
8/25/2015 © 2015 RTI 51
void test_roundtrip_shape(const ShapeType & in)
{
ShapeType out; // empty
DDS::DynamicData dd(...); // empty
reflex::write_dynamicdata(dd, in);
reflex::read_dynamicdata(out, dd)
assert(in == out);
}
• The assertion must hold for all instances.
void test_many_shapes()
{
auto generator = gen::make_aggregate_gen<ShapeType>();
for (int i = 0;i < 100; ++i) {
test_roundtrip_shapetype(gen.generate());
}
}
A generic property-test in RefleX
8/25/2015 © 2015 RTI 52
template <class T>
void test_roundtrip_property(const T & in)
{
T out; // empty
DDS::DynamicData dd(...); // empty
reflex::update_dynamicdata(dd, in);
reflex::read_dynamicdata(out, dd)
assert(in == out);
}
• What are the input types?
• Given a type, how to produce data?
Random Types at
Compile-time
8/25/2015 © 2015 RTI 53
Random Numbers at
Compile-time
if we can generate
Random Numbers at Compile-time
• Demo
– In C
– Then in C++
8/25/2015 © 2015 RTI 54
Live code
Linear Feedback Shift Register (LFSR)
• Simple random number generator
• 4 bit Fibonacci LFSR
• Feedback polynomial = X4 + X3 + 1
• Taps 4 and 3
8/25/2015 © 2015 RTI 55
Linear Feedback Shift Register (LFSR)
• Live code feedback polynomial (16 bit)
– X16 + X14 + X13 + X11 + 1
• Taps: 16, 14, 13, and 11
8/25/2015 © 2015 RTI 56
Type Generators Demystified
• Random seed as command line #define
• Compile-time random numbers using LFSR
• C++ meta-programming for type synthesis
• std::string generator for type names and
member names
• RefleX to map types to typecode and dynamic data
8/25/2015 © 2015 RTI 57
RefleX Property-test Type Generator
• “Good” Numbers
– 31415 (3 nested structs)
– 32415 (51 nested structs)
– 2626 (12 nested structs)
– 10295 (15 nested structs)
– 21525 (41 nested structs)
– 7937 ( 5 nested structs)
– ...
• “Bad” Numbers
– 2152 (test seg-faults) sizeof(tuple) > 2750 KB!
8/25/2015 © 2015 RTI 58
Github: https://github.com/rticommunity/rticonnextdds-reflex/blob/develop/test/generator
Thank You!
8/25/2015 © 2015 RTI 59

More Related Content

What's hot

Performance and predictability
Performance and predictabilityPerformance and predictability
Performance and predictabilityRichardWarburton
 
Performance and predictability (1)
Performance and predictability (1)Performance and predictability (1)
Performance and predictability (1)RichardWarburton
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applicationsKexin Xie
 
Big-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbaiBig-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbaiUnmesh Baile
 
Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...
Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...
Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...InfluxData
 
Flink Batch Processing and Iterations
Flink Batch Processing and IterationsFlink Batch Processing and Iterations
Flink Batch Processing and IterationsSameer Wadkar
 
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and CassandraBrief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and CassandraSomnath Mazumdar
 
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)Hansol Kang
 
Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015Christian Peel
 
Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningCarol McDonald
 
HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016Ehsan Totoni
 
Apache Flink Deep Dive
Apache Flink Deep DiveApache Flink Deep Dive
Apache Flink Deep DiveVasia Kalavri
 
Machine learning in production with scikit-learn
Machine learning in production with scikit-learnMachine learning in production with scikit-learn
Machine learning in production with scikit-learnJeff Klukas
 
Whats new in ES2019
Whats new in ES2019Whats new in ES2019
Whats new in ES2019chayanikaa
 
A Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for EveryoneA Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for Everyoneinside-BigData.com
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Yulia Tsisyk
 
Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...Chris Richardson
 
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Jen Aman
 

What's hot (20)

Performance and predictability
Performance and predictabilityPerformance and predictability
Performance and predictability
 
Performance and predictability (1)
Performance and predictability (1)Performance and predictability (1)
Performance and predictability (1)
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
 
Big-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbaiBig-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbai
 
Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...
Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...
Scott Anderson [InfluxData] | Map & Reduce – The Powerhouses of Custom Flux F...
 
Flink Batch Processing and Iterations
Flink Batch Processing and IterationsFlink Batch Processing and Iterations
Flink Batch Processing and Iterations
 
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and CassandraBrief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
 
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)
 
Scalding
ScaldingScalding
Scalding
 
Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015Ehsan parallel accelerator-dec2015
Ehsan parallel accelerator-dec2015
 
Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and Tuning
 
HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016HPAT presentation at JuliaCon 2016
HPAT presentation at JuliaCon 2016
 
Apache Flink Deep Dive
Apache Flink Deep DiveApache Flink Deep Dive
Apache Flink Deep Dive
 
Machine learning in production with scikit-learn
Machine learning in production with scikit-learnMachine learning in production with scikit-learn
Machine learning in production with scikit-learn
 
Intro to Akka Streams
Intro to Akka StreamsIntro to Akka Streams
Intro to Akka Streams
 
Whats new in ES2019
Whats new in ES2019Whats new in ES2019
Whats new in ES2019
 
A Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for EveryoneA Future for R: Parallel and Distributed Processing in R for Everyone
A Future for R: Parallel and Distributed Processing in R for Everyone
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"
 
Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...Map(), flatmap() and reduce() are your new best friends: simpler collections,...
Map(), flatmap() and reduce() are your new best friends: simpler collections,...
 
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
 

Viewers also liked

Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Sumant Tambe
 
Ph.D. Dissertation
Ph.D. DissertationPh.D. Dissertation
Ph.D. DissertationSumant Tambe
 
An Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDSAn Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDSSumant Tambe
 
Nit 40165477-per-2014-12-cod-2046-nro-13815025037-boleta
Nit 40165477-per-2014-12-cod-2046-nro-13815025037-boletaNit 40165477-per-2014-12-cod-2046-nro-13815025037-boleta
Nit 40165477-per-2014-12-cod-2046-nro-13815025037-boletaCarlos Rene Lopez Caneck
 
Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)
Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)
Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)Carlos Rene Lopez Caneck
 
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingCV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingAmit Bhanegaonkar
 
KCB Bank Presentation by Starehe - Valuraha Investment Club
KCB Bank Presentation by Starehe - Valuraha Investment ClubKCB Bank Presentation by Starehe - Valuraha Investment Club
KCB Bank Presentation by Starehe - Valuraha Investment ClubWangechi Mwangi
 
Mumias Presentation by Precious Blood - Valuraha Investment Club
Mumias Presentation by Precious Blood - Valuraha Investment Club Mumias Presentation by Precious Blood - Valuraha Investment Club
Mumias Presentation by Precious Blood - Valuraha Investment Club Wangechi Mwangi
 
Reinado efectivo de isabel ii (1843 1868)
Reinado efectivo de isabel ii (1843 1868)Reinado efectivo de isabel ii (1843 1868)
Reinado efectivo de isabel ii (1843 1868)Blanca Ruiz
 
Can everyone use your app?
Can everyone use your app?Can everyone use your app?
Can everyone use your app?Tom Widerøe
 
Having your cake, and eating it too!
Having your cake, and eating it too!Having your cake, and eating it too!
Having your cake, and eating it too!Gary Park
 
Having your cake, and eating it too! - DDDScotland
Having your cake, and eating it too! - DDDScotlandHaving your cake, and eating it too! - DDDScotland
Having your cake, and eating it too! - DDDScotlandGary Park
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Guglielmo Iozzia
 
Building a Culture Supporting Accessibility from Within Your Organization
Building a Culture Supporting Accessibility from Within Your OrganizationBuilding a Culture Supporting Accessibility from Within Your Organization
Building a Culture Supporting Accessibility from Within Your OrganizationTom Widerøe
 
Remote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSRemote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSSumant Tambe
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 Sumant Tambe
 

Viewers also liked (20)

Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
 
Ph.D. Dissertation
Ph.D. DissertationPh.D. Dissertation
Ph.D. Dissertation
 
An Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDSAn Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDS
 
Nit 40165477-per-2014-12-cod-2046-nro-13815025037-boleta
Nit 40165477-per-2014-12-cod-2046-nro-13815025037-boletaNit 40165477-per-2014-12-cod-2046-nro-13815025037-boleta
Nit 40165477-per-2014-12-cod-2046-nro-13815025037-boleta
 
Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)
Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)
Nit 86972235-per-2014-12-cod-1311-nro-13782109705-boleta(1)
 
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_TestingCV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
CV_Amit_Bhanegaonkar_BE._with_4.11_years_of_experience_in_Software_Testing
 
KCB Bank Presentation by Starehe - Valuraha Investment Club
KCB Bank Presentation by Starehe - Valuraha Investment ClubKCB Bank Presentation by Starehe - Valuraha Investment Club
KCB Bank Presentation by Starehe - Valuraha Investment Club
 
portfolio_digital_pages
portfolio_digital_pagesportfolio_digital_pages
portfolio_digital_pages
 
Mumias Presentation by Precious Blood - Valuraha Investment Club
Mumias Presentation by Precious Blood - Valuraha Investment Club Mumias Presentation by Precious Blood - Valuraha Investment Club
Mumias Presentation by Precious Blood - Valuraha Investment Club
 
Reinado efectivo de isabel ii (1843 1868)
Reinado efectivo de isabel ii (1843 1868)Reinado efectivo de isabel ii (1843 1868)
Reinado efectivo de isabel ii (1843 1868)
 
Muhammad_Zubair_-_Islamic_Banking
Muhammad_Zubair_-_Islamic_BankingMuhammad_Zubair_-_Islamic_Banking
Muhammad_Zubair_-_Islamic_Banking
 
Can everyone use your app?
Can everyone use your app?Can everyone use your app?
Can everyone use your app?
 
Instrumente software utile in realizarea tutorialelor online
Instrumente software utile in realizarea tutorialelor onlineInstrumente software utile in realizarea tutorialelor online
Instrumente software utile in realizarea tutorialelor online
 
Having your cake, and eating it too!
Having your cake, and eating it too!Having your cake, and eating it too!
Having your cake, and eating it too!
 
Having your cake, and eating it too! - DDDScotland
Having your cake, and eating it too! - DDDScotlandHaving your cake, and eating it too! - DDDScotland
Having your cake, and eating it too! - DDDScotland
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
 
Building a Culture Supporting Accessibility from Within Your Organization
Building a Culture Supporting Accessibility from Within Your OrganizationBuilding a Culture Supporting Accessibility from Within Your Organization
Building a Culture Supporting Accessibility from Within Your Organization
 
Remote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSRemote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJS
 
Halal Research Council
Halal Research CouncilHalal Research Council
Halal Research Council
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012
 

Similar to Property-based Testing and Generators (Lua)

Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++Sumant Tambe
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Benoit Combemale
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTPMustafa TURAN
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every dayVadym Khondar
 
Seminar: New Stochastic Programming Features for MPL - Nov 2011
Seminar: New Stochastic Programming Features for MPL - Nov 2011Seminar: New Stochastic Programming Features for MPL - Nov 2011
Seminar: New Stochastic Programming Features for MPL - Nov 2011Bjarni Kristjánsson
 
Functional programming-advantages
Functional programming-advantagesFunctional programming-advantages
Functional programming-advantagesSergei Winitzki
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshopVinay Kumar
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processorsRISC-V International
 
Model-based GUI testing using UPPAAL
Model-based GUI testing using UPPAALModel-based GUI testing using UPPAAL
Model-based GUI testing using UPPAALUlrik Hørlyk Hjort
 
Apache Flink & Graph Processing
Apache Flink & Graph ProcessingApache Flink & Graph Processing
Apache Flink & Graph ProcessingVasia Kalavri
 
Two methods for optimising cognitive model parameters
Two methods for optimising cognitive model parametersTwo methods for optimising cognitive model parameters
Two methods for optimising cognitive model parametersUniversity of Huddersfield
 
Hpg2011 papers kazakov
Hpg2011 papers kazakovHpg2011 papers kazakov
Hpg2011 papers kazakovmistercteam
 
Java n-plus-1-incl-demo-slides
Java n-plus-1-incl-demo-slidesJava n-plus-1-incl-demo-slides
Java n-plus-1-incl-demo-slidesMichel Schudel
 
Map reduce: beyond word count
Map reduce: beyond word countMap reduce: beyond word count
Map reduce: beyond word countJeff Patti
 
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...dantleech
 
Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014Dieter Plaetinck
 
Architecture for scalable Angular applications
Architecture for scalable Angular applicationsArchitecture for scalable Angular applications
Architecture for scalable Angular applicationsPaweł Żurowski
 

Similar to Property-based Testing and Generators (Lua) (20)

Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 
Seminar: New Stochastic Programming Features for MPL - Nov 2011
Seminar: New Stochastic Programming Features for MPL - Nov 2011Seminar: New Stochastic Programming Features for MPL - Nov 2011
Seminar: New Stochastic Programming Features for MPL - Nov 2011
 
Functional programming-advantages
Functional programming-advantagesFunctional programming-advantages
Functional programming-advantages
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
 
Online test program generator for RISC-V processors
Online test program generator for RISC-V processorsOnline test program generator for RISC-V processors
Online test program generator for RISC-V processors
 
Model-based GUI testing using UPPAAL
Model-based GUI testing using UPPAALModel-based GUI testing using UPPAAL
Model-based GUI testing using UPPAAL
 
C# 6.0 Preview
C# 6.0 PreviewC# 6.0 Preview
C# 6.0 Preview
 
Apache Flink & Graph Processing
Apache Flink & Graph ProcessingApache Flink & Graph Processing
Apache Flink & Graph Processing
 
Two methods for optimising cognitive model parameters
Two methods for optimising cognitive model parametersTwo methods for optimising cognitive model parameters
Two methods for optimising cognitive model parameters
 
Hpg2011 papers kazakov
Hpg2011 papers kazakovHpg2011 papers kazakov
Hpg2011 papers kazakov
 
Lambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter LawreyLambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter Lawrey
 
Cascalog internal dsl_preso
Cascalog internal dsl_presoCascalog internal dsl_preso
Cascalog internal dsl_preso
 
Java n-plus-1-incl-demo-slides
Java n-plus-1-incl-demo-slidesJava n-plus-1-incl-demo-slides
Java n-plus-1-incl-demo-slides
 
Map reduce: beyond word count
Map reduce: beyond word countMap reduce: beyond word count
Map reduce: beyond word count
 
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
Building and Incredible Machine with Pipelines and Generators in PHP (IPC Ber...
 
Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014Rethinking metrics: metrics 2.0 @ Lisa 2014
Rethinking metrics: metrics 2.0 @ Lisa 2014
 
Architecture for scalable Angular applications
Architecture for scalable Angular applicationsArchitecture for scalable Angular applications
Architecture for scalable Angular applications
 

More from Sumant Tambe

Kafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presentedKafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presentedSumant Tambe
 
Tuning kafka pipelines
Tuning kafka pipelinesTuning kafka pipelines
Tuning kafka pipelinesSumant Tambe
 
New Tools for a More Functional C++
New Tools for a More Functional C++New Tools for a More Functional C++
New Tools for a More Functional C++Sumant Tambe
 
Reactive Stream Processing in Industrial IoT using DDS and Rx
Reactive Stream Processing in Industrial IoT using DDS and RxReactive Stream Processing in Industrial IoT using DDS and Rx
Reactive Stream Processing in Industrial IoT using DDS and RxSumant Tambe
 
RPC over DDS Beta 1
RPC over DDS Beta 1RPC over DDS Beta 1
RPC over DDS Beta 1Sumant Tambe
 
Reactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeReactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeSumant Tambe
 
Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Sumant Tambe
 
Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Sumant Tambe
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Sumant Tambe
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeSumant Tambe
 
Retargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core SystemsRetargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core SystemsSumant Tambe
 

More from Sumant Tambe (11)

Kafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presentedKafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presented
 
Tuning kafka pipelines
Tuning kafka pipelinesTuning kafka pipelines
Tuning kafka pipelines
 
New Tools for a More Functional C++
New Tools for a More Functional C++New Tools for a More Functional C++
New Tools for a More Functional C++
 
Reactive Stream Processing in Industrial IoT using DDS and Rx
Reactive Stream Processing in Industrial IoT using DDS and RxReactive Stream Processing in Industrial IoT using DDS and Rx
Reactive Stream Processing in Industrial IoT using DDS and Rx
 
RPC over DDS Beta 1
RPC over DDS Beta 1RPC over DDS Beta 1
RPC over DDS Beta 1
 
Reactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeReactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/Subscribe
 
Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)
 
Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/Subscribe
 
Retargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core SystemsRetargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core Systems
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

Property-based Testing and Generators (Lua)

  • 1. Your systems. Working as one. Property-based Testing and Generators Sumant Tambe 7/29/2015
  • 2. Agenda • Property-based Testing • The need for generators • Design/Implementation of the generator library • Using mathematics for API design • Value constraints in type definitions • Reactive generators • Generators at compile-time (type generators) 8/25/2015 © 2015 RTI 2
  • 3. Why should you care? • If you write software for living and if you are serious about any of the following – Bug-free code – Productivity • Modularity • Reusability • Extensibility • Maintainability – Performance/latency • Multi-core scalability – and having fun while doing that! 8/25/2015 © 2015 RTI 3
  • 4. 8/25/2015 © 2015 RTI 4 Source Google images
  • 5. What’s a Property • Reversing a linked-list twice has no effect – reverse(reverse(list)) == list • Compression can make things smaller – compress(input).size <= input.size • Round-trip serialization/deserialization has no effect – deserialize(serialize(input)) == input 8/25/2015 © 2015 RTI 5
  • 6. Property-based Testing • Complementary to traditional example-based testing • Specify post-conditions that must hold no matter what • Encourages the programmer to think harder about the code • More declarative • Need data generators to produce inputs • Free reproducers! – Good property-based testing frameworks shrink inputs to minimal automatically • Famous: Haskell’s QuickCheck, Scala’s ScalaTest 8/25/2015 © 2015 RTI 6
  • 7. A property-test in RefleX 8/25/2015 © 2015 RTI 7 template <class T> void test_roundtrip_property(const T & in) { T out; // empty DDS::DynamicData dd(...); // empty reflex::update_dynamicdata(dd, in); reflex::read_dynamicdata(out, dd) assert(in == out); } • What’s the input data? • What are the input types?
  • 8. Data Generators 8/25/2015 © 2015 RTI 8 Lua has less syntactic noise than C++. So, code examples are in Lua
  • 9. Data Generators 8/25/2015 © 2015 RTI 9 • Simplest data generator = math.random math.randomseed(os.time()) local r = math.random(6) print(r) -- one of 1, 2, 3, 4, 5, 6 r = math.random(20, 25) print(r) -- one of 20, 21, 22, 23, 24, 25
  • 10. Data Generators 8/25/2015 © 2015 RTI 10 • A boolean generator function boolGen() return math.random(2) > 1 end • An uppercase character generator function upperCaseGen() -- A=65, Z=90 return string.char(math.random(65, 90)) end • An int16 generator function int16Gen() return math.random(MIN_INT16, MAX_INT16) end
  • 11. Data Generators 8/25/2015 © 2015 RTI 11 • A range generator function rangeGen(lo, hi) return math.random(lo, hi) end • Inconvenient because args must be passed every time Use state!
  • 12. Closure Recap 8/25/2015 © 2015 RTI 12 • A simple closure local f = function () return boolGen() end print(f()) -- true or false • Another closure local a = 20 local f = function () print(a) end f() -- 20 a = 30 f() -- 30
  • 13. Closures capture state 8/25/2015 © 2015 RTI 13 • Back to the range generator function rangeGen(lo, hi) return function() return math.random(lo, hi) end end local f = rangeGen(20, 25) print(f()) -- one of 20, 21, 22, 23, 24, 25
  • 14. Closures capture state 8/25/2015 © 2015 RTI 14 • The oneOf generator function oneOfGen(array) local len = #array –- get length of the array return function() return array[math.random(1, len)] end end local days = { “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat” } local f = oneOfGen(days) print(f()) -- one of Sun, Mon, Tue, Wed, Thu, Fri, Sat
  • 15. 8/25/2015 © 2015 RTI 15 “Closures are poor man's objects; Objects are poor man's closure” -- The venerable master Qc Na Source Google images
  • 16. Closure vs Object • Is function a sufficient abstraction for any generator? function () { return blah; } • Answer depends upon your language – No. In Lua, C++, … – Yes. In Haskell 8/25/2015 © 2015 RTI 16
  • 17. The Generator Library 8/25/2015 17 local Gen = require(“generator”) local rangeGen = Gen.rangeGen(20,25) for i=1, 5 do print(rangeGen:generate()) –- 5 values in range(20, 25) end Github: https://github.com/rticommunity/rticonnextdds-ddsl local stepperGen = Gen.stepperGen(1, 10) for i=1, 5 do print(stepperGen:generate()) –- 1, 2, 3, 4, 5 end local infiniteGen = Gen.stepperGen(1, 10, 1, true) while true do print(infiniteGen:generate()) –- 1, 2, 3, 4, ... end
  • 18. The Generator Library 8/25/2015 18 local Gen = require(“generator”) local charGen = Gen.uppercaseGen() local maxLen = 64 local strGen = Gen.stringGen(maxLen, charGen) for i=1, 5 do print(strGen:generate()) -- 5 uppercase strings upto size 64 end Github: https://github.com/rticommunity/rticonnextdds-ddsl sequenceGen is quite similar
  • 19. The Generator library (batteries included) 8/25/2015 © 2015 RTI 19 boolGen posFloatGen emptyGen charGen posDoubleGen singleGen wcharGen floatGen constantGen octetGen doubleGen oneOfGen shortGen lowercaseGen inOrderGen int16Gen uppercaseGen stepperGen int32Gen alphaGen rangeGen int64Gen alphaNumGen seqGen uint16Gen printableGen arrayGen uint32Gen stringGen aggregateGen uint64Gen nonEmptyStringGen enumGen
  • 20. The Generator “Class” • Lua does not have “classes” but that’s not important 8/25/2015 © 2015 RTI 20 local Generator = {} –- an object that will serve as a class function Generator:new(generateImpl) local o = {} o.genImpl = generateImpl -- A method assignment -- some additional metatable manipulation here return o end function Generator:generate() return self.genImpl() end function rangeGen(lo, hi) return Generator:new(function () return math.random(lo, hi) end) end
  • 21. 8/25/2015 © 2015 RTI 21 Source Google images
  • 22. Composing Generators • Producing more complex Generators from one or more simpler Generators 8/25/2015 © 2015 RTI 22 Generator map reduce append where zipMany concatMap take scan
  • 23. Mapping over a generator 8/25/2015 © 2015 RTI 23 local days = { “Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat” } local fiboGen = Gen.fibonacciGen() -- 0 1 1 2 3 5 8 ... local plus1Gen = fiboGen:map(function (i) return i+1 end) -- 1 2 2 3 4 6 9 ... local dayGen = plus1Gen:map(function (j) return days[j] end) -- Sun, Mon, Mon, Tue, Wed, Fri, nil, ... for i=1, 6 do print(dayGen:generate()) -- Sun, Mon, Mon, Tue, Wed, Fri end
  • 24. Zipping generators 8/25/2015 © 2015 RTI 24 local xGen = Gen.stepperGen(0,100) local yGen = Gen.stepperGen(0,200,2) local pointGen = Gen.zipMany(xGen, yGen, function (x, y) return { x, y } end) for i=1, 5 do print(pointGen:generate()) –- {0,0}, {1,2}, {3,4}, ... end
  • 25. Zipping generators 8/25/2015 © 2015 RTI 25 local xGen = Gen.stepperGen(0,100) local yGen = Gen.stepperGen(0,200,2) local colorGen = Gen.oneOfGen({ “RED”, “GREEN”, “BLUE” }) local sizeGen = Gen.constantGen(30) local shapeGen = Gen.zipMany(xGen, yGen, colorGen, sizeGen, function (x, y, color, size) return { x = x, y = y, color = color, shapesize = size } end) • The mandatory Shapes example
  • 26. Using Data Domain Specific Language (DDSL) 8/25/2015 © 2015 RTI 26 local ShapeType = xtypes.struct{ ShapeType = { { x = { xtypes.long } }, { y = { xtypes.long } }, { shapesize = { xtypes.long } }, { color = { xtypes.string(128), xtypes.Key } }, } } local shapeGen = Gen.aggregateGen(ShapeType) for i=1, 5 do print(shapeGen:generate()) –- output next slide end • Use Lua DDSL to define types
  • 27. Five random shapes 8/25/2015 © 2015 RTI 27 COLOR?!
  • 28. Use a Collection of Generators 8/25/2015 © 2015 RTI 28 local ShapeType = xtypes.struct{ ShapeType = { { x = { xtypes.long } }, { y = { xtypes.long } }, { shapesize = { xtypes.long } }, { color = { xtypes.string(128), xtypes.Key } }, } } local shapeGenLib = {} shapeGenLib.x = Gen.stepperGen(0, 100) shapeGenLib.y = Gen.stepperGen(0, 200, 2) shapeGenLib.color = Gen.oneOf({ "RED", "GREEN", "BLUE" }) shapeGenLib.shapesize = Gen.rangeGen(20, 30) local shapeGen = Gen.aggregateGen(ShapeType, shapeGenLib) for i=1, 5 do print(shapeGen:generate()) –- output next slide end
  • 30. In not so distant future… 8/25/2015 © 2015 RTI 30 local ShapeType = xtypes.struct{ ShapeType = { { x = { xtypes.long, xtypes.constraint{ “[ x | x <- stepperGen(0,100) ]” }}}, { y = { xtypes.long, xtypes.constraint{ “[ x*x | x <- stepperGen(0,200,2) ]” }}}, { size = { xtypes.long, xtypes.constraint{ “[ x | x <- rangeGen(20,30) ]” }}}, { color= { xtypes.string(128), xtypes.constraint{ “[ x | x <- constantGen('BLUE') ]” }}} } } • Direct applicability in • MEP  Message Emulation Processes (i.e., generate data) • MCT  Generator expressions may be specified directly in the UI
  • 31. 8/25/2015 © 2015 RTI 31 The Mathematics of the Generator API
  • 32. Generators • General design principal – Create a language to solve a problem – API is the language – Reuse parsing/compilation of the host language (duh!) • The “language” of Generators – Primitive values are basic generators – Complex values are composite generators – All APIs result in some generator • Especially, map, zip, reduce, etc. – I.e., generators form an algebra 8/25/2015 © 2015 RTI 32
  • 33. Algebra A first-class abstraction + Compositional* API 8/25/2015 © 2015 RTI 33 *Composition based on mathematical concepts
  • 34. 8/25/2015 © 2015 RTI 34 What Math Concepts? • Algebraic Structures from Category Theory – Monoid – Monad – Functor – Applicative – Group – Endofunctor • Where to begin? – Haskell – But innocent should start with Scala perhaps
  • 35. 8/25/2015 © 2015 RTI 35 Does it have anything to do with DDS? Yes! Composable API for DDS exists. It’s Rx4DDS Also, RPC-over-DDS (futures). Both are humble beginnings And remember, sky is the limit
  • 36. Next Items • Value constraints in type definitions • Reactive generators • Generators at compile-time (type generators) • (Back to) Testing RefleX API properties 8/25/2015 © 2015 RTI 36
  • 37. Constraints in Data Models • Database Schemas • XSD Restrictions 8/25/2015 © 2015 RTI 37 CREATE TABLE products ( product_no integer UNIQUE NOT NULL, name text, price numeric CHECK (price > 0) ); <xs:element name="age"> <xs:simpleType> <xs:restriction base="xs:integer"> <xs:minInclusive value="0"/> <xs:maxInclusive value="120"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="prodid"> <xs:simpleType> <xs:restriction base="xs:integer"> <xs:pattern value="[0-9][0-9][0-9]"/> </xs:restriction> </xs:simpleType> </xs:element>
  • 38. Constraints in Data Models • STANAG 4607 – Ground Moving Target Indicator • Object Constraint Language – Defined by OMG: part of the UML standard – Huge! 8/25/2015 © 2015 RTI 38
  • 39. In not so distant future… 8/25/2015 © 2015 RTI 39 local ShapeType = xtypes.struct{ ShapeType = { { x = { xtypes.long, xtypes.constraint{ “[ x | x <- stepperGen(0,100) ]” }}}, { y = { xtypes.long, xtypes.constraint{ “[ x*x | x <- stepperGen(0,200,2) ]” }}}, { size = { xtypes.long, xtypes.constraint{ “[ x | x <- rangeGen(20,30) ]” }}}, { color= { xtypes.string(128), xtypes.constraint{ “[ x | x <- constantGen('BLUE') ]” }}} } } • Direct applicability in • MEP  Message Emulation Processes (i.e., generate data) • MCT  Generator expressions may be specified directly in the UI
  • 40. General Syntax for Data Generation • Mathematical Set Builder Notation • Suggested Generator Syntax – [ x | x <- stepperGen() ] – [ 2*x | x <- fibonacciGen() ] – [ “ID” .. i | i <- stepperGen(1, 256) ] • Translated mechanically to the Generator API – map, flatMap, etc. – List Comprehension in disguise • Python, Haskell has it. Lua does not. 8/25/2015 © 2015 RTI 40
  • 41. Value Dependencies • List Comprehension alone is not sufficient • What if data members have value dependencies – o.y = o.x * o.x – o.len = length(o.somearray) – o.min = minimum(o.somearray) – o.max = maximum(o.somearray) 8/25/2015 © 2015 RTI 41
  • 42. Syntax for Value Dependencies • Generator Syntax seems to work for value dependencies too • Just refer to the generator of the parent attribute – [ a*a | a <- $(x) ] – [ len(a) | a <- $(somearray) ] – [ min(point.x) | point <- t, t <- $(trajectory) ] (Assuming trajectory is an array of points ) 8/25/2015 © 2015 RTI 42
  • 43. Pull Generators aren’t enough • Pull Generators don’t handle dependencies well – At least not without state – Requires multiple passes through state for every generated sample • Seems expensive – Dependencies must be “interpreted” for every sample • I.e., needs to refer type description to do its job • Dependencies can’t be “compiled” for performance – A relatively simple and powerful alternative exists 8/25/2015 © 2015 RTI 43
  • 44. How dependencies break • The ShapeType generator asks leaf generators to produce a new value. • Dependencies are immediately lost 8/25/2015 © 2015 RTI 44 X Y ShapeType Y = X2 Circle represents a generator not state
  • 45. Reactive Generators • Work “just like DDS!” • Propagate values “downstream” – Push-based instead of pull-based • Subject-Observer (pub/sub) pattern – A single value is propagated to one or more dependent attributes • Dependent generators take the “right” action – Such as doubling the value, counting min, etc. • map, flatmap, reduce etc. work exactly like pull generators • Composable – Generator expressions can be mechanically translated to reactive generator API 8/25/2015 © 2015 RTI 45
  • 46. Basics of Reactive Generators 8/25/2015 © 2015 RTI 46 class Generator<T> { void listen(callback); }; Where callback is a closure callback = function (t) { // provided by the user } You can register multiple callbacks
  • 47. Create Listen Push Dispose Lifecycle of a reactive (push) generator n n Create a Pull Generator Subject transform, … Optional
  • 48. Composing Reactive Generators • Producing more complex Generators from one or more simpler Generators 8/25/2015 © 2015 RTI 48 ReactGen map reduce append where zipMany concatMap take scan
  • 50. Back to Property-based Testing in RefleX 8/25/2015 © 2015 RTI 50
  • 51. Round-trip property-test for ShapeType 8/25/2015 © 2015 RTI 51 void test_roundtrip_shape(const ShapeType & in) { ShapeType out; // empty DDS::DynamicData dd(...); // empty reflex::write_dynamicdata(dd, in); reflex::read_dynamicdata(out, dd) assert(in == out); } • The assertion must hold for all instances. void test_many_shapes() { auto generator = gen::make_aggregate_gen<ShapeType>(); for (int i = 0;i < 100; ++i) { test_roundtrip_shapetype(gen.generate()); } }
  • 52. A generic property-test in RefleX 8/25/2015 © 2015 RTI 52 template <class T> void test_roundtrip_property(const T & in) { T out; // empty DDS::DynamicData dd(...); // empty reflex::update_dynamicdata(dd, in); reflex::read_dynamicdata(out, dd) assert(in == out); } • What are the input types? • Given a type, how to produce data?
  • 53. Random Types at Compile-time 8/25/2015 © 2015 RTI 53 Random Numbers at Compile-time if we can generate
  • 54. Random Numbers at Compile-time • Demo – In C – Then in C++ 8/25/2015 © 2015 RTI 54 Live code
  • 55. Linear Feedback Shift Register (LFSR) • Simple random number generator • 4 bit Fibonacci LFSR • Feedback polynomial = X4 + X3 + 1 • Taps 4 and 3 8/25/2015 © 2015 RTI 55
  • 56. Linear Feedback Shift Register (LFSR) • Live code feedback polynomial (16 bit) – X16 + X14 + X13 + X11 + 1 • Taps: 16, 14, 13, and 11 8/25/2015 © 2015 RTI 56
  • 57. Type Generators Demystified • Random seed as command line #define • Compile-time random numbers using LFSR • C++ meta-programming for type synthesis • std::string generator for type names and member names • RefleX to map types to typecode and dynamic data 8/25/2015 © 2015 RTI 57
  • 58. RefleX Property-test Type Generator • “Good” Numbers – 31415 (3 nested structs) – 32415 (51 nested structs) – 2626 (12 nested structs) – 10295 (15 nested structs) – 21525 (41 nested structs) – 7937 ( 5 nested structs) – ... • “Bad” Numbers – 2152 (test seg-faults) sizeof(tuple) > 2750 KB! 8/25/2015 © 2015 RTI 58 Github: https://github.com/rticommunity/rticonnextdds-reflex/blob/develop/test/generator
  • 59. Thank You! 8/25/2015 © 2015 RTI 59