1 / 10

Eclipse Plug-in for Authoring and Debugging Higher-order Rewriting

Eclipse Plug-in for Authoring and Debugging Higher-order Rewriting. Takahide Nogayama. Contents. Overview Rule file editor Debug tool for CRSX rewriting Prepare CRSX sample source code The simplest sample “Calc” Open rule file with eclipse plug-in Install eclipse plug-in for CRSX.

finna
Télécharger la présentation

Eclipse Plug-in for Authoring and Debugging Higher-order Rewriting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Eclipse Plug-in for Authoring and Debugging Higher-order Rewriting Takahide Nogayama

  2. Contents • Overview • Rule file editor • Debug tool for CRSX rewriting • Prepare CRSX sample source code • The simplest sample “Calc” • Open rule file with eclipse plug-in • Install eclipse plug-in for CRSX

  3. Rule file editor Highlighting Outlining Syntax checking Debug tool Iterative rewriting Break point against rules Overview

  4. The Simplest Sample “Calc” • Download crsx22.zip from • http://sourceforge.net/projects/crsx/ • Unzip crsx22.zip • Run CRSX to calculate “1 + 2 + 3” $unzip crsx22.zip $java -jar crsx.jar -cp src “grammar={'net.sf.crsx.samples.calc.CalcParser'}” rules=samples/calc/interpret.crs category=P “term=1 + 2 + 3” 6 • 1 + 2 + 3 • 1 + 5 • 6

  5. Open crs rule file with rule editor • Start eclipse • Create java project and copy files under crsx19 • Right click samples/calc/interpret.crs Notify syntax error Jump by clicking outline Highlight syntax

  6. Debug Tool for CRSX Rewriting (1) • Right click rule file • Select “CRSX”, and “Start iterative rewriting” (Perspective will be changed to “CRSX perspective”) • Set arguments into “program arguments” text field • Click “Start” button

  7. Debug Tool for CRSX Rewriting (1) • For each clicking “Next” button, one rewriting rule is applied to term 1 + 2 + 3 1 + 5 6

  8. Debug Scenario Minus rule has a bug. The right term must be $[Minus, #I1, #I2] • Assuming the Calc rule has a bug. (The right term of minus rule is Plus) • A rule developer realizes the result of rewriting “1 + 2 – 3” is “6”. But it should be “0”. He wants to know which rule has issue. • The developer starts iterative rewriting. • The developer can find out the minus rule has an issue because the result of minus operator is 5 which is not expected. The result of “2 – 3” must be “-1” but is 5

  9. Prerequisite eclipse for java Doroid font Install Start eclipse Select “Help”, “Install New Software” Add repository CRSX http://crsx.sourceforge.net/eclipse-plugin/site.xml Click Next Install Eclipse Plug-in for CRSX

  10. Uninstall Start eclipse Select “Help”, “About Eclipse” Click “Installation Details” button Click “Installed Software” tab Select “CRSX eclipse future” Click “Uninstall” button Uninstall Eclipse Plug-in for CRSX

More Related