Code Monkey home page Code Monkey logo

aspectc's People

Watchers

 avatar

aspectc's Issues

ACC doesn't build on Mac OS X 10.6

What steps will reproduce the problem?
1. Run the build

What is the expected output? What do you see instead?
A clean build showing passed test cases, but instead:

cflewis@coral-reef ~/D/ACC> make
cd src && make all_bs 
gcc -c libacc.c
ar rvs ../lib/libacc.a libacc.o
ar: creating archive ../lib/libacc.a
a - libacc.o
gcc -O2  -o ../bin/acc Parse.c Decls.c Unparse.c Bodies.c AST.c IR.c DefTab.c 
Types.c Scanning.c Error.c Coder.c Mapping.c Arith.c weaveutil.c Weave.c 
Semantic.c main.c  lexer.c output.c XARITH.c xerror.c XCODER.c pointcut.c 
symboltable.c y.tab.c grts.c
../bin/tacc -acc-option="-n" -bootstrappath=..  -O2  -o ../bin/acc Parse.c 
Decls.c Unparse.c Bodies.c AST.c IR.c DefTab.c Types.c Scanning.c Error.c 
Coder.c Mapping.c Arith.c weaveutil.c Weave.c Semantic.c main.c  lexer.c 
output.c XARITH.c xerror.c XCODER.c pointcut.c symboltable.c y.tab.c grts.c 
matchinfo.acc matchaa.acc
"/usr/include/stdlib.h", line 271: error--1: syntax error near token '^' .
make[1]: *** [all_bs] Error 1
make: *** [all] Error 2


What version of the product are you using? On what operating system?
ACC v0.9 RC

Please provide any additional information below.

cflewis@coral-reef ~/D/ACC> gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~105/src/configure --disable-checking 
--enable-werror --prefix=/usr --mandir=/share/man 
--enable-languages=c,objc,c++,obj-c++ 
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib 
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- 
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10 
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)


Original issue reported on code.google.com by [email protected] on 23 Oct 2010 at 5:48

Conflict between critical file names

What steps will reproduce the problem?
1.: Write a C file
2.: Rename it to .mc file in order to use ACC
3.: Compile with ACC compiler

What is the expected output? What do you see instead?
The dependency of the files should not be removed when ac_make clean is 
executed. 
Currently, ac_make clean will remove .acc_dir, so the dependency will be 
broken. 



Please use labels and text to provide additional information.

Though functionally, it is ok. But it might causes problems when debugging.

Reported by Michael 



Original issue reported on code.google.com by [email protected] on 13 May 2010 at 6:50

SET /GET pointcuts only accept *(a) but not *a

What steps will reproduce the problem?
1. Compile the files that are in attachment
2. Run the executable

What is the expected output? What do you see instead?

Expected:
In main
This is a point-cut for set
This is a point_cut for get
*(a) is '1'.
This is a point-cut for get
*a is '1'


Actual:
In main
This is a point-cut for set
This is a point_cut for get
*(a) is '1'.
*a is '1'


*a and *(a) should mean the same thing. There shouldn't be any difference

Please use labels and text to provide additional information.


Original issue reported on code.google.com by [email protected] on 14 May 2010 at 3:50

Attachments:

Tests failing on ubuntu server 8.04

What steps will reproduce the problem?
1. Install ubuntu server 8.04 32bit (i used VirtualBox for that).
2. Get ACC in version 0.8.
3. Extract it and run make.

What is the expected output? What do you see instead?

Expected: All tests pass.

Actual Result:
It builds without warnings.
However, some tests fail:

result:
total=96, succeed = 89 , fail = 7
fail case :  case52 case53 case54 case58 case59 case60 case68
see log file for details

I have attached the log files.

What version of the product are you using? On what operating system?

I used ACC 0.8 on ubuntu server 8.04 32bit with gcc 4.2.4-1ubuntu4.
I also tried ACC_2009-50-30_dev : same problem.


Please provide any additional information below.

diff reports a missing hyphen ("<command line>" instead of "<command-line>").

Original issue reported on code.google.com by [email protected] on 22 Mar 2010 at 10:07

Attachments:

ACC in Ubuntu 9.10

What steps will reproduce the problem?
1. Download the software v0.8
2. Untar
3. type make

What is the expected output? What do you see instead?
Should complete successfully but what I get is:
cd src && make all_bs 
make[1]: Entering directory `/home/pcheng/ACC/src'
gcc -c libacc.c
ar rvs ../lib/libacc.a libacc.o
ar: creating ../lib/libacc.a
a - libacc.o
gcc -O2  -o ../bin/acc Parse.c Decls.c Unparse.c Bodies.c AST.c IR.c
DefTab.c Types.c Scanning.c Error.c Coder.c Mapping.c Arith.c weaveutil.c
Weave.c Semantic.c main.c  lexer.c output.c XARITH.c xerror.c XCODER.c
pointcut.c symboltable.c y.tab.c grts.c
weaveutil.c: In function ‘insert_one_advice’:
weaveutil.c:469: warning: cast from pointer to integer of different size
weaveutil.c: In function ‘match_join_point’:
weaveutil.c:2071: warning: cast to pointer from integer of different size
lexer.c: In function ‘create_file_pos’:
lexer.c:1190: warning: format ‘%d’ expects type ‘int’, but argument 2 
has
type ‘long unsigned int’
lexer.c:1190: warning: format ‘%d’ expects type ‘int’, but argument 3 
has
type ‘long unsigned int’
lexer.c:1191: warning: format ‘%d’ expects type ‘int’, but argument 2 
has
type ‘long unsigned int’
output.c: In function ‘logGenDecls’:
output.c:355: warning: format ‘%d’ expects type ‘int’, but argument 3 
has
type ‘long int’
xerror.c: In function ‘ERROR’:
xerror.c:107: warning: format ‘%d’ expects type ‘int’, but argument 3 
has
type ‘long int’
grts.c: In function ‘yyPrintOpaque’:
grts.c:154: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyPrintIndex’:
grts.c:160: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyPrint_INT’:
grts.c:166: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyPrint_POS’:
grts.c:172: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyTerm’:
grts.c:232: warning: format ‘%s’ expects type ‘char *’, but argument 2 
has
type ‘int’
../bin/tacc -acc-option="-n" -bootstrappath=..  -O2  -o ../bin/acc Parse.c
Decls.c Unparse.c Bodies.c AST.c IR.c DefTab.c Types.c Scanning.c Error.c
Coder.c Mapping.c Arith.c weaveutil.c Weave.c Semantic.c main.c  lexer.c
output.c XARITH.c xerror.c XCODER.c pointcut.c symboltable.c y.tab.c grts.c
matchinfo.acc matchaa.acc
acc: pointcut.c:250: setACName: Assertion `pCutInfo != ((void *)0)' failed.
Aborted
make[1]: *** [all_bs] Error 1
make[1]: Leaving directory `/home/pcheng/ACC/src'
make: *** [all] Error 2


What version of the product are you using? On what operating system?
ACC v0.8 on Ubuntu 9.10

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Mar 2010 at 8:12

Dependency of the ACC is broken when acc_make clean is executed

What steps will reproduce the problem?
1. : Run “ac_make clean “ after .acc_dir is created.

What is the expected output? What do you see instead?

The dependency of the files should not be removed when ac_make clean is 
executed. 
Currently, ac_make clean will remove .acc_dir, so the dependency will be 
broken. 

Please use labels and text to provide additional information.

Original description: 
In the caes of ORBit, gcc uses .Tpo to track dependencies between ".o" and 
".c"
files. The dependency is generated through the -MF switch of gcc which 
reports
the dependencies between the actual compiled files, which in our case, are
prefixed by ".acc_dir". Problems arise if .acc_dir is removed by "ac_make 
clean"
and the regular build will try to find the dependent files. ".Tpo" files 
are
immortal. A follow up script needs to be in place to rewrite the 
dependencies.



Original issue reported on code.google.com by [email protected] on 12 May 2010 at 7:45

tacc command cannot accept .acc files alone

What steps will reproduce the problem?
1. Write an .acc file that contain both C and AspeCtC code
2. tacc to compile one single acc file with mixed code

What is the expected output? What do you see instead?
If the codes are correctly written, there should be no error, but 
currently, tacc will not accept one single file. It will give an error

Please use labels and text to provide additional information.
Reported by H.-Arno Jacobsen

Original description: 

Let's remember this as a bug for tacc. It would be nice, if we could fix 
that for 0.8. It would also help us to simplify the presentation of the 
examples on the web site.
 -a worked with acc and all in one file; I tried it again. However, now we 
cannot have all in one file and exclude the application of aspects to the 
code in the advice. Is this critical? Is this a bug?
tacc -o bin coreAspect.acc fails, see below
 tacc cannot accept "acc" files alone right now. For mixed code, I think
I have to do some work to modify tacc since this changes my current compile 
strategy.
2. With tacc and just one file with core and aspect together.This fails.
 sailor$ tacc -o abin coreAspect.acc
/home/arno/ac/.acc_dir/coreAspect_ac.c:13:2: warning: no newline at end of 
file
 /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-
cygwin/bin/ld:coreAspect.acc: file format not recognized; treating as 
linker script /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-
cygwin/bin/ld:coreAspect.acc:1: syntax error collect2: ld returned 1 exit 
status
void foo(char * a) {
printf("inside foo, a = %s\n", a);
 }
 int main() {
foo("abcde");
 }
void around(): call(void foo(char *)) {
     printf("in around advice: start\n");
     proceed();
     printf("in around advice: end\n"); }


Original issue reported on code.google.com by [email protected] on 13 May 2010 at 7:05

Around, After, Before cannot accept function pointers.

What steps will reproduce the problem?
1. In a C file, write code like this:
int (*pt2Fun)(float, char, char) = NULL;   //define function prt.

pt2Fun = (Function);   //give pointer an address

*pt2Fun(float, char, char)   //call function with the pointer.

2. Write ACC file that will execute some code before and after a call to 
this function
3. Compile and run

What is the expected output? What do you see instead?
It should execute code before and after a call to the function, both 
through function pointer, and direct call.

Currently, ACC will ONLY output things when a direct call to the function 
is executed. 

What version of the product are you using? On what operating system?
any

Please provide any additional information below.

Original description: 
From: Janne 

Greetings

I'm a research assistant at the Aalto University School of Science and
Technology (former Helsinki University of Technology), and I'm working in a
project called LIME2 (LightweIght formal Methods for distributed component-
based
Embedded systems). We have been using AspeCt-oriented C as a part of our
toolchain to implement something called "interface monitors" for C programs
(more information available in the project website at
http://www.tcs.hut.fi/Research/Logic/LIME2/), and now recently ran into a
problem with ACC ignoring function calls made through function pointers
completely.

The problem appears as functions called via function pointers (at least 
when the
values for these pointers are generated during the program execution) not
getting instrumented properly, so "around" -advices for these functions are 
not
executed with the functions at all. Since there are no warnings or errors 
during
the compilation process and ACC is still under development, I assume this 
is
a missing feature and would thus like to inquire what are your possible 
plans on
implementing the support for function pointers in your tool. If this is an
actual bug you were previously unaware of (I tried checking your bugzilla 
but
the page seems to be unavailable, so at least the link on your web site,
http://www.msrg.utoronto.ca/bugzilla/, seems to be broken at the moment), 
please
let me know and I'd be happy to provide you with a program that reproduces 
the
issue.



Original issue reported on code.google.com by [email protected] on 13 May 2010 at 7:40

Problem with GCC optimization option

What steps will reproduce the problem?
1. Change the compile flag to -O2 in src/Makefile "CCFLAGOPT= -O2"
2. compile under RedHat , Ubuntu 9 and cygwin.
3. Run test
4. Change the compile flag to nothing, src/Makefile "CCFLAGOPT= "
5. compile under RedHat, ubuntu9 and cygwin

What is the expected output? What do you see instead?
When flag is set to O2, All 3 platform will compile successfully, but case80 
will fail. Ideally, all the test cases will pass.

When Flag is set to nothing, Redhat and Ubuntu will fail to compile ( will not 
pass the second stage of compilation when using tacc). However, under ubuntu, 
all the test cases will pass, including case80.


Please use labels and text to provide additional information.

Ubuntu 9.04, RedHat with GCC 4.1, Cygwin with GCC 4.1


Original issue reported on code.google.com by [email protected] on 6 Aug 2010 at 8:34

Acc_gcc command line error

What steps will reproduce the problem?
1. Enter command line "acc_gcc -D"abc(s)=\#s" -Ddef="kkk(akkk)" t1.c"


What is the expected output? What do you see instead?
The acc compiler should give no error since it will pass gcc compiler if 
"gcc -D"abc(s)=\#s" -Ddef="kkk(akkk)" t1.c" is entered as a command.


Please use labels and text to provide additional information.
The error is caused by the fact that the quote are removed by acc_gcc so it 
doesn't appear on the command line passed to gcc.


Original issue reported on code.google.com by [email protected] on 12 May 2010 at 7:36

SET /GET pointcuts doesn’t accept array.

What steps will reproduce the problem?
1. In .acc file, write lines like "Before: set(int a[10]){ 
printf("print");}"
2. In .mc file, try to access the int array "a"
3. Compile the code with gcc and acc

What is the expected output? What do you see instead?
The expect output for an array declared as "int[10]" should have no error 
during compilation process. However, it will pass acc compiler, but not 
GCC, GCC will give an 
parsing error.



What version of the product are you using? On what operating system?
ACC  0.8x  Ubuntu 9.10

Please provide any additional information below.
Possible solution:
Check Program counter each time program access “a”


Reported by Ivan Muzzolini


Original issue reported on code.google.com by [email protected] on 14 May 2010 at 3:34

Incompatible with 64bit system

What steps will reproduce the problem?
1. Install Ubuntu on a 64bit system
2. download ACC 0.8
3. enter make command


What is the expected output? What do you see instead?
It should build with no error. However, if it is running on a 64bit 
machine, there will be errors.

What version of the product are you using? On what operating system?
ACCv0.7, v0.8 & v0.8-200903, x86_64-linux-gnu

Please provide any additional information below.
vi world.mc
acc hello.acc world.mc
gcc hello.c world.c
hello.acc:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before 
‘{’ token
hello.acc:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’
before ‘{’ token
world.mc: In function ‘main’:
world.mc:2: warning: incompatible implicit declaration of built-in
function ‘printf’

Building the source code...
make
cd src && make all_bs make[1]: Entering directory 
`/home/steve/aspectc/ACCv0.8/src'
gcc -c libacc.c
ar rvs ../lib/libacc.a libacc.o
r - libacc.o
gcc -O2  -o ../bin/acc Parse.c Decls.c Unparse.c Bodies.c AST.c IR.c
DefTab.c Types.c Scanning.c Error.c Coder.c Mapping.c Arith.c
weaveutil.c Weave.c Semantic.c main.c  lexer.c output.c XARITH.c
xerror.c XCODER.c pointcut.c symboltable.c y.tab.c grts.c
weaveutil.c: In function ‘insert_one_advice’:
weaveutil.c:467: warning: cast from pointer to integer of different size
weaveutil.c: In function ‘match_join_point’:
weaveutil.c:2067: warning: cast to pointer from integer of different
size
lexer.c: In function ‘create_file_pos’:
lexer.c:1178: warning: format ‘%d’ expects type ‘int’, but argument 2
has type ‘long unsigned int’
lexer.c:1178: warning: format ‘%d’ expects type ‘int’, but argument 3
has type ‘long unsigned int’
lexer.c:1179: warning: format ‘%d’ expects type ‘int’, but argument 2
has type ‘long unsigned int’
output.c: In function ‘logGenDecls’:
output.c:355: warning: format ‘%d’ expects type ‘int’, but argument 3
has type ‘long int’
xerror.c: In function ‘ERROR’:
xerror.c:107: warning: format ‘%d’ expects type ‘int’, but argument 3
has type ‘long int’
grts.c: In function ‘yyPrintOpaque’:
grts.c:154: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyPrintIndex’:
grts.c:160: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyPrint_INT’:
grts.c:166: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyPrint_POS’:
grts.c:172: warning: format ‘%d’ expects type ‘int’, but argument 2 has
type ‘long int’
grts.c: In function ‘yyTerm’:
grts.c:232: warning: format ‘%s’ expects type ‘char *’, but argument 2
has type ‘int’
./bin/tacc -acc-option="-n" -bootstrappath=..  -O2  -o ../bin/acc
Parse.c Decls.c Unparse.c Bodies.c AST.c IR.c DefTab.c Types.c
Scanning.c Error.c Coder.c Mapping.c Arith.c weaveutil.c Weave.c
Semantic.c main.c  lexer.c output.c XARITH.c xerror.c XCODER.c
pointcut.c symboltable.c y.tab.c grts.c matchinfo.acc matchaa.acc
acc: pointcut.c:250: setACName: Assertion `pCutInfo != ((void *)0)'
failed.
Aborted
make[1]: *** [all_bs] Error 1
make[1]: Leaving directory `/home/steve/aspectc/ACCv0.8/src'
make: *** [all] Error 2

GCC...

gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.3.2-1ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)


Original issue reported on code.google.com by [email protected] on 13 May 2010 at 7:14

SET/GET pointcut doesn't support local variables

What steps will reproduce the problem?
1. In .acc file, write lines like "Before: set(int a){ 
printf("print");}"
2. In .mc file, try to access the locally defined int a.
3. Compile the code with gcc and acc

What is the expected output? What do you see instead?
The expect output for this should work the same way as global defined
variables. However, the ACC compile doesn't generate pointcuts for local
variables.


Reported by Ke Deng.


Original issue reported on code.google.com by [email protected] on 14 May 2010 at 3:49

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.