Resource usage
- Resources originate in modules associated with nodes
- If a node provides a resource, it comes from one of:
- Module (code) associated with node
- Provided from child (derived)
- Interaction between siblings s1 --> s2
- provides complete access to s2 all resources of s1
- non-transitive relationship
- children of s2 also inherit by default (can be overridden providing
only a small set of rights if needed)
- responsibility rests with parent of s1, s2
- Specs. checked by a compiler - for module m associated with node n
- acual usage of resources in m conforms to rights granted to n
- resources provided by n either come from a child or originate in m
- usage links - derived by compiler - if node n has access to p and
associated module m uses a resource provided by p , then a usage link
points from p to m .
MIL75: Resource/Accessibility/Usage

dotted arrows - resources provided by child
solid arrow - sibling interaction
dashed arrow - usage links (from the compiler)
MIL75: Advantages
- Maps well to programming languages
- Name resolution
- Automated checks
Related Languages
- INTERCOL 1979
- interface control (type consistancy between modules)
- version control (system evolution - different versions and configurations)
precursor of configuration management
- Mesa 1979
- system wide type consistancy
- Interfaces defined in a separate from from implementation
- When needed, interfaces are imported with inclusion directives
- distributed information about architecture
- Gandalf, PWD (programmers work bench), CLU (Liskov), ADAPT (Abstract Design
and Programming Translator), SARA (System ARchitect's Apprentice) . . .
Polylith
J. Purtilo, ``The Polylith software bus'' ACM Transactions on Programming
Languages and Systems, vol. 16, no. 1,January 1994, pp. 151-174.
- Distribution:
- system-level namespace
- Interprocess communication - data flattening, protocols
- Heterogeneity: language and runtime system
- data difference between systems
- data differences between languages
- Integration choices: dependant on environment, modules and configuration
- consists both of a language (MIL) and runtime-environment (bus)
Phonebook example from paper
Use of Polylith with packagers

solid circles - input
hollow circles - output
Example Module Specifications
module generate {
source interface out : PATTERN = string
}
module print {
sink interface in : PATTERN = string
}
module dup {
sink interface in : PATTERN = string
source interface out1 : PATTERN = string
source interface out2 : PATTERN = string
}
Code includes library calls:
main() { /* dup module */
mh_init(. . .)
while (. . .) {
mh_read("in","S",new_string);
mh_write("out1","S",new_string);
mh_write("out2","S",new_string);
}
mh_shutdown(. . .);
}
Configuration Specifications
module new {
tool generate
tool dup
tool print1 : print
tool print2 : print
bind generate.out dup.in
bind dup1.out1 print1.in
bind dup1.out2 print2.in
}


Sieve of Eratosthenes
- Prime number generation
- Idea:
- Start with a list of numbers 2. . . n ,
2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, . . .
- first remove multiples of 2
2,3,5,7,9,11,13,15, . . .
- then remove multiples of 3
2,3,5,7,11,13, . . .
- then remove multiples of 5
2,3,5,7,11,13, . . .
- then 7, then 11, . . .
Parallel Solution
- To generate N primes, need N modules connected in a sequence.
- Module 1 has P = 2 and passes along odd numbers.
- Each module 2- N , the first input is the prime number P .
- For all further inputs, if the new number is
not a multiple of P , pass it to the next module in the list
- Once each module have a P value, the N modules hold
the first N prime numbers.

For module i > 1 :
read(new, P );
while (1)
read(new, i );
if i is not a multiple of P , write(out, i )
Other MILs
- lots of other MILs (see survey paper). Different foci or
domains.
- Many consider integration, dynamic reconfiguration, etc.
- Associated runtime environments
- Static checking of matches (source to sink, types match, interfaces bound, etc.)
What is missing?
- Interaction -
- in MIL75, procedure call assumed
- in Polylith, source/sink or RPC
Other interactions must be implemented in the module as read/writes.
- Problems with Scale
- Cannot enforce (or even specify) constraints