Killer Coding Ninja Bunny
UML
Suddenly occured to me that I may have drawn the UML diagram in my PS2 report with the generalisation arrows the wrong way around :O
Oops.
Anyway, ArgoUML is going pretty well. About as many bugs as Umbrello but it has some nice features and runs under Windows at least.
Tasks
- Implement Queries
- Implement Actions
- Display better errors and warnings with line numbers - seperate file?
Queries
isBigger[A,B] ? A:size > B:size
-> if (a.size > b.size) { }
isScarier[A,B] ? A.scariness > B.scariness
-> if (a.scariness > b.scariness) { }
isInitimidating[A,B] ? isScaries[A,B] & isBigger[A,B]
-> if ( (a.size > b.size) && (a.scariness > b.scariness) ) { }
action_Attack[A,B] ? isIntimidating[A,B] & A:aggression > 40
-> if ( ( (a.size > b.size ) && (a.scariness > b.scariness) ) && (a.aggression > 40) ) {
attack();
}
Case Sensitivity
Orignally I also wanted this language to be case insensitive so I may need to add functionality to take all new names and convert them to lower or upper case.
Should be a tolower function in the ctype header.
Errors
It would be good to get some better error reporting - have something to count line numbers and have a few functions which deal with error logging, possibly to a file.
Tools Progress
Ok, I have one linked list working. Easier than I expected.
First tasks for tomorrow:
- change file names to something more meaningful. Linked list to something symbol table related. animalfuncs to something animal related.
- Implement a linked list for animals
- start writing function for when new animals are created etc
The solution looks something like this
- list of animals, and meta animals, which can have their attributes set
- list of symbols which can be compared
- I’m not sure how queries will work yet, but so far I can consider that part of the solution completely seperate, so I can drop it if need be.