C Omega
Upcoming SlideShare
Loading in...5

C Omega



The original compiler of LINQ, now available in framework 3.5. And some other michenism for concurrency control

The original compiler of LINQ, now available in framework 3.5. And some other michenism for concurrency control



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

C Omega C Omega Presentation Transcript

    • Cω is a strongly typed, data oriented programming language that bridges the gap between semi-structured hierarchical data (XML), relational data (SQL), and the .NET Common Type System (CTS).
    • Concurrency is going mainstream: rise of multi-core and asynchronous web applications.
    • “ Great! Pity they’re tied to an outdated research compiler…”
    • C ω extended C# 1.0 with high-level, asynchronous concurrency abstractions - join patterns - based on the join calculus.
    • (variant of Polyphonic C#, related to JoCaml).
    • Cω’s features have been used in the creation of the LINQ extension in C#.
    • The concurrency constructs have also been released in a slightly modified form as library, named Joins Concurrency Library , for C#, some prototype extensions for VB and other .NET languages by Microsoft Research.
    • Concurrency
    • Direct support of Asynchronous concurrency and processing of relational and semi-structured data.
      • Stronger compile-time guarantees
      • Freedom to choose different implementation strategies for compiler.
      • More natural syntax.
      • Better support from other tools such as editors and debuggers.
    • No Reinvention of wheel. Extend an already-popular language.
    • The aim is to take models and lessons learnt from the design of more academic, special purpose languages and try to incorporate them within the mainstream object-oriented framework
      • Example:
        • Concurrency – from - join calculus and JoCaml.
    • Provide an integration of the object, relational and semi-structured data models.
    • Generalization , rather than specializations
    • Ordered homogeneous collections of zero or more values.
    • Closely related to C#’s IEnumerable<>
    • Generated using iterators, which are blocks that contain yield statements.
    • They are always flattened ; there are no nested streams of streams
    • Apply-to-all expression
    • variable it
    • Ordered collections of heterogeneous values.
    • Allows repeated occurrences of the same member name within an anonymous struct type, even at different types
    • Discriminated Union type
    • Provides a test, e is T on choice values to test the value's type.
    • choice{int;Button;} x = 3;
    • choice{int;Button;} y = new Button();
    • A normal class that has a single unlabelled type that describes the content of that class
    • Cω offers some XPath-like expressivity:
      • Filters
        • allows a filter to be passed over a stream.
        • Example: friends[ it.age < 18]
      • Queries by type
    • The projection list results in the select expression returning a stream of &quot; tuple types &quot;, namely
    • struct{SqlInt32 ProductId; SqlMoney Total; }*
    • The from clause specifies the data source being queried. This can be either an object in a SQL database, or any in-memory object.
    • Cω select statement supports various forms of joins , which are essential to any real database application.
    • Cω also supports order by and group by clauses.
    • The where clause can specify any valid Cω Boolean predicate for filtering the selection.
    • Methods can be defined as either synchronous or asynchronous
    • When a synchronous method is called, the caller is blocked until the method returns
    • When an asynchronous method is called, there is no result and the caller proceeds immediately without being blocked
    • A body may be associated with a set of methods. Such a definition is called chord.
    • A particular method may appear in the header of several chords.
    • The body of a chord can only execute once all the methods in its header have been called.
    • Thus, when a method is called there may be zero, one, or more chords which are enabled:
    • If no chord is enabled then the method invocation is queued up. If the method is asynchronous, then this simply involves adding the arguments (the contents of the message) to a queue. If the method is synchronous, then the calling thread is blocked.
    • If there is a single enabled chord, then the arguments of the calls involved in the match are de-queued, any blocked thread involved in the match is awakened, and the body runs.
    • When a chord which involves only asynchronous methods runs, then it does so in a new thread.
    • If there are several chords which are enabled then an unspecified one of them is chosen to run.
    • Similarly, if there are multiple calls to a particular method queued up, we do not specify which call will be de-queued when there is a match.
    • Cω contains elegant primitives for asynchronous communication, and offers a strongly-typed integration of the object, relational and semi-structured data models.
    • It makes easier to write the data-intensive distributed applications being written today
    • http://www.google.co.in/
    • http://research.microsoft.com/comega/
    • http://bartdesmet.net/blogs/bart/archive/tags/Comega/default.aspx
    • http://msdn.microsoft.com/en-us/library/ms974195.aspx
    • http://channel9.msdn.com/
  • Thank You