Hi Richard,
I’ve pushed a new version of CQL (cql.jar only, didn’t update cqlAlt.jar) that partially addresses this issue. There was a now-fixed error in the Rext code, but that wasn't the only problem.
The following code works just fine now:
typeside T = literal {
types Integer Boolean
constants "1" : Integer true : Boolean
functions
isLess : Integer, Integer -> Boolean}
schema S = literal : T {
entities
table
attributes
value : table -> Integer}
query Q = simple : S {
from
t : tablewhere
isLess(t.value, "1") = true
attributes
value -> t.value}
query id = identity S
query R = rext identity S Q
As does the above code with the following type side:
typeside T = literal {
imports sql
external_functions
isLess : Integer, Integer -> Boolean = "(x,y)=>java.util.Optional.of(true)"
equations
forall x y . isLess(x,y) = true
}
However, if you omit the equation in T, you still get an anomaly:
Error in query R: java.lang.RuntimeException: Anomaly: not equal: (inr (id0, value) isLess 1) and true
I’m not sure if this is due to an inherent limitation of how CQL’s theorem proving works in a mixed user-defined-function / axiom environment, or if this is a programming error, but I’ll continue to investigate.
Ryan
> To view this discussion on the web visit
https://groups.google.com/d/msgid/categoricaldata/e2f8d360-5c7e-4c20-9a9c-5244dfa51f0dn%40googlegroups.com.