Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[p4-feedback] Why does the expression editor remove essential parentheses?

Nick Drummond nick.drummond at cs.manchester.ac.uk
Mon Apr 20 05:35:52 PDT 2009


Hi Patrick,

I just looked at this and I think the issue is just the rendering. Or
appears to have greater precedence than and in the Man Syntax.

A and B or C is parsed as

A and (B or C)

We should probably retain the brackets to make this clearer (as it depends
what your background is whether this is intuitive - C has && as higher
precedence for example).

The reason the rendering changes on a reload is p4 remembers the expression
as you typed it until it is restarted.

Nick

2009/4/16 Patrick McCrae <patrick.mccrae at informatik.uni-hamburg.de>

>  Hi, List -
>
> I just noticed an editor phenomenon of which I am inclined to believe it is
> a bug.
>
> When I include the following 'Equivalent Classes' expression, the outer
> parentheses after the first 'and' get removed when I save, close and re-open
> the ontology.
>
> My Input:
>
> Situation.Concept
> and (     (  not (has_AGENT some Thing)
>              and has_RECIPIENT exactly 1 Entity.Concept
>              and has_THEME exactly 1 Entity.Concept
>           )
>           or
>           (  not (has_RECIPIENT some Thing)
>              and has_AGENT exactly 1 Entity.Concept
>              and has_THEME exactly 1 Entity.Concept
>           )
>           or
>           (  not (has_THEME some Thing)
>              and has_AGENT exactly 1 Entity.Concept
>              and has_RECIPIENT exactly 1 Entity.Concept
>           )
>      )
>
>
> Received Output after saving, closing and re-opening the ontology:
>
> Situation.Concept
> and       (  not (has_AGENT some Thing)
>              and has_RECIPIENT exactly 1 Entity.Concept
>              and has_THEME exactly 1 Entity.Concept
>           )
>           or
>           (  not (has_RECIPIENT some Thing)
>              and has_AGENT exactly 1 Entity.Concept
>              and has_THEME exactly 1 Entity.Concept
>           )
>           or
>           (  not (has_THEME some Thing)
>              and has_AGENT exactly 1 Entity.Concept
>              and has_RECIPIENT exactly 1 Entity.Concept
>           )
>
> The resulting logical expression clearly is not equivalent to the original
> one which contain the parentheses. I am assuming some of the incorrect
> categorisation results I obtain are caused by this re-write.
>
> Is this a problem with the expression editor?
>
> Best regards -
>
> Pat
>
>
> P. S.: I attach the ontology in which I observed the problem. The specific
> class from which the example is taken is Thing > Ontological.Concept >
> Situation.Concept > Binary.Situation. _______________________
>
>  Patrick McCrae
> <http://cinacs.informatik.uni-hamburg.de/index.php?option=com_content&task=view&id=17&Itemid=85>
>
> CINACS Graduate Research Group
> Department of Informatics
> Hamburg University
> Vogt-Kölln-Straße 30
> 22527 Hamburg, Germany
>
> patrick.mccrae at informatik.uni-hamburg.de
> fon: +49 . 40 . 428 83 - 23 60
> fax: +49 . 40 . 428 83 - 25 15
>
> _______________________________________________
> p4-feedback mailing list
> p4-feedback at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/p4-feedback/attachments/20090420/4cb51bfd/attachment.html>


More information about the p4-feedback mailing list