Project

General

Profile

Revision 1d36cd07 src/lib/Nom2fix.ml

View differences:

src/lib/Nom2fix.ml
94 94

  
95 95
  !ret
96 96

  
97
let delFix foo =
98
let rec selFixpoints fo =
99
  let n = CoAlgFormula.depthFormula fo in
100
  match fo with 
101
    | CoAlgFormula.FALSE -> CoAlgFormula.FALSE
102
    | CoAlgFormula.TRUE -> CoAlgFormula.TRUE
103
    | CoAlgFormula.AP s -> CoAlgFormula.AP s
104
    | CoAlgFormula.NOT f -> CoAlgFormula.NOT (selFixpoints f)
105
    | CoAlgFormula.OR (f1, f2) -> CoAlgFormula.OR ((selFixpoints f1), (selFixpoints f2))
106
    | CoAlgFormula.AND (f1, f2) -> CoAlgFormula.AND ((selFixpoints f1), (selFixpoints f2))
107
    | CoAlgFormula.EQU (f1, f2) -> CoAlgFormula.EQU ((selFixpoints f1), (selFixpoints f2))
108
    | CoAlgFormula.IMP (f1, f2) -> CoAlgFormula.IMP ((selFixpoints f1), (selFixpoints f2))
109
    | CoAlgFormula.EX (s, f) -> CoAlgFormula.EX (s, (selFixpoints f))
110
    | CoAlgFormula.AX (s, f) -> CoAlgFormula.AX (s, (selFixpoints f))
111
    | CoAlgFormula.ENFORCES (l, f) -> CoAlgFormula.ENFORCES(l, (selFixpoints f))
112
    | CoAlgFormula.ALLOWS (l, f) -> CoAlgFormula.ALLOWS(l, (selFixpoints f))
113
    | CoAlgFormula.MIN (i, s, f) -> CoAlgFormula.MIN(i, s, (selFixpoints f))
114
    | CoAlgFormula.MAX (i, s, f) -> CoAlgFormula.MAX(i, s, (selFixpoints f))
115
    | CoAlgFormula.MORETHAN (i, s, f) -> CoAlgFormula.MORETHAN(i, s, (selFixpoints f))
116
    | CoAlgFormula.MAXEXCEPT (i, s, f) -> CoAlgFormula.MAXEXCEPT(i, s, (selFixpoints f))
117
    | CoAlgFormula.ATLEASTPROB (r, f) -> CoAlgFormula.ATLEASTPROB(r, (selFixpoints f))
118
    | CoAlgFormula.LESSPROBFAIL (r, f) -> CoAlgFormula.LESSPROBFAIL (r, (selFixpoints f))
119
    | CoAlgFormula.ID f -> CoAlgFormula.ID (selFixpoints f)
120
    | CoAlgFormula.MU (s, f) -> 
121
        let ret = ref CoAlgFormula.FALSE in
122
        for i = 1 to n+1 do
123
          ret := CoAlgFormula.OR(f, EX("",!ret));
124
        done;
125
        !ret
126
    | CoAlgFormula.NU (s, f) -> 
127
        let ret = ref CoAlgFormula.TRUE in
128
        for i = 1 to n+1 do
129
          ret := CoAlgFormula.AND(f, AX("",!ret));
130
        done;
131
        !ret
132
    | CoAlgFormula.AF f -> CoAlgFormula.AF (selFixpoints f)
133
    | CoAlgFormula.EF f -> CoAlgFormula.EF (selFixpoints f)
134
    | CoAlgFormula.AG f -> CoAlgFormula.AG (selFixpoints f)
135
    | CoAlgFormula.EG f -> CoAlgFormula.EG (selFixpoints f)
136
    | CoAlgFormula.VAR s -> CoAlgFormula.VAR s
137
in
138
selFixpoints foo
139

  
97 140

  
98 141
let calcinv f noms nomTbl sorts s =
99 142
  (*calc flc*)

Also available in: Unified diff