diff options
Diffstat (limited to 'assignment-8')
-rw-r--r-- | assignment-8/skeleton8.icl | 67 | ||||
-rw-r--r-- | assignment-8/skeleton8.prj.default | 59 |
2 files changed, 126 insertions, 0 deletions
diff --git a/assignment-8/skeleton8.icl b/assignment-8/skeleton8.icl new file mode 100644 index 0000000..0c68ac9 --- /dev/null +++ b/assignment-8/skeleton8.icl @@ -0,0 +1,67 @@ +module skeleton8
+
+/**
+ * Advanved Progrmming 2017, Assignment 8
+ * Pieter Koopman, pieter@cs.ru.nl
+ */
+
+from iTasks import class iTask, class toPrompt, class Publishable, instance Publishable Task,
+ instance toPrompt String, instance Functor Task,
+ class TApplicative, instance TApplicative Task,
+ generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor,
+ :: JSONNode, :: TextFormat, :: Editor, :: TaskValue(..), :: Stability, :: Task, :: Action,
+ :: TaskCont(..), :: ViewOption(..), :: UpdateOption(..),
+ -||-, -||, ||-, >>*, always, hasValue, updateInformation, viewInformation, startEngine
+import qualified iTasks
+import qualified iTasks.WF.Combinators.Overloaded as WF
+import Data.Functor, Control.Applicative, Control.Monad
+import Data.Tuple, StdClass, StdList, StdMaybe, StdString
+import StdGeneric, StdBool
+from StdFunc import o
+import qualified Data.List as List
+import qualified Data.Map as Map
+
+:: Expression
+ = New [Int]
+ | Elem Int
+ | Variable Ident
+ | Size Set
+ | (+.) infixl 6 Expression Expression
+ | (-.) infixl 6 Expression Expression
+ | (*.) infixl 7 Expression Expression
+ | (=.) infixl 2 Ident Expression
+
+:: Logical
+ = TRUE | FALSE
+ | (In) infix 4 Elem Set
+ | (==.) infix 4 Expression Expression
+ | (<=.) infix 4 Expression Expression
+ | Not Logical
+ | (||.) infixr 2 Logical Logical
+ | (&&.) infixr 3 Logical Logical
+
+:: Stmt
+ = If Logical Stmt Stmt
+ | For Ident Set Stmt
+ | Expression Expression
+ | Logical Logical
+
+:: Set :== Expression
+:: Elem :== Expression
+:: Ident :== String
+
+// === State
+
+
+// === semantics
+
+
+// === simulation
+(>>>=) :== 'iTasks'.tbind
+(>>>|) a b :== 'iTasks'.tbind a (\_ -> b)
+treturn :== 'iTasks'.return
+ActionOk :== 'iTasks'.ActionOk
+ActionQuit :== 'iTasks'.ActionQuit
+ActionNew :== 'iTasks'.ActionNew
+
+Start = ()
diff --git a/assignment-8/skeleton8.prj.default b/assignment-8/skeleton8.prj.default new file mode 100644 index 0000000..cf32d2f --- /dev/null +++ b/assignment-8/skeleton8.prj.default @@ -0,0 +1,59 @@ +Version: 1.4 +Global + ProjectRoot: . + Target: iTasks + Exec: {Project}/skeleton8 + CodeGen + CheckStacks: False + CheckIndexes: True + Application + HeapSize: 167772160 + StackSize: 1048576 + ExtraMemory: 81920 + IntialHeapSize: 204800 + HeapSizeMultiplier: 4096 + ShowExecutionTime: False + ShowGC: False + ShowStackSize: False + MarkingCollector: False + DisableRTSFlags: False + StandardRuntimeEnv: True + Profile + Memory: False + MemoryMinimumHeapSize: 0 + Time: False + Stack: False + Dynamics: True + DescExL: False + Output + Output: ShowConstructors + Font: Monaco + FontSize: 9 + WriteStdErr: False + Link + LinkMethod: Static + GenerateRelocations: False + GenerateSymbolTable: False + GenerateLinkMap: False + LinkResources: False + ResourceSource: + GenerateDLL: False + ExportedNames: + Paths + Path: {Project} + Precompile: + Postlink: +MainModule + Name: skeleton8 + Dir: {Project} + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False |