// Test-case for string matching

.type String <: symbol

.decl inputData  (t:String)
.decl pattern1  (t:String)
.decl pattern2  (t:String)
.decl outputData  (t:String)
.output outputData  ()

outputData(x) :- pattern2(_), pattern1(y), inputData(x), match(y, x), match(y, x).

inputData("a").
inputData("aba").
inputData("ababa").
inputData("aa").
inputData("aaaa").

pattern1("a.*").
pattern2 ("aa").
pattern2 ("aba.*").
