Archive for April, 2012

Functions, ghost functions and higher order functions

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 […]

Leave a comment

Tuples and functions

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 […]

Leave a comment

Inheritance

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 […]

2 Comments

Specification and implementation of modules

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 […]

Leave a comment

Quantified expressions

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 […]

Leave a comment