Thứ Hai, 18 tháng 3, 2013

Forward and Backward Transformation



  • Fwd_uncal:
    • Command line:

> fwd_uncal -db src.uncal -uq trans.unql -png result.png \

  -dot result.dot -xg result.xg -ei bd.ei
    • Input: 
      • -db src.uncal / Dot file is also accepted
      • -uq trans.unql
    • Output:
      • -xg result.xg > saves the executed UnCAL expression augmented with result graph 
      • -dot result.dot  > also saves the result graph to DOT file result.dot for editing and further backward evaluation with bwd uncal 
      • -ei bd.ei > Various evaluation information is also stored in bd.ei 
    • These files, together with source graph src.uncal should be passed to bwd uncal when backward evaluation is necessary 

  • 9.1 Overview of the forward interpreter
This command evaluates UnQL+/UnCAL query on specified input graph and produces output graph with trace information.
The command line
> fwd_uncal -db src.uncal -uq trans.unql -png result.png \
-dot result.dot -xg result.xg -ei bd.ei
loads input graph specified by file src.uncal1 and binds to variable $db, inter- prets UnQL+ source trans.unql, and saves the executed UnCAL expression augmented with result graph to result.xg. It also saves the result graph to DOT file result.dot for editing and further backward evaluation with bwd uncal. Various evaluation information is also stored in bd.ei. These files, together with source graph src.uncal should be passed to bwd uncal when backward evaluation is necessary. Options -db, -dot, -xg and -ei are mandatory. As for transformation, either -uq (UnQL+ query) or -q (UnCAL query) should be specified. The image of the result graph stored in result.png is just for preview and not required for backward evaluation.
Unlike unidirectional evaluator uncalcmd, bulk semantics is always used for traceability.
1DOT file can be accepted as well.

  • Bwd_uncal:
    • Command line:
> bwd_uncal -db src.uncal -xg result.xg -ei bd.ei \
-dot result.dot -ucal srcprime.uncal -png srcprime.png
    • Input:
      • -db src.uncal: loads input graph specified by file src.uncaland binds to variable $db
      • -xg result.xg -ei bd.ei: interprets UnQL+/UnCAL source backwards using evaluation mode that had been saved in result.xg and result.ei by fwd uncal command
      • -ucal srcprime.uncal: saves updated source graph to srcprime.uncal in UnCAL format
    • Output:
  • 10.1 Overview of the backward interpreter
This command evaluates UnQL+/UnCAL query on specified output graph along with trace information and produces input graph with modification on the output graph being reflected.
The command line
> bwd_uncal -db src.uncal -xg result.xg -ei bd.ei \
  -dot result.dot -ucal srcprime.uncal -png srcprime.png
loads input graph specified by file src.uncal1 and binds to variable $db, interprets UnQL+/UnCAL source backwards using evaluation mode that had been saved in result.xg and result.ei by fwd uncal command, and saves updated source graph to srcprime.uncal in UnCAL format. It also saves the image of the updated source graph in srcprime.png for preview. Options -db, -xg, -ei and -dot are mandatory. 

Không có nhận xét nào: