# Archive for April, 2012

### Functions, ghost functions and higher order functions

Posted by helmutbrandl in Uncategorized on April 30, 2012

Ghost functions Boolean expressions of the form all(x:X) p(a,x) — x is a bound variable, a is free within the expression some(x:X) p(a,x) are not computable in general, even if the boolean valued function “p” is computable. I.e. the following constructs are illegal in executable code. — Illegal if expression!!! if all(x:X) p(a,x) then exp1 […]

### Tuples and functions

Posted by helmutbrandl in Uncategorized on April 29, 2012

Introduction Tuples are very versatile in Modern Eiffel. This is due to the possibility that tuples and sequences of expressions can be freely mixed as long as the corresponding types match. In the following tuples and the possible use of tuples in expressions and functions is shown. Tuples Tuples are product types. If you have […]

### Inheritance

Posted by helmutbrandl in Uncategorized on April 23, 2012

Introduction In the following the three modules “comparable”, “partially_ordered” and “ordered” are used to demostrate inheritance within Modern Eiffel. Like all object oriented languages abstract or deferred classes can be defined within Modern Eiffel. A module with a deferred current class is deferred as well. A module “a” whose current class inherits from the current […]

### Specification and implementation of modules

Posted by helmutbrandl in Uncategorized on April 19, 2012

Definition of a module A module is a compilation unit. It is contained in a file e.g. “c.e”. A module file contains a sequence of blocks. Each block is either a class block or a feature block, i.e. a module file has the structure — file “c.e” class C … end feature … end feature […]

### Quantified expressions

Posted by helmutbrandl in Uncategorized on April 2, 2012

Introduction This article describes the use of quantified expressions and laws for quantified expressions. All the axioms and proved assertion belong to the class BOOLEAN, because only pure logic is involved. Quantified expressions model some logic which is deeply rooted in our thinking. A universal quantification and its consequence can be expressed in the form […]