Feature #1672
closedEasy interface for Aspectator
0%
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).
Updated by Evgeny Novikov about 12 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).
Updated by Evgeny Novikov about 12 years ago
- Project changed from Linux Driver Verification to C Instrumentation Framework
- Category deleted (
15)
Updated by Evgeny Novikov about 12 years ago
- Subject changed from Easy interface for Aspectator to Easy interface for CIF
Updated by Evgeny Novikov about 12 years ago
- Subject changed from Easy interface for CIF to Easy interface for Aspectator
- 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.
Updated by Evgeny Novikov about 12 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.
Updated by Evgeny Novikov about 12 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.
Updated by Evgeny Novikov about 12 years ago
- Published in build changed from 619f02b to 610cc00
Fixed after small tests failed in commit 610cc00.
Updated by Evgeny Novikov about 12 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.