Mathematical Use Cases lead naturally to nonstandard Inheritance

  • Slides: 10
Download presentation
Mathematical Use Cases lead naturally to non-standard Inheritance Relationships – How to make them

Mathematical Use Cases lead naturally to non-standard Inheritance Relationships – How to make them accessible in a “mainstream” language? ! n ? by: Marc Conrad, Tim French, Carsten Maple (University of Luton) n Sandra Pott (University York)of Luton 15/12/2021 Marc Conradof - University n 1

! ? Possible Strategies n n Adding new features to the mainstream language itself

! ? Possible Strategies n n Adding new features to the mainstream language itself (negotiations with the “owner of the language”). Providing an “add-on” to the mainstream language (library, pre-processor, package, …). Developing an extension of the mainstream language. Developing a new language and educating possible users. 15/12/2021 Marc Conrad - University of Luton 2

! ? Use Case I – Overriding & Renaming n (G, o) a group

! ? Use Case I – Overriding & Renaming n (G, o) a group with an operation. Can be additive (+) or multiplicative (x). Cryptographic Application n Also other examples (e. g. endomorphism becomes matrix multiplication, …) 15/12/2021 Group +operation() (Z/n. Z)* +multiplication() Marc Conrad - University of Luton Elliptic Curve +addition() 3

! ? Use Case II – Reclassification n Z/n. Z can be a field

! ? Use Case II – Reclassification n Z/n. Z can be a field or a ring (depending on n). Class diagram Ring Sequence diagram(? ) Z 17: Z/n. Z prove 17 prime reclassify to field Z/n. Z n Field Z 17: Field Also other examples (Euclidian Ring vs. UFD vs. Noetherian Ring …, abelian groups, …) 15/12/2021 Marc Conrad - University of Luton 4

! ? Use Case III – Interclassing n New structures in Mathematics are discovered

! ? Use Case III – Interclassing n New structures in Mathematics are discovered or defined (or simply “non-standard”) but belong inside an existing inheritance hierarchy. Ring Emmy Noether invents her Ring and wants to integrate it in the existing hierarchy. Noetherian Ring Field n More recent examples in Functional Analysis (eg. Triebel-Lizorking spaces between Lp, Hardy & BMO spaces and Banach spaces, …), … 15/12/2021 Marc Conrad - University of Luton Field 5

! n n n ? Discussion These features are not new! Overriding with renaming:

! n n n ? Discussion These features are not new! Overriding with renaming: Eiffel, Python Reclassification: Cecil (predicate classes), Self, the Darwin Project, Fickle Interclassing: OFL (hyper-generic parameters), Shadows(? ) Common to all these languages, architectures, solutions: n They are mostly unrelated to each other. n They are not usually applied in Mathematical context n They are unknown to the intended target user population (i. e. Mathematicians). 15/12/2021 Marc Conrad - University of Luton 6

! ? Possible Java Syntax of Overriding & Renaming n Implementation could be straightforward,

! ? Possible Java Syntax of Overriding & Renaming n Implementation could be straightforward, eg. using a keyword override (cf. C#). public class Group { public abstract Elt operation( Elt a, Elt b ); } public class Elliptic. Curve extends Group { public override operation Elt add( Elt a, Elt b) { … } 15/12/2021 Marc Conrad - University of Luton 7

! ? Possible Java Syntax of Reclassification n Define a method in the java.

! ? Possible Java Syntax of Reclassification n Define a method in the java. lang. Object class (cf. clone() ). // module=17: Z/17 Z is instantiated: Ring Z_n. Z = new Modular. Integer. Ring(module); // … // Z/17 Z is reclassified because it is a Field: if(Z_n. Z. get. Module. is. Prime() ) { Z_n. Z. reclassify( Class. for. Name(“com. perisic. Finite. Prime. Field”)); } 15/12/2021 Marc Conrad - University of Luton 8

! ? Possible Java Syntax of Interclassing n Any suggestions? ? 15/12/2021 Marc Conrad

! ? Possible Java Syntax of Interclassing n Any suggestions? ? 15/12/2021 Marc Conrad - University of Luton 9

! ? Summary n n n Solutions to these problems do exist. But not

! ? Summary n n n Solutions to these problems do exist. But not in Java! (C++, C#, …) In Mathematics these “esoteric” features exist naturally. So they should be naturally accessible in mainstream languages (“Interclassing for Dummies”). Maybe similar problems in other application areas. n If a language feature cannot be used it is useless. 15/12/2021 Marc Conrad - University of Luton 10