The System Amadeus: Tutorial
(This page is under construction) |
Macros
System
Folders
System Properties
A sample macro set:
The
sample macro
set above does not cover all possible kinds of insertion (e. g.
primitive
heads).
The detailed
algorithm defining insert object
for
given macro body is outlined at the end of this section.
Several
macro sets
can be placed into the last branch of a skm-text as shown in the
following
general picture:
Defining
macro
insertion: algorithmic definition
Let B be the branch representing the macro
body of an invoked macro. The insertion object which will be
inserted at the
current caret is defined as follows:
Folder class contains the system properties file Amadeus.properties, the system class-files, and
packages epsgraphics, jdom
in
its sub-folder org.
System properties are listed in the
properties file Amadeus.properties
located in the folder class.
This is a plain text file, in which each line
describes a property in the form
propertyKey = propertyValue
Properties are used to automatically define
or re-define some default values every time the system is started.
If some of the properties is not (correctly)
given in the file or the file Amadeus.properties
is missing,
the system tries to set needed
values by itself. The following
properties may be given:
Property key |
Property value syntax / default |
Purpose |
Example |
Java |
Set
path to Java
classes |
Java =
C:\\\"Program Files\"\\Java\\jdk1.5.0_01\\bin\\ |
|
AmadeusDirectory |
AmadeusDirectory
= D:\\Amadeus2006 |
||
defaultOpenDirectory |
Full path.
Default: current path (.) |
Set initial O/I path for UI
|
defaultOpenDirectory
= D:\\Amadeus2006\\Portfolio |
modelsDirectory |
Full path.
Default: AmadeusDirectory\models\ |
Set path to models |
modelsDirectory =
D:\\myModels |
tempDirectory |
Full path.
Default: AmadeusDirectory\temp\ |
Set path to a temporary folder |
tempDirectory =
D:\\provisional |
startProject |
Project description file name [path]pDfName[.html] By default path= AmadeusDirectory\Portfolio\ |
Project (if given)
to be imported initially |
startProject =
Amadeus2006 |
iconImageFileName |
[path]fname.ftype By default, path= AmadeusDirectory\gif\ |
Set icon image
file name |
iconImageFileName
= collapsed2.gif |
myMacros |
List of elements [path]fname[.ftype] By default, path= AmadeusDirectory\macros\ ftype = html |
List files from
which macros (if list given) have to be
initially imported |
myMacros = AltGr
Kirillitsa.xml Java.html |
defaultFont |
name,style,size style: 0-plain / 1-bold / 2-italic/ 3-bolditalic |
Define default font |
defaultFont
= Times New Roman, 1, 18 |
autoSaveTimePeriod |
Positive integer Default: 1 |
Gives the period
(minutes) |
autoSaveTimePeriod
= 3 |
locale |
ENG | EST | RUS Default: ENG |
Set user interface
language |
locale
= EST |
Every scheme is assigned
a view (a
sub-class
of the class View) from the set of possible ones.
The view methods are applied for screen planning and drawing while
displaying
schemes. The appearance on the screen of any scheme is fully determined
by its
(current) view.
In this
section we will use the abbreviation
“view” instead of
more precise “View sub-class”.
There exists a view
repository
where the origins of some (ready-made, debugged and “approved”) views
reside. The location of the repository
is defined by URL in the field Default.viewRepository.
Views included into the
repository
are called the registered views, and
are always usable. In addition, users may easily add, develop and
debug/try new
views. So, in general, all registered
views and a number of non-registered (user-made) views are available at
a time.
For the purpose of restricting the set of current views, each of the
registered
views (except the basic view called the Sketchy view) is allowed to be
deactivated (and activated later again, if necessary).
Non-registered views can be removed but not
deactivated. Adding/removing of (non-registered ) views is possible
only in
LIFO manner.
All Java identifiers are
allowed
except “KONST”. For any two names v, w the
condition
!
v.toUperCase().equals(w.toUpperCase())
must hold.
Select a scheme. Menu
command
View->Set displays the list of all currently active views. After
selecting
one of the list items, the selected scheme (and all of its sub-schemes)
will be
assigned to this view.
Every scheme is assigned
to a base
language (represented by a sub-class of
the class
BaseLanguage) from
the set of possible ones.
The base language methods perform various conversions of schemes
(skm-texts).
These conversions are invoked from the Tools menu. As a rule, base
language
denotes a plain text language, which structured skm-texts are converted
from or
to.
For instance, if current plain
skm-text psk is assigned to base
language bl, then the menu command
Tools->Sketchify invokes bl.sketchify method which transforms psk into a schematic skm-text sk
according to a certain conversion model.
The resulting skm-text sk appears
in a new frame. The opposite conversion (sk
to psk) is performed by
Tools->Textualize.
The system provides several
“standard” (registered) base languages, namely Java, LaTeX, ParseTree,
None,
JavaCC, Java5, LPN, Family. In particular, None stands for empty
(missing,
undefined) base language. The base language LPN is included just for
tutoring
purposes.
The plain texts in LPN
are just
forests written in so-called left parentheses notation. The latter is
characterized by the grammar:
s ::= forestLPN
forestLPN
::= “(“
treeLPN (“,” treeLPN)* “)
“
treeLPN
::= root [forestLPN]
root
::= IDENIFIER
The following forest
written in LPN: (A(B,C(D,E),F),X(Y))
Tree-like structures have
straight representations as
structured skm-texts. For instance, one particular representation
(narrative)
could be:
A tree is represented by
a
sketch which head contains the root and (single) branch contains all
sub-trees
(as sketches) of the tree; any forest is represented by a branch.
According to this model,
the
sample tree above will be represented by the following skm-text:
Another particular
representation
could be formulated (narrative) as follows:
A tree is represented by a sketch which
single branch contains the root (as a
primitive member) and all sub-trees (as sketches) of the tree; any
forest is a
sequence of sub-trees (sketches).
According to this second model,
the sample tree above will be represented by the following skm-text:
A conversion model for a
base
language L establishes how texts in L
are mapped to structured skm-texts. In
the case of LPN, such model could be expressed (narrative) as follows.
A
tree (treeLPN) is represented by a sketch
which head contains the root (IDENTIFIER) and (single) branch contains
all
sub-trees (as sketches) of the tree; any forest (forestLPN) is
represented by a
branch.