clojure-rte issues
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues
2020-12-13T11:36:06+01:00
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/70
ERROR in (t-rte-not-random) (rte_construct.clj:933) Uncaught exception, not i...
2020-12-13T11:36:06+01:00
Jim Newton
ERROR in (t-rte-not-random) (rte_construct.clj:933) Uncaught exception, not in assertion.
```
[:rte (:or (:and (:cat (:cat (:not :epsilon)) (member 1 a)) (:or (:? (:or)) (:and (satisfies keyword?))) (:not :sigma)) :empty-set (:not :sigma) (:cat (:? (:* (:not (:cat)))) (:and :empty-set :sigma) (:? (:* (:? :sigma)))))]
[:rte (:...
```
[:rte (:or (:and (:cat (:cat (:not :epsilon)) (member 1 a)) (:or (:? (:or)) (:and (satisfies keyword?))) (:not :sigma)) :empty-set (:not :sigma) (:cat (:? (:* (:not (:cat)))) (:and :empty-set :sigma) (:? (:* (:? :sigma)))))]
[:rte (:contains-any :empty-set
(:or (:cat (:? :epsilon)
(:cat (:* (:not :sigma))))
:sigma
(:contains-any :epsilon
(:and (member (1 2 3) (2 1 3)))))
:epsilon
(satisfies seq?))]
lein test :only clojure-rte.rte-tester-test/t-rte-not-random
ERROR in (t-rte-not-random) (rte_construct.clj:933)
Uncaught exception, not in assertion.
expected: nil
actual: clojure.lang.ExceptionInfo: cannot compute derivative of overlapping types because clojure.lang.ISeq is not a subtype of (member (1 2 3) (2 1 3))
{:error-type :derivative-undefined,
:wrt clojure.lang.ISeq,
:expr (member (1 2 3) (2 1 3)),
:sub-types [{:type (and clojure.lang.ISeq (member (1 2 3) (2 1 3)))}
{:type (and clojure.lang.ISeq (not (member (1 2 3) (2 1 3))))}]}
at clojure_rte.rte_construct$derivative$fn__3067.invoke (rte_construct.clj:933)
clojure_rte.rte_construct$traverse_pattern$if_multiple_operands__2921.invoke (rte_construct.clj:501)
clojure_rte.rte_construct$traverse_pattern.invokeStatic (rte_construct.clj:516)
clojure_rte.rte_construct$traverse_pattern.invoke (rte_construct.clj:426)
clojure_rte.rte_construct$traverse_pattern.invokeStatic (rte_construct.clj:436)
clojure_rte.rte_construct$traverse_pattern.invoke (rte_construct.clj:426)
clojure_rte.rte_construct$derivative.invokeStatic (rte_construct.clj:915)
clojure_rte.rte_construct$derivative.invoke (rte_construct.clj:895)
clojure_rte.rte_construct$derivative$walk__3061$fn__3062.invoke (rte_construct.clj:901)
clojure.core$map$fn__5851.invoke (core.clj:2753)
clojure.lang.LazySeq.sval (LazySeq.java:42)
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/66
FAIL in (t-inhabited-random) (genus_test.clj:427)
2020-11-20T23:28:05+01:00
Jim Newton
FAIL in (t-inhabited-random) (genus_test.clj:427)
```
FAIL in (t-inhabited-random) (genus_test.clj:427)
checking some randomly generated types for inhabited?
(and (not (member a b))
(and (not (or (= a)
(member [1 2 3] [1 2] [1] [])))
(or (and (satisfie...
```
FAIL in (t-inhabited-random) (genus_test.clj:427)
checking some randomly generated types for inhabited?
(and (not (member a b))
(and (not (or (= a)
(member [1 2 3] [1 2] [1] [])))
(or (and (satisfies decimal?)
(member a b))
(or (member a b c)
(member a b c a b c)))))
is not inhabited but its canonicalized form is (member a b c c)
expected: (not= true inh-2)
actual: (not (not= true true))
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/65
disjoint? cannot decide (and Long (not (= 0))) vs Long -- assuming not disjoint
2020-11-13T11:07:29+01:00
Jim Newton
disjoint? cannot decide (and Long (not (= 0))) vs Long -- assuming not disjoint
```
disjoint? cannot decide (and Long (not (= 0))) vs Long -- assuming not disjoint
disjoint? cannot decide (and Number (not (= 0))) vs Number -- assuming not disjoint
disjoint? cannot decide (and Number (not Long) (not (= 0))) vs Number...
```
disjoint? cannot decide (and Long (not (= 0))) vs Long -- assuming not disjoint
disjoint? cannot decide (and Number (not (= 0))) vs Number -- assuming not disjoint
disjoint? cannot decide (and Number (not Long) (not (= 0))) vs Number -- assuming not disjoint
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/64
rename rte-compile to rte/compile
2020-11-09T10:29:03+01:00
Jim Newton
rename rte-compile to rte/compile
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/63
rename rte-match to match
2020-11-06T12:01:18+01:00
Jim Newton
rename rte-match to match
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/62
alias gns and rte even in genus and rte-construct namespaces
2020-11-06T11:48:24+01:00
Jim Newton
alias gns and rte even in genus and rte-construct namespaces
this allows us to use gns/and? and rte/and? in all files, even in genus.clj and rte_construct.clj
this allows us to use gns/and? and rte/and? in all files, even in genus.clj and rte_construct.clj
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/61
rename rte-expand to expand-1
2020-11-06T11:20:23+01:00
Jim Newton
rename rte-expand to expand-1
this allows us to have a top level function which calls expand-1 within a call to fixed point
and allows for better testing.
this allows us to have a top level function which calls expand-1 within a call to fixed point
and allows for better testing.
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/60
disjoint? cannot decide
2020-11-05T16:35:00+01:00
Jim Newton
disjoint? cannot decide
```
disjoint? cannot decide (and Boolean (rte (:cat String :sigma))) vs Boolean -- assuming not disjoint
disjoint? cannot decide (and (rte (:cat String :sigma)) String) vs String -- assuming not disjoint
```
```
disjoint? cannot decide (and Boolean (rte (:cat String :sigma))) vs Boolean -- assuming not disjoint
disjoint? cannot decide (and (rte (:cat String :sigma)) String) vs String -- assuming not disjoint
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/59
Eliminate registered-type?
2020-11-09T10:30:24+01:00
Jim Newton
Eliminate registered-type?
registering a type with rte is problematic.
Can't rte just assume that any unknown form is a type designator?
registering a type with rte is problematic.
Can't rte just assume that any unknown form is a type designator?
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/58
eliminate 1-arg version of inhabited?
2020-11-03T11:31:12+01:00
Jim Newton
eliminate 1-arg version of inhabited?
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/57
remove unused error cases from subtype? etc.
2020-11-03T11:57:23+01:00
Jim Newton
remove unused error cases from subtype? etc.
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/56
eliminate 2-ary function gns/type-equivalent?
2020-11-03T11:06:06+01:00
Jim Newton
eliminate 2-ary function gns/type-equivalent?
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/55
eliminate 2-ary function gns/subtype?
2020-11-03T10:43:24+01:00
Jim Newton
eliminate 2-ary function gns/subtype?
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/54
eliminate 2-ary function gns/disjoint?
2020-11-03T10:02:08+01:00
Jim Newton
eliminate 2-ary function gns/disjoint?
Changing the 3rd argument from a function to a symbol.
This simplifies the call site.
The 3rd argument may now be true, false, :dont-know, or :warn
Changing the 3rd argument from a function to a symbol.
This simplifies the call site.
The 3rd argument may now be true, false, :dont-know, or :warn
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/53
FAIL in (t-canonicalize-and) (genus_test.clj:337)
2020-11-02T14:58:39+01:00
Jim Newton
FAIL in (t-canonicalize-and) (genus_test.clj:337)
```
FAIL in (t-canonicalize-and) (genus_test.clj:337)
canonicalize-type and
test 2
expected: (= (quote (member 1.0 2.0))
(gns/canonicalize-type (quote (and Double (member 1.0 2.0 "a" "b")))))
actual: (not (= (member 1.0 2...
```
FAIL in (t-canonicalize-and) (genus_test.clj:337)
canonicalize-type and
test 2
expected: (= (quote (member 1.0 2.0))
(gns/canonicalize-type (quote (and Double (member 1.0 2.0 "a" "b")))))
actual: (not (= (member 1.0 2.0)
(= 1.0)))
lein test :only clojure-rte.genus-test/t-canonicalize-or
FAIL in (t-canonicalize-or) (genus_test.clj:344)
canonicalize-type or
test 0
expected: (= (gns/canonicalize-type (quote (or Double (member 1.0 2.0 "a" "b"))))
(quote (or Double (member "a" "b"))))
actual: (not (= (or Double (= "a"))
(or Double (member "a" "b"))))
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/52
FAIL in (t-dnf) (bdd_test.clj:243) dnf by serialization out and in
2020-11-02T16:35:07+01:00
Jim Newton
FAIL in (t-dnf) (bdd_test.clj:243) dnf by serialization out and in
```
FAIL in (t-dnf) (bdd_test.clj:243)
dnf by serialization out and in
failed: serialized-1 <: serialized-2, dnf serialization failed on
#<Bdd (member -1 0 1) #<Bdd (member 0 2 4 6) #<Bdd (= 0) #<Bdd (member hello world)> true> #<Bdd (=...
```
FAIL in (t-dnf) (bdd_test.clj:243)
dnf by serialization out and in
failed: serialized-1 <: serialized-2, dnf serialization failed on
#<Bdd (member -1 0 1) #<Bdd (member 0 2 4 6) #<Bdd (= 0) #<Bdd (member hello world)> true> #<Bdd (= 0) #<Bdd Number #<Bdd (member hello world) #<Bdd Character> false> #<Bdd (member hello world)>> true>> #<Bdd (member 0 2 4 6) true #<Bdd (= 0) #<Bdd Number #<Bdd Character> true> true>>>, (or (and (not (member -1 0 1)) (not (member 0 2 4 6))) (and (not (member -1 0 1)) (member 0 2 4 6)) (and (member -1 0 1) (not (member 0 2 4 6))) (and (member -1 0 1) (member 0 2 4 6) (not (= 0)))) != (or (not (member -1 0 1)) (and (member -1 0 1) (not (member 0 2 4 6))))
expected: (bdd/type-subtype? serialized-1 serialized-2)
actual:
(not
(bdd/type-subtype? (or (and (not (member -1 0 1))
(not (member 0 2 4 6)))
(and (not (member -1 0 1))
(member 0 2 4 6))
(and (member -1 0 1)
(not (member 0 2 4 6)))
(and (member -1 0 1)
(member 0 2 4 6)
(not (= 0))))
(or (not (member -1 0 1))
(and (member -1 0 1)
(not (member 0 2 4 6))))))
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/51
FAIL in (t-inhabited) (genus_test.clj:278)
2020-11-02T15:00:51+01:00
Jim Newton
FAIL in (t-inhabited) (genus_test.clj:278)
```
FAIL in (t-inhabited) (genus_test.clj:278)
inhabited?
expected: (gns/inhabited? (quote (and Number (not (member 1 2 3)))) (constantly false))
actual: (not (gns/inhabited? (and Number (not (member 1 2 3))) #object[clojure.core$const...
```
FAIL in (t-inhabited) (genus_test.clj:278)
inhabited?
expected: (gns/inhabited? (quote (and Number (not (member 1 2 3)))) (constantly false))
actual: (not (gns/inhabited? (and Number (not (member 1 2 3))) #object[clojure.core$constantly$fn__5657 0x141cfa4a "clojure.core$constantly$fn__5657@141cfa4a"]))
lein test :only clojure-rte.genus-test/t-subtype?-and
FAIL in (t-subtype?-and) (genus_test.clj:245)
subtype? and
test 4
expected: (not (gns/subtype? (quote (and Long (not (member 0 2 4 6)))) (quote (not Long)) (constantly :dont-know)))
actual: (not (not :dont-know))
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/50
disjoint? cannot decide assuming not disjoint
2020-10-30T09:31:05+01:00
Jim Newton
disjoint? cannot decide assuming not disjoint
```
disjoint? cannot decide (and BigDecimal (not clojure.lang.IMeta)) vs java.lang.Number -- assuming not disjoint
disjoint? cannot decide (and BigDecimal clojure.lang.IMeta) vs java.lang.Number -- assuming not disjoint
disjoint? cannot ...
```
disjoint? cannot decide (and BigDecimal (not clojure.lang.IMeta)) vs java.lang.Number -- assuming not disjoint
disjoint? cannot decide (and BigDecimal clojure.lang.IMeta) vs java.lang.Number -- assuming not disjoint
disjoint? cannot decide (and BigInteger (not clojure.lang.IMeta)) vs java.lang.Number -- assuming not disjoint
disjoint? cannot decide (and clojure.lang.IMeta BigInteger) vs java.lang.Number -- assuming not disjoint
disjoint? cannot decide (and clojure.lang.IMeta clojure.lang.Ratio) vs java.lang.Number -- assuming not disjoint
disjoint? cannot decide (and clojure.lang.Ratio (not clojure.lang.IMeta)) vs java.lang.Number -- assuming not disjoint
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/49
(gns/disjoint? 'Number '(not java.io.Serializable)) is wrong
2020-10-28T17:05:20+01:00
Jim Newton
(gns/disjoint? 'Number '(not java.io.Serializable)) is wrong
Since every Number is Serializable, then Number should be disjoint with (not Serializable),
but the code does not reflect this.
```
clojure-rte.rte-core> (gns/disjoint? 'Number '(not java.io.Serializable))
false
clojure-rte.rte-core> (a...
Since every Number is Serializable, then Number should be disjoint with (not Serializable),
but the code does not reflect this.
```
clojure-rte.rte-core> (gns/disjoint? 'Number '(not java.io.Serializable))
false
clojure-rte.rte-core> (ancestors Number)
#{java.io.Serializable java.lang.Object}
clojure-rte.rte-core>
```
https://gitlab.lre.epita.fr/jnewton/clojure-rte/-/issues/48
not yet implemented: derivative
2020-11-02T18:51:51+01:00
Jim Newton
not yet implemented: derivative
```
887/1000: trying (:or (:cat (:contains-every (:or :sigma) (:? :empty-set)) (:? (:contains-every (:+ (:? (:? (:+ :sigma)))))) (= 0)) java.io.Serializable (:or (:+ (:not (:contains-every))) (:* (:contains-every (satisfies symbol?))) :e...
```
887/1000: trying (:or (:cat (:contains-every (:or :sigma) (:? :empty-set)) (:? (:contains-every (:+ (:? (:? (:+ :sigma)))))) (= 0)) java.io.Serializable (:or (:+ (:not (:contains-every))) (:* (:contains-every (satisfies symbol?))) :epsilon) (:not (:cat (:+ (:? (:? (:? (= (1 2 3)))))) (:not java.lang.Number))))
lein test :only clojure-rte.rte-tester-test/t-rte-not-random
ERROR in (t-rte-not-random) (rte_construct.clj:686)
Uncaught exception, not in assertion.
expected: nil
actual: clojure.lang.ExceptionInfo: not yet implemented: derivative of java.lang.Number wrt (and (not java.io.Serializable) (not (= (1 2 3))))
{:error-type :rte-not-yet-implemented, :pattern java.lang.Number, :wrt (and (not java.io.Serializable) (not (= (1 2 3))))}
at clojure_rte.rte_core$compute_compound_derivative.invokeStatic (rte_construct.clj:686)
clojure_rte.rte_core$compute_compound_derivative.invoke (rte_construct.clj:668)
clojure_rte.rte_core$derivative$fn__2725.invoke (rte_construct.clj:728)
clojure_rte.rte_core$traverse_pattern$if_atom__2564.invoke (rte_construct.clj:228)
clojure_rte.rte_core$traverse_pattern.invokeStatic (rte_construct.clj:315)
clojure_rte.rte_core$traverse_pattern.invoke (rte_construct.clj:200)
clojure_rte.rte_core$traverse_pattern.invokeStatic (rte_construct.clj:210)
clojure_rte.rte_core$traverse_pattern.invoke (rte_construct.clj:200)
clojure_rte.rte_core$derivative.invokeStatic (rte_construct.clj:713)
clojure_rte.rte_core$derivative.invoke (rte_construct.clj:693)
clojure_rte.rte_core$derivative$walk__2719$fn__2720.invoke (rte_construct.clj:699)
clojure.core$map$fn__5851.invoke (core.clj:2755)
clojure.lang.LazySeq.sval (LazySeq.java:42)
clojure.lang.LazySeq.seq (LazySeq.java:51)
clojure.lang.RT.seq (RT.java:531)
clojure.core$seq__5387.invokeStatic (core.clj:137)
clojure.core$dorun.invokeStatic (core.clj:3133)
clojure.core$doall.invokeStatic (core.clj:3148)
clojure.core$doall.invoke (core.clj:3148)
clojure_rte.util$map_eagerly.invokeStatic (util.clj:288)
clojure_rte.util$map_eagerly.doInvoke (util.clj:285)
clojure.lang.RestFn.invoke (RestFn.java:421)
clojure_rte.rte_core$derivative$walk__2719.invoke (rte_construct.clj:698)
clojure_rte.rte_core$derivative$fn__2731.invoke (rte_construct.clj:744)
clojure_rte.rte_core$traverse_pattern$if_exactly_one_operand__2580.invoke (rte_construct.clj:280)
clojure_rte.rte_core$traverse_pattern.invokeStatic (rte_construct.clj:324)
clojure_rte.rte_core$traverse_pattern.invoke (rte_construct.clj:200)
clojure_rte.rte_core$traverse_pattern$if_exactly_one_operand__2580.invoke (rte_construct.clj:277)
clojure_rte.rte_core$traverse_pattern.invokeStatic (rte_construct.clj:324)
clojure_rte.rte_core$traverse_pattern.invoke (rte_construct.clj:200)
clojure_rte.rte_core$traverse_pattern.invokeStatic (rte_construct.clj:210)
```