kevinclancy avatar kevinclancy committed a34b6f3

changed "deduced" to "accumulated"

Comments (0)

Files changed (3)

LoveStudio/LuaAnalyzer/Context.fs

             None
 
     /// Undoes all types in the type environment (in effect,
-    /// reducing all deduced types to their permanent types).
+    /// reducing all accumulated types to their permanent types).
     member this.UndoAllAccumulations
         with get () =
             let mapEntry (key : string) (field : Field) : Field =

LoveStudio/LuaAnalyzer/Type.fs

         | _ ->
             failwith "tried to access a field of some non-record type"
 
-    /// Generate a deduced Type for when an field of type original 
-    /// has been determined to have type deduced.
-    static member MakeDeducedTy (original : Type) (deduced : Type) =
+    /// Generate an accumulated type for when an field of type original 
+    /// has been determined to have type accumulated.
+    static member MakeAccumulatedTy (original : Type) (accumulated : Type) =
         
         let perm =
             match original with
                 original
 
         let temp =
-            match deduced with
-            | AccumulatedTy(_,deducedOriginal) ->
-                deducedOriginal
+            match accumulated with
+            | AccumulatedTy(_,accumulatedOriginal) ->
+                accumulatedOriginal
             | _ ->
-                deduced
+                accumulated
     
         AccumulatedTy(perm,temp)
 
                         if isNewField then
                             targetField.ty
                         else
-                            Type.MakeDeducedTy lastField.ty targetField.ty
+                            Type.MakeAccumulatedTy lastField.ty targetField.ty
 
                     { lastField with ty = newTy }
                 match accField.ty with 
                             fields.[head]
                         else
                             Field.OfType(UnknownTy)
-                    let deduced = { headField with ty = applyAt headField rest targetField }
-                    RecordTy(a,b,c,d,fields.Add(head,deduced),e,f)
+                    let accumulated = { headField with ty = applyAt headField rest targetField }
+                    RecordTy(a,b,c,d,fields.Add(head,accumulated),e,f)
                 | OpenRecordTy(a,b,c,d,fields,e,f) ->
                     let headField = 
                         if fields.ContainsKey head then
                             fields.[head]
                         else
                             Field.OfType(UnknownTy)
-                    let deduced = { headField with ty = applyAt headField rest targetField }
-                    OpenRecordTy(a,b,c,d,fields.Add(head,deduced),e,f)
+                    let accumulated = { headField with ty = applyAt headField rest targetField }
+                    OpenRecordTy(a,b,c,d,fields.Add(head,accumulated),e,f)
                 | AccumulatedTy(a, RecordTy(b,c,d,e,fields,f,g)) ->
                     let headField = 
                         if fields.ContainsKey head then
                             fields.[head]
                         else
                             Field.OfType(UnknownTy)
-                    let deduced = { headField with ty = applyAt headField rest targetField }
-                    AccumulatedTy(a,RecordTy(b,c,d,e,fields.Add(head,deduced),f,g))
+                    let accumulated = { headField with ty = applyAt headField rest targetField }
+                    AccumulatedTy(a,RecordTy(b,c,d,e,fields.Add(head,accumulated),f,g))
                 | AccumulatedTy(a, OpenRecordTy(b,c,d,e,fields,f,g)) ->
                     let headField = 
                         if fields.ContainsKey head then
                             fields.[head]
                         else
                             Field.OfType(UnknownTy)
-                    let deduced = { headField with ty = applyAt headField rest targetField }
-                    AccumulatedTy(a,OpenRecordTy(b,c,d,e,fields.Add(head,deduced),f,g))                    
+                    let accumulated = { headField with ty = applyAt headField rest targetField }
+                    AccumulatedTy(a,OpenRecordTy(b,c,d,e,fields.Add(head,accumulated),f,g))                    
                 | _ ->
                     UnknownTy
               
         if fields.IsEmpty then
-            Type.MakeDeducedTy baseField.ty targetField.ty
+            Type.MakeAccumulatedTy baseField.ty targetField.ty
         else   
             applyAt baseField fields targetField
     

LoveStudio/LuaAnalyzer/Typechecker.fs

 /// ctxt - the context which the condition expression occurs in
 /// cond - a condition expression to deduce accumulations from the negation of
 /// 
-/// returns a list of all accumulations which can deduced from the fact that the
+/// returns a list of all accumulations which can be deduced from the fact that the
 /// condition expression evaluates to false.
 ///
 /// Example:
 /// ctxt - the context which the condition expression occurs in
 /// cond - a condition expression to deduce accumulations from
 /// 
-/// returns a list of all accumulations which can deduced from the fact that the
+/// returns a list of all accumulations which can be deduced from the fact that the
 /// condition expression evaluates to true.
 ///
 /// Example:
             | _ ->
                 ctxt
              
-        typeCheckStat ctxt.UndoAllDeductions body
+        typeCheckStat ctxt.UndoAllAccumulations body
         ty,None
     | UnOpExpr(unop,operand,rng) ->
         let operandTy = Type.Coerce tenv (fst (typeCheckExpr ctxt operand))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.