[Attempto] APE Webclient parsing error

Norbert E. Fuchs fuchs at ifi.uzh.ch
Sat Jan 2 17:46:04 CET 2010


On 2 Jan 2010, at 04:40, Kenneth Jones wrote:

> ...
> 
> 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).

I thought so and this guided me when I rephrased your sentence.

May I suggest that when writing the DRS parser you keep in mind how to simply get from the DRS derived from your grammar rules to the Java code. The more verbose your grammar rules are – for instance writing "C is a n:conditions-definition" instead of  "there is a n:conditions-definition C" – the more work you have to do to get from the DRS to the 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.

Do I understand you correctly that you indicate the interpretation of your ACE sentences as code, or rule, or ...  by the verb form, i.e. by a sentence-internal marker? Wouldn't some sentence-external marker – for instance grouping your sentences according to their target representations –  be simpler and more obvious for the reader? Furthermore, using "is" instead of "must be" again simplifies the transformation DRS -> Java.

Regards.

   --- nef



More information about the attempto mailing list