Professional Documents
Culture Documents
Implementation Implementaion
Testing
Testing
Model-Based SW Technology
• Simula
• FGCS and Prolog
• Knowledge-based system projects
• Using metamodels
Best of existing MBSE
conforms to
conforms to conforms to
Expression conforms to
Transition System
Model
States
Gregor Engels
What is needed?
import java.util.*;
class Complex {/*@
specification Complex {
double re, im, arg, mod;
mod^2 = re^2 + im^2;
mod * sin(arg) = im;}
@*/
}
More concepts
class Branch {
/*@ specification Branch {
Complex z, i, u, g;
double f;
class Resistor extends Branch {
u.mod = i.mod * z.mod;
/*@ specification Resistor super Branch
u.arg = i.arg + z.arg;
double r;
g.mod * z.mod = 1;
z.re = r;
g.arg + z.arg = 0;
z.im = 0;
const double PI = Math.PI;
}@*/
}@*/
}
}
}
A real program component
public class Process {
[ inp -> out, draw ], min, step, max -> res {proc_run};
}@*/
public void proc_run(Subtask st, double start, double step, double finish) {
try {
for (double i = start; i <= finish; i+=step ) {
Object[] out = st.run( new Object[]{i});
}
}
catch (Exception e) {
e.printStackTrace();
}
}
}
The circuits DSL
res resistance r
capacitor capacity C
inductor inductivity L
(U V { }) (X Y{F})
1≤i≤m
i i i or quite often even X Y{F}
Domain engineering
Application
engineering
Specification
(scheme or text) (6) Requirements (5)
Automatic
steps
Logical Algorithm (8) Executable
formulae (7) code (9)
The domain engineering
technology
• Problem(s) analysis, use cases
• Domain analysis:
– Domain concepts
– Domain ontology, incl. inheritance and part-of
relations between the concepts
– Problems-related concepts
– List of components
– Computational content of components.
The tool: CoCoViLa
CoCoViLa is a software tool for model-based
software development with a visual language
support that performs automatic synthesis of
programs from logical specifications. It is tightly
integrated with Java: it is written in Java, uses
advanced features of Java, and it supports
programming of new software components in
Java almost without restrictions.
http://www.cs.ioc.ee/cocovila
Support of domain and application
engineering
CoCoViLa consists of two runnables: Class Editor
and Scheme Editor.
Boiler.gif B
... .xml
Boiler.java
BoilerDaemon.java
Rich component
(metaclass, visual class)
Rich component is a description of a domain-
specific concept used for describing models. It is
a class, extended with information needed for
automatic usage of the class, and also for visual
handling of instances of the class. It is therefore
also called visual class. A rich component may
have four parts:
• visual part – its image, pop-up window etc.
• specification (a logical part)
• program component
• daemon (a permanently running thread).
Package
Package is a collection of rich components
and schemes related to an application
domain, collected in a package folder and
supplied with a package description file in
xml format.
A package supported by the Scheme
Editor is an implementation of a domain-
specific language.
Specification language
1) Declaration of variables
type id, id, ...;
The type is a primitive type, a class, or a metaclass.
Examples:
int i,step;
Boiler b;
2) Binding
a = b;
Binding is an equality, where a, b are variables.
3) Equation
Example:
x = 2* y*sin(alpha);
Specification language continued
3) Axiom
precondition -> variable{name-of-method}
Example:
x,y -> z{P}
This axiom specifies that a method P can be used for calculating z
int P(int a, int b) {…}
4) Alias
alias name = (list of names);
Examples:
alias state = (*.state);
alias in = (x1, x2);
A real application: security exprt
system
Grosschmidt, G.; Harf, M. (2009). COCO-SIM - Object-oriented Multi-pole Modelling and Simulation
Environment for Fluid Power Systems. Part 1: Fundamentals. International Journal of Fluid Power,
Vol. 10, No. 2, 2009, pp. 91 - 100. Part 2: Modelling and simulation of hydraulic-mechanical load-
sensing system. International Journal of Fluid Power, Vol. 10, No. 3, 2009, pp. 71 - 85
Application: composition of services
R. Maigre, P. Küngas, M. Matskin, E. Tyugu. Handling Large Web Services Models in a Federated
Governmental Information System. Proc. 3-rd International Conference on Internet and Web Applications
and Services. IEEE Computer Society & CPS, 2008, p. 626 – 631