You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <ui...@incubator.apache.org> on 2006/11/15 03:39:36 UTC

[jira] Created: (UIMA-25) Implement better support for arrays of Feature Structures

Implement better support for arrays of Feature Structures
---------------------------------------------------------

                 Key: UIMA-25
                 URL: http://issues.apache.org/jira/browse/UIMA-25
             Project: UIMA
          Issue Type: Improvement
          Components: Core Java Framework
            Reporter: Marshall Schor


The code for subsumes treats FSArray special:
       // Yes, the code below is intentional. Until we actually support real
        // arrays of some
        // particular fs,
        // we have FSArray is the supertype of xxxx[] AND
        // xxx[] is the supertype of FSArray
        // (this second relation because all we can generate are instances of
        // FSArray
        // and we must be able to assign them to xxx[] )
This is illogical, and should be fixed somehow.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Created: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by Thilo Goetz <tw...@gmx.de>.
Marshall, do you recall why we put that code there?  I only have a vague 
recollection that something was broken without this weird condition.

In general, how are we going to proceed with the array stuff? 
Can/should we drop support for the old array names and simply move to 
the new scheme?  Is that too drastic?  What we could try to do would be 
to allow the old names as alternatives, but internally use the new ones 
exclusively.  Thoughts?

--Thilo

Marshall Schor (JIRA) wrote:
> Implement better support for arrays of Feature Structures
> ---------------------------------------------------------
> 
>                  Key: UIMA-25
>                  URL: http://issues.apache.org/jira/browse/UIMA-25
>              Project: UIMA
>           Issue Type: Improvement
>           Components: Core Java Framework
>             Reporter: Marshall Schor
> 
> 
> The code for subsumes treats FSArray special:
>        // Yes, the code below is intentional. Until we actually support real
>         // arrays of some
>         // particular fs,
>         // we have FSArray is the supertype of xxxx[] AND
>         // xxx[] is the supertype of FSArray
>         // (this second relation because all we can generate are instances of
>         // FSArray
>         // and we must be able to assign them to xxx[] )
> This is illogical, and should be fixed somehow.
> 
> 

[jira] Assigned: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz reassigned UIMA-25:
-------------------------------

    Assignee: Thilo Goetz

> Implement better support for arrays of Feature Structures
> ---------------------------------------------------------
>
>                 Key: UIMA-25
>                 URL: https://issues.apache.org/jira/browse/UIMA-25
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>         Assigned To: Thilo Goetz
>
> The code for subsumes treats FSArray special:
>        // Yes, the code below is intentional. Until we actually support real
>         // arrays of some
>         // particular fs,
>         // we have FSArray is the supertype of xxxx[] AND
>         // xxx[] is the supertype of FSArray
>         // (this second relation because all we can generate are instances of
>         // FSArray
>         // and we must be able to assign them to xxx[] )
> This is illogical, and should be fixed somehow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz closed UIMA-25.
---------------------------

    Resolution: Fixed

I've removed the comment and the corresponding code.  The core test cases still go through.  I do not really understand what the code and comment were there for, though.  If anybody has any issues with my changes, let me know.


> Implement better support for arrays of Feature Structures
> ---------------------------------------------------------
>
>                 Key: UIMA-25
>                 URL: https://issues.apache.org/jira/browse/UIMA-25
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>         Assigned To: Thilo Goetz
>
> The code for subsumes treats FSArray special:
>        // Yes, the code below is intentional. Until we actually support real
>         // arrays of some
>         // particular fs,
>         // we have FSArray is the supertype of xxxx[] AND
>         // xxx[] is the supertype of FSArray
>         // (this second relation because all we can generate are instances of
>         // FSArray
>         // and we must be able to assign them to xxx[] )
> This is illogical, and should be fixed somehow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by Adam Lally <al...@alum.rpi.edu>.
On 12/7/06, Thilo Goetz <tw...@gmx.de> wrote:
><snip/>
>
> I appreciate your comments about the Java collection framework.  We've
> talked about this on and off, but it never really went anywhere.  Is
> this something we might want to support in JCas?  That would seem like a
> good place for it.
>
> Opinions?
>

I think it is reasonable for FSArray to provide an iterator() method
for both JCAS and CAS.  The only reason I could think of for not
wanting to do it in CAS is to keep the CAS APIs as similar as possible
to the C++ CAS APIs.  But I think we may want some flexibility there
to do some simple things that make Java programmers' lives easier.

A stickier question is whether FSArray should implement Collection.
It could only be an unmodifiable Collection since arrays are fixed
sized.  An advantage of implementing Collection is that users on Java
5 could use the new for(element : collection) construction, but we
still remain 1.4-compatible.

FSList could definitely implement Collection since add() and remove()
can be implemented.  (This would be in JCAS, since I don't believe we
have a special Java class for FSList in CAS - it's just treated as an
ordinary FeatureStructure.)

-Adam

Re: [jira] Commented: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by Thilo Goetz <tw...@gmx.de>.
Greg Holmberg (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/UIMA-25?page=comments#action_12456189 ] 
>             
> Greg Holmberg commented on UIMA-25:
> -----------------------------------
> 
> This may not be exactly what Marshall is referring to, but I found it surprising that FSArray doesn't provide or implement FSIterator.
> 
> An FSArrayIterator class would be easy to implement.  Keep an int that indexes the array.  hasNext() checks if the index is less than the size, next() does an array.get() on the index and increments it.  And so on.
> 
> In general, it would be nice if all the arrays, lists, iterators, etc in UIMA implemented the standard Java Collection package interfaces.  Even better if UIMA moved to Java 5 and parameterized its collection classes with the member type (i.e. use generics).

Hi Greg,

a large part of the industry is still on Java 1.4, and we think we can't 
drop 1.4 support just yet.

I appreciate your comments about the Java collection framework.  We've 
talked about this on and off, but it never really went anywhere.  Is 
this something we might want to support in JCas?  That would seem like a 
good place for it.

Opinions?

--Thilo


[jira] Commented: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by "Greg Holmberg (JIRA)" <ui...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/UIMA-25?page=comments#action_12456189 ] 
            
Greg Holmberg commented on UIMA-25:
-----------------------------------

This may not be exactly what Marshall is referring to, but I found it surprising that FSArray doesn't provide or implement FSIterator.

An FSArrayIterator class would be easy to implement.  Keep an int that indexes the array.  hasNext() checks if the index is less than the size, next() does an array.get() on the index and increments it.  And so on.

In general, it would be nice if all the arrays, lists, iterators, etc in UIMA implemented the standard Java Collection package interfaces.  Even better if UIMA moved to Java 5 and parameterized its collection classes with the member type (i.e. use generics).

> Implement better support for arrays of Feature Structures
> ---------------------------------------------------------
>
>                 Key: UIMA-25
>                 URL: http://issues.apache.org/jira/browse/UIMA-25
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>
> The code for subsumes treats FSArray special:
>        // Yes, the code below is intentional. Until we actually support real
>         // arrays of some
>         // particular fs,
>         // we have FSArray is the supertype of xxxx[] AND
>         // xxx[] is the supertype of FSArray
>         // (this second relation because all we can generate are instances of
>         // FSArray
>         // and we must be able to assign them to xxx[] )
> This is illogical, and should be fixed somehow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Reopened: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by Marshall Schor <ms...@schor.com>.
I'll add a test case for this.  It should pass with the code as is, but 
fail if the strange piece of code Thilo took out before is taken out again.

The test will be put in src/test/java/ 
org.apache.uima.cas.test.TypeSystemTest, in the method testArrayTypes().
You can see the last line now commented out on purpose for the strange 
work-around approach.

-Marshall


[jira] Reopened: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz reopened UIMA-25:
-----------------------------


Reverted changes as the true solution needs more work.  Defer till after 2.1 release.

> Implement better support for arrays of Feature Structures
> ---------------------------------------------------------
>
>                 Key: UIMA-25
>                 URL: https://issues.apache.org/jira/browse/UIMA-25
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>         Assigned To: Thilo Goetz
>
> The code for subsumes treats FSArray special:
>        // Yes, the code below is intentional. Until we actually support real
>         // arrays of some
>         // particular fs,
>         // we have FSArray is the supertype of xxxx[] AND
>         // xxx[] is the supertype of FSArray
>         // (this second relation because all we can generate are instances of
>         // FSArray
>         // and we must be able to assign them to xxx[] )
> This is illogical, and should be fixed somehow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz closed UIMA-25.
---------------------------


The whole parametric array implementation is screwed up and needs to be fixed.  This is just an epiphenomenon.


> Implement better support for arrays of Feature Structures
> ---------------------------------------------------------
>
>                 Key: UIMA-25
>                 URL: https://issues.apache.org/jira/browse/UIMA-25
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>            Assignee: Thilo Goetz
>
> The code for subsumes treats FSArray special:
>        // Yes, the code below is intentional. Until we actually support real
>         // arrays of some
>         // particular fs,
>         // we have FSArray is the supertype of xxxx[] AND
>         // xxx[] is the supertype of FSArray
>         // (this second relation because all we can generate are instances of
>         // FSArray
>         // and we must be able to assign them to xxx[] )
> This is illogical, and should be fixed somehow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (UIMA-25) Implement better support for arrays of Feature Structures

Posted by "Thilo Goetz (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thilo Goetz resolved UIMA-25.
-----------------------------

    Resolution: Later

We'll think about this after 2.1 again.

> Implement better support for arrays of Feature Structures
> ---------------------------------------------------------
>
>                 Key: UIMA-25
>                 URL: https://issues.apache.org/jira/browse/UIMA-25
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>            Reporter: Marshall Schor
>         Assigned To: Thilo Goetz
>
> The code for subsumes treats FSArray special:
>        // Yes, the code below is intentional. Until we actually support real
>         // arrays of some
>         // particular fs,
>         // we have FSArray is the supertype of xxxx[] AND
>         // xxx[] is the supertype of FSArray
>         // (this second relation because all we can generate are instances of
>         // FSArray
>         // and we must be able to assign them to xxx[] )
> This is illogical, and should be fixed somehow.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira