Changes in / [47ed726:29207bf]
- Files:
-
- 88 added
- 90 deleted
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Makefile.am
r47ed726 r29207bf 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Mon Jan 25 22:31:42 201614 ## Update Count : 2 513 ## Last Modified On : Tue Nov 6 09:01:23 2018 14 ## Update Count : 26 15 15 ############################################################################### 16 16 … … 304 304 305 305 compile-attributes$(EXEEXT): 306 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.c 306 @$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.cfa 307 307 308 308 compile-empty$(EXEEXT): -
doc/bibliography/pl.bib
r47ed726 r29207bf 21 21 % toplas: ACM Trans. on Prog. Lang. & Sys. 22 22 % tcs: Theoretical Computer Science 23 @string{ieeepds="IEEE Transactions on Parallel and Distributed Systems"} 24 % @string{ieeepds="IEEE Trans. Parallel Distrib. Syst."} 25 @string{ieeese="IEEE Transactions on Software Engineering"} 26 % @string{ieeese="IEEE Trans. Softw. Eng."} 27 @string{spe="Software---\-Practice and Experience"} 28 % @string{spe="Softw. Pract. Exp."} 29 @string{ccpe="Concurrency and Computation: Practice and Experience"} 30 % @string{ccpe="Concurrency Comput: Pract Experience"} 31 @string{sigplan="SIGPLAN Notices"} 32 % @string{sigplan="SIGPLAN Not."} 33 @string{joop="Journal of Object-Oriented Programming"} 34 % @string{joop="J. of Object-Oriented Program."} 23 24 string{ieeepds="IEEE Transactions on Parallel and Distributed Systems"} 25 @string{ieeepds="IEEE Trans. Parallel Distrib. Syst."} 26 string{ieeese="IEEE Transactions on Software Engineering"} 27 @string{ieeese="IEEE Trans. Softw. Eng."} 28 string{spe="Software---\-Practice and Experience"} 29 @string{spe="Softw. Pract. Exper."} 30 string{ccpe="Concurrency and Computation: Practice and Experience"} 31 @string{ccpe="Concurrency Comput.: Pract. Exper."} 32 string{sigplan="SIGPLAN Notices"} 33 @string{sigplan="SIGPLAN Not."} 34 string{joop="Journal of Object-Oriented Programming"} 35 @string{joop="J. of Object-Oriented Program."} 35 36 @string{popl="Conference Record of the ACM Symposium on Principles of Programming Languages"} 36 37 @string{osr="Operating Systems Review"} 37 38 @string{pldi="Programming Language Design and Implementation"} 38 39 @string{toplas="Transactions on Programming Languages and Systems"} 39 @string{mathann="Mathematische Annalen"}40 %@string{mathann="Math. Ann."}40 string{mathann="Mathematische Annalen"} 41 @string{mathann="Math. Ann."} 41 42 42 43 % A … … 566 567 } 567 568 569 @inproceedings {Qin18, 570 author = {Henry Qin and Qian Li and Jacqueline Speiser and Peter Kraft and John Ousterhout}, 571 title = {Arachne: Core-Aware Thread Management}, 572 booktitle = {13th {USENIX} Symp. on Oper. Sys. Design and Impl. ({OSDI} 18)}, 573 year = {2018}, 574 address = {Carlsbad, CA}, 575 pages = {145-160}, 576 publisher = {{USENIX} Association}, 577 note = {\href{https://www.usenix.org/conference/osdi18/presentation/qin}{https://\-www.usenix.org/\-conference/\-osdi18/\-presentation/\-qin}}, 578 } 579 568 580 @article{Kessels82, 569 581 keywords = {concurrency, critical section}, … … 653 665 author = {Joung, Yuh-Jzer}, 654 666 title = {Asynchronous group mutual exclusion}, 655 journal = {Distributed Computing}, 667 journal = {Dist. Comput.}, 668 optjournal = {Distributed Computing}, 656 669 year = {2000}, 657 670 month = {Nov}, … … 796 809 time computable inheritance hierarchy. 797 810 }, 798 comment 811 comment = { 799 812 Classes are predicates; if object {\tt o} is in class {\tt C}, then 800 813 {\tt C} is true of {\tt o}. Classes are combined with {\tt :AND}, … … 950 963 951 964 @article{Moss18, 952 keywords = {type systems, tuples, Cforall},965 keywords = {type systems, polymorphism, tuples, Cforall}, 953 966 contributer = {pabuhr@plg}, 954 967 author = {Aaron Moss and Robert Schluntz and Peter A. Buhr}, 955 968 title = {\textsf{C}$\mathbf{\forall}$ : Adding Modern Programming Language Features to C}, 969 journal = spe, 970 volume = 48, 971 number = 12, 972 month = dec, 956 973 year = 2018, 957 month = aug, 958 journal = spe, 974 pages = {2111-2146}, 959 975 note = {\href{http://dx.doi.org/10.1002/spe.2624}{http://\-dx.doi.org/\-10.1002/\-spe.2624}}, 960 976 } … … 989 1005 journal = {Dr. Dobb's Journal of Software Tools}, 990 1006 year = 1989, 991 month = feb, volume = 14, number = 2, pages = {45-51}, 1007 month = feb, 1008 volume = 14, 1009 number = 2, 1010 pages = {45-51}, 992 1011 comment = { 993 1012 A light-weight multitasking kernel for MS-DOS. A task\_control … … 1507 1526 } 1508 1527 1509 @ techreport{uC++,1528 @manual{uC++, 1510 1529 keywords = {C++, concurrency, light-weight process, shared memory}, 1511 1530 contributer = {pabuhr@plg}, 1531 key = {uC++}, 1512 1532 author = {Peter A. Buhr}, 1513 1533 title = {$\mu${C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Annotated Reference Manual, Version 7.0.0}, 1514 institution = {School of Computer Science, University of Waterloo}, 1515 address = {Waterloo, Ontario, Canada, N2L 3G1}, 1516 month = dec, 1517 year = 2017, 1534 organization= {University of Waterloo}, 1535 month = sep, 1536 year = 2018, 1518 1537 note = {\href{https://plg.uwaterloo.ca/~usystem/pub/uSystem/uC++.pdf}{https://\-plg.uwaterloo.ca/\-$\sim$usystem/\-pub/\-uSystem/uC++.pdf}}, 1519 1538 } … … 1586 1605 author = {Sun, Xianda}, 1587 1606 title = {Concurrent High-performance Persistent Hash Table In {J}ava}, 1588 school = {School of Computer Sc ience, University of Waterloo},1607 school = {School of Computer Sc., University of Waterloo}, 1589 1608 year = 2015, 1590 1609 optaddress = {Waterloo, Ontario, Canada, N2L 3G1}, … … 1936 1955 note = {Svensk Standard SS 63 61 14}, 1937 1956 year = 1987, 1938 abstract = { 1939 Standard for the programming language SIMULA. Written in English. 1940 } 1957 abstract = {Standard for the programming language SIMULA. Written in English.} 1941 1958 } 1942 1959 1943 1960 @article{Galil91, 1944 keywords= {union-find},1945 contributer= {a3moss@uwaterloo.ca},1946 title={Data structures and algorithms for disjoint set union problems},1947 author={Galil, Zvi and Italiano, Giuseppe F},1948 journal={ACM Computing Surveys (CSUR)},1949 volume={23},1950 number={3},1951 pages={319--344},1952 year={1991},1953 publisher={ACM}1961 keywords = {union-find}, 1962 contributer = {a3moss@uwaterloo.ca}, 1963 title = {Data structures and algorithms for disjoint set union problems}, 1964 author = {Galil, Zvi and Italiano, Giuseppe F}, 1965 journal = {ACM Computing Surveys (CSUR)}, 1966 volume = 23, 1967 number = 3, 1968 pages = {319--344}, 1969 year = 1991, 1970 publisher = {ACM}, 1954 1971 } 1955 1972 … … 2094 2111 2095 2112 @book{Aho74, 2096 keywords= {algorithms, textbook, union-find},2097 contributer= {a3moss@uwaterloo.ca},2098 title= {The Design and Analysis of Computer Algorithms},2099 author= {Aho, Alfred V and Hopcroft, John E and Ullman, Jeffrey D},2100 year= {1974},2101 publisher= {Addison-Wesley},2102 address= {Reading, MA, USA}2113 keywords = {algorithms, textbook, union-find}, 2114 contributer = {a3moss@uwaterloo.ca}, 2115 title = {The Design and Analysis of Computer Algorithms}, 2116 author = {Aho, Alfred V and Hopcroft, John E and Ullman, Jeffrey D}, 2117 year = {1974}, 2118 publisher = {Addison-Wesley}, 2119 address = {Reading, MA, USA} 2103 2120 } 2104 2121 … … 2900 2917 month = oct, 2901 2918 year = 1988, 2902 pages = {143- -149}2903 } 2904 2905 @ InProceedings{Patwary10,2906 keywords= {union-find},2907 contributer = {a3moss@uwaterloo.ca},2908 author={Patwary, Md. Mostofa Ali and Blair, Jean and Manne, Fredrik},2909 editor={Festa, Paola},2910 title={Experiments on Union-Find Algorithms for the Disjoint-Set Data Structure},2911 booktitle={Experimental Algorithms},2912 year=2010,2913 publisher={Springer Berlin Heidelberg},2914 address={Berlin, Heidelberg},2915 pages={411--423},2916 isbn={978-3-642-13193-6}2919 pages = {143-149} 2920 } 2921 2922 @inproceedings{Patwary10, 2923 keywords = {union-find}, 2924 contributer = {a3moss@uwaterloo.ca}, 2925 author = {Patwary, Md. Mostofa Ali and Blair, Jean and Manne, Fredrik}, 2926 editor = {Festa, Paola}, 2927 title = {Experiments on Union-Find Algorithms for the Disjoint-Set Data Structure}, 2928 booktitle = {Experimental Algorithms}, 2929 year = 2010, 2930 publisher = {Springer Berlin Heidelberg}, 2931 address = {Berlin, Heidelberg}, 2932 pages = {411--423}, 2933 isbn = {978-3-642-13193-6} 2917 2934 } 2918 2935 … … 3260 3277 keywords = {Go programming language}, 3261 3278 contributer = {pabuhr@plg}, 3279 author = {Robert Griesemer and Rob Pike and Ken Thompson}, 3262 3280 title = {{Go} Programming Language}, 3263 author = {Robert Griesemer and Rob Pike and Ken Thompson},3264 3281 organization= {Google}, 3265 3282 year = 2009, … … 3453 3470 month = sep, 3454 3471 publisher = {John Wiley \& Sons}, 3455 note = {\href{https://doi -org.proxy.lib.uwaterloo.ca/10.1002/cpe.4475}{https://\-doi-org.proxy.lib.uwaterloo.ca/\-10.1002/\-cpe.4475}},3472 note = {\href{https://doi.org/10.1002/cpe.4475}{https://\-doi.org/\-10.1002/\-cpe.4475}}, 3456 3473 } 3457 3474 … … 3594 3611 3595 3612 @article{Galler64, 3596 keywords={union-find, original},3597 contributer={a3moss@uwaterloo.ca},3598 title={An improved equivalence algorithm},3599 author={Galler, Bernard A and Fisher, Michael J},3600 journal={Communications of the ACM},3601 volume={7},3602 number={5},3603 pages={301--303},3604 year={1964},3605 publisher={ACM}3613 keywords = {union-find, original}, 3614 contributer = {a3moss@uwaterloo.ca}, 3615 title = {An improved equivalence algorithm}, 3616 author = {Galler, Bernard A and Fisher, Michael J}, 3617 journal = {Communications of the ACM}, 3618 volume = {7}, 3619 number = {5}, 3620 pages = {301--303}, 3621 year = {1964}, 3622 publisher = {ACM} 3606 3623 } 3607 3624 … … 3948 3965 author = {Peter A. Buhr and Martin Karsten and Jun Shih}, 3949 3966 title = {{\small\textsf{KDB}}: A Multi-threaded Debugger for Multi-threaded Applications}, 3950 booktitle = {Proc eedings of SPDT'96: SIGMETRICS Symposiumon Parallel and Distributed Tools},3967 booktitle = {Proc. of SPDT'96: SIGMETRICS Symp. on Parallel and Distributed Tools}, 3951 3968 publisher = {ACM Press}, 3952 3969 address = {Philadelphia, Pennsylvania, U.S.A.}, … … 5440 5457 5441 5458 @inproceedings{Conchon07, 5442 keywords= {persistent array, union-find},5443 contributer= {a3moss@uwaterloo.ca},5444 title={A persistent union-find data structure},5445 author={Conchon, Sylvain and Filli{\^a}tre, Jean-Christophe},5446 booktitle={Proceedings of the 2007 workshop on Workshop on ML},5447 pages={37--46},5448 year={2007},5449 organization={ACM}5459 keywords = {persistent array, union-find}, 5460 contributer = {a3moss@uwaterloo.ca}, 5461 title = {A persistent union-find data structure}, 5462 author = {Conchon, Sylvain and Filli{\^a}tre, Jean-Christophe}, 5463 booktitle = {Proceedings of the 2007 workshop on Workshop on ML}, 5464 pages = {37--46}, 5465 year = {2007}, 5466 organization= {ACM} 5450 5467 } 5451 5468 … … 5664 5681 author = {Peter A. Buhr and Robert Denda}, 5665 5682 title = {{$\mu$Profiler} : Profiling User-Level Threads in a Shared-Memory Programming Environment}, 5666 booktitle = {Proc eedings of the Second International Symposium on Computing in Object-Oriented Parallel Environments (ISCOPE'98)},5683 booktitle = {Proc. of 2nd Inter. Symp. on Computing in Object-Oriented Parallel Environments}, 5667 5684 series = {Lecture Notes in Computer Science}, 5668 5685 publisher = {Springer-Verlag}, … … 6035 6052 issn = {0164-0925}, 6036 6053 pages = {429-475}, 6037 url = {http://doi.acm.org .proxy.lib.uwaterloo.ca/10.1145/1133651.1133653},6054 url = {http://doi.acm.org/10.1145/1133651.1133653}, 6038 6055 doi = {10.1145/1133651.1133653}, 6039 6056 acmid = {1133653}, … … 6302 6319 contributer = {pabuhr@plg}, 6303 6320 key = {Rust}, 6304 title = { The{R}ust Programming Language},6305 address = {TheRust Project Developers},6321 title = {{R}ust Programming Language}, 6322 optaddress = {Rust Project Developers}, 6306 6323 year = 2015, 6307 6324 note = {\href{https://doc.rust-lang.org/reference.html}{https://\-doc.rust-lang\-.org/\-reference.html}}, … … 6372 6389 6373 6390 @article{Baker78, 6374 keywords= {Algol display, FUNARG's, Lisp 1.5, deep binding, environment trees, multiprogramming, shallow binding},6375 contributer= {a3moss@uwaterloo.ca},6376 author= {Baker,Jr., Henry G.},6377 title= {Shallow Binding in Lisp 1.5},6378 journal= {Commun. ACM},6379 issue_date= {July 1978},6380 volume = {21},6381 number = {7},6382 month= jul,6383 year = {1978},6384 issn= {0001-0782},6385 pages= {565--569},6386 numpages= {5},6387 url = {http://doi.acm.org.proxy.lib.uwaterloo.ca/10.1145/359545.359566},6388 doi= {10.1145/359545.359566},6389 acmid= {359566},6390 publisher= {ACM},6391 address= {New York, NY, USA}6391 keywords = {Algol display, FUNARG's, Lisp 1.5, deep binding, environment trees, multiprogramming, shallow binding}, 6392 contributer = {a3moss@uwaterloo.ca}, 6393 author = {Baker,Jr., Henry G.}, 6394 title = {Shallow Binding in Lisp 1.5}, 6395 journal = {Commun. ACM}, 6396 issue_date = {July 1978}, 6397 volume = 21, 6398 number = 7, 6399 month = jul, 6400 year = 1978, 6401 issn = {0001-0782}, 6402 pages = {565--569}, 6403 numpages = {5}, 6404 url = {http://doi.acm.org/10.1145/359545.359566}, 6405 doi = {10.1145/359545.359566}, 6406 acmid = {359566}, 6407 publisher = {ACM}, 6408 address = {New York, NY, USA} 6392 6409 } 6393 6410 6394 6411 @article{Baker91, 6395 keywords= {shallow binding, functional arrays},6396 contributer= {a3moss@uwaterloo.ca},6397 author= {Baker, Henry G.},6398 title= {Shallow Binding Makes Functional Arrays Fast},6399 journal= {SIGPLAN Not.},6400 issue_date= {Aug. 1991},6401 volume = {26},6402 number = {8},6403 month= aug,6404 year = {1991},6405 issn= {0362-1340},6406 pages= {145--147},6407 numpages= {3},6408 url = {http://doi.acm.org.proxy.lib.uwaterloo.ca/10.1145/122598.122614},6409 doi= {10.1145/122598.122614},6410 acmid= {122614},6411 publisher= {ACM},6412 address= {New York, NY, USA},6412 keywords = {shallow binding, functional arrays}, 6413 contributer = {a3moss@uwaterloo.ca}, 6414 author = {Baker, Henry G.}, 6415 title = {Shallow Binding Makes Functional Arrays Fast}, 6416 journal = {SIGPLAN Not.}, 6417 issue_date = {Aug. 1991}, 6418 volume = 26, 6419 number = 8, 6420 month = aug, 6421 year = 1991, 6422 issn = {0362-1340}, 6423 pages = {145--147}, 6424 numpages = {3}, 6425 url = {http://doi.acm.org/10.1145/122598.122614}, 6426 doi = {10.1145/122598.122614}, 6427 acmid = {122614}, 6428 publisher = {ACM}, 6429 address = {New York, NY, USA}, 6413 6430 } 6414 6431 … … 7580 7597 7581 7598 @article{Tarjan84, 7582 keywords= {union-find},7583 contributer= {a3moss@uwaterloo.ca},7584 author= {Tarjan, Robert E. and van Leeuwen, Jan},7585 title= {Worst-case Analysis of Set Union Algorithms},7586 journal= {J. ACM},7587 issue_date= {April 1984},7588 volume = {31},7589 number = {2},7590 month= mar,7591 year = {1984},7592 issn= {0004-5411},7593 pages= {245--281},7594 numpages= {37},7595 url= {http://doi.acm.org/10.1145/62.2160},7596 doi= {10.1145/62.2160},7597 acmid= {2160},7598 publisher= {ACM},7599 address= {New York, NY, USA},7599 keywords = {union-find}, 7600 contributer = {a3moss@uwaterloo.ca}, 7601 author = {Tarjan, Robert E. and van Leeuwen, Jan}, 7602 title = {Worst-case Analysis of Set Union Algorithms}, 7603 journal = {J. ACM}, 7604 issue_date = {April 1984}, 7605 volume = 31, 7606 number = 2, 7607 month = mar, 7608 year = 1984, 7609 issn = {0004-5411}, 7610 pages = {245--281}, 7611 numpages = {37}, 7612 url = {http://doi.acm.org/10.1145/62.2160}, 7613 doi = {10.1145/62.2160}, 7614 acmid = {2160}, 7615 publisher = {ACM}, 7616 address = {New York, NY, USA}, 7600 7617 } 7601 7618 -
doc/user/Makefile
r47ed726 r29207bf 79 79 ## Define the default recipes. 80 80 81 ${Build} :81 ${Build} : 82 82 mkdir -p ${Build} 83 83 -
doc/user/user.tex
r47ed726 r29207bf 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Fri Aug 31 07:54:50201814 %% Update Count : 339 613 %% Last Modified On : Wed Nov 7 17:00:49 2018 14 %% Update Count : 3399 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 547 547 548 548 549 %\subsection{\texorpdfstring{\protect\lstinline@for@ Statement}{for Statement}} 550 \subsection{\texorpdfstring{\LstKeywordStyle{for} Statement}{for Statement}} 549 \subsection{Loop Control} 551 550 552 551 The ©for©/©while©/©do-while© loop-control allows empty or simplified ranges. … … 557 556 the down-to range ©-~=©\index{-~=@©-~=©} means inclusive range [N,M]. 558 557 ©0© is the implicit start value; 559 ©1© is the implicit increment value for an up-to range and ©-1© for an implicit down-to range. 558 ©1© is the implicit increment value. 559 The up-to range uses ©+=© for increment; 560 the down-to range uses ©-=© for decrement. 560 561 The loop index is polymorphic in the type of the start value or comparison value when start is implicitly ©0©. 561 562 \begin{cquote} 562 563 \begin{tabular}{@{}ll|l@{}} 563 \multicolumn{2}{c|}{ forcontrol} & \multicolumn{1}{c}{output} \\564 \multicolumn{2}{c|}{loop control} & \multicolumn{1}{c}{output} \\ 564 565 \hline 565 566 \begin{cfa} … … 571 572 for ( ®10® ) { sout | "A"; } 572 573 for ( ®1 ~= 10 ~ 2® ) { sout | "B"; } 573 for ( ®10 -~= 1 ~ -2® ) { sout | "C"; }574 for ( ®10 -~= 1 ~ 2® ) { sout | "C"; } 574 575 for ( ®0.5 ~ 5.5® ) { sout | "D"; } 575 576 for ( ®5.5 -~ 0.5® ) { sout | "E"; } 576 577 for ( ®i; 10® ) { sout | i; } 577 578 for ( ®i; 1 ~= 10 ~ 2® ) { sout | i; } 578 for ( ®i; 10 -~= 1 ~ -2® ) { sout | i; }579 for ( ®i; 10 -~= 1 ~ 2® ) { sout | i; } 579 580 for ( ®i; 0.5 ~ 5.5® ) { sout | i; } 580 581 for ( ®i; 5.5 -~ 0.5® ) { sout | i; } 581 582 for ( ®ui; 2u ~= 10u ~ 2u® ) { sout | ui; } 582 for ( ®ui; 10u -~= 2u ~ -2u® ) { sout | ui; } 583 int start = 3, comp = 10, inc = 2; 583 for ( ®ui; 10u -~= 2u ~ 2u® ) { sout | ui; } 584 enum { N = 10 }; 585 for ( ®N® ) { sout | "N"; } 586 for ( ®i; N® ) { sout | i; } 587 for ( ®i; N -~ 0® ) { sout | i; } 588 const int start = 3, comp = 10, inc = 2; 584 589 for ( ®i; start ~ comp ~ inc + 1® ) { sout | i; } 585 590 \end{cfa} 586 591 & 587 592 \begin{cfa} 593 sout | endl; 594 sout | endl; 595 sout | endl; 596 sout | "zero" | endl; 588 597 sout | endl; 589 598 sout | endl; … … 598 607 sout | endl; 599 608 sout | endl; 609 sout | endl | endl; 610 600 611 sout | endl; 601 612 sout | endl; 602 sout | endl; 603 sout | endl; 604 sout | endl; 613 sout | endl | endl; 605 614 606 615 sout | endl; … … 611 620 empty 612 621 empty 613 622 zero 614 623 A 615 624 A A A A A A A A A A … … 625 634 2 4 6 8 10 626 635 10 8 6 4 2 636 637 N N N N N N N N N N 638 0 1 2 3 4 5 6 7 8 9 639 10 9 8 7 6 5 4 3 2 1 627 640 628 641 3 6 9 -
libcfa/src/iostream.cfa
r47ed726 r29207bf 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 11 13:56:43201813 // Update Count : 47 312 // Last Modified On : Fri Nov 2 07:17:05 2018 13 // Update Count : 474 14 14 // 15 15 … … 410 410 // Local Variables: // 411 411 // tab-width: 4 // 412 // compile-command: "cfa iostream.c " //412 // compile-command: "cfa iostream.cfa" // 413 413 // End: // -
libcfa/src/iterator.cfa
r47ed726 r29207bf 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 7 08:38:23 201713 // Update Count : 2 812 // Last Modified On : Fri Nov 2 07:17:37 2018 13 // Update Count : 29 14 14 // 15 15 … … 33 33 // Local Variables: // 34 34 // tab-width: 4 // 35 // compile-command: "cfa iterator.c " //35 // compile-command: "cfa iterator.cfa" // 36 36 // End: // -
src/Parser/DeclarationNode.cc
r47ed726 r29207bf 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 20 14:56:54201813 // Update Count : 110 712 // Last Modified On : Thu Nov 1 20:54:26 2018 13 // Update Count : 1108 14 14 // 15 15 … … 402 402 } 403 403 404 DeclarationNode * DeclarationNode::newTypeof( ExpressionNode * expr ) {405 DeclarationNode * newnode = new DeclarationNode; 406 newnode->type = new TypeData( TypeData::Typeof );404 DeclarationNode * DeclarationNode::newTypeof( ExpressionNode * expr, bool basetypeof ) { 405 DeclarationNode * newnode = new DeclarationNode; 406 newnode->type = new TypeData( basetypeof ? TypeData::Basetypeof : TypeData::Typeof ); 407 407 newnode->type->typeexpr = expr; 408 408 return newnode; -
src/Parser/ParseNode.h
r47ed726 r29207bf 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 4 09:39:40201813 // Update Count : 85 312 // Last Modified On : Thu Nov 1 20:54:53 2018 13 // Update Count : 854 14 14 // 15 15 … … 249 249 static DeclarationNode * newBitfield( ExpressionNode * size ); 250 250 static DeclarationNode * newTuple( DeclarationNode * members ); 251 static DeclarationNode * newTypeof( ExpressionNode * expr );251 static DeclarationNode * newTypeof( ExpressionNode * expr, bool basetypeof = false ); 252 252 static DeclarationNode * newAttr( const std::string *, ExpressionNode * expr ); // @ attributes 253 253 static DeclarationNode * newAttr( const std::string *, DeclarationNode * type ); // @ attributes -
src/Parser/TypeData.cc
r47ed726 r29207bf 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 20 14:39:31201813 // Update Count : 62 212 // Last Modified On : Fri Nov 2 07:54:26 2018 13 // Update Count : 624 14 14 // 15 15 … … 96 96 break; 97 97 case Typeof: 98 case Basetypeof: 98 99 // typeexpr = new Typeof_t; 99 100 typeexpr = nullptr; … … 166 167 break; 167 168 case Typeof: 169 case Basetypeof: 168 170 // delete typeexpr->expr; 169 171 delete typeexpr; … … 245 247 break; 246 248 case Typeof: 249 case Basetypeof: 247 250 newtype->typeexpr = maybeClone( typeexpr ); 248 251 break; … … 419 422 } // if 420 423 break; 424 case Basetypeof: 425 os << "base-"; 426 #if defined(__GNUC__) && __GNUC__ >= 7 427 __attribute__((fallthrough)); 428 #endif 421 429 case Typeof: 422 430 os << "type-of expression "; … … 457 465 case Tuple: 458 466 case Typeof: 467 case Basetypeof: 459 468 case Builtin: 460 469 assertf(false, "Tried to get leaf name from kind without a name: %d", kind); … … 513 522 switch ( td->kind ) { 514 523 case TypeData::Unknown: 515 // fill in implicit int516 return new BasicType( buildQualifiers( td ), BasicType::SignedInt );524 // fill in implicit int 525 return new BasicType( buildQualifiers( td ), BasicType::SignedInt ); 517 526 case TypeData::Basic: 518 return buildBasicType( td );527 return buildBasicType( td ); 519 528 case TypeData::Pointer: 520 return buildPointer( td );529 return buildPointer( td ); 521 530 case TypeData::Array: 522 return buildArray( td );531 return buildArray( td ); 523 532 case TypeData::Reference: 524 return buildReference( td );533 return buildReference( td ); 525 534 case TypeData::Function: 526 return buildFunction( td );535 return buildFunction( td ); 527 536 case TypeData::AggregateInst: 528 return buildAggInst( td );537 return buildAggInst( td ); 529 538 case TypeData::EnumConstant: 530 // the name gets filled in later -- by SymTab::Validate531 return new EnumInstType( buildQualifiers( td ), "" );539 // the name gets filled in later -- by SymTab::Validate 540 return new EnumInstType( buildQualifiers( td ), "" ); 532 541 case TypeData::SymbolicInst: 533 return buildSymbolicInst( td );542 return buildSymbolicInst( td ); 534 543 case TypeData::Tuple: 535 return buildTuple( td );544 return buildTuple( td ); 536 545 case TypeData::Typeof: 537 return buildTypeof( td ); 546 case TypeData::Basetypeof: 547 return buildTypeof( td ); 538 548 case TypeData::Builtin: 539 if(td->builtintype == DeclarationNode::Zero) {540 return new ZeroType( noQualifiers );541 }542 else if(td->builtintype == DeclarationNode::One) {543 return new OneType( noQualifiers );544 }545 else {546 return new VarArgsType( buildQualifiers( td ) );547 }549 if (td->builtintype == DeclarationNode::Zero) { 550 return new ZeroType( noQualifiers ); 551 } 552 else if (td->builtintype == DeclarationNode::One) { 553 return new OneType( noQualifiers ); 554 } 555 else { 556 return new VarArgsType( buildQualifiers( td ) ); 557 } 548 558 case TypeData::GlobalScope: 549 return new GlobalScopeType();559 return new GlobalScopeType(); 550 560 case TypeData::Qualified: 551 return new QualifiedType( buildQualifiers( td ), typebuild( td->qualified.parent ), typebuild( td->qualified.child ) );561 return new QualifiedType( buildQualifiers( td ), typebuild( td->qualified.parent ), typebuild( td->qualified.child ) ); 552 562 case TypeData::Symbolic: 553 563 case TypeData::Enum: 554 564 case TypeData::Aggregate: 555 assert( false );565 assert( false ); 556 566 } // switch 557 567 … … 929 939 930 940 TypeofType * buildTypeof( const TypeData * td ) { 931 assert( td->kind == TypeData::Typeof );941 assert( td->kind == TypeData::Typeof || td->kind == TypeData::Basetypeof ); 932 942 assert( td->typeexpr ); 933 943 // assert( td->typeexpr->expr ); 934 return new TypeofType( buildQualifiers( td ), td->typeexpr->build() ); 944 return new TypeofType{ 945 buildQualifiers( td ), td->typeexpr->build(), td->kind == TypeData::Basetypeof }; 935 946 } // buildTypeof 936 947 -
src/Parser/TypeData.h
r47ed726 r29207bf 10 10 // Created On : Sat May 16 15:18:36 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 20 13:56:40201813 // Update Count : 19 512 // Last Modified On : Thu Nov 1 20:56:46 2018 13 // Update Count : 196 14 14 // 15 15 … … 27 27 struct TypeData { 28 28 enum Kind { Basic, Pointer, Reference, Array, Function, Aggregate, AggregateInst, Enum, EnumConstant, Symbolic, 29 SymbolicInst, Tuple, Typeof, B uiltin, GlobalScope, Qualified, Unknown };29 SymbolicInst, Tuple, Typeof, Basetypeof, Builtin, GlobalScope, Qualified, Unknown }; 30 30 31 31 struct Aggregate_t { -
src/Parser/lex.ll
r47ed726 r29207bf 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Wed Aug 29 15:02:41201813 * Update Count : 68 612 * Last Modified On : Thu Nov 1 20:57:35 2018 13 * Update Count : 687 14 14 */ 15 15 … … 209 209 __attribute__ { KEYWORD_RETURN(ATTRIBUTE); } // GCC 210 210 auto { KEYWORD_RETURN(AUTO); } 211 basetypeof { KEYWORD_RETURN(BASETYPEOF); } // CFA 211 212 _Bool { KEYWORD_RETURN(BOOL); } // C99 212 213 break { KEYWORD_RETURN(BREAK); } -
src/Parser/parser.yy
r47ed726 r29207bf 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 30 17:02:25201813 // Update Count : 40 2912 // Last Modified On : Thu Nov 8 18:08:23 2018 13 // Update Count : 4052 14 14 // 15 15 … … 186 186 } // fieldDecl 187 187 188 ExpressionNode *forInc( const OperKinds op ) {189 return new ExpressionNode( build_constantInteger( *new string( op == OperKinds::LThan || op == OperKinds::LEThan ? "1" : "-1" ) ) );190 } // forInc191 192 188 ForCtrl * forCtrl( ExpressionNode * type, string * index, ExpressionNode * start, enum OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) { 193 ConstantExpr * constant = dynamic_cast<ConstantExpr *>(type->get_expr());189 ConstantExpr * constant = dynamic_cast<ConstantExpr *>(type->get_expr()); 194 190 if ( constant && (constant->get_constant()->get_value() == "0" || constant->get_constant()->get_value() == "1") ) { 195 191 type = new ExpressionNode( new CastExpr( maybeMoveBuild< Expression >(type), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ) ); 196 192 } // if 197 193 return new ForCtrl( 198 distAttr( DeclarationNode::newTypeof( type ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ),194 distAttr( DeclarationNode::newTypeof( type, true ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ), 199 195 new ExpressionNode( build_binary_val( compop, new ExpressionNode( build_varref( new string( *index ) ) ), comp ) ), 200 new ExpressionNode( build_binary_val( OperKinds::PlusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) ); 196 new ExpressionNode( build_binary_val( compop == OperKinds::LThan || compop == OperKinds::LEThan ? // choose += or -= for upto/downto 197 OperKinds::PlusAssn : OperKinds::MinusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) ); 198 } // forCtrl 199 200 ForCtrl * forCtrl( ExpressionNode * type, ExpressionNode * index, ExpressionNode * start, enum OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) { 201 if ( NameExpr * identifier = dynamic_cast<NameExpr *>(index->get_expr()) ) { 202 return forCtrl( type, new string( identifier->name ), start, compop, comp, inc ); 203 } else { 204 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); return nullptr; 205 } // if 201 206 } // forCtrl 202 207 … … 261 266 %token ZERO_T ONE_T // CFA 262 267 %token VALIST // GCC 263 %token TYPEOF LABEL// GCC268 %token TYPEOF BASETYPEOF LABEL // GCC 264 269 %token ENUM STRUCT UNION 265 270 %token EXCEPTION // CFA … … 636 641 { $$ = new ExpressionNode( build_fieldSel( $1, build_tuple( $4 ) ) ); } 637 642 | postfix_expression ARROW no_attr_identifier 638 { 639 $$ = new ExpressionNode( build_pfieldSel( $1, *$3 == "0" || *$3 == "1" ? build_constantInteger( *$3 ) : build_varref( $3 ) ) ); 640 } 643 { $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); } 641 644 | postfix_expression ARROW INTEGERconstant // CFA, tuple index 642 645 { $$ = new ExpressionNode( build_pfieldSel( $1, build_constantInteger( *$3 ) ) ); } … … 1137 1140 | FOR '(' push for_control_expression ')' statement pop 1138 1141 { $$ = new StatementNode( build_for( $4, $6 ) ); } 1142 | FOR '(' ')' statement // CFA => for ( ;; ) 1143 { $$ = new StatementNode( build_for( new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ), $4 ) ); } 1139 1144 ; 1140 1145 1141 1146 for_control_expression: 1142 comma_expression_opt // CFA 1143 { 1144 if ( ! $1 ) { // => for ( ;; ) 1145 $$ = new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ); 1146 } else { 1147 $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), 1148 OperKinds::LThan, $1->clone(), forInc( OperKinds::LThan ) ); 1149 } // if 1150 } 1147 comma_expression // CFA 1148 { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), 1149 OperKinds::LThan, $1->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); } 1151 1150 | constant_expression inclexcl constant_expression // CFA 1152 { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, forInc( $2) ); }1151 { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); } 1153 1152 | constant_expression inclexcl constant_expression '~' constant_expression // CFA 1154 1153 { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, $5 ); } 1155 | comma_expression_opt ';' comma_expression // CFA 1156 { 1157 if ( ! $1 ) { 1158 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr; 1159 } else if ( ! $3 ) { 1160 SemanticError( yylloc, "Missing loop range." ); $$ = nullptr; 1161 } else { 1162 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) { 1163 $$ = forCtrl( $3, new string( identifier->name ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), 1164 OperKinds::LThan, $3->clone(), forInc( OperKinds::LThan ) ); 1165 } else { 1166 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr; 1167 } // if 1168 } // if 1169 } 1170 | comma_expression_opt ';' constant_expression inclexcl constant_expression // CFA 1171 { 1172 if ( ! $1 ) { 1173 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr; 1174 } else { 1175 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) { 1176 $$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, forInc( $4 ) ); 1177 } else { 1178 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr; 1179 } // if 1180 } // if 1181 } 1182 | comma_expression_opt ';' constant_expression inclexcl constant_expression '~' constant_expression // CFA 1183 { 1184 if ( ! $1 ) { 1185 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr; 1186 } else { 1187 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) { 1188 $$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, $7 ); 1189 } else { 1190 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr; 1191 } // if 1192 } // if 1193 } 1194 | comma_expression_opt ';' comma_expression_opt ';' comma_expression_opt 1154 | comma_expression ';' comma_expression // CFA 1155 { $$ = forCtrl( $3, $1, new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), 1156 OperKinds::LThan, $3->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); } 1157 | comma_expression ';' constant_expression inclexcl constant_expression // CFA 1158 { $$ = forCtrl( $3, $1, $3->clone(), $4, $5, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); } 1159 | comma_expression ';' constant_expression inclexcl constant_expression '~' constant_expression // CFA 1160 { $$ = forCtrl( $3, $1, $3->clone(), $4, $5, $7 ); } 1161 | comma_expression ';' comma_expression_opt ';' comma_expression_opt 1195 1162 { $$ = new ForCtrl( $1, $3, $5 ); } 1163 | ';' comma_expression_opt ';' comma_expression_opt 1164 { $$ = new ForCtrl( (ExpressionNode * )nullptr, $2, $4 ); } 1196 1165 | declaration comma_expression_opt ';' comma_expression_opt // C99, declaration has ';' 1197 1166 { $$ = new ForCtrl( $1, $2, $4 ); } … … 1855 1824 1856 1825 indirect_type: 1857 TYPEOF '(' type ')' // GCC: typeof( x) y;1826 TYPEOF '(' type ')' // GCC: typeof( x ) y; 1858 1827 { $$ = $3; } 1859 | TYPEOF '(' comma_expression ')' // GCC: typeof( a+b) y;1828 | TYPEOF '(' comma_expression ')' // GCC: typeof( a+b ) y; 1860 1829 { $$ = DeclarationNode::newTypeof( $3 ); } 1861 | ATTR_TYPEGENname '(' type ')' // CFA: e.g., @type(x) y; 1830 | BASETYPEOF '(' type ')' // CFA: basetypeof( x ) y; 1831 { $$ = DeclarationNode::newTypeof( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ), true ); } 1832 | BASETYPEOF '(' comma_expression ')' // CFA: basetypeof( a+b ) y; 1833 { $$ = DeclarationNode::newTypeof( $3, true ); } 1834 | ATTR_TYPEGENname '(' type ')' // CFA: e.g., @type( x ) y; 1862 1835 { $$ = DeclarationNode::newAttr( $1, $3 ); } 1863 | ATTR_TYPEGENname '(' comma_expression ')' // CFA: e.g., @type( a+b) y;1836 | ATTR_TYPEGENname '(' comma_expression ')' // CFA: e.g., @type( a+b ) y; 1864 1837 { $$ = DeclarationNode::newAttr( $1, $3 ); } 1865 1838 | ZERO_T // CFA -
src/ResolvExpr/AlternativeFinder.cc
r47ed726 r29207bf 10 10 // Created On : Sat May 16 23:52:08 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Feb 17 11:19:39201813 // Update Count : 3 312 // Last Modified On : Thu Nov 1 21:00:56 2018 13 // Update Count : 34 14 14 // 15 15 … … 1344 1344 /// Gets name from untyped member expression (member must be NameExpr) 1345 1345 const std::string& get_member_name( UntypedMemberExpr *memberExpr ) { 1346 if ( dynamic_cast< ConstantExpr * >( memberExpr->get_member() ) ) { 1347 SemanticError( memberExpr, "Indexed access to struct fields unsupported: " ); 1348 } // if 1346 1349 NameExpr * nameExpr = dynamic_cast< NameExpr * >( memberExpr->get_member() ); 1347 1350 assert( nameExpr ); -
src/ResolvExpr/ResolveTypeof.cc
r47ed726 r29207bf 67 67 std::cerr << std::endl; 68 68 #endif 69 if ( typeofType->expr ) { 69 // pass on null expression 70 if ( ! typeofType->expr ) return typeofType; 71 72 bool isBasetypeof = typeofType->is_basetypeof; 73 auto oldQuals = typeofType->get_qualifiers().val; 74 75 Type* newType; 76 if ( TypeExpr* tyExpr = dynamic_cast<TypeExpr*>(typeofType->expr) ) { 77 // typeof wrapping type 78 newType = tyExpr->type; 79 tyExpr->type = nullptr; 80 delete tyExpr; 81 } else { 82 // typeof wrapping expression 70 83 Expression * newExpr = resolveInVoidContext( typeofType->expr, indexer ); 71 84 assert( newExpr->result && ! newExpr->result->isVoid() ); 72 Type *newType = newExpr->result;85 newType = newExpr->result; 73 86 newExpr->result = nullptr; 74 87 delete typeofType; 75 88 delete newExpr; 76 return newType; 77 } // if 78 return typeofType; 89 } 90 91 // clear qualifiers for base, combine with typeoftype quals in any case 92 if ( isBasetypeof ) { 93 // replace basetypeof(<enum>) by int 94 if ( dynamic_cast<EnumInstType*>(newType) ) { 95 Type* newerType = 96 new BasicType{ newType->get_qualifiers(), BasicType::SignedInt, 97 newType->attributes }; 98 delete newType; 99 newType = newerType; 100 } 101 newType->get_qualifiers().val 102 = ( newType->get_qualifiers().val & ~Type::Qualifiers::Mask ) | oldQuals; 103 } else { 104 newType->get_qualifiers().val |= oldQuals; 105 } 106 107 return newType; 79 108 } 80 109 } // namespace ResolvExpr -
src/SynTree/Type.h
r47ed726 r29207bf 598 598 class TypeofType : public Type { 599 599 public: 600 Expression *expr; 601 602 TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() ); 600 Expression *expr; ///< expression to take the type of 601 bool is_basetypeof; ///< true iff is basetypeof type 602 603 TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() ); 604 TypeofType( const Type::Qualifiers & tq, Expression *expr, bool is_basetypeof, 605 const std::list< Attribute * > & attributes = std::list< Attribute * >() ); 603 606 TypeofType( const TypeofType& ); 604 607 virtual ~TypeofType(); -
src/SynTree/TypeofType.cc
r47ed726 r29207bf 23 23 class Attribute; 24 24 25 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), expr( expr ) { 26 } 25 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, 26 const std::list< Attribute * > & attributes ) 27 : Type( tq, attributes ), expr( expr ), is_basetypeof(false) {} 27 28 28 TypeofType::TypeofType( const TypeofType &other ) : Type( other ), expr( maybeClone( other.expr ) ) { 29 } 29 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof, 30 const std::list< Attribute * > & attributes ) 31 : Type( tq, attributes ), expr( expr ), is_basetypeof( is_basetypeof ) {} 32 33 TypeofType::TypeofType( const TypeofType &other ) 34 : Type( other ), expr( maybeClone( other.expr ) ), is_basetypeof( other.is_basetypeof ) {} 30 35 31 36 TypeofType::~TypeofType() { … … 35 40 void TypeofType::print( std::ostream &os, Indenter indent ) const { 36 41 Type::print( os, indent ); 42 if ( is_basetypeof ) { os << "base-"; } 37 43 os << "type-of expression "; 38 44 if ( expr ) { -
tests/.expect/alloc-ERROR.txt
r47ed726 r29207bf 1 alloc.c :265:1 error: No reasonable alternatives for expression Applying untyped:1 alloc.cfa:265:1 error: No reasonable alternatives for expression Applying untyped: 2 2 Name: ?=? 3 3 ...to: … … 19 19 20 20 21 alloc.c :266:1 error: No reasonable alternatives for expression Applying untyped:21 alloc.cfa:266:1 error: No reasonable alternatives for expression Applying untyped: 22 22 Name: ?=? 23 23 ...to: … … 39 39 40 40 41 alloc.c :267:1 error: No reasonable alternatives for expression Applying untyped:41 alloc.cfa:267:1 error: No reasonable alternatives for expression Applying untyped: 42 42 Name: ?=? 43 43 ...to: … … 50 50 51 51 52 alloc.c :268:1 error: No reasonable alternatives for expression Applying untyped:52 alloc.cfa:268:1 error: No reasonable alternatives for expression Applying untyped: 53 53 Name: ?=? 54 54 ...to: -
tests/.expect/castError.txt
r47ed726 r29207bf 1 castError.c :7:1 error: Cannot choose between 3 alternatives for expression1 castError.cfa:7:1 error: Cannot choose between 3 alternatives for expression 2 2 Cast of: 3 3 Name: f 4 4 ... to: 5 char Alternatives are:5 char Alternatives are: 6 6 Cost ( 1, 0, 0, 0 ): Cast of: 7 7 Variable Expression: f: function -
tests/.expect/completeTypeError.txt
r47ed726 r29207bf 1 completeTypeError.c :33:1 error: No reasonable alternatives for expression Applying untyped:1 completeTypeError.cfa:33:1 error: No reasonable alternatives for expression Applying untyped: 2 2 Name: *? 3 3 ...to: 4 4 Name: v 5 5 6 completeTypeError.c :34:1 error: No reasonable alternatives for expression Applying untyped:6 completeTypeError.cfa:34:1 error: No reasonable alternatives for expression Applying untyped: 7 7 Name: *? 8 8 ...to: 9 9 Name: y 10 10 11 completeTypeError.c :35:1 error: No reasonable alternatives for expression Applying untyped:11 completeTypeError.cfa:35:1 error: No reasonable alternatives for expression Applying untyped: 12 12 Name: foo 13 13 ...to: 14 14 Name: v 15 15 16 completeTypeError.c :36:1 error: No reasonable alternatives for expression Applying untyped:16 completeTypeError.cfa:36:1 error: No reasonable alternatives for expression Applying untyped: 17 17 Name: baz 18 18 ...to: 19 19 Name: v 20 20 21 completeTypeError.c :37:1 error: No reasonable alternatives for expression Applying untyped:21 completeTypeError.cfa:37:1 error: No reasonable alternatives for expression Applying untyped: 22 22 Name: quux 23 23 ...to: 24 24 Name: v 25 25 26 completeTypeError.c :58:1 error: No reasonable alternatives for expression Applying untyped:26 completeTypeError.cfa:58:1 error: No reasonable alternatives for expression Applying untyped: 27 27 Name: baz 28 28 ...to: 29 29 Name: y 30 30 31 completeTypeError.c :59:1 error: No reasonable alternatives for expression Applying untyped:31 completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped: 32 32 Name: quux 33 33 ...to: 34 34 Name: y 35 35 36 completeTypeError.c :60:1 error: No reasonable alternatives for expression Applying untyped:36 completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped: 37 37 Name: *? 38 38 ...to: 39 39 Name: y 40 40 41 completeTypeError.c :72:1 error: No reasonable alternatives for expression Applying untyped:41 completeTypeError.cfa:72:1 error: No reasonable alternatives for expression Applying untyped: 42 42 Name: baz 43 43 ...to: -
tests/.expect/declarationErrors.txt
r47ed726 r29207bf 1 declarationErrors.c :16:1 error: duplicate static in declaration of x1: static const volatile short int1 declarationErrors.cfa:16:1 error: duplicate static in declaration of x1: static const volatile short int 2 2 3 declarationErrors.c :17:1 error: conflicting extern & static in declaration of x2: extern const volatile short int3 declarationErrors.cfa:17:1 error: conflicting extern & static in declaration of x2: extern const volatile short int 4 4 5 declarationErrors.c :18:1 error: conflicting extern & auto, conflicting extern & static, conflicting extern & static, duplicate extern in declaration of x3: extern const volatile short int5 declarationErrors.cfa:18:1 error: conflicting extern & auto, conflicting extern & static, conflicting extern & static, duplicate extern in declaration of x3: extern const volatile short int 6 6 7 declarationErrors.c :19:1 error: duplicate static in declaration of x4: static const volatile instance of const volatile struct __anonymous07 declarationErrors.cfa:19:1 error: duplicate static in declaration of x4: static const volatile instance of const volatile struct __anonymous0 8 8 with members 9 9 i: int … … 11 11 12 12 13 declarationErrors.c :20:1 error: duplicate const, duplicate static, duplicate volatile in declaration of x5: static const volatile instance of const volatile struct __anonymous113 declarationErrors.cfa:20:1 error: duplicate const, duplicate static, duplicate volatile in declaration of x5: static const volatile instance of const volatile struct __anonymous1 14 14 with members 15 15 i: int … … 17 17 18 18 19 declarationErrors.c :22:1 error: duplicate static in declaration of x6: static const volatile Int19 declarationErrors.cfa:22:1 error: duplicate static in declaration of x6: static const volatile Int 20 20 21 declarationErrors.c :24:1 error: duplicate const in declaration of f01: static inline function21 declarationErrors.cfa:24:1 error: duplicate const in declaration of f01: static inline function 22 22 with no parameters 23 23 returning const volatile int 24 24 25 25 26 declarationErrors.c :25:1 error: duplicate volatile in declaration of f02: static inline function26 declarationErrors.cfa:25:1 error: duplicate volatile in declaration of f02: static inline function 27 27 with no parameters 28 28 returning const volatile int 29 29 30 30 31 declarationErrors.c :26:1 error: duplicate const in declaration of f03: static inline function31 declarationErrors.cfa:26:1 error: duplicate const in declaration of f03: static inline function 32 32 with no parameters 33 33 returning const volatile int 34 34 35 35 36 declarationErrors.c :27:1 error: duplicate volatile in declaration of f04: static inline function36 declarationErrors.cfa:27:1 error: duplicate volatile in declaration of f04: static inline function 37 37 with no parameters 38 38 returning const volatile int 39 39 40 40 41 declarationErrors.c :28:1 error: duplicate const in declaration of f05: static inline function41 declarationErrors.cfa:28:1 error: duplicate const in declaration of f05: static inline function 42 42 with no parameters 43 43 returning const volatile int 44 44 45 45 46 declarationErrors.c :29:1 error: duplicate volatile in declaration of f06: static inline function46 declarationErrors.cfa:29:1 error: duplicate volatile in declaration of f06: static inline function 47 47 with no parameters 48 48 returning const volatile int 49 49 50 50 51 declarationErrors.c :30:1 error: duplicate const in declaration of f07: static inline function51 declarationErrors.cfa:30:1 error: duplicate const in declaration of f07: static inline function 52 52 with no parameters 53 53 returning const volatile int 54 54 55 55 56 declarationErrors.c :31:1 error: duplicate const, duplicate volatile in declaration of f08: static inline function56 declarationErrors.cfa:31:1 error: duplicate const, duplicate volatile in declaration of f08: static inline function 57 57 with no parameters 58 58 returning const volatile int 59 59 60 60 61 declarationErrors.c :33:1 error: duplicate const, duplicate volatile in declaration of f09: static inline function61 declarationErrors.cfa:33:1 error: duplicate const, duplicate volatile in declaration of f09: static inline function 62 62 with no parameters 63 63 returning const volatile int 64 64 65 65 66 declarationErrors.c :34:1 error: duplicate const, duplicate _Atomic, duplicate _Atomic, duplicate const, duplicate restrict, duplicate volatile in declaration of f09: static inline function66 declarationErrors.cfa:34:1 error: duplicate const, duplicate _Atomic, duplicate _Atomic, duplicate const, duplicate restrict, duplicate volatile in declaration of f09: static inline function 67 67 with no parameters 68 68 returning const restrict volatile _Atomic int -
tests/.expect/nested-types-ERR1.txt
r47ed726 r29207bf 1 nested-types.c :70:1 error: Use of undefined type T1 nested-types.cfa:70:1 error: Use of undefined type T -
tests/.expect/nested-types-ERR2.txt
r47ed726 r29207bf 1 nested-types.c :73:1 error: Use of undefined global type Z2 nested-types.c :74:1 error: Qualified type requires an aggregate on the left, but has: signed int3 nested-types.c :75:1 error: Undefined type in qualified type: Qualified Type:1 nested-types.cfa:73:1 error: Use of undefined global type Z 2 nested-types.cfa:74:1 error: Qualified type requires an aggregate on the left, but has: signed int 3 nested-types.cfa:75:1 error: Undefined type in qualified type: Qualified Type: 4 4 instance of struct S with body 1 5 5 instance of type Z (not function type) -
tests/.expect/scopeErrors.txt
r47ed726 r29207bf 1 scopeErrors.c :2:1 error: duplicate object definition for thisIsAnError: signed int2 scopeErrors.c :20:1 error: duplicate function definition for butThisIsAnError: function1 scopeErrors.cfa:2:1 error: duplicate object definition for thisIsAnError: signed int 2 scopeErrors.cfa:20:1 error: duplicate function definition for butThisIsAnError: function 3 3 ... with parameters 4 4 double -
tests/.expect/typedefRedef-ERR1.txt
r47ed726 r29207bf 1 typedefRedef.c :4:1 error: Cannot redefine typedef: Foo2 typedefRedef.c :60:1 error: Cannot redefine typedef: ARR1 typedefRedef.cfa:4:1 error: Cannot redefine typedef: Foo 2 typedefRedef.cfa:60:1 error: Cannot redefine typedef: ARR -
tests/Makefile.am
r47ed726 r29207bf 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Wed Jun 6 16:42:20201814 ## Update Count : 4913 ## Last Modified On : Tue Nov 20 11:18:51 2018 14 ## Update Count : 68 15 15 ############################################################################### 16 16 17 17 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 18 19 include $(top_srcdir)/src/cfa.make 18 20 19 21 debug=yes … … 36 38 37 39 AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} 38 39 40 CC = @CFACC@ 40 41 … … 42 43 43 44 .PHONY: list .validate 44 .INTERMEDIATE: .validate .validate.c 45 EXTRA_PROGRAMS = fstream_test avl_test # build but do not install 46 47 fstream_test_SOURCES = fstream_test.c 45 .INTERMEDIATE: .validate .validate.cfa 46 EXTRA_PROGRAMS = avl_test # build but do not install 48 47 49 48 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c … … 62 61 @+${TEST_PY} --list ${concurrent} 63 62 64 .validate: .validate.c 65 $(C OMPILE) .validate.c-fsyntax-only -Wall -Wextra -Werror63 .validate: .validate.cfa 64 $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror 66 65 67 .validate.c: 66 .validate.cfa: 67 @echo "int main() { return 0; }" > ${@} 68 69 dummy_hack.c: 68 70 @echo "int main() { return 0; }" > ${@} 69 71 … … 72 74 73 75 #---------------------------------------------------------------------------------------------------------------- 76 74 77 # implicit rule so not all test require a rule 75 % : %.c $(C C)76 $(PRETTY_PATH) $(C OMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})78 % : %.c $(CFACC) 79 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 77 80 78 declarationSpecifier: declarationSpecifier.c $(CC)79 $(PRETTY_PATH) $(C OMPILE) -CFA -XCFA -p$(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})81 % : %.cfa $(CFACC) 82 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 80 83 81 gccExtensions : gccExtensions.c $(CC)82 $(PRETTY_PATH) $(C OMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})84 declarationSpecifier: declarationSpecifier.cfa $(CFACC) 85 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 83 86 84 extension : extension.c $(CC)85 $(PRETTY_PATH) $(C OMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})87 gccExtensions : gccExtensions.cfa $(CFACC) 88 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 86 89 87 attributes : attributes.c $(CC)88 $(PRETTY_PATH) $(C OMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})90 extension : extension.cfa $(CFACC) 91 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 89 92 90 functions: functions.c $(CC)91 $(PRETTY_PATH) $(C OMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})93 attributes : attributes.cfa $(CFACC) 94 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 92 95 93 KRfunctions : KRfunctions.c $(CC)94 $(PRETTY_PATH) $(C OMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})96 functions: functions.cfa $(CFACC) 97 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 95 98 96 sched-ext-parse : sched-ext-parse.c $(CC)97 $(PRETTY_PATH) $(C OMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})99 KRfunctions : KRfunctions.cfa $(CFACC) 100 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 98 101 99 gmp : gmp.c $(CC) 100 $(PRETTY_PATH) $(COMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 102 sched-ext-parse : sched-ext-parse.c $(CFACC) 103 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 104 105 gmp : gmp.cfa $(CFACC) 106 $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 101 107 102 108 #builtins 103 builtins/sync: builtins/sync.c $(C C)104 $(PRETTY_PATH) $(C OMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only109 builtins/sync: builtins/sync.c $(CFACC) 110 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 105 111 106 112 #------------------------------------------------------------------------------ 113 107 114 #To make errors path independent we need to cd into the correct directories 108 completeTypeError : completeTypeError.c $(CC)109 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})115 completeTypeError : completeTypeError.cfa $(CFACC) 116 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 110 117 111 typedefRedef-ERR1: typedefRedef.c $(CC)112 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})118 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 119 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 113 120 114 alloc-ERROR: alloc.c $(CC)115 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})121 alloc-ERROR: alloc.cfa $(CFACC) 122 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 116 123 117 fallthrough-ERROR: fallthrough.c $(CC)118 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})124 fallthrough-ERROR: fallthrough.cfa $(CFACC) 125 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 119 126 120 nested-types-ERR1: nested-types.c $(CC)121 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})127 nested-types-ERR1: nested-types.cfa $(CFACC) 128 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 122 129 123 nested-types-ERR2: nested-types.c $(CC)124 $(PRETTY_PATH) $(C OMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})130 nested-types-ERR2: nested-types.cfa $(CFACC) 131 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 125 132 126 133 # Constructor/destructor tests 127 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(C C)128 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})134 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CFACC) 135 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 129 136 130 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(C C)131 $(PRETTY_PATH) $(C OMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})137 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CFACC) 138 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 132 139 133 raii/memberCtors-ERR1: raii/memberCtors.c $(C C)134 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})140 raii/memberCtors-ERR1: raii/memberCtors.c $(CFACC) 141 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 135 142 136 raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(C C)137 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})143 raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CFACC) 144 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 138 145 139 146 # Warnings 140 warnings/self-assignment: warnings/self-assignment.c $(C C)141 $(PRETTY_PATH) $(C OMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only147 warnings/self-assignment: warnings/self-assignment.c $(CFACC) 148 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only -
tests/Makefile.in
r47ed726 r29207bf 91 91 build_triplet = @build@ 92 92 host_triplet = @host@ 93 EXTRA_PROGRAMS = fstream_test$(EXEEXT)avl_test$(EXEEXT)93 EXTRA_PROGRAMS = avl_test$(EXEEXT) 94 94 subdir = tests 95 95 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 … … 110 110 avl_test_OBJECTS = $(am_avl_test_OBJECTS) 111 111 avl_test_LDADD = $(LDADD) 112 am_fstream_test_OBJECTS = fstream_test.$(OBJEXT)113 fstream_test_OBJECTS = $(am_fstream_test_OBJECTS)114 fstream_test_LDADD = $(LDADD)115 112 AM_V_P = $(am__v_P_@AM_V@) 116 113 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) … … 141 138 am__v_CCLD_0 = @echo " CCLD " $@; 142 139 am__v_CCLD_1 = 143 SOURCES = $(avl_test_SOURCES) $(fstream_test_SOURCES)144 DIST_SOURCES = $(avl_test_SOURCES) $(fstream_test_SOURCES)140 SOURCES = $(avl_test_SOURCES) 141 DIST_SOURCES = $(avl_test_SOURCES) 145 142 am__can_run_installinfo = \ 146 143 case $$AM_UPDATE_INFO_DIR in \ … … 168 165 CTAGS = ctags 169 166 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.py.in \ 170 $(srcdir)/test.py $(top_srcdir)/automake/depcomp 167 $(srcdir)/test.py $(top_srcdir)/automake/depcomp \ 168 $(top_srcdir)/src/cfa.make 171 169 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 172 170 ACLOCAL = @ACLOCAL@ … … 297 295 top_srcdir = @top_srcdir@ 298 296 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names 297 CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS) 298 AM_V_CFA = $(am__v_CFA_@AM_V@) 299 am__v_CFA_ = $(am__v_CFA_@AM_DEFAULT_V@) 300 am__v_CFA_0 = @echo " CFA " $@; 301 am__v_CFA_1 = 299 302 debug = yes 300 303 installed = no … … 309 312 ${INSTALL_FLAGS} ${ARCH_FLAGS} 310 313 PRETTY_PATH = cd ${srcdir} && 311 fstream_test_SOURCES = fstream_test.c312 314 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c 313 315 all: all-am 314 316 315 317 .SUFFIXES: 316 .SUFFIXES: .c . o .obj .validate317 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)318 .SUFFIXES: .c .cfa .o .obj .validate 319 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/src/cfa.make $(am__configure_deps) 318 320 @for dep in $?; do \ 319 321 case '$(am__configure_deps)' in \ … … 335 337 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 336 338 esac; 339 $(top_srcdir)/src/cfa.make $(am__empty): 337 340 338 341 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) … … 371 374 $(AM_V_CCLD)$(LINK) $(avl_test_OBJECTS) $(avl_test_LDADD) $(LIBS) 372 375 373 fstream_test$(EXEEXT): $(fstream_test_OBJECTS) $(fstream_test_DEPENDENCIES) $(EXTRA_fstream_test_DEPENDENCIES)374 @rm -f fstream_test$(EXEEXT)375 $(AM_V_CCLD)$(LINK) $(fstream_test_OBJECTS) $(fstream_test_LDADD) $(LIBS)376 377 376 mostlyclean-compile: 378 377 -rm -f *.$(OBJEXT) … … 382 381 -rm -f *.tab.c 383 382 384 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream_test.Po@am__quote@385 383 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl-private.Po@am__quote@ 386 384 @AMDEP_TRUE@@am__include@ @am__quote@avltree/$(DEPDIR)/avl0.Po@am__quote@ … … 530 528 531 529 distclean: distclean-am 532 -rm -rf ./$(DEPDIR)avltree/$(DEPDIR)530 -rm -rf avltree/$(DEPDIR) 533 531 -rm -f Makefile 534 532 distclean-am: clean-am distclean-compile distclean-generic \ … … 576 574 577 575 maintainer-clean: maintainer-clean-am 578 -rm -rf ./$(DEPDIR)avltree/$(DEPDIR)576 -rm -rf avltree/$(DEPDIR) 579 577 -rm -f Makefile 580 578 maintainer-clean-am: distclean-am maintainer-clean-generic … … 612 610 613 611 612 .cfa.o: 613 $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ 614 $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 615 $(am__mv) $$depbase.Tpo $$depbase.Po 616 614 617 .PHONY: list .validate 615 .INTERMEDIATE: .validate .validate.c 618 .INTERMEDIATE: .validate .validate.cfa 616 619 617 620 #---------------------------------------------------------------------------------------------------------------- … … 628 631 @+${TEST_PY} --list ${concurrent} 629 632 630 .validate: .validate.c 631 $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror 632 633 .validate.c: 633 .validate: .validate.cfa 634 $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror 635 636 .validate.cfa: 637 @echo "int main() { return 0; }" > ${@} 638 639 dummy_hack.c: 634 640 @echo "int main() { return 0; }" > ${@} 635 641 … … 638 644 639 645 #---------------------------------------------------------------------------------------------------------------- 646 640 647 # implicit rule so not all test require a rule 641 % : %.c $(CC) 642 $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 643 644 declarationSpecifier: declarationSpecifier.c $(CC) 645 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 646 647 gccExtensions : gccExtensions.c $(CC) 648 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 649 650 extension : extension.c $(CC) 651 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 652 653 attributes : attributes.c $(CC) 654 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 655 656 functions: functions.c $(CC) 657 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 658 659 KRfunctions : KRfunctions.c $(CC) 660 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 661 662 sched-ext-parse : sched-ext-parse.c $(CC) 663 $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 664 665 gmp : gmp.c $(CC) 666 $(PRETTY_PATH) $(COMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 648 % : %.c $(CFACC) 649 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 650 651 % : %.cfa $(CFACC) 652 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 653 654 declarationSpecifier: declarationSpecifier.cfa $(CFACC) 655 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 656 657 gccExtensions : gccExtensions.cfa $(CFACC) 658 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 659 660 extension : extension.cfa $(CFACC) 661 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 662 663 attributes : attributes.cfa $(CFACC) 664 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 665 666 functions: functions.cfa $(CFACC) 667 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 668 669 KRfunctions : KRfunctions.cfa $(CFACC) 670 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 671 672 sched-ext-parse : sched-ext-parse.c $(CFACC) 673 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 674 675 gmp : gmp.cfa $(CFACC) 676 $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 667 677 668 678 #builtins 669 builtins/sync: builtins/sync.c $(C C)670 $(PRETTY_PATH) $(C OMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only679 builtins/sync: builtins/sync.c $(CFACC) 680 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 671 681 672 682 #------------------------------------------------------------------------------ 683 673 684 #To make errors path independent we need to cd into the correct directories 674 completeTypeError : completeTypeError.c $(CC)675 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})676 677 typedefRedef-ERR1: typedefRedef.c $(CC)678 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})679 680 alloc-ERROR: alloc.c $(CC)681 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})682 683 fallthrough-ERROR: fallthrough.c $(CC)684 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})685 686 nested-types-ERR1: nested-types.c $(CC)687 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})688 689 nested-types-ERR2: nested-types.c $(CC)690 $(PRETTY_PATH) $(C OMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})685 completeTypeError : completeTypeError.cfa $(CFACC) 686 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 687 688 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 689 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 690 691 alloc-ERROR: alloc.cfa $(CFACC) 692 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 693 694 fallthrough-ERROR: fallthrough.cfa $(CFACC) 695 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 696 697 nested-types-ERR1: nested-types.cfa $(CFACC) 698 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 699 700 nested-types-ERR2: nested-types.cfa $(CFACC) 701 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 691 702 692 703 # Constructor/destructor tests 693 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(C C)694 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})695 696 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(C C)697 $(PRETTY_PATH) $(C OMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})698 699 raii/memberCtors-ERR1: raii/memberCtors.c $(C C)700 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})701 702 raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(C C)703 $(PRETTY_PATH) $(C OMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})704 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CFACC) 705 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 706 707 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CFACC) 708 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 709 710 raii/memberCtors-ERR1: raii/memberCtors.c $(CFACC) 711 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 712 713 raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CFACC) 714 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 704 715 705 716 # Warnings 706 warnings/self-assignment: warnings/self-assignment.c $(C C)707 $(PRETTY_PATH) $(C OMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only717 warnings/self-assignment: warnings/self-assignment.c $(CFACC) 718 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 708 719 709 720 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
tests/concurrent/coroutineYield.c
r47ed726 r29207bf 6 6 7 7 #define __kick_rate 150000ul 8 #include "long_tests.h "8 #include "long_tests.hfa" 9 9 10 10 #ifndef PREEMPTION_RATE -
tests/concurrent/examples/matrixSum.c
r47ed726 r29207bf 6 6 // file "LICENCE" distributed with Cforall. 7 7 // 8 // matrixSum.c --8 // matrixSum.cfa -- 9 9 // 10 10 // Author : Peter A. Buhr 11 11 // Created On : Mon Oct 9 08:29:28 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : T hu Aug 9 09:17:30201814 // Update Count : 1 313 // Last Modified On : Tue Nov 6 17:51:32 2018 14 // Update Count : 14 15 15 // 16 16 … … 59 59 // Local Variables: // 60 60 // tab-width: 4 // 61 // compile-command: "cfa matrixSum.c " //61 // compile-command: "cfa matrixSum.cfa" // 62 62 // End: // -
tests/concurrent/preempt.c
r47ed726 r29207bf 3 3 #include <time.hfa> 4 4 5 #include "long_tests.h "5 #include "long_tests.hfa" 6 6 7 7 #ifndef PREEMPTION_RATE -
tests/concurrent/signal/block.c
r47ed726 r29207bf 14 14 #include <time.hfa> 15 15 16 #include "long_tests.h "16 #include "long_tests.hfa" 17 17 18 18 #ifndef PREEMPTION_RATE -
tests/concurrent/signal/disjoint.c
r47ed726 r29207bf 5 5 #include <time.hfa> 6 6 7 #include "long_tests.h "7 #include "long_tests.hfa" 8 8 9 9 #ifndef PREEMPTION_RATE -
tests/concurrent/signal/wait.c
r47ed726 r29207bf 13 13 14 14 #define __kick_rate 12000ul 15 #include "long_tests.h "15 #include "long_tests.hfa" 16 16 17 17 #ifndef PREEMPTION_RATE -
tests/preempt_longrun/create.c
r47ed726 r29207bf 3 3 #include <time.hfa> 4 4 5 #include "long_tests.h "5 #include "long_tests.hfa" 6 6 7 7 #ifndef PREEMPTION_RATE -
tests/preempt_longrun/enter3.c
r47ed726 r29207bf 5 5 6 6 #define __kick_rate 75000ul 7 #include "long_tests.h "7 #include "long_tests.hfa" 8 8 9 9 #ifndef PREEMPTION_RATE -
tests/preempt_longrun/processor.c
r47ed726 r29207bf 5 5 #include <unistd.h> 6 6 7 #include "long_tests.h "7 #include "long_tests.hfa" 8 8 9 9 #ifndef PREEMPTION_RATE -
tests/preempt_longrun/yield.c
r47ed726 r29207bf 4 4 5 5 #define __kick_rate 550000ul 6 #include "long_tests.h "6 #include "long_tests.hfa" 7 7 8 8 #ifndef PREEMPTION_RATE
Note: See TracChangeset
for help on using the changeset viewer.