|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
libaxiom.al: dependenciesDear Peter, and all who know about the Aldor compiler internals...
I've checked now what dependencies you have calculated in src_aldor2. That seemingly differs by a few domain. Maybe it is important, but maybe not. Therefore my question. Do you know enough about the aldor compiler internals to be able to say something about the following? Suppose I have 3 files a.ap b.ap, c.ap where a depends directly on b but not directly on c. And where b depends directly on c. Now I want to create the corresponding .ao file. Is it enough if while compiling a.ap that only b.ao is mentioned as a library? The current compiler 1.1.0 compiles the stuff below without problem. If it really is enough to list direct dependencies why should one bother to figure out dependencies recursively? It might be different if I try to compile to .a files, but I am speaking here only of the .ao files which are necessary for the libaxiom.al construction. Ralf ---BEGIN a.as #include "aldor" #library LLL "library" import from LLL; AAA: with { afoo: % -> % } == add { Rep == BBB; import from Rep; afoo(x: %): % == per bfoo rep x; } ---END a.as ---BEGIN b.as #include "aldor" #library LLL "library" import from LLL; BBB: with { bfoo: % -> % } == add { Rep == CCC; import from Rep; bfoo(x: %): % == per cfoo rep x; } ---END b.as ---BEGIN c.as #include "aldor" CCC: with { cfoo: % -> % } == add { cfoo(x: %): % == x; } ---END c.as ---BEGIN Makefile a.ao: a.as libbbb.al cp libbbb.al liblibrary.al aldor -llibrary $< libbbb.al: b.ao ar r libbbb.al $< b.ao: b.as libccc.al cp libccc.al liblibrary.al aldor -llibrary b.as libccc.al: c.ao ar r libccc.al $< c.ao: c.as aldor c.as ---END Makefile _______________________________________________ Aldor-l mailing list Aldor-l@... http://aldor.org/mailman/listinfo/aldor-l_aldor.org |
|
|
Re: [fricas-devel] libaxiom.al: dependenciesOn Thu, May 29, 2008 at 7:08 AM, Ralf Hemmecke wrote:
> ... > Suppose I have 3 files a.ap b.ap, c.ap where a depends directly on b but > not directly on c. And where b depends directly on c. > > Now I want to create the corresponding .ao file. > > Is it enough if while compiling a.ap that only b.ao is mentioned as > a library? > > The current compiler 1.1.0 compiles the stuff below without problem. > If it really is enough to list direct dependencies why should one > bother to figure out dependencies recursively? > ... Isn't the point of chasing dependencies to find the strongly connected components, i.e. the cycles in the dependency graph? As I understand it, these need special treatment. Or did you mean something else by this question? Regards, Bill Page. _______________________________________________ Aldor-l mailing list Aldor-l@... http://aldor.org/mailman/listinfo/aldor-l_aldor.org |
|
|
Re: libaxiom.al: dependenciesIt should be enough for "a" to mention just "b".
If "b" was created using a version of the compiler that circumvents the "inline from" declaration (thereby allowing inlining from everything), then if "c" changes, "a" may need to be recompiled. -- Stephen On Thu, May 29, 2008 at 01:08:10PM +0200, Ralf Hemmecke wrote: > Dear Peter, and all who know about the Aldor compiler internals... > > I've checked now what dependencies you have calculated in src_aldor2. > That seemingly differs by a few domain. > > Maybe it is important, but maybe not. Therefore my question. Do you know > enough about the aldor compiler internals to be able to say something > about the following? > > Suppose I have 3 files a.ap b.ap, c.ap where a depends directly on b but > not directly on c. And where b depends directly on c. > > Now I want to create the corresponding .ao file. > > Is it enough if while compiling a.ap that only b.ao is mentioned as a > library? > > The current compiler 1.1.0 compiles the stuff below without problem. If > it really is enough to list direct dependencies why should one bother to > figure out dependencies recursively? > > It might be different if I try to compile to .a files, but I am speaking > here only of the .ao files which are necessary for the libaxiom.al > construction. > > Ralf > > ---BEGIN a.as > #include "aldor" > #library LLL "library" > import from LLL; > AAA: with { > afoo: % -> % > } == add { > Rep == BBB; > import from Rep; > afoo(x: %): % == per bfoo rep x; > } > ---END a.as > > > ---BEGIN b.as > #include "aldor" > #library LLL "library" > import from LLL; > BBB: with { > bfoo: % -> % > } == add { > Rep == CCC; > import from Rep; > bfoo(x: %): % == per cfoo rep x; > } > ---END b.as > > ---BEGIN c.as > #include "aldor" > CCC: with { > cfoo: % -> % > } == add { > cfoo(x: %): % == x; > } > ---END c.as > > ---BEGIN Makefile > a.ao: a.as libbbb.al > cp libbbb.al liblibrary.al > aldor -llibrary $< > > libbbb.al: b.ao > ar r libbbb.al $< > > b.ao: b.as libccc.al > cp libccc.al liblibrary.al > aldor -llibrary b.as > > libccc.al: c.ao > ar r libccc.al $< > > c.ao: c.as > aldor c.as > ---END Makefile > > _______________________________________________ > Aldor-l mailing list > Aldor-l@... > http://aldor.org/mailman/listinfo/aldor-l_aldor.org _______________________________________________ Aldor-l mailing list Aldor-l@... http://aldor.org/mailman/listinfo/aldor-l_aldor.org |
|
|
Re: libaxiom.al: dependenciesOn 05/31/2008 01:57 PM, Stephen Watt wrote:
> It should be enough for "a" to mention just "b". Hmm, after Peter send me: > Yes, but c.ao should be available (ie. in the library search path, > or in a library). > c will be needed if any types from there are implicitly used. I modified the a.ao target of my Makefile to a.ao: a.as libbbb.al rm c.ao cp libbbb.al liblibrary.al aldor -llibrary $< then I get >make aldor c.as ar r libccc.al c.ao ar: creating libccc.al cp libccc.al liblibrary.al aldor -llibrary b.as ar r libbbb.al b.ao ar: creating libbbb.al rm c.ao cp libbbb.al liblibrary.al aldor -llibrary a.as #1 (Fatal Error) Could not open file `c.ao'. make: *** [a.ao] Error 1 Is that OK? > If "b" was created using a version of the compiler that circumvents > the "inline from" declaration (thereby allowing inlining from everything), > then if "c" changes, "a" may need to be recompiled. Well, I don't know if any inlining happens here. I am using v1.1.0. Ralf > On Thu, May 29, 2008 at 01:08:10PM +0200, Ralf Hemmecke wrote: >> Dear Peter, and all who know about the Aldor compiler internals... >> >> I've checked now what dependencies you have calculated in src_aldor2. >> That seemingly differs by a few domain. >> >> Maybe it is important, but maybe not. Therefore my question. Do you know >> enough about the aldor compiler internals to be able to say something >> about the following? >> >> Suppose I have 3 files a.ap b.ap, c.ap where a depends directly on b but >> not directly on c. And where b depends directly on c. >> >> Now I want to create the corresponding .ao file. >> >> Is it enough if while compiling a.ap that only b.ao is mentioned as a >> library? >> >> The current compiler 1.1.0 compiles the stuff below without problem. If >> it really is enough to list direct dependencies why should one bother to >> figure out dependencies recursively? >> >> It might be different if I try to compile to .a files, but I am speaking >> here only of the .ao files which are necessary for the libaxiom.al >> construction. >> >> Ralf >> >> ---BEGIN a.as >> #include "aldor" >> #library LLL "library" >> import from LLL; >> AAA: with { >> afoo: % -> % >> } == add { >> Rep == BBB; >> import from Rep; >> afoo(x: %): % == per bfoo rep x; >> } >> ---END a.as >> >> >> ---BEGIN b.as >> #include "aldor" >> #library LLL "library" >> import from LLL; >> BBB: with { >> bfoo: % -> % >> } == add { >> Rep == CCC; >> import from Rep; >> bfoo(x: %): % == per cfoo rep x; >> } >> ---END b.as >> >> ---BEGIN c.as >> #include "aldor" >> CCC: with { >> cfoo: % -> % >> } == add { >> cfoo(x: %): % == x; >> } >> ---END c.as >> >> ---BEGIN Makefile >> a.ao: a.as libbbb.al >> cp libbbb.al liblibrary.al >> aldor -llibrary $< >> >> libbbb.al: b.ao >> ar r libbbb.al $< >> >> b.ao: b.as libccc.al >> cp libccc.al liblibrary.al >> aldor -llibrary b.as >> >> libccc.al: c.ao >> ar r libccc.al $< >> >> c.ao: c.as >> aldor c.as >> ---END Makefile _______________________________________________ Aldor-l mailing list Aldor-l@... http://aldor.org/mailman/listinfo/aldor-l_aldor.org |
|
|
Re: libaxiom.al: dependenciesPeter is also correct.
In your scenario, "a" should be independent of the private info of "c", but the .ao has to be around to compile it. -- Stephen On Sat, May 31, 2008 at 02:54:34PM +0200, Ralf Hemmecke wrote: > On 05/31/2008 01:57 PM, Stephen Watt wrote: > >It should be enough for "a" to mention just "b". > > Hmm, after Peter send me: > > > Yes, but c.ao should be available (ie. in the library search path, > > or in a library). > > c will be needed if any types from there are implicitly used. > > I modified the a.ao target of my Makefile to > > a.ao: a.as libbbb.al > rm c.ao > cp libbbb.al liblibrary.al > aldor -llibrary $< > > then I get > > >make > aldor c.as > ar r libccc.al c.ao > ar: creating libccc.al > cp libccc.al liblibrary.al > aldor -llibrary b.as > ar r libbbb.al b.ao > ar: creating libbbb.al > rm c.ao > cp libbbb.al liblibrary.al > aldor -llibrary a.as > #1 (Fatal Error) Could not open file `c.ao'. > make: *** [a.ao] Error 1 > > Is that OK? > > >If "b" was created using a version of the compiler that circumvents > >the "inline from" declaration (thereby allowing inlining from everything), > >then if "c" changes, "a" may need to be recompiled. > > Well, I don't know if any inlining happens here. I am using v1.1.0. > > Ralf > > >On Thu, May 29, 2008 at 01:08:10PM +0200, Ralf Hemmecke wrote: > >>Dear Peter, and all who know about the Aldor compiler internals... > >> > >>I've checked now what dependencies you have calculated in src_aldor2. > >>That seemingly differs by a few domain. > >> > >>Maybe it is important, but maybe not. Therefore my question. Do you know > >>enough about the aldor compiler internals to be able to say something > >>about the following? > >> > >>Suppose I have 3 files a.ap b.ap, c.ap where a depends directly on b but > >>not directly on c. And where b depends directly on c. > >> > >>Now I want to create the corresponding .ao file. > >> > >>Is it enough if while compiling a.ap that only b.ao is mentioned as a > >>library? > >> > >>The current compiler 1.1.0 compiles the stuff below without problem. If > >>it really is enough to list direct dependencies why should one bother to > >>figure out dependencies recursively? > >> > >>It might be different if I try to compile to .a files, but I am speaking > >>here only of the .ao files which are necessary for the libaxiom.al > >>construction. > >> > >>Ralf > >> > >>---BEGIN a.as > >>#include "aldor" > >>#library LLL "library" > >>import from LLL; > >>AAA: with { > >> afoo: % -> % > >>} == add { > >> Rep == BBB; > >> import from Rep; > >> afoo(x: %): % == per bfoo rep x; > >>} > >>---END a.as > >> > >> > >>---BEGIN b.as > >>#include "aldor" > >>#library LLL "library" > >>import from LLL; > >>BBB: with { > >> bfoo: % -> % > >>} == add { > >> Rep == CCC; > >> import from Rep; > >> bfoo(x: %): % == per cfoo rep x; > >>} > >>---END b.as > >> > >>---BEGIN c.as > >>#include "aldor" > >>CCC: with { > >> cfoo: % -> % > >>} == add { > >> cfoo(x: %): % == x; > >>} > >>---END c.as > >> > >>---BEGIN Makefile > >>a.ao: a.as libbbb.al > >> cp libbbb.al liblibrary.al > >> aldor -llibrary $< > >> > >>libbbb.al: b.ao > >> ar r libbbb.al $< > >> > >>b.ao: b.as libccc.al > >> cp libccc.al liblibrary.al > >> aldor -llibrary b.as > >> > >>libccc.al: c.ao > >> ar r libccc.al $< > >> > >>c.ao: c.as > >> aldor c.as > >>---END Makefile _______________________________________________ Aldor-l mailing list Aldor-l@... http://aldor.org/mailman/listinfo/aldor-l_aldor.org |
| Free Forum Powered by Nabble | Forum Help |