From marcoxa at cs.nyu.edu Tue Oct 25 19:21:56 2005 From: marcoxa at cs.nyu.edu (Marco Antoniotti) Date: Tue, 25 Oct 2005 15:21:56 -0400 Subject: [cl-unification-devel] Bugreport In-Reply-To: <053fa70c64d63f5881234c912dafae4b@cs.nyu.edu> References: <583364235@web.de> <053fa70c64d63f5881234c912dafae4b@cs.nyu.edu> Message-ID: <9972eb49282948dc1aaf9f1e47bc0040@cs.nyu.edu> Hi it took a long time, but I added two bugfixes to the CVS. One is the one reported by Norman Werner here, and the other is a minor test in the checking of the number of default clauses in MATCHING. Cheers -- Marco On Aug 25, 2005, at 11:23 AM, Marco Antoniotti wrote: > Ok. This is an easy one. > > Marco > > > On Aug 25, 2005, at 12:57 AM, norman werner wrote: > >> >> it is not an unification-error. >> On sbcl it is >> >> "debugger invoked on a SB-KERNEL:BOUNDING-INDICES-BAD-ERROR in thread >> 2890: >> The bounding indices 0 and 2 are bad for a sequence of length 1." >> >> However this will almost certainly depend on the lisp used. >> >> Norman >> >> ______________________________________________________________________ >> ___ >> Mit der Gruppen-SMS von WEB.DE FreeMail k?nnen Sie eine SMS an alle >> Freunde gleichzeitig schicken: >> http://freemail.web.de/features/?mc=021179 >> >> >> > -- > Marco Antoniotti http://bioinformatics.nyu.edu > NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 > 715 Broadway 10th FL fax. +1 - 212 - 998 3484 > New York, NY, 10003, U.S.A. > > _______________________________________________ > cl-unification-devel site list > cl-unification-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-unification-devel > -- Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A. From marcoxa at cs.nyu.edu Thu Oct 27 15:21:12 2005 From: marcoxa at cs.nyu.edu (Marco Antoniotti) Date: Thu, 27 Oct 2005 11:21:12 -0400 Subject: [cl-unification-devel] Re: cl-unification on CMUCL19b In-Reply-To: References: Message-ID: Hi thanks for the interest. On Oct 26, 2005, at 7:11 PM, karol skocik wrote: > Hi Marco, > I started to play with your cl-unification library on > CMUCL19b/Linux, but for some unknown reasons most of the examples on > the web documentation does not work. > Actually almost all templates except list and vector. Structure > templates return mostly empty environment where they should return > normal env. Nope. An "empty" environment is just an environment with no bindings. Technically the choice has been for UNIFY to return an environment (empty or not) on success and to signal an UNIFICATION-FAILURE condition otherwise. > For example this: > > foo1 is the same as your foo class : > (defclass foo1 () ((a :initform 42 :accessor foo1-a))) > CL-USER> (unify (make-instance 'foo1) #T(foo1 foo1-a 42)) > # This is correct. Try (unify '(1 2 3) '(1 2 3)) you will see that it returns an empty environment as well. > > while this is ok : > CL-USER> (unify (make-instance 'baz :b '?e) #T(baz bazb 42)) > # > CL-USER> (find-variable-value '?e *) > 42 > T This is also correct. > after changing the declarations : > CL-USER> (defstruct foo () (a 42)) > Warning: Change in instance length of class FOO: > current length: 4 > new length: 3 > Warning: Previously loaded FOO accessors will no longer work. > FOO > CL-USER> (defstruct (baz (:include foo)) (b 33)) > Warning: > Change in superclasses of class # {58A47025}>: > current superclasses: (T PCL::SLOT-OBJECT STANDARD-OBJECT) > new superclasses: (T INSTANCE STRUCTURE-OBJECT FOO) > Warning: > Previously loaded # {58A47025}> accessors will no longer work. > Warning: > Changing meta-class of BAZ from KERNEL::STANDARD-CLASS to > KERNEL::STRUCTURE-CLASS. > BAZ > > this also return empty env : > CL-USER> (unify (make-foo) #T(foo foo-a 42)) > # > > for example this : > CL-USER> (unify (make-instance 'baz :b '?e) #T(baz bazb 42)) > makes this error : > Invalid initialization argument > :B > in call for class #. This is unrelated. You have changed a class to a structure. The constructor no longer works. > from the others templates like : > CL-USER> (unify "asdfasdfasdf" #T(elt 3 ?x)) > Error in function (METHOD UNIFY NIL > (VECTOR CL.EXT.DACF.UNIFICATION::TEMPLATE)): > Cannot unify a vector with a non-vector template: "asdfasdfasdf" > #T(ELT 3 > > ?X). > [Condition of type CL.EXT.DACF.UNIFICATION::UNIFICATION-FAILURE] This seems like a bug. Thanks for reporting it. > CL-USER> (unify '(0 1 42 3 4 5) #T(nth 2 ?x)) > Error in function (METHOD UNIFY NIL (LIST > CL.EXT.DACF.UNIFICATION::TEMPLATE)): > Cannot unify a list with a non-list template: (0 1 42 3 4 5) #T(NTH > 2 ?X). > [Condition of type CL.EXT.DACF.UNIFICATION::UNIFICATION-FAILURE] This seems like a bug too. > ... in the attachment is the whole session (without error messages - > is there any way to output them to REPL instead just "Evaluation > aborted" ?) and also compile log. What might be a problem? Don't worry > about that if you are busy. I am just playing & studying some nice > lisp libs. After serious procedural brain damage I suffered on my > "university", lisp is a showing me how deep the rabbit hole goes :) Thanks again for the interest. I will go into the code and see what can be done with the two bugs you reported. You are most definitively welcome to dig in :) Cheers Marco PS. please join the cl-unification-devel mailoing list. It is best for these discussions to go on. -- Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A.