Project

General

Profile

Actions

Feature #1672

closed

Easy interface for Aspectator

Added by Pavel Shved over 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Category:
-
Start date:
08/22/2011
Due date:
% Done:

0%

Estimated time:
Published in build:
610cc00

Description

As far as I recall, our Aspectator tool has a tricky and somewhat inconvenient interface. Ideally, it should be called like this:

aspectator first.aspect second.aspect ... last.aspect -I /path/ ... file1.c file2.c ... (usual C compiler options)

And the result should appear in the output -o file (or in a.out), all temporary directories being created automatically in the proper places. Such a simple interface is required for:

  • publishing our tools to the external users
  • for us, to make experimentation with verifiers easier (i.e. without building comprehensive rule models).

Related issues 3 (1 open2 closed)

Blocks C Instrumentation Framework - Feature #2159: A step to a general purpose C AOP implementationClosedEvgeny Novikov01/05/2012

Actions
Blocks C Instrumentation Framework - Feature #2959: We need to develop analyzer on the basis of CIF infrastructure for the new environment generatorClosedEvgeny Novikov06/06/2012

Actions
Blocks Linux Driver Verification - Feature #3383: Rule instrumentor needs refactoringOpenEvgeny Novikov08/30/2012

Actions
Actions #1

Updated by Pavel Shved over 12 years ago

  • Description updated (diff)
Actions #2

Updated by Pavel Shved over 12 years ago

  • Priority changed from High to Normal
Actions #3

Updated by Evgeny Novikov over 11 years ago

  • Status changed from New to Open
  • Priority changed from Normal to High

This task became more important since we began to use CIF more extensively. For instance, in #2462 it's used to execute information requests to get argument signatures. #2959 also needs CIF to extract information on driver structures and callbacks registration. At last it will be very well if CIF will have good interface before publishing it (#2159).

Actions #4

Updated by Evgeny Novikov over 11 years ago

  • Project changed from Linux Driver Verification to C Instrumentation Framework
  • Category deleted (15)
Actions #5

Updated by Evgeny Novikov over 11 years ago

  • Subject changed from Easy interface for Aspectator to Easy interface for CIF
Actions #6

Updated by Evgeny Novikov over 11 years ago

  • Subject changed from Easy interface for CIF to Easy interface for Aspectator
I suggest to use following names:
  • Aspectator is a tool that extends GCC with implementation of aspect-oriented programming for the C programming language.
  • CIF is interface for Aspectator intended for high-level and convenient manipulations of instrumentation stages (this interface can be used by Rule Instrumentor, Rerouter and Driver Environment Generator, for instance).

As for repository and installation, CIF is already named correctly (cif) while for Aspectator it's used something like aspectator-core. I'm going to fix names while resolving #2227.

Actions #7

Updated by Evgeny Novikov over 11 years ago

Here is current version of help for CIF (I guess that it answers the most of questions how to use it):

NAME
  ./cif: instruments a file using an aspect and options
    specified.                                         

SYNOPSIS
  ./cif [option...] [-- options_for_aspectator]

OPTIONS

  --aspect <file>
    Aspect <file> to be used for instrumentation.

  --aspect-preprocessing-opts <string>
    Options specified by means of <string> will be passed as is at
    'aspect preprocessing' stage.                                 

  --back-end <back-end>
    Use specified back-end to produce output at 'comilation' stage. Following
    back-ends available: 'bin', 'asm', 'obj' and 'src'.                      

  --aspectator <bin>
    <bin> is executable to be used as aspectator during instrumentation.

  --compilation-opts <string>
    Options specified by means of <string> will be passed as is at 'compilation'
    stage.                                                                      

  --debug <level>
    Debug <level> may be 'QUIET', 'WARNING', 'NORMAL', 'INFO', 'DEBUG', 'TRACE'
    or 'ALL'. Each following level includes all messages of levels before it.  

  --file-preparation-opts <string>
    Options specified by means of <string> will be passed as is at
    'file preparation' stage.

  --general-opts <string>
    Options specified by means of <string> will be passed as is at all stages.

  -h, --help
    Print this help and exit with a syntax error.

  -c, --in <file>
    Input <file> to be instrumented.

  --instrumentation-opts <string>
    Options specified by means of <string> will be passed as is at
    'instrumentation' stage.

  --keep
    Keep intermediate files.

  --keep-prepared-file
    Keep just prepared intermediate file. This may be required because of
    preprocessed file refers to the given file instead of the original one.

  --macro-instrumentation-opts <string>
    Options specified by means of <string> will be passed as is at
    'macro instrumentation' stage.

  -o, --out <file>
    Specified back-end will place output to <file> if 'compilation' stage will
    be performed. Intermediate files are placed near output file.

  --stage <stage>
    <stage> may be one of 'aspect preprocessing', 'file preparation', 'macro
    instrumentation', 'instrumentation', 'compilation'. Each following stage
    includes all previous stages. 'Compilation' stage is used by default.

  options_for_aspectator
    This is list of options that will be passed to aspectator as is. Note that
    these options are processed by your interpreter before passing to CIF, so
    don't forget about proper escaping.

ENVIRONMENT VARIABLES

  LDV_ASPECTATOR
    Optional environment variable that specifies aspectator to be used during
    instrumentation. This option has more priority then using default and
    specified by means of --aspectator aspectator.

Script itself is available in feature-1672 branch.

Actions #8

Updated by Evgeny Novikov over 11 years ago

  • Status changed from Open to Resolved
  • Published in build set to 619f02b

Published in commit 619f02b of the master branch and tested now. I hope that tests will pass.

Actions #9

Updated by Evgeny Novikov over 11 years ago

  • Published in build changed from 619f02b to 610cc00

Fixed after small tests failed in commit 610cc00.

Actions #10

Updated by Evgeny Novikov over 11 years ago

  • Status changed from Resolved to Closed

I guess that CIF is rather well interface for Aspectator. As one can notice CIF can be used instead of compiler in building any applications. But to do this one should specify required options: -in, --out, options after -, --aspect, --aspectator, --back-end.

Actions

Also available in: Atom PDF