@@ -0,0 +1,280 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | ||
|
6 | namespace Implab.Automaton { | |
|
7 | public class DFATable : IDFATableBuilder { | |
|
8 | DFAStateDescriptior[] m_dfaTable; | |
|
9 | ||
|
10 | int m_stateCount; | |
|
11 | int m_symbolCount; | |
|
12 | int m_initialState; | |
|
13 | ||
|
14 | readonly HashSet<int> m_finalStates = new HashSet<int>(); | |
|
15 | readonly HashSet<AutomatonTransition> m_transitions = new HashSet<AutomatonTransition>(); | |
|
16 | ||
|
17 | void AssertNotReadOnly() { | |
|
18 | if (m_dfaTable != null) | |
|
19 | throw new InvalidOperationException("The object is readonly"); | |
|
20 | } | |
|
21 | ||
|
22 | ||
|
23 | #region IDFADefinition implementation | |
|
24 | ||
|
25 | public DFAStateDescriptior[] GetTransitionTable() { | |
|
26 | if (m_dfaTable == null) { | |
|
27 | if (m_stateCount <= 0) | |
|
28 | throw new InvalidOperationException("Invalid automaton definition: states count = {0}", m_stateCount); | |
|
29 | if (m_symbolCount <= 0) | |
|
30 | throw new InvalidOperationException("Invalid automaton definition: symbols count = {0}", m_symbolCount); | |
|
31 | ||
|
32 | m_dfaTable = ConstructTransitionTable(); | |
|
33 | } | |
|
34 | return m_dfaTable; | |
|
35 | } | |
|
36 | ||
|
37 | public bool IsFinalState(int s) { | |
|
38 | Safe.ArgumentInRange(s, 0, m_stateCount, "s"); | |
|
39 | ||
|
40 | return m_dfaTable != null ? m_dfaTable[s].final : m_finalStates.Contains(s); | |
|
41 | } | |
|
42 | ||
|
43 | public IEnumerable<int> FinalStates { | |
|
44 | get { | |
|
45 | return m_finalStates; | |
|
46 | } | |
|
47 | } | |
|
48 | ||
|
49 | public int StateCount { | |
|
50 | get { return m_stateCount; } | |
|
51 | } | |
|
52 | ||
|
53 | public int AlphabetSize { | |
|
54 | get { return m_symbolCount; } | |
|
55 | } | |
|
56 | ||
|
57 | public int InitialState { | |
|
58 | get { return m_initialState; } | |
|
59 | } | |
|
60 | ||
|
61 | #endregion | |
|
62 | ||
|
63 | protected virtual DFAStateDescriptior[] ConstructTransitionTable() { | |
|
64 | var dfaTable = new DFAStateDescriptior[m_stateCount]; | |
|
65 | ||
|
66 | ||
|
67 | foreach (var t in m_transitions) { | |
|
68 | if (dfaTable[t.s1].transitions == null) | |
|
69 | dfaTable[t.s1] = new DFAStateDescriptior(m_symbolCount, m_finalStates.Contains(t.s1)); | |
|
70 | ||
|
71 | dfaTable[t.s1].transitions[t.edge] = t.s2; | |
|
72 | } | |
|
73 | ||
|
74 | foreach (var s in m_finalStates) | |
|
75 | if (!dfaTable[s].final) | |
|
76 | m_dfaTable[s] = new DFAStateDescriptior(m_symbolCount, true); | |
|
77 | ||
|
78 | } | |
|
79 | ||
|
80 | public void SetInitialState(int s) { | |
|
81 | Safe.ArgumentAssert(s >= 0, "s"); | |
|
82 | m_initialState = s; | |
|
83 | } | |
|
84 | ||
|
85 | public void MarkFinalState(int state) { | |
|
86 | AssertNotReadOnly(); | |
|
87 | m_finalStates.Add(state); | |
|
88 | } | |
|
89 | ||
|
90 | public void Add(AutomatonTransition item) { | |
|
91 | AssertNotReadOnly(); | |
|
92 | Safe.ArgumentAssert(item.s1 >= 0, "item"); | |
|
93 | Safe.ArgumentAssert(item.s2 >= 0, "item"); | |
|
94 | Safe.ArgumentAssert(item.edge >= 0, "item"); | |
|
95 | ||
|
96 | m_stateCount = Math.Max(m_stateCount, Math.Max(item.s1, item.s2) + 1); | |
|
97 | m_symbolCount = Math.Max(m_symbolCount, item.edge); | |
|
98 | ||
|
99 | m_transitions.Add(item); | |
|
100 | } | |
|
101 | ||
|
102 | public void Clear() { | |
|
103 | AssertNotReadOnly(); | |
|
104 | ||
|
105 | m_stateCount = 0; | |
|
106 | m_symbolCount = 0; | |
|
107 | m_finalStates.Clear(); | |
|
108 | m_transitions.Clear(); | |
|
109 | } | |
|
110 | ||
|
111 | public bool Contains(AutomatonTransition item) { | |
|
112 | return m_transitions.Contains(item); | |
|
113 | } | |
|
114 | ||
|
115 | public void CopyTo(AutomatonTransition[] array, int arrayIndex) { | |
|
116 | m_transitions.CopyTo(array, arrayIndex); | |
|
117 | } | |
|
118 | ||
|
119 | public bool Remove(AutomatonTransition item) { | |
|
120 | AssertNotReadOnly(); | |
|
121 | m_transitions.Remove(item); | |
|
122 | } | |
|
123 | ||
|
124 | public int Count { | |
|
125 | get { | |
|
126 | return m_transitions.Count; | |
|
127 | } | |
|
128 | } | |
|
129 | ||
|
130 | public bool IsReadOnly { | |
|
131 | get { | |
|
132 | return m_dfaTable != null; | |
|
133 | } | |
|
134 | } | |
|
135 | ||
|
136 | public IEnumerator<AutomatonTransition> GetEnumerator() { | |
|
137 | return m_transitions.GetEnumerator(); | |
|
138 | } | |
|
139 | ||
|
140 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { | |
|
141 | return GetEnumerator(); | |
|
142 | } | |
|
143 | ||
|
144 | /// <summary>Формирует множества конечных состояний перед началом работы алгоритма минимизации.</summary> | |
|
145 | /// <remarks> | |
|
146 | /// В процессе построения минимального автомата требуется разделить множество состояний, | |
|
147 | /// на два подмножества - конечные состояния и все остальные, после чего эти подмножества | |
|
148 | /// будут резделены на более мелкие. Иногда требуется гарантировать различия конечных сосотяний, | |
|
149 | /// для этого необходимо переопределить даннцю фукнцию, для получения множеств конечных состояний. | |
|
150 | /// </remarks> | |
|
151 | /// <returns>The final states.</returns> | |
|
152 | protected virtual IEnumerable<HashSet<int>> GroupFinalStates() { | |
|
153 | return new HashSet<int>[] { m_finalStates }; | |
|
154 | } | |
|
155 | ||
|
156 | protected void Optimize<TInput, TState>( | |
|
157 | IDFATableBuilder optimalDFA, | |
|
158 | IAlphabet<TInput> inputAlphabet, | |
|
159 | IAlphabetBuilder<TInput> optimalInputAlphabet, | |
|
160 | IAlphabet<TState> stateAlphabet, | |
|
161 | IAlphabetBuilder<TState> optimalStateAlphabet | |
|
162 | ) { | |
|
163 | Safe.ArgumentNotNull(optimalDFA, "dfa"); | |
|
164 | Safe.ArgumentNotNull(optimalInputAlphabet, "optimalInputAlphabet"); | |
|
165 | Safe.ArgumentNotNull(optimalStateAlphabet, "optimalStateAlphabet"); | |
|
166 | Safe.ArgumentNotNull(inputAlphabet, "inputAlphabet"); | |
|
167 | Safe.ArgumentNotNull(stateAlphabet, "stateAlphabet"); | |
|
168 | ||
|
169 | if (inputAlphabet.Count != m_symbolCount) | |
|
170 | throw new InvalidOperationException("The input symbols aphabet mismatch"); | |
|
171 | if (stateAlphabet.Count != m_stateCount) | |
|
172 | throw new InvalidOperationException("The states alphabet mismatch"); | |
|
173 | ||
|
174 | var setComparer = new CustomEqualityComparer<HashSet<int>>( | |
|
175 | (x, y) => x.SetEquals(y), | |
|
176 | s => s.Sum(x => x.GetHashCode()) | |
|
177 | ); | |
|
178 | ||
|
179 | var optimalStates = new HashSet<HashSet<int>>(setComparer); | |
|
180 | var queue = new HashSet<HashSet<int>>(setComparer); | |
|
181 | ||
|
182 | // получаем конечные состояния, сгруппированные по маркерам | |
|
183 | optimalStates.UnionWith( | |
|
184 | GroupFinalStates() | |
|
185 | ); | |
|
186 | ||
|
187 | var state = new HashSet<int>( | |
|
188 | Enumerable | |
|
189 | .Range(0, m_stateCount - 1) | |
|
190 | .Where(i => !m_finalStates.Contains(i)) | |
|
191 | ); | |
|
192 | ||
|
193 | optimalStates.Add(state); | |
|
194 | queue.Add(state); | |
|
195 | ||
|
196 | var rmap = m_transitions | |
|
197 | .GroupBy(t => t.s2) | |
|
198 | .ToLookup( | |
|
199 | g => g.Key, // s2 | |
|
200 | g => g.ToLookup(t => t.edge, t => t.s1) | |
|
201 | ); | |
|
202 | ||
|
203 | while (queue.Count > 0) { | |
|
204 | var stateA = queue.First(); | |
|
205 | queue.Remove(stateA); | |
|
206 | ||
|
207 | for (int c = 0; c < m_symbolCount; c++) { | |
|
208 | var stateX = new HashSet<int>(); | |
|
209 | foreach(var a in stateA) | |
|
210 | stateX.UnionWith(rmap[a][c]); // all states from wich 'c' leads to 'a' | |
|
211 | ||
|
212 | foreach (var stateY in optimalStates.ToArray()) { | |
|
213 | if (stateX.Overlaps(stateY) && !stateY.IsSubsetOf(stateX)) { | |
|
214 | var stateR1 = new HashSet<int>(stateY); | |
|
215 | var stateR2 = new HashSet<int>(stateY); | |
|
216 | ||
|
217 | stateR1.IntersectWith(stateX); | |
|
218 | stateR2.ExceptWith(stateX); | |
|
219 | ||
|
220 | optimalStates.Remove(stateY); | |
|
221 | optimalStates.Add(stateR1); | |
|
222 | optimalStates.Add(stateR2); | |
|
223 | ||
|
224 | if (queue.Contains(stateY)) { | |
|
225 | queue.Remove(stateY); | |
|
226 | queue.Add(stateR1); | |
|
227 | queue.Add(stateR2); | |
|
228 | } else { | |
|
229 | queue.Add(stateR1.Count <= stateR2.Count ? stateR1 : stateR2); | |
|
230 | } | |
|
231 | } | |
|
232 | } | |
|
233 | } | |
|
234 | } | |
|
235 | ||
|
236 | // карта получения оптимального состояния по соотвествующему ему простому состоянию | |
|
237 | var statesMap = stateAlphabet.Reclassify(optimalStateAlphabet, optimalStates); | |
|
238 | ||
|
239 | // получаем минимальный алфавит | |
|
240 | // входные символы не различимы, если Move(s,a1) == Move(s,a2) | |
|
241 | var optimalAlphabet = m_transitions | |
|
242 | .GroupBy(t => Tuple.Create(statesMap[t.s1], statesMap[t.s2]), t => t.edge); | |
|
243 | ||
|
244 | var alphabetMap = inputAlphabet.Reclassify(optimalInputAlphabet, optimalAlphabet); | |
|
245 | ||
|
246 | // построение автомата | |
|
247 | optimalDFA.SetInitialState(statesMap[m_initialState]); | |
|
248 | ||
|
249 | foreach (var sf in m_finalStates.GroupBy(s => statesMap[s])) | |
|
250 | optimalDFA.MarkFinalState(sf.Key); | |
|
251 | ||
|
252 | foreach (var t in m_transitions.Select(t => new AutomatonTransition(statesMap[t.s1],statesMap[t.s2],alphabetMap[t.edge])).Distinct()) | |
|
253 | optimalDFA.Add(t); | |
|
254 | ||
|
255 | } | |
|
256 | ||
|
257 | protected void PrintDFA<TInput, TState>(IAlphabet<TInput> inputAlphabet, IAlphabet<TState> stateAlphabet) { | |
|
258 | Safe.ArgumentNotNull(inputAlphabet, "inputAlphabet"); | |
|
259 | Safe.ArgumentNotNull(stateAlphabet, "stateAlphabet"); | |
|
260 | ||
|
261 | var inputMap = inputAlphabet.CreateReverseMap(); | |
|
262 | var stateMap = stateAlphabet.CreateReverseMap(); | |
|
263 | ||
|
264 | for (int i = 0; i < inputMap.Length; i++) | |
|
265 | Console.WriteLine("C{0}: {1}", i, String.Join(",", inputMap[i])); | |
|
266 | ||
|
267 | ||
|
268 | foreach(var t in m_transitions) | |
|
269 | Console.WriteLine( | |
|
270 | "[{0}] -{{{1}}}-> [{2}]{3}", | |
|
271 | stateMap[t.s1], | |
|
272 | String.Join(",", inputMap[t.edge]), | |
|
273 | stateMap[t.s2], | |
|
274 | m_finalStates.Contains(t.s2) ? "$" : "" | |
|
275 | ); | |
|
276 | ||
|
277 | } | |
|
278 | ||
|
279 | } | |
|
280 | } |
@@ -0,0 +1,9 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Automaton.RegularExpressions { | |
|
4 | public interface IDFATable2<TTag> : IDFATable { | |
|
5 | void MarkFinalState(int state, TTag[] tags); | |
|
6 | ||
|
7 | } | |
|
8 | } | |
|
9 |
@@ -1,15 +1,26 | |||
|
1 | 1 | namespace Implab.Automaton { |
|
2 | 2 | public struct DFAStateDescriptior { |
|
3 | 3 | public readonly bool final; |
|
4 | 4 | public readonly int[] transitions; |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | public DFAStateDescriptior(int[] transitions, bool final) { |
|
8 | 8 | this.transitions = transitions; |
|
9 | 9 | this.final = final; |
|
10 | 10 | } |
|
11 | 11 | |
|
12 | 12 | public DFAStateDescriptior(int[] transitions) : this(transitions, false) { |
|
13 | 13 | } |
|
14 | ||
|
15 | public DFAStateDescriptior(int size, bool final) { | |
|
16 | Safe.ArgumentInRange(size, 0, int.MaxValue, "size"); | |
|
17 | ||
|
18 | this.final = final; | |
|
19 | ||
|
20 | transitions = new int[size]; | |
|
21 | ||
|
22 | for (int i = 0; i < size; i++) | |
|
23 | transitions[i] = DFAConst.UNREACHABLE_STATE; | |
|
24 | } | |
|
14 | 25 | } |
|
15 | 26 | } |
@@ -1,43 +1,43 | |||
|
1 | 1 | using System; |
|
2 | 2 | |
|
3 | 3 | namespace Implab.Automaton.RegularExpressions { |
|
4 |
public class RegularDFADefinition<TInput, TTag> : DFAT |
|
|
4 | public class RegularDFADefinition<TInput, TTag> : DFATable { | |
|
5 | 5 | |
|
6 | 6 | readonly IAlphabet<TInput> m_alphabet; |
|
7 | 7 | |
|
8 | 8 | public RegularDFADefinition(IAlphabet<TInput> alphabet) { |
|
9 | 9 | Safe.ArgumentNotNull(alphabet, "aplhabet"); |
|
10 | 10 | |
|
11 | 11 | m_alphabet = alphabet; |
|
12 | 12 | } |
|
13 | 13 | |
|
14 | 14 | |
|
15 | 15 | public IAlphabet<TInput> InputAlphabet { |
|
16 | 16 | get { |
|
17 | 17 | return m_alphabet; |
|
18 | 18 | } |
|
19 | 19 | } |
|
20 | 20 | |
|
21 |
protected override DFAStateDescriptior |
|
|
21 | protected override DFAStateDescriptior[] ConstructTransitionTable() { | |
|
22 | 22 | if (InputAlphabet.Count != m_alphabet.Count) |
|
23 | 23 | throw new InvalidOperationException("The alphabet doesn't match the transition table"); |
|
24 | 24 | |
|
25 | 25 | return base.ConstructTransitionTable(); |
|
26 | 26 | } |
|
27 | 27 | |
|
28 | 28 | /// <summary> |
|
29 | 29 | /// Optimize the specified alphabet. |
|
30 | 30 | /// </summary> |
|
31 | 31 | /// <param name = "dfaTable"></param> |
|
32 | 32 | /// <param name="alphabet">Пустой алфавит, который будет зполнен в процессе оптимизации.</param> |
|
33 | 33 | public void Optimize(IDFATableBuilder<TTag> dfaTable, IAlphabetBuilder<TInput> alphabet) { |
|
34 | 34 | Safe.ArgumentNotNull(alphabet, "alphabet"); |
|
35 | 35 | Safe.ArgumentNotNull(dfaTable, "dfaTable"); |
|
36 | 36 | |
|
37 | 37 | Optimize(dfaTable, InputAlphabet, alphabet, new DummyAlphabet(StateCount), new MapAlphabet<int>()); |
|
38 | 38 | } |
|
39 | 39 | |
|
40 | 40 | |
|
41 | 41 | } |
|
42 | 42 | } |
|
43 | 43 |
@@ -1,271 +1,272 | |||
|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 | 3 | <PropertyGroup> |
|
4 | 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
5 | 5 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
6 | 6 | <ProjectGuid>{F550F1F8-8746-4AD0-9614-855F4C4B7F05}</ProjectGuid> |
|
7 | 7 | <OutputType>Library</OutputType> |
|
8 | 8 | <RootNamespace>Implab</RootNamespace> |
|
9 | 9 | <AssemblyName>Implab</AssemblyName> |
|
10 | 10 | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
11 | 11 | <ReleaseVersion>0.2</ReleaseVersion> |
|
12 | 12 | <ProductVersion>8.0.30703</ProductVersion> |
|
13 | 13 | <SchemaVersion>2.0</SchemaVersion> |
|
14 | 14 | </PropertyGroup> |
|
15 | 15 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
16 | 16 | <DebugSymbols>true</DebugSymbols> |
|
17 | 17 | <DebugType>full</DebugType> |
|
18 | 18 | <Optimize>false</Optimize> |
|
19 | 19 | <OutputPath>bin\Debug</OutputPath> |
|
20 | 20 | <DefineConstants>TRACE;DEBUG;</DefineConstants> |
|
21 | 21 | <ErrorReport>prompt</ErrorReport> |
|
22 | 22 | <WarningLevel>4</WarningLevel> |
|
23 | 23 | <ConsolePause>false</ConsolePause> |
|
24 | 24 | <RunCodeAnalysis>true</RunCodeAnalysis> |
|
25 | 25 | </PropertyGroup> |
|
26 | 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
27 | 27 | <DebugType>full</DebugType> |
|
28 | 28 | <Optimize>true</Optimize> |
|
29 | 29 | <OutputPath>bin\Release</OutputPath> |
|
30 | 30 | <ErrorReport>prompt</ErrorReport> |
|
31 | 31 | <WarningLevel>4</WarningLevel> |
|
32 | 32 | <ConsolePause>false</ConsolePause> |
|
33 | 33 | </PropertyGroup> |
|
34 | 34 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug 4.5|AnyCPU' "> |
|
35 | 35 | <DebugSymbols>true</DebugSymbols> |
|
36 | 36 | <DebugType>full</DebugType> |
|
37 | 37 | <Optimize>false</Optimize> |
|
38 | 38 | <OutputPath>bin\Debug</OutputPath> |
|
39 | 39 | <DefineConstants>TRACE;DEBUG;NET_4_5</DefineConstants> |
|
40 | 40 | <ErrorReport>prompt</ErrorReport> |
|
41 | 41 | <WarningLevel>4</WarningLevel> |
|
42 | 42 | <RunCodeAnalysis>true</RunCodeAnalysis> |
|
43 | 43 | <ConsolePause>false</ConsolePause> |
|
44 | 44 | </PropertyGroup> |
|
45 | 45 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.5|AnyCPU' "> |
|
46 | 46 | <Optimize>true</Optimize> |
|
47 | 47 | <OutputPath>bin\Release</OutputPath> |
|
48 | 48 | <ErrorReport>prompt</ErrorReport> |
|
49 | 49 | <WarningLevel>4</WarningLevel> |
|
50 | 50 | <ConsolePause>false</ConsolePause> |
|
51 | 51 | <DefineConstants>NET_4_5</DefineConstants> |
|
52 | 52 | </PropertyGroup> |
|
53 | 53 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugMono|AnyCPU' "> |
|
54 | 54 | <DebugSymbols>true</DebugSymbols> |
|
55 | 55 | <DebugType>full</DebugType> |
|
56 | 56 | <Optimize>false</Optimize> |
|
57 | 57 | <OutputPath>bin\Debug</OutputPath> |
|
58 | 58 | <DefineConstants>TRACE;DEBUG;NET_4_5;MONO</DefineConstants> |
|
59 | 59 | <ErrorReport>prompt</ErrorReport> |
|
60 | 60 | <WarningLevel>4</WarningLevel> |
|
61 | 61 | <RunCodeAnalysis>true</RunCodeAnalysis> |
|
62 | 62 | <ConsolePause>false</ConsolePause> |
|
63 | 63 | </PropertyGroup> |
|
64 | 64 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseMono|AnyCPU' "> |
|
65 | 65 | <Optimize>true</Optimize> |
|
66 | 66 | <OutputPath>bin\Release</OutputPath> |
|
67 | 67 | <DefineConstants>NET_4_5;MONO;</DefineConstants> |
|
68 | 68 | <ErrorReport>prompt</ErrorReport> |
|
69 | 69 | <WarningLevel>4</WarningLevel> |
|
70 | 70 | <ConsolePause>false</ConsolePause> |
|
71 | 71 | </PropertyGroup> |
|
72 | 72 | <ItemGroup> |
|
73 | 73 | <Reference Include="System" /> |
|
74 | 74 | <Reference Include="System.Xml" /> |
|
75 | 75 | <Reference Include="mscorlib" /> |
|
76 | 76 | </ItemGroup> |
|
77 | 77 | <ItemGroup> |
|
78 | 78 | <Compile Include="CustomEqualityComparer.cs" /> |
|
79 | 79 | <Compile Include="Diagnostics\ConsoleTraceListener.cs" /> |
|
80 | 80 | <Compile Include="Diagnostics\EventText.cs" /> |
|
81 | 81 | <Compile Include="Diagnostics\LogChannel.cs" /> |
|
82 | 82 | <Compile Include="Diagnostics\LogicalOperation.cs" /> |
|
83 | 83 | <Compile Include="Diagnostics\TextFileListener.cs" /> |
|
84 | 84 | <Compile Include="Diagnostics\TraceLog.cs" /> |
|
85 | 85 | <Compile Include="Diagnostics\TraceEvent.cs" /> |
|
86 | 86 | <Compile Include="Diagnostics\TraceEventType.cs" /> |
|
87 | 87 | <Compile Include="ICancellable.cs" /> |
|
88 | 88 | <Compile Include="IProgressHandler.cs" /> |
|
89 | 89 | <Compile Include="IProgressNotifier.cs" /> |
|
90 | 90 | <Compile Include="IPromiseT.cs" /> |
|
91 | 91 | <Compile Include="IPromise.cs" /> |
|
92 | 92 | <Compile Include="IServiceLocator.cs" /> |
|
93 | 93 | <Compile Include="ITaskController.cs" /> |
|
94 | 94 | <Compile Include="Parallels\DispatchPool.cs" /> |
|
95 | 95 | <Compile Include="Parallels\ArrayTraits.cs" /> |
|
96 | 96 | <Compile Include="Parallels\MTQueue.cs" /> |
|
97 | 97 | <Compile Include="Parallels\WorkerPool.cs" /> |
|
98 | 98 | <Compile Include="ProgressInitEventArgs.cs" /> |
|
99 | 99 | <Compile Include="Properties\AssemblyInfo.cs" /> |
|
100 | 100 | <Compile Include="Parallels\AsyncPool.cs" /> |
|
101 | 101 | <Compile Include="Safe.cs" /> |
|
102 | 102 | <Compile Include="ValueEventArgs.cs" /> |
|
103 | 103 | <Compile Include="PromiseExtensions.cs" /> |
|
104 | 104 | <Compile Include="SyncContextPromise.cs" /> |
|
105 | 105 | <Compile Include="Diagnostics\OperationContext.cs" /> |
|
106 | 106 | <Compile Include="Diagnostics\TraceContext.cs" /> |
|
107 | 107 | <Compile Include="Diagnostics\LogEventArgs.cs" /> |
|
108 | 108 | <Compile Include="Diagnostics\LogEventArgsT.cs" /> |
|
109 | 109 | <Compile Include="Diagnostics\Extensions.cs" /> |
|
110 | 110 | <Compile Include="PromiseEventType.cs" /> |
|
111 | 111 | <Compile Include="Parallels\AsyncQueue.cs" /> |
|
112 | 112 | <Compile Include="PromiseT.cs" /> |
|
113 | 113 | <Compile Include="IDeferred.cs" /> |
|
114 | 114 | <Compile Include="IDeferredT.cs" /> |
|
115 | 115 | <Compile Include="Promise.cs" /> |
|
116 | 116 | <Compile Include="PromiseTransientException.cs" /> |
|
117 | 117 | <Compile Include="Parallels\Signal.cs" /> |
|
118 | 118 | <Compile Include="Parallels\SharedLock.cs" /> |
|
119 | 119 | <Compile Include="Diagnostics\ILogWriter.cs" /> |
|
120 | 120 | <Compile Include="Diagnostics\ListenerBase.cs" /> |
|
121 | 121 | <Compile Include="Parallels\BlockingQueue.cs" /> |
|
122 | 122 | <Compile Include="AbstractEvent.cs" /> |
|
123 | 123 | <Compile Include="AbstractPromise.cs" /> |
|
124 | 124 | <Compile Include="AbstractPromiseT.cs" /> |
|
125 | 125 | <Compile Include="FuncTask.cs" /> |
|
126 | 126 | <Compile Include="FuncTaskBase.cs" /> |
|
127 | 127 | <Compile Include="FuncTaskT.cs" /> |
|
128 | 128 | <Compile Include="ActionChainTaskBase.cs" /> |
|
129 | 129 | <Compile Include="ActionChainTask.cs" /> |
|
130 | 130 | <Compile Include="ActionChainTaskT.cs" /> |
|
131 | 131 | <Compile Include="FuncChainTaskBase.cs" /> |
|
132 | 132 | <Compile Include="FuncChainTask.cs" /> |
|
133 | 133 | <Compile Include="FuncChainTaskT.cs" /> |
|
134 | 134 | <Compile Include="ActionTaskBase.cs" /> |
|
135 | 135 | <Compile Include="ActionTask.cs" /> |
|
136 | 136 | <Compile Include="ActionTaskT.cs" /> |
|
137 | 137 | <Compile Include="ICancellationToken.cs" /> |
|
138 | 138 | <Compile Include="SuccessPromise.cs" /> |
|
139 | 139 | <Compile Include="SuccessPromiseT.cs" /> |
|
140 | 140 | <Compile Include="PromiseAwaiterT.cs" /> |
|
141 | 141 | <Compile Include="PromiseAwaiter.cs" /> |
|
142 | 142 | <Compile Include="Components\ComponentContainer.cs" /> |
|
143 | 143 | <Compile Include="Components\Disposable.cs" /> |
|
144 | 144 | <Compile Include="Components\DisposablePool.cs" /> |
|
145 | 145 | <Compile Include="Components\ObjectPool.cs" /> |
|
146 | 146 | <Compile Include="Components\ServiceLocator.cs" /> |
|
147 | 147 | <Compile Include="Components\IInitializable.cs" /> |
|
148 | 148 | <Compile Include="TaskController.cs" /> |
|
149 | 149 | <Compile Include="Components\App.cs" /> |
|
150 | 150 | <Compile Include="Components\IRunnable.cs" /> |
|
151 | 151 | <Compile Include="Components\ExecutionState.cs" /> |
|
152 | 152 | <Compile Include="Components\RunnableComponent.cs" /> |
|
153 | 153 | <Compile Include="Components\IFactory.cs" /> |
|
154 | 154 | <Compile Include="Automaton\DFAStateDescriptor.cs" /> |
|
155 | 155 | <Compile Include="Automaton\EnumAlphabet.cs" /> |
|
156 | 156 | <Compile Include="Automaton\IAlphabet.cs" /> |
|
157 | 157 | <Compile Include="Automaton\ParserException.cs" /> |
|
158 | 158 | <Compile Include="Automaton\Scanner.cs" /> |
|
159 | 159 | <Compile Include="Automaton\IndexedAlphabetBase.cs" /> |
|
160 | 160 | <Compile Include="Automaton\IAlphabetBuilder.cs" /> |
|
161 | 161 | <Compile Include="Automaton\RegularExpressions\AltToken.cs" /> |
|
162 | 162 | <Compile Include="Automaton\RegularExpressions\BinaryToken.cs" /> |
|
163 | 163 | <Compile Include="Automaton\RegularExpressions\CatToken.cs" /> |
|
164 | 164 | <Compile Include="Automaton\DFAConst.cs" /> |
|
165 | 165 | <Compile Include="Automaton\RegularExpressions\Grammar.cs" /> |
|
166 | 166 | <Compile Include="Automaton\RegularExpressions\StarToken.cs" /> |
|
167 | 167 | <Compile Include="Automaton\RegularExpressions\SymbolToken.cs" /> |
|
168 | 168 | <Compile Include="Automaton\RegularExpressions\EmptyToken.cs" /> |
|
169 | 169 | <Compile Include="Automaton\RegularExpressions\EndToken.cs" /> |
|
170 | 170 | <Compile Include="Automaton\RegularExpressions\Token.cs" /> |
|
171 | 171 | <Compile Include="Automaton\RegularExpressions\IVisitor.cs" /> |
|
172 | 172 | <Compile Include="Automaton\AutomatonTransition.cs" /> |
|
173 | 173 | <Compile Include="Automaton\RegularExpressions\RegularDFABuilder.cs" /> |
|
174 | 174 | <Compile Include="Formats\JSON\JSONElementContext.cs" /> |
|
175 | 175 | <Compile Include="Formats\JSON\JSONElementType.cs" /> |
|
176 | 176 | <Compile Include="Formats\JSON\JSONGrammar.cs" /> |
|
177 | 177 | <Compile Include="Formats\JSON\JSONParser.cs" /> |
|
178 | 178 | <Compile Include="Formats\JSON\JSONScanner.cs" /> |
|
179 | 179 | <Compile Include="Formats\JSON\JsonTokenType.cs" /> |
|
180 | 180 | <Compile Include="Formats\JSON\JSONWriter.cs" /> |
|
181 | 181 | <Compile Include="Formats\JSON\JSONXmlReader.cs" /> |
|
182 | 182 | <Compile Include="Formats\JSON\JSONXmlReaderOptions.cs" /> |
|
183 | 183 | <Compile Include="Formats\JSON\StringTranslator.cs" /> |
|
184 | 184 | <Compile Include="Automaton\MapAlphabet.cs" /> |
|
185 | 185 | <Compile Include="Automaton\DummyAlphabet.cs" /> |
|
186 | <Compile Include="Automaton\DFATransitionTable.cs" /> | |
|
187 | 186 | <Compile Include="Automaton\RegularExpressions\RegularDFADefinition.cs" /> |
|
188 | 187 | <Compile Include="Formats\CharAlphabet.cs" /> |
|
189 | 188 | <Compile Include="Formats\ByteAlphabet.cs" /> |
|
190 | 189 | <Compile Include="Formats\RegularCharDFADefinition.cs" /> |
|
191 | 190 | <Compile Include="Automaton\IDFATable.cs" /> |
|
192 | 191 | <Compile Include="Automaton\IDFATableBuilder.cs" /> |
|
192 | <Compile Include="Automaton\DFATable.cs" /> | |
|
193 | <Compile Include="Automaton\RegularExpressions\IDFATable2.cs" /> | |
|
193 | 194 | </ItemGroup> |
|
194 | 195 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
195 | 196 | <ItemGroup /> |
|
196 | 197 | <ProjectExtensions> |
|
197 | 198 | <MonoDevelop> |
|
198 | 199 | <Properties> |
|
199 | 200 | <Policies> |
|
200 | 201 | <CSharpFormattingPolicy IndentSwitchBody="True" NamespaceBraceStyle="EndOfLine" ClassBraceStyle="EndOfLine" InterfaceBraceStyle="EndOfLine" StructBraceStyle="EndOfLine" EnumBraceStyle="EndOfLine" MethodBraceStyle="EndOfLine" ConstructorBraceStyle="EndOfLine" DestructorBraceStyle="EndOfLine" BeforeMethodDeclarationParentheses="False" BeforeMethodCallParentheses="False" BeforeConstructorDeclarationParentheses="False" NewLineBeforeConstructorInitializerColon="NewLine" NewLineAfterConstructorInitializerColon="SameLine" BeforeIndexerDeclarationBracket="False" BeforeDelegateDeclarationParentheses="False" NewParentheses="False" SpacesBeforeBrackets="False" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" /> |
|
201 | 202 | <TextStylePolicy FileWidth="120" EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" /> |
|
202 | 203 | <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild" /> |
|
203 | 204 | <TextStylePolicy FileWidth="120" TabsToSpaces="False" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="application/xml" /> |
|
204 | 205 | <XmlFormattingPolicy inheritsSet="Mono" inheritsScope="application/xml" scope="application/xml" /> |
|
205 | 206 | <TextStylePolicy FileWidth="120" TabsToSpaces="False" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" /> |
|
206 | 207 | <NameConventionPolicy> |
|
207 | 208 | <Rules> |
|
208 | 209 | <NamingRule Name="Namespaces" AffectedEntity="Namespace" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
209 | 210 | <NamingRule Name="Types" AffectedEntity="Class, Struct, Enum, Delegate" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
210 | 211 | <NamingRule Name="Interfaces" AffectedEntity="Interface" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
211 | 212 | <RequiredPrefixes> |
|
212 | 213 | <String>I</String> |
|
213 | 214 | </RequiredPrefixes> |
|
214 | 215 | </NamingRule> |
|
215 | 216 | <NamingRule Name="Attributes" AffectedEntity="CustomAttributes" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
216 | 217 | <RequiredSuffixes> |
|
217 | 218 | <String>Attribute</String> |
|
218 | 219 | </RequiredSuffixes> |
|
219 | 220 | </NamingRule> |
|
220 | 221 | <NamingRule Name="Event Arguments" AffectedEntity="CustomEventArgs" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
221 | 222 | <RequiredSuffixes> |
|
222 | 223 | <String>EventArgs</String> |
|
223 | 224 | </RequiredSuffixes> |
|
224 | 225 | </NamingRule> |
|
225 | 226 | <NamingRule Name="Exceptions" AffectedEntity="CustomExceptions" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
226 | 227 | <RequiredSuffixes> |
|
227 | 228 | <String>Exception</String> |
|
228 | 229 | </RequiredSuffixes> |
|
229 | 230 | </NamingRule> |
|
230 | 231 | <NamingRule Name="Methods" AffectedEntity="Methods" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
231 | 232 | <NamingRule Name="Static Readonly Fields" AffectedEntity="ReadonlyField" VisibilityMask="Internal, Protected, Public" NamingStyle="CamelCase" IncludeInstanceMembers="False" IncludeStaticEntities="True" /> |
|
232 | 233 | <NamingRule Name="Fields (Non Private)" AffectedEntity="Field" VisibilityMask="Internal, Public" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
233 | 234 | <NamingRule Name="ReadOnly Fields (Non Private)" AffectedEntity="ReadonlyField" VisibilityMask="Internal, Public" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False" /> |
|
234 | 235 | <NamingRule Name="Fields (Private)" AffectedEntity="Field, ReadonlyField" VisibilityMask="Private, Protected" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False"> |
|
235 | 236 | <RequiredPrefixes> |
|
236 | 237 | <String>m_</String> |
|
237 | 238 | </RequiredPrefixes> |
|
238 | 239 | </NamingRule> |
|
239 | 240 | <NamingRule Name="Static Fields (Private)" AffectedEntity="Field" VisibilityMask="Private" NamingStyle="CamelCase" IncludeInstanceMembers="False" IncludeStaticEntities="True"> |
|
240 | 241 | <RequiredPrefixes> |
|
241 | 242 | <String>_</String> |
|
242 | 243 | </RequiredPrefixes> |
|
243 | 244 | </NamingRule> |
|
244 | 245 | <NamingRule Name="ReadOnly Fields (Private)" AffectedEntity="ReadonlyField" VisibilityMask="Private, Protected" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False"> |
|
245 | 246 | <RequiredPrefixes> |
|
246 | 247 | <String>m_</String> |
|
247 | 248 | </RequiredPrefixes> |
|
248 | 249 | </NamingRule> |
|
249 | 250 | <NamingRule Name="Constant Fields" AffectedEntity="ConstantField" VisibilityMask="VisibilityMask" NamingStyle="AllUpper" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
250 | 251 | <NamingRule Name="Properties" AffectedEntity="Property" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
251 | 252 | <NamingRule Name="Events" AffectedEntity="Event" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
252 | 253 | <NamingRule Name="Enum Members" AffectedEntity="EnumMember" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
253 | 254 | <NamingRule Name="Parameters" AffectedEntity="Parameter, LocalVariable" VisibilityMask="VisibilityMask" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
254 | 255 | <NamingRule Name="Type Parameters" AffectedEntity="TypeParameter" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
255 | 256 | <RequiredPrefixes> |
|
256 | 257 | <String>T</String> |
|
257 | 258 | </RequiredPrefixes> |
|
258 | 259 | </NamingRule> |
|
259 | 260 | </Rules> |
|
260 | 261 | </NameConventionPolicy> |
|
261 | 262 | </Policies> |
|
262 | 263 | </Properties> |
|
263 | 264 | </MonoDevelop> |
|
264 | 265 | </ProjectExtensions> |
|
265 | 266 | <ItemGroup> |
|
266 | 267 | <Folder Include="Components\" /> |
|
267 | 268 | <Folder Include="Automaton\RegularExpressions\" /> |
|
268 | 269 | <Folder Include="Formats\" /> |
|
269 | 270 | <Folder Include="Formats\JSON\" /> |
|
270 | 271 | </ItemGroup> |
|
271 | 272 | </Project> No newline at end of file |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now