From: Mart Lubbers Date: Wed, 29 Apr 2015 18:57:05 +0000 (+0200) Subject: try for week3 part 2 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=3216cc4bc00dde60098f7735af317a791e714494;p=fp1415.git try for week3 part 2 --- diff --git a/fp2/week3/mart/StdDynSet.exe b/fp2/week3/mart/StdDynSet.exe new file mode 100755 index 0000000..f619496 Binary files /dev/null and b/fp2/week3/mart/StdDynSet.exe differ diff --git a/fp2/week3/mart/StdDynSet.icl b/fp2/week3/mart/StdDynSet.icl index ee43631..ffc2590 100644 --- a/fp2/week3/mart/StdDynSet.icl +++ b/fp2/week3/mart/StdDynSet.icl @@ -8,25 +8,29 @@ class Set a | TC, ==, toString a :: Set = Set [Dynamic] instance zero Set -where zero = abort "zero instance voor Set nog niet geimplementeerd.\n" +where zero = Set [] instance toString Set -where toString a = abort "toString instance voor Set nog niet geimplementeerd.\n" - +where toString (Set a) = abort "toString not implemented" + instance == Set where == a b = abort "== instance voor Set nog niet geimplementeerd.\n" toSet :: a -> Set | Set a -toSet a = abort "toSet nog niet geimplementeerd.\n" +toSet a = Set [dynamic a] nrOfElts :: Set -> Int -nrOfElts a = abort "nrOfElts nog niet geimplementeerd.\n" +nrOfElts (Set a) = length a isEmptySet :: Set -> Bool -isEmptySet a = abort "isEmptySet nog niet geimplementeerd.\n" +isEmptySet (Set []) = True +isEmptySet _ = False memberOfSet :: a Set -> Bool | Set a -memberOfSet x a = abort "memberOfSet nog niet geimplementeerd.\n" +memberOfSet _ (Set []) = False +memberOfSet x (Set [y:xs]) +| isEqual x y = True +| otherwise = memberOfSet x xs isSubset :: Set Set -> Bool isSubset a b = abort "isSubset nog niet geimplementeerd.\n" @@ -42,3 +46,6 @@ intersection a b = abort "intersection nog niet geimplementeerd.\n" without :: Set Set -> Set without a b = abort "without nog niet geimplementeerd.\n" + +Start :: Set +Start = toSet 1 diff --git a/fp2/week3/mart/StdDynSet.prj b/fp2/week3/mart/StdDynSet.prj new file mode 100644 index 0000000..4328042 --- /dev/null +++ b/fp2/week3/mart/StdDynSet.prj @@ -0,0 +1,569 @@ +Version: 1.4 +Global + ProjectRoot: . + Built: True + Target: Experimental + Exec: {Project}\StdDynSet.exe + CodeGen + CheckStacks: False + CheckIndexes: True + Application + HeapSize: 2097152 + StackSize: 512000 + ExtraMemory: 81920 + IntialHeapSize: 204800 + HeapSizeMultiplier: 4096 + ShowExecutionTime: False + ShowGC: False + ShowStackSize: False + MarkingCollector: False + StandardRuntimeEnv: True + Profile + Memory: False + MemoryMinimumHeapSize: 0 + Time: False + Stack: False + Output + Output: ShowConstructors + Font: Courier + FontSize: 9 + WriteStdErr: False + Link + LinkMethod: Static + GenerateRelocations: False + GenerateLinkMap: False + LinkResources: False + ResourceSource: + GenerateDLL: False + ExportedNames: + Paths + Path: {Project} + Precompile: + Postlink: +MainModule + Name: StdDynSet + Dir: {Project} + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False +OtherModules + Module + Name: StdCleanTypes + Dir: {Application}\Libraries\Dynamics + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdDynamic + Dir: {Application}\Libraries\Dynamics + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: BitSet + Dir: {Application}\Libraries\Dynamics\general + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: DefaultElem + Dir: {Application}\Libraries\Dynamics\general + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: EnDecode + Dir: {Application}\Libraries\Dynamics\general + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: DynIDMacros + Dir: {Application}\Libraries\Dynamics\implementation + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: DynamicUtilities + Dir: {Application}\Libraries\Dynamics\implementation + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdDynamicLowLevelInterface + Dir: {Application}\Libraries\Dynamics\implementation + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdDynamicTypes + Dir: {Application}\Libraries\Dynamics\implementation + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdDynamicVersion + Dir: {Application}\Libraries\Dynamics\implementation + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: _SystemDynamic + Dir: {Application}\Libraries\Dynamics\implementation + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: DynamicGraphConversion + Dir: {Application}\Libraries\Dynamics\implementation\windows + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: DynamicLinkerInterface + Dir: {Application}\Libraries\Dynamics\implementation\windows + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + NeededObjFiles + ObjectFile: read_function.obj + Module + Name: memory + Dir: {Application}\Libraries\Dynamics\implementation\windows + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + NeededObjFiles + ObjectFile: mem.obj + Module + Name: memory_mapped_files + Dir: {Application}\Libraries\Dynamics\implementation\windows + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + NeededObjFiles + ObjectFile: low.obj + NeededLibraries + Library: StdDynamic_kernel32_library + Module + Name: shared_buffer + Dir: {Application}\Libraries\Dynamics\implementation\windows + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdArray + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdBool + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdChar + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdCharList + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdClass + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdEnum + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdEnv + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdFile + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdFunc + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdInt + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdList + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdMisc + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdOrdList + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdOverloaded + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdReal + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdString + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdTuple + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: _SystemArray + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: _SystemEnum + Dir: {Application}\Libraries\StdEnv + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False + Module + Name: StdMaybe + Dir: {Application}\Libraries\StdLib + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False diff --git a/fp2/week3/mart/StdDynSet.prp b/fp2/week3/mart/StdDynSet.prp new file mode 100644 index 0000000..f2a25e4 --- /dev/null +++ b/fp2/week3/mart/StdDynSet.prp @@ -0,0 +1,193 @@ +Version: 1.4 +MainModule + Name: StdDynSet + Dir: {Project} + DclOpen: False + Icl + WindowPosition + X: 10 + Y: 10 + SizeX: 800 + SizeY: 600 + IclOpen: False +OtherModules + Module + Name: StdCleanTypes + Dir: {Application}\Libraries\Dynamics + DclOpen: False + IclOpen: False + Module + Name: StdDynamic + Dir: {Application}\Libraries\Dynamics + DclOpen: False + IclOpen: False + Module + Name: BitSet + Dir: {Application}\Libraries\Dynamics\general + DclOpen: False + IclOpen: False + Module + Name: DefaultElem + Dir: {Application}\Libraries\Dynamics\general + DclOpen: False + IclOpen: False + Module + Name: EnDecode + Dir: {Application}\Libraries\Dynamics\general + DclOpen: False + IclOpen: False + Module + Name: DynIDMacros + Dir: {Application}\Libraries\Dynamics\implementation + DclOpen: False + IclOpen: False + Module + Name: DynamicUtilities + Dir: {Application}\Libraries\Dynamics\implementation + DclOpen: False + IclOpen: False + Module + Name: StdDynamicLowLevelInterface + Dir: {Application}\Libraries\Dynamics\implementation + DclOpen: False + IclOpen: False + Module + Name: StdDynamicTypes + Dir: {Application}\Libraries\Dynamics\implementation + DclOpen: False + IclOpen: False + Module + Name: StdDynamicVersion + Dir: {Application}\Libraries\Dynamics\implementation + DclOpen: False + IclOpen: False + Module + Name: _SystemDynamic + Dir: {Application}\Libraries\Dynamics\implementation + DclOpen: False + IclOpen: False + Module + Name: DynamicGraphConversion + Dir: {Application}\Libraries\Dynamics\implementation\windows + DclOpen: False + IclOpen: False + Module + Name: DynamicLinkerInterface + Dir: {Application}\Libraries\Dynamics\implementation\windows + DclOpen: False + IclOpen: False + Module + Name: memory + Dir: {Application}\Libraries\Dynamics\implementation\windows + DclOpen: False + IclOpen: False + Module + Name: memory_mapped_files + Dir: {Application}\Libraries\Dynamics\implementation\windows + DclOpen: False + IclOpen: False + Module + Name: shared_buffer + Dir: {Application}\Libraries\Dynamics\implementation\windows + DclOpen: False + IclOpen: False + Module + Name: StdArray + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdBool + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdChar + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdCharList + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdClass + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdEnum + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdEnv + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdFile + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdFunc + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdInt + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdList + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdMisc + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdOrdList + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdOverloaded + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdReal + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdString + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdTuple + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: _SystemArray + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: _SystemEnum + Dir: {Application}\Libraries\StdEnv + DclOpen: False + IclOpen: False + Module + Name: StdMaybe + Dir: {Application}\Libraries\StdLib + DclOpen: False + IclOpen: False