|
|
# AST-Generation
|
|
|
|
|
|
## create-system
|
|
|
|
|
|
```
|
|
|
(create-system num-pe num-pe-subs num-comp impl-per-comp mode-per-impl . opts)
|
|
|
(create-system num-pe num-pe-subs num-comp impl-per-comp mode-per-impl . (list sw-reqc ud-sw-clauses ud-hw-clauses ud-types))
|
|
|
```
|
|
|
|
|
|
Creates a new system with a tree-like or flat structure of hardware resources (PE = processing element), a number of
|
|
|
software components, normally combined in the pipe-and-filter architecture, i.e. each software component requires the next one,
|
|
|
and a request targeting the first component.
|
|
|
|
|
|
The whole system is generated in such a way, that at least one valid configuration exists, i.e. a mapping of
|
|
|
implementations in certain modes onto hardware resources, such that no clause of the deployed modes as
|
|
|
well as no constraint of the request is violated.
|
|
|
|
|
|
All components, implementations and modes have symbolic names according to their type followed by a running number for this type:
|
|
|
|
|
|
- software components: comp-*n*
|
|
|
- implementations: impl-*n*
|
|
|
- modes: mode-*n*
|
|
|
- hardware components: res-*n*
|
|
|
|
|
|
The default behavior creates the properties load and frequency for every hardware resource, and a synthetic property prop-*n* for
|
|
|
every component according to their component number *n*.
|
|
|
|
|
|
Parameters:
|
|
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------
|
|
|
Name Description
|
|
|
------------ -------------------------------------------------------------------------------------------------------
|
|
|
num-pe Total number of resources.
|
|
|
|
|
|
num-pe-subs Number of subresources for every resource (use 0 for a flat layout).
|
|
|
|
|
|
num-comp Total number of components.
|
|
|
|
|
|
impl-per-comp Number of implementations per component.
|
|
|
|
|
|
mode-per-impl Number of modes per implementation.
|
|
|
|
|
|
opts An optional list with options, defaults to `(list #f #f #f #f)`. Each element eq? `#f` implies default behavior.
|
|
|
See below for description of the four elements.
|
|
|
|
|
|
sw-reqc A function, given the name of an implementation, returns whether this implementation should require the previous created component.
|
|
|
The default behavior is to toss a coin.
|
|
|
|
|
|
ud-sw-clauses A function, given a name of a resource, returns a clause-function.
|
|
|
The default behavior creates constraints for the properties load, frequency and the provided property of the required component, if any.
|
|
|
Further, the default creates a provision clause for the provided property of this clause.
|
|
|
|
|
|
ud-hw-clauses A function, given a name of a mode, returns a clause-function.
|
|
|
The default behavior creates provisions for the properties load and frequency.
|
|
|
|
|
|
ud-types A function, given a name of a resource, returns either `#f`, or the number of the resource type.
|
|
|
The default behvaior always returns `#f`, resulting in the number 0 for the resource type.
|
|
|
-----------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
A clause-function is a function given a name of the property, returns either `#t` (use default),
|
|
|
`#f` (do not include this property), or a list containing the following elements and which is used for
|
|
|
creating of the clause
|
|
|
|
|
|
- `makeprov` or `makereq`, functions to either create a provision or a requirement, defined in *ast-generation.scm*
|
|
|
- comparator, the comparator function to use, mostly defined in *ast.scm*
|
|
|
- value-function, a function taking two parameters (list of MetaParameter and the deployment target) and returning the value of the clause
|
|
|
|