楼主: ReneeBK
835 3

[Lecture Notes]Programming Language Design [推广有奖]

  • 1关注
  • 62粉丝

VIP

已卖:4901份资源

学术权威

14%

还不是VIP/贵宾

-

TA的文库  其他...

R资源总汇

Panel Data Analysis

Experimental Design

威望
1
论坛币
49675 个
通用积分
56.1287
学术水平
370 点
热心指数
273 点
信用等级
335 点
经验
57805 点
帖子
4005
精华
21
在线时间
582 小时
注册时间
2005-5-8
最后登录
2023-11-26

楼主
ReneeBK 发表于 2016-4-9 07:26:02 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Schedule

This schedule may be subject to minor changes. Any changes will be announced in class and also be posted on the course web page.

[td]
WeekNoteTopicReading
Week 1: Aug 27-Aug 31 Regular languages
Regular expressions
Finite Automata
LectureNotes1
LectureNotes2
Week 2: Sep 3-Sep 7 Finite Automata (cont'd)
Context-Free Languages
LectureNotes3
LectureNotes4
Week 3: Sep 10-Sep 14 Parsing and Ambiguity
Recursive-Descent Parsing
LectureNotes5
LectureNotes6
Week 4: Sep 17-Sep 21 Turing Machines
Decidability and the Halting Problem
LectureNotes7
LectureNotes8
Week 5: Sep 24-Sep 28 Decidability of Regular Languages
Exam 1
LectureNotes9
Week 6: Oct 1-Oct 5 RubyChapter 2
Week 7: Oct 8-Oct 12 Ruby, cont'd
Io
Chapter 3
Week 8: Oct 15-Oct 19No class TuesIo, cont'd
Week 9: Oct 22-Oct 26 Io, cont'd
Prolog
Chapter 4
Week 10: Oct 29-Nov 2 Prolog, cont'd
Scala
Chapter 5
Week 11: Nov 5-Nov 9 Scala, cont'd
Week 12: Nov 12-Nov 16 ErlangChapter 6
Week 13: Nov 19-Nov 23No class ThursClojureChapter 7
Week 14: Nov 26-Nov 30 Clojure, cont'd
Exam 2
Week 15: Dec 3-Dec 7 HaskellChapter 8
Week 16: Dec 12-Dec 14No class ThursHaskell, cont'd

http://goose.ycp.edu/~dhovemey/fall2012/cs340/syllabus.html

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Programming Language Program Lecture Design schedule course Design posted

沙发
ReneeBK 发表于 2016-4-9 07:27:34
  1. Defining an actor class

  2. An actor class should extend the Actor base class. Here is an example:

  3. case object SayHello

  4. class Hello(val name : String) extends Actor {
  5.   def act() {
  6.     loop {
  7.       react {
  8.         case SayHello => {
  9.           println(name + " says hello")
  10.           exit()
  11.         }
  12.       }
  13.     }
  14.   }
  15. }
复制代码

藤椅
ReneeBK 发表于 2016-4-9 07:28:17
  1. Sending a message

  2. Messages are sent to actors using the ! operator, with the syntax

  3. actor ! message
  4. Here's a test program using the Hello actor class above:

  5. object Main {
  6.   def main(args : Array[String]) {
  7.     val a = new Hello("Alice")
  8.     a.start()

  9.     val b = new Hello("Bob")
  10.     b.start()

  11.     a ! SayHello
  12.     b ! SayHello
  13.   }
  14. }
复制代码

板凳
ReneeBK 发表于 2016-4-9 07:29:13
  1. Waiting for a reply

  2. Sometimes it is useful to be able to send a message to an actor and then wait for a reply. This is possible using the !! operator.

  3. Example: here is an actor which accepts Add messages containing two integer values, computes the sum, and sends the sum back to the sender:

  4. case class Add(val x : Int, val y : Int)

  5. class Adder extends Actor {
  6.   def act() {
  7.     loop {
  8.       react {
  9.         case msg : Add => {
  10.           val sum = msg.x + msg.y
  11.           sender ! sum
  12.           exit()
  13.         }
  14.       }
  15.     }
  16.   }
  17. }
复制代码

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-31 19:28