>
> >
> > Yes, they are specification and implementation, while the specifications
> are
> > not compulsory.
> >
> > Interfaces of Java work as the specification, and the classes implement
> it.
> > The difference
> > is Java requires the class provides all methods the specified in the
> > interface, or else it
> > can only be qualified as "abstract".
>
> Java is one language. C++ is another. Haskell is yet another.
>
> >
> > OpenAxiom does not impose this type of restriction, and provides no
> > compensatory mechanism
> > to avoid run-time errors brought by this "freedom".
> > -------------------------------------------------------------------------
>
> I do not understand.
>
> -- Gaby
>
In Axiom, I can define a domain to be a member of Ring, but not actually
implement
the functions of Ring in my domain. When my domain is used in somewhere the
functions
are used, a error will arise. such as
)abbrev domain UR UnfinishedRing
UnfinishedRing():Public == Private where
Public == Join(Ring, ConvertibleTo OutputForm) with
coerce : Integer -> %
Private == add
Rep == Integer
a:% + b:% == per ((rep a) + (rep b))
coerce(a:Integer):% == per a
coerce(a:%):OutputForm == (rep a)::OutputForm
Then by
(13) -> u:=3::UR
(13) 3
Type:
UnfinishedRing
(14) ->
(14) -> matrix [[u,u]]
Internal Error
The function Zero with signature $ is missing from domain
UnfinishedRing
You can treat this as a bug of the user. But when I trace back to the paper
"a language for computational algebra" by Richard Jenks et al. in 1981,
(http://portal.acm.org/citation.cfm?id=988125.988127&coll=portal&dl=ACM)
they said:
"Declaring a domain to be a member of a category indicates that all the
operations
of the category are implemented in that domain as functions which satisfy
the
attributes of the category ."
I admit this is only a paper, and the software doesn't need to follow it
exactly, and this paper is old.
But I do want to know why Axiom systems just deny the domain
"UnfinishedRing".
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel