Skip to Content.
Sympa Menu

maude-help - [Maude-help] Maude

maude-help AT lists.siebelschool.illinois.edu

Subject: Maude-help mailing list

List archive

[Maude-help] Maude


Chronological Thread 
  • From: "polina delfia" <isold AT live.fr>
  • To: <maude-help AT cs.uiuc.edu>
  • Subject: [Maude-help] Maude
  • Date: Wed, 4 May 2011 13:53:50 +0200
  • Importance: Normal
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
  • List-id: <maude-help.cs.uiuc.edu>

welcome,  well i’m trying to execute this strategie wish allow me to install all component’s services ( us exemple POSTFIX)
 
fmod CONFIG-STRAT is
 
protecting META-LEVEL .
 
  var install? :[Result4Tuple] .
  var MS : Term .
op InstallAll : Term -> Term .
 
ceq InstallAll(MS)
=
if(install? :: Result4Tuple)
then InstallAll(getTerm(install?))
else MS
fi
if install? := metaXapply(upModule('CONFIG,false), MS,'install, none, 0, unbounded, 0) .
 
eq InstallAll(MS) = MS [owise] .
endfm
 
i wanna execute this strategie  by installing Postfix services ( MTA,amavis et not sendmail)  defined on d module CONFIG
 
 
 
 
mod CONFIG is         
 
 
protecting CONTEXT .
 
 
sort Declaration .
 
 
sort Configuration .
 
 
subsort Context Declaration < Configuration .
 
 
op _:_ : Component Dependencies -> Declaration [ctor prec 31 ] .
 
 
op nilcnf : -> Configuration [ctor] .
 
 
op __ : Configuration Configuration -> Configuration [ assoc comm id: nilcnf prec 32 ] .
 
 
op PSDep : Dependencies Configuration -> Services .
 
 
op FSDep : Dependencies Context -> Services .
 
 
op FCDep : Dependencies Context -> Components .
 
 
op RSDep : Dependencies Service -> Nodes .
 
  op OPDep : Dependencies Service -> Nodes .
   op MODep : Dependencies Service -> Nodes .
 
 
 
op modify : Graph Component Dependencies Services -> Graph .
 
ops S-lib S-Amavis Smta Sav  : -> Service [ctor] .
 
 
ops FDS OS RAM : -> EnvProp [ctor] .
 
ops LINUX : -> Val [ctor] .
 
 
op my-conf : -> Configuration [ctor] .
 
 
 
 
var C : Component .
 
 
vars D D1 D2 : Dependencies .
 
 
var E : EnvVars .
 
 
var I : InstalledCs .
 
 
var G : Graph .
 
 
var spd1 :  SimplPredicate .
 
 
vars SS S : Service .
 
 
var Ss : Services .
 
 
vars Q P : Predicates .
 
 
var X : Context .
 
 
  *** (Forbidden services by component)
 
 
eq FSDep(P => S, X) = FS(P) .
 
 
eq FSDep(D1 andD D2,X) = FSDep(D1,X) FSDep(D2,X) .
 
 
eq FSDep(D1 orD D2,X) =  if evalDep(D1,X) then FSDep(D1,X) else  FSDep(D2 , X) fi .
 
 
eq FSDep(? D1 , X) = nils . *** (Forbidden components by component C)
 
 
eq FCDep(P => S, X) = FC(P) .
 
 
eq FCDep(D1 andD D2,X) = FCDep(D1, X) FCDep(D2, X) .
 
 
eq FCDep(D1 orD D2, X) = if evalDep(D1, X) then FCDep(D1, X) else FCDep(D2, X) fi  .
 
 
eq FCDep(? D1, X) = nilc .
 
 
*** (provided services of component C)
 
 
eq PSDep(P => S , X) = S .
 
 
 
eq PSDep(D1 andD D2, X) = PSDep(D1,X) PSDep(D2,X) .
 
 
eq PSDep(D1 orD D2,X) = if  evalDep(D1,X) then PSDep(D1,X) else PSDep(D2,X) fi .
 
 
eq PSDep(? D1, X) = PSDep(D1 , X) .
 
 
 
 
eq RSDep( C . S \/ spd1 /\ P => S , S) = ( C . S ) RSDep( spd1 /\ P => S , S ) .
 
 
eq RSDep( P => S , SS ) = niln [owise] .
 
 
eq RSDep(D1 andD D2, S) = RSDep(D1, S) RSDep(D2,S) .
 
 
eq RSDep(D1 orD D2,S) = RSDep(D1,S) .
 
 
eq RSDep(? D1,S) = RSDep(D1,S) .
 
 
eq modify(G, C, D, nils ) = G .
 
 
eq modify(G, C, D, S Ss ) =  modify(addE(addN( G , ( C . S ) ), allLinks(( C . S ), RSDep( D , S ) , M )), C, D, Ss ) [owise] .
 
 
rl [install] : ctx( E , I , G ) C : D => if  ( not ( C BelongsTo ForbiddenC(I)) and  evalDep( D , ctx( E , I , G ) )) then ctx( E , < C , PSDep(  D , ctx( E , I , G )), FSDep( D , ctx( E , I , G )), FCDep( D , ctx( E , I , G ))>  I, modify(G , C , D , PSDep( D, ctx( E , I , G )))) else ctx( E , I , G ) fi . 
 
eq my-conf = ctx( ( FDS = 1000.0 ) ( OS = LINUX ) ( RAM = 128.0 )  , < C1 , S-lib , nils , nilc > < CA , S-Amavis , nils , nilc > , | ( C1 . S-lib ) ( CA . S-Amavis ) , nile | ) POSTFIX : [ FDS = 50000.0 ] /\ notC C-SM   => Smta orD ? S-Amavis => Sav .
endm
 
 
 
 
 
 


  • [Maude-help] Maude, polina delfia, 05/04/2011

Archive powered by MHonArc 2.6.16.

Top of Page