diff --git a/AlgebraicDataflowArchitectureModel/models/DataStore.model b/AlgebraicDataflowArchitectureModel/models/DataStore.model index 5992f7f..3ae99d1 100644 --- a/AlgebraicDataflowArchitectureModel/models/DataStore.model +++ b/AlgebraicDataflowArchitectureModel/models/DataStore.model @@ -1,51 +1,37 @@ channel addAccounts { - out accounts(accounts: Map, addAccounts(aid: Str, name: Str)) = insert(accounts, aid, {"name": name}) + out accounts(accounts: Map, addAccounts(id: Str, name: Str, age: Int)) = insert(accounts, id, {"name": name,"age": age}) } -channel changeNameOfAccounts(aid: Str) { - out accounts.{aid}.name(name: Str, changeNameOfAccounts(newName: Str)) = newName +channel changeNameOfAccounts(id: Str) { + out accounts.{id}.name(name: Str, changeNameOfAccounts(newName: Str)) = newName +} + +channel changeAgeOfAccounts(id: Str) { + out accounts.{id}.age(age: Int, changeAgeOfAccounts(newAge: Int)) = newAge } channel addTweets { - out tweets(tweets: Map, addTweets(tid: Str, contents: Str, aidOfAccountName: Str)) = insert(tweets, tid, {"contents": contents,"aidOfAccountName": aidOfAccountName}) + out tweets(tweets: Map, addTweets(tweetId: Int, contents: Str, idOfAccounts: Str)) = insert(tweets, tweetId, {"contents": contents,"idOfAccounts": idOfAccounts}) } -channel changeContentsOfTweets(tid: Str) { - out tweets.{tid}.contents(contents: Str, changeContentsOfTweets(newContents: Str)) = newContents +channel changeContentsOfTweets(tweetId: Int) { + out tweets.{tweetId}.contents(contents: Str, changeContentsOfTweets(newContents: Str)) = newContents } -channel changeAidOfAccountNameOfTweets(tid: Str) { - out tweets.{tid}.aidOfAccountName(aidOfAccountName: Str, changeAidOfAccountNameOfTweets(newAidOfAccountName: Str)) = newAidOfAccountName +channel changeIdOfAccountsOfTweets(tweetId: Int) { + out tweets.{tweetId}.idOfAccounts(idOfAccounts: Str, changeIdOfAccountsOfTweets(newIdOfAccounts: Str)) = newIdOfAccounts } -channel nameOfAccountNameOfTweets(tid: Str){ - in tweets.{tid}.aidOfAccountName(aidOfAccountName: Str, nameOfAccountNameOfTweets(newAidOfAccountName: Str, newNameOfAccountName: Str)) = newAidOfAccountName - in accounts.{newAidOfAccountName}.name(name: Str, nameOfAccountNameOfTweets(newAidOfAccountName, newNameOfAccountName)) = newNameOfAccountName - out tweets.{tid}.nameOfAccountName(nameOfAccountName, nameOfAccountNameOfTweets(newAidOfAccountName, newNameOfAccountName)) = newNameOfAccountName +channel nameOfAccountsOfTweets(tweetId: Int){ + in tweets.{tweetId}.idOfAccounts(idOfAccounts: Str, nameOfAccountsOfTweets(newIdOfAccounts: Str, newNameOfAccounts: Str)) = newIdOfAccounts + in accounts.{newIdOfAccounts}.name(name: Str, nameOfAccountsOfTweets(newIdOfAccounts, newNameOfAccounts)) = newNameOfAccounts + out tweets.{tweetId}.nameOfAccounts(nameOfAccounts, nameOfAccountsOfTweets(newIdOfAccounts, newNameOfAccounts)) = newNameOfAccounts } -channel addFollow { - out follow(follow: Map, addFollow(fid: Str, aidOfFollower: Str, aidOfFollowee: Str)) = insert(follow, fid, {"aidOfFollower": aidOfFollower,"aidOfFollowee": aidOfFollowee}) -} - -channel changeAidOfFollowerOfFollow(fid: Str) { - out follow.{fid}.aidOfFollower(aidOfFollower: Str, changeAidOfFollowerOfFollow(newAidOfFollower: Str)) = newAidOfFollower -} - -channel nameOfFollowerOfFollow(fid: Str){ - in follow.{fid}.aidOfFollower(aidOfFollower: Str, nameOfFollowerOfFollow(newAidOfFollower: Str, newNameOfFollower: Str)) = newAidOfFollower - in accounts.{newAidOfFollower}.name(name: Str, nameOfFollowerOfFollow(newAidOfFollower, newNameOfFollower)) = newNameOfFollower - out follow.{fid}.nameOfFollower(nameOfFollower, nameOfFollowerOfFollow(newAidOfFollower, newNameOfFollower)) = newNameOfFollower -} - -channel changeAidOfFolloweeOfFollow(fid: Str) { - out follow.{fid}.aidOfFollowee(aidOfFollowee: Str, changeAidOfFolloweeOfFollow(newAidOfFollowee: Str)) = newAidOfFollowee -} - -channel nameOfFolloweeOfFollow(fid: Str){ - in follow.{fid}.aidOfFollowee(aidOfFollowee: Str, nameOfFolloweeOfFollow(newAidOfFollowee: Str, newNameOfFollowee: Str)) = newAidOfFollowee - in accounts.{newAidOfFollowee}.name(name: Str, nameOfFolloweeOfFollow(newAidOfFollowee, newNameOfFollowee)) = newNameOfFollowee - out follow.{fid}.nameOfFollowee(nameOfFollowee, nameOfFolloweeOfFollow(newAidOfFollowee, newNameOfFollowee)) = newNameOfFollowee +channel ageOfAccountsOfTweets(tweetId: Int){ + in tweets.{tweetId}.idOfAccounts(idOfAccounts: Str, ageOfAccountsOfTweets(newIdOfAccounts: Str, newAgeOfAccounts: Int)) = newIdOfAccounts + in accounts.{newIdOfAccounts}.age(age: Int, ageOfAccountsOfTweets(newIdOfAccounts, newAgeOfAccounts)) = newAgeOfAccounts + out tweets.{tweetId}.ageOfAccounts(ageOfAccounts, ageOfAccountsOfTweets(newIdOfAccounts, newAgeOfAccounts)) = newAgeOfAccounts }