[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: centaur mailing list / bug report



=> Why does the VTP formalism hasn't been implemented entirely on the
=> basis of LeLisp objects? 

As far as I know, the vtp is implemented using lists instead of typed vectors
for efficiency reasons. Work is beeing done within the project to realize a
fully object oriented implementation of the VTP.  

=> And here is a bug report: 
=> 
=> Consider the following function to parse and attach a tree to
=> a given  ctedit, say current-ctedit:
=> 
=> (defun my-parse (file ctedit formalism)
=>   (let ((parsed-tree ({parser}:tree file ({name}:formalism formalism) ".")))
=>     (send 'set-variable ctedit parsed-tree)
=>     't))
=> 
=> ;; Fol stands for First Order Logic
=> ? (my-parse "test1.Fol" current-ctedit 'Fol) 
=> = t
=> 
=> Looks not to bad to me, but now I select from the menu bar the
=> "Display" menu and choose first the "Redisplay" and then the "Redraw"
=> items.  This makes appear the following error messages in the centaur
=> window:
=> 
=> ? ** sun4 : erreur de la machine : erreur de bus
=> = ()
=> ? ** sun4 : erreur de la machine : violation de segment
=> = ()

=> Looks like a bug to me, doesn't it? 

You made a mistake : a {tree} and a {variable} are different objects. You
should call set-variable with a {variable} argument, not a {tree}. See the
core/centaur_paths documentation to get information about what is a {variable}
and how you can use it.

Here is a corrected version of your parse function.

(defun my-parse (file ctedit formalism)
  (let ((parsed-tree ({parser}:tree file ({name}:formalism formalism) ".")))
     (send 'set-variable ctedit ({variable}:make parsed-tree))
     't))

Vincent Prunet