- Documenting Objects in MATHS
- Static Aspects
- Extensions and subsets
- Behavior
- Dynamics
- Scenarios
- Inheritance
- Generics and Templates
- No Privacy
- More
- Notes on MATHS Notation
- Notes on the Underlying Logic of MATHS
- Glossary

- POINT::=following,

Net

These 'nets' can also be abbreviated and used in expressions like this: - Net{x,y:real}
The static interrelationships between objects is treated using the MATHS techniques that also apply to "data bases": [ math_13_Data_Bases.html ]

# Extensions and subsets

You can extend and/or subset Nets: - POINT2::= $ POINT with following,

Net

which adds polar coordinates. As a result POINT3 is

Net

(End of Net)

# Behavior

The behavior of objects is expresed in diffeernt ways by different methodologists. One technique is to list and define the operations that apply to objects of a given class. THis can be like an Abstract Data Type. Or it can be describing the changes that can occur to an implicit object [ intro_dynamics.html ]MATHS can use the Z (Zed) approach of describing change in a complex object as a Net (schema) that contains a description of the start and end of the change and the constraint beteen them. The prime "'" indicates the final or future value:

- For x0,y0:real, MOVE(x0,y0)::=following,

Net- |-POINT.
- |-POINT'.
- |-x'=x+x0 and y'=y+y0.

(End of Net)

Notice that the arg and abs of a POINT2 will always be adjusted when either x or y changes.

- |-POINT.
- For x0,y0:real, MOVE2(x0,y0)::=following,

Net- |-POINT2.
- |-POINT2'.
- |-x'=x+x0 and y'=y+y0.

(End of Net)

And vice versa -- if a change rotates the point

- |-POINT2.
- p.arg = x.arg + 45.degrees,
then p.x, and p.y will change.
- Operations::Partly_Baked_Idea=following,

Net-
Another (as yet informal) convention could be to include
object-oriented operations
inside a Network of variables and predicates. For example
- POINT3::=following

Net- x::real.
- y::real.
- arg::Angle.
- abs::Positive & REAL.
- |-x*tan(arg)=y.
- |-arg^2 = x^2 + y^2.
- For x0:real, setX(x0)::operation = (x'=x0).
- For y0:real, setY(y0)::operation = (y'=y0).
- For x0,y0:real, move(x0,y0)::operation = (x'=x+x0 and y'=y0+y).

(End of Net POINT3)

- p1: POINT(x=1,y=1).
- p2:= p1.move(-1,-1).
or

- p3:=p1.move(1,1).
The above is a Partly_Baked_Idea.

[click here OperationOnObjects if you can fill this hole]

(End of Net)

# Dynamics

Davaid Harel invented the Statechart as an improvement of the Finite State Machine and these have been put into the UML. These can be expressed in MATHS but Jackson Life History Program technique gives a cleaner structure to problems. It also means that the states are deduced from the problem rather than guessed. Here the possible lives of an object in the class are written as structured running program. Each real object is a thread executing the program. [ math_75_Programs.html ] The threads run for as long as the real object exists... when the program is not running the object must be saved in a persistent form. When the real object becomes active the saved stae is restored and the life-history is restarted. The communication between these (highly poarallel) objects is close to that in CSP.# Scenarios

Scenarios can described in a simple structured form using: [ intro_ebnf.html ]# Inheritance

If you have already written the documentation for something called N then - POINT3::=following
- N and w is the result of adding a condition or well formed formula to N
as a constraint.
You can add a whole set of features to a piece of documentation called N by

- N with{ new_features}.
# Generics and Templates

Any loosely bound terms in a piece of MATHS documentation is generic and can be replaced by a more tightly bound and so specific form.# No Privacy

VAriable can be hidden by using an existential quantifier, if needed. But this is pretty rare.# More

[ math_12_Structure.html ]# Notes on MATHS Notation

Special characters are defined in [ intro_characters.html ] that also outlines the syntax of expressions and a document.Proofs follow a natural deduction style that start with assumptions ("Let") and continue to a consequence ("Close Let") and then discard the assumptions and deduce a conclusion. Look here [ Block Structure in logic_25_Proofs ] for more on the structure and rules.

The notation also allows you to create a new network of variables and constraints. A "Net" has a number of variables (including none) and a number of properties (including none) that connect variables. You can give them a name and then reuse them. The schema, formal system, or an elementary piece of documentation starts with "Net" and finishes "End of Net". For more, see [ notn_13_Docn_Syntax.html ] for these ways of defining and reusing pieces of logic and algebra in your documents. A quick example: a circle might be described by Net{radius:Positive Real, center:Point, area:=π*radius^2, ...}.

For a complete listing of pages in this part of my site by topic see [ home.html ]

# Notes on the Underlying Logic of MATHS

The notation used here is a formal language with syntax and a semantics described using traditional formal logic [ logic_0_Intro.html ] plus sets, functions, relations, and other mathematical extensions.For a more rigorous description of the standard notations see

- STANDARD::= See http://www.csci.csusb.edu/dick/maths/math_11_STANDARD.html
# Glossary

- above::reason="I'm too lazy to work out which of the above statements I need here", often the last 3 or 4 statements. The previous and previous but one statments are shown as (-1) and (-2).
- given::reason="I've been told that...", used to describe a problem.
- given::variable="I'll be given a value or object like this...", used to describe a problem.
- goal::theorem="The result I'm trying to prove right now".
- goal::variable="The value or object I'm trying to find or construct".
- let::reason="For the sake of argument let...", introduces a temporary hypothesis that survives until the end of the surrounding "Let...Close.Let" block or Case.
- hyp::reason="I assumed this in my last Let/Case/Po/...".
- QED::conclusion="Quite Easily Done" or "Quod Erat Demonstrandum", indicates that you have proved what you wanted to prove.
- QEF::conclusion="Quite Easily Faked", -- indicate that you have proved that the object you constructed fitted the goal you were given.
- RAA::conclusion="Reducto Ad Absurdum". This allows you to discard the last
assumption (let) that you introduced.

MATHS predates the OO explosion of the middle 1990s. However it had already incorporated several ideas that have been absorbed into OOP/OOA/OOD. Inheritance for example was present in some of the very earliest notes prepared like this in the late 1960's.

An object has both a state and a pattern of behavior. Both of these must be documented:

For example a point in the Cartesian plan might be described as: