Dear Gaby, Waldek, Waldek Hebisch <[EMAIL PROTECTED]> writes:
> I am slightly suprized that the file compiles and is doing someting > sensible. I was, too. Well, it doesn't quite work yet, but it would be very nice if it did. Since it does not seem to be the case that Aldor is going to become GPL compatible software, (Stephen?) I'm thinking of porting the species project back to SPAD. It's a pity, because we invested so much time in Aldor, but I'd like to save at least those bits that can be saved. I *really* want the species framework to replace the corresponding domains in FriCAS: Partitions, Permutations, SetsOfMIntegersInN, Lists, Sets, BinaryTrees, etc. Of course, even a great deal of the implementation can stay, but the organisation should be redone. > > (2) -> S2 := S1::SpeciesCategory INT > > > > You cannot use SpeciesCategory(Integer) or any other category in a > > target, coercion, or package-call context. > Try commenting out the checks. I did. Now it doesn't complain anymore, but calling "structures" from S2 enters an infinite loop, it seems. I attach the new spad file, and backtrace after interrupting. Gaby, I also attach a backtrace for the equivalent thing in Open Axiom... I noticed that my spad file was flawed, it seems that I can't get Rep and % right in Spad. In aldor it's so easy... At least, now FriCAS doesn't complain anymore about the Rep. Could we add these two macro definitions to FriCAS? (I'd rather have them as macros, not builtin as in Open-Axiom, I must admit) macro { rep x == ((x)@%) pretend Rep; per r == ((r)@Rep) pretend %; } Martin ------------------------------------------------------------------------------- )abb category SPECCAT SpeciesCategory SpeciesCategory(L: SetCategory): Category == SetCategory with structures: Set L -> List % name: () -> String )abb domain CHARSPEC CharacteristicSpecies CharacteristicSpecies(L: SetCategory, n: Integer): SpeciesCategory L == add Rep := Set L name() == output("enter name")$OutputPackage concat ["CharacteristicSpecies(", string n, ")"] coerce(t: %): OutputForm == coerce(t)$Rep structures s == output("enter structures")$OutputPackage if #s = n then [s] else [] )abb domain SPECIES Species Species(L: SetCategory): Ring with coerce: % -> SpeciesCategory L co: % -> SpeciesCategory L == add Rep := SpeciesCategory L coerce(s: %): OutputForm == S := s::SpeciesCategory(L) name()$S::OutputForm coerce(s: %): SpeciesCategory L == s pretend SpeciesCategory(L) co(s: %): SpeciesCategory L == s pretend SpeciesCategory(L) 0 == CharacteristicSpecies(L, 0) pretend % 1 == CharacteristicSpecies(L, 1) pretend %
fri.log.gz
Description: Binary data
oax.log.gz
Description: Binary data
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel