[Attempto] APE Webclient parsing error

Kenneth Jones kennethjone at gmail.com
Sat Jan 2 04:40:51 CET 2010


Norbert,

Thank you for the suggestion.  If fact, I originally started with the
sentence

If p:String-To-Be-Parsed matches  ["drs", "(", Y, ",",  Z, ")"]
and Y is a n:domain-definition
and Z is a n:conditions-definition
then p:String-To-Be-Parsed must be a n:drs-definition.

This is similar to your suggestion but, after looking at your example, I
think I will also play around with the idea of using the noun
"n:string-to-be-parsed" instead of the proper name "p:String-To-Be-Parsed"
and I will keep in mind the use of the phrase "there is a".  Also, I, for
some reason, got it into my head that variables had to be X<n>, Y<n>, or
Z<n>, where <n> is an optional integer.  Being able to use the more
descriptive D and C is very nice.

After I saw that the APE web client would parse the sentence above I started
playing around with the more verbose form I sent you, in order to see how I
might create a logically equivalent sentence without using the list
notation.  I was afraid that non-programmers might balk at the sight of the
list notation because it might look like a construct from a programming
language.  But then, I don't really expect non-programmers to write
specifications for parsers, so this specific sentence shouldn't present a
problem!  I'm glad you added the list notation to ACE; it allows for the
creation of much more concise and readable sentences.

I guess it's obvious that I'm am trying to write a DRS parser in ACE.  I
then want to add a back end that generates code (initially Java code).

The reason for using "must be" instead of "is a" near the end of the
sentence is that I am trying to generate code from specifications that are
written as statements of necessity rather than assertions or statements of
facts.  In the end I want to be able to create a multi-paradigm language
that uses statements of necessity to express requirements that are
translated to imperative code, assertions to express business rules,
constraints, pre-conditions, post-conditions, and tests in a declarative
manner, and facts to express data.

So I have a very, very long road ahead of me, but it's good to have goals,
right? :-)  Any suggestions you have about any aspect of this endeavor are
always welcome.

I think Launchpad was a great choice for hosting the ACE code.  I look
forward to playing around with branches off the trunk that Tobias plans to
create there.

BTW, since I sent you the screenshot I have encountered the same error
message several times from the web client.  When I try to parse the same
sentences (all of them ill-formed) using the APE command-line interface at
home the parser just seeems to loop indefinitely (or at least until I
finally kill the application).  I suspect that the web client just times out
and displays the error message requesting that a screenshot be submitted.
I'm not really worried about it.  It isn't hindering the work I'm trying to
do.  I submitted only the first screenshot because I didn't want to you
inundate you -- I just wanted you to be aware of this behavior.  Let me know
if you want me to continue to send in screenshots, but don't spend too much
time on this issue on my account.

-- Ken

On Fri, Jan 1, 2010 at 6:25 PM, Norbert E. Fuchs <fuchs at ifi.uzh.ch> wrote:

>
> On 30 Dec 2009, at 21:34, Kenneth Jones wrote:
>
> > A screenshot is attached.  Note the syntax error: the word "and" occurs
> at the end of the next-to-the-last line and at the beginning of the last
> line and is therefore repeated.  I just wanted to let you know about the
> error handling.
> >
> > -- Ken
>
> Ken
>
> While we are working on the error that you reported in relation to your
> sentence
>
> If p:String-To-Be-Parsed starts with X1 and X1 is "drs" and
> X1 v:immediately-precedes X2 and X2 is "(" and
> X2 v:immediately-precedes X3 and X3 is Y and
> X3 v:immediately-precedes X4 and X4 is "," and
> X4 v:immediately-precedes X5 and X5 is Z and
> X5 v:immediately-precedes X6 and X6 is ")" and
> and Y is a n:domain-definition and Z is a n:conditions-definition
> then p:String-To-Be-Parsed must be a n:drs-definition.
>
> I was wondering whether your sentence could not be expressed more concisely
> as
>
> If there is a n:domain-definition D
> and there is a n:conditions-definition C
> and a n:string-to-be-parsed is ["drs", "(", D, "," , C ,")"]
> then the n:string-to-be-parsed is a n:drs-definition.
>
> Regards.
>
>   --- nef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ifi.uzh.ch/pipermail/attempto/attachments/20100101/391125bc/attachment.htm>


More information about the attempto mailing list