The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
Main Page
Packages
Classes
Files
File List
File Members
UnifyOperation.cs
Go to the documentation of this file.
1
using
System.Collections.Generic;
2
using
Tools;
3
namespace
TypeSystem.Operations {
4
public
class
UnifyOperation
:
TypeSystemOperation
{
5
//TypeExpression te;
6
//SortOfUnification unification;
7
//IList<Pair<TypeExpression, TypeExpression>> previouslyUnified;
8
9
//public UnifyOperation(TypeExpression te, SortOfUnification unification, IList<Pair<TypeExpression, TypeExpression>> previouslyUnified) {
10
// this.te = te;
11
// this.unification = unification;
12
// this.previouslyUnified = previouslyUnified;
13
//}
14
// //WriteType varial
15
//public override object AcceptOperation(TypeVariable t0) {
16
// if (this.te == null)
17
// return false;
18
// bool success = t0.addToMyEquivalenceClass(this.te, this.unification, this.previouslyUnified);
19
// // * Clears the type expression cache
20
// t0.ValidTypeExpression = this.te.ValidTypeExpression = false;
21
// return success;
22
//}
23
//public override objectn Unify(MethodType m0) {
24
// MethodType mt = this.te as MethodType;
25
// if (mt != null) {
26
// if (mt.ParameterListCount != m0.ParameterListCount)
27
// return false;
28
// bool success = true;
29
// for (int i = 0; i < m0.ParameterListCount; i++)
30
// if (!(bool)m0.GetParameter[i].AcceptOperation(new UnifyOperation(mt.GetParameter(i), this.unification, this.previouslyUnified)) {
31
// success = false;
32
// break;
33
// }
34
// if (success)
35
// success = (bool)m0.Return.AcceptOperation(new UnifyOperation(mt.Return, this.unification, this.previouslyUnified));
36
// // * Clears the type expression cache
37
// m0.ValidTypeExpression = false;
38
// this.te.ValidTypeExpression = false;
39
// return success;
40
// }
41
// if (this.te is TypeVariable && this.unification != SortOfUnification.Incremental)
42
// // * No incremental unification is commutative
43
// return this.te.AcceptOperation(UnifyOperation(m0, this.unification, this.previouslyUnified);
44
// return false;
45
//}
46
47
public
override
object
ReportError
(
TypeExpression
firstOperand) {
48
throw
new
System.NotImplementedException();
49
}
50
}
51
}
TypeSystem.Operations.TypeSystemOperation
This class represent the entry wnen sending a message to an operation object derived from TypeExpress...
Definition:
TypeSystemOperations.cs:10
TypeSystem.TypeExpression
Abstract class that represents all different types.
Definition:
TypeExpression.cs:34
TypeSystem.Operations.UnifyOperation.ReportError
override object ReportError(TypeExpression firstOperand)
Definition:
UnifyOperation.cs:47
TypeSystem.Operations.UnifyOperation
Definition:
UnifyOperation.cs:4
Desktop
stadyn
Inference
src
TypeSystem
Operations
UnifyOperation.cs
Generated on Mon Oct 21 2013 16:10:27 for The StaDyn Programming Language by
1.8.5