Microsoft Corporation
May, 2009
Contents
Introduction
These Release Notes provide an overview of the new capabilities of the "Oslo" May 2009 Community Technology Preview (CTP). This CTP includes a number of updates across each of the major "Oslo" components including:
- simplified developer experience for using the "M" modeling language
- domain models for a broad set of developer concerns including the .NET Common Language Runtime (CLR), Identity, and UML domains
- an early look at a version of the "Quadrant" tool configured for general purpose repository browsing
- performance and productivity improvements to the "Intellipad" tool
Thank you for taking the time to evaluate this preview of "Oslo" technology. You can provide feedback and file bugs through the "Oslo" Connect Site and will find additional documentation, learning aids, and community forums on the "Oslo" Developer Center.
System Requirements
Supported Architectures
Supported Operating Systems
- Windows XP SP3
- Windows Vista SP1
- Windows Server 2003 R2, SP2
- Windows Server 2008
- Windows 7 RC (Full test passes had not been completed at the time of this release but we know of no blocking issues preventing the "Oslo" May 2009 CTP from running on Windows 7 RC.)
Hardware Requirements
- Minimum: 1.6 GHz CPU, 1GB RAM
- Recommended: 2.2 GHz CPU, 2GB RAM
Software Requirements
- Windows Installer 4.5
- To run setup, Windows Installer 4.5 is required. If you do not have it installed, setup will not continue.
- Note that a system reboot is required by Windows Installer. After installing, launch the code name "Oslo" setup program again.
- .NET Framework 3.5 SP1
- .NET Framework 3.5 is required for "Oslo" setup to work properly. During setup, you will be prompted to install .NET Framework 3.5 SP1 if it is not installed.
- SQL Server 2008 Express or higher SKU.
- Visual Studio 2008 Standard or higher SKU (optional)
- Visual Studio is not required for "Oslo" but for full functionality with Visual Studio and "M" integration, users must have Standard or higher SKU.
Installing and Uninstalling "Oslo"
Before Installing "Oslo"
"Quadrant" requires SQL "sysadmin" server role privileges
"Quadrant" will surface an error and exit if the current user does not have "sysadmin" server role privileges under the running instance of SQL Server. If you installed SQL yourself on your machine (versus an administrator or other form of installation), typically you are included in the SQL "sysadmin" server role by clicking the "Add Current User" button under the "Specify SQL Server Administrators" installation option.
Workaround: For this release, it is necessary to reinstall SQL and ensure that your domain account is added to "sysadmin" server role on installation.
The "Oslo" Repository must deployed to the default instance on the target machine in order to view "Quadrant" Samples
The "Quadrant" Samples are configured for installation in a repository named "Repository" running under the default SQL instance on the installed machine. If the "Oslo" Repository is not deployed to the default instance on the machine, the "Quadrant" samples won't display properly as configuration is not applied.
Due to a SQL Express installation issue, if you select the "Default Instance" option when installing SQL Express, it doesn't actually make the installed instance the default instance.
Workaround: Ensure your SQL Server instance for the "Oslo" Repository is the default instance and that your "Oslo" Repository is using name "Repository". If you're using SQL Express, reinstall it and select the option to install a named instance and enter "MSSQLSERVER" as the instance name.
OsloSetup.exe requires elevated privileges
You must run OsloSetup.exe with elevated privileges. If you have UAC enabled, it prompts you to elevate if you are not. Run OsloSetup.exe from the location where you extracted it. The install log is saved in %temp%\OsloSetup.log. There are two ways to install "Oslo", namely, default and custom.
Default Installation – "Install Now"
"Install Now" installs all of "Oslo" ("Quadrant", "Oslo" repository, and the "Oslo" SDK) on your machine. The default location is in %ProgramFiles%\Microsoft Oslo. On 64-bit machines this location is %PROGRAMFILES(x86)%\Microsoft Oslo.
- Click "Install Now" and accept or decline the license terms.
- Once installation completes, you are prompted for "Oslo" Repository settings:
- Enter a repository name (default is "Repository") and target server (default is ".").
- Click Browse to select other SQL Server instances locally or on the network.
- Click Continue, and then Close.
Custom Installation – "Customize"
- Click "Customize" and accept or decline the license terms.
- Choose the location where you want "Oslo" installed (default is %ProgramFiles%\Microsoft Oslo for 32-bit Operating systems, %PROGRAMFILES(x86)%\Microsoft Oslo for 64-bit systems).
- Select the following programs to install:
- "Quadrant" (no optional features)
- Repository (no optional features)
- SDK
- Click Continue.
- Once installation completes, you are prompted for "Oslo" Repository settings:
- Enter a repository name (default is "Repository") and target server (default is ".").
- Click Browse to select other SQL Server instances locally or on the network.
- Click Continue, and then Close.
Silent Installation
To silently install all of the "Oslo" components, execute this command at the console prompt:
OsloSetup install -passive -ae
This installs "Quadrant", "Oslo" Repository and the "Oslo" SDK on your machine and also creates a database named 'Repository' on your local SQL Server default instance.
Creating a Repository
The "Oslo" setup program automatically creates a repository for you. You can also use mx.exe from %ProgramFiles%\Microsoft Oslo\1.0\bin to manually create a repository database. Run the following two commands from a command prompt. You must drop any pre-existing repository database first.
mx create /database:Repository /dataFile:"<Path>/Repository.mdf"
/dataFileInitialSize:1GB /dataFileMaxSize:"unlimited"
/logFile:"<Path>/Repository.ldf" /logFileInitialSize:800MB
/dataFileGrowth:100MB /logFileMaxSize:"unlimited"
/logFileGrowth:100MB /force mx install Repository.mx /database:Repository /property:RepositoryChangeTracking=+
Uninstalling "Oslo"
Uninstalling "Oslo" involves removing all the files that were installed including registry settings and start menu shortcuts.
- In Windows XP, go to the Control Panel and select Add or Remove Programs; in Windows Vista or later, go to the Control Panel and select Programs and Features.
- Select Microsoft Codename "Oslo" Repository, Microsoft Codename "Oslo" SDK or Microsoft Codename "Oslo" "Quadrant".
- Right-click and select Uninstall.
- Click Add or Remove Features to deselect the programs you want to uninstall.
Silent Uninstall
To silently remove all the "Oslo" components, execute this command at the console prompt:
OsloSetup remove -qd -r -sdk –dr -passive
This removes "Quadrant", "Oslo" repository and the "Oslo" SDK from your machine, and also drops the 'Repository' database that was created by the installer.
Troubleshooting Setup
Issue: When you save the self-extracting file OsloMay2009CTP.exe to your local machine and run it, the files used during setup are decompressed into the folder where the exe was executed and remain there after setup completes.
Possible causes and remedies:
- The OsloMay2009CTP self-extracting file decompresses its files in the folder where it was executed. After "Oslo" setup is complete, these files can be deleted without impacting the functionality of "Oslo". This is a known issue which we will be resolving in a future release.
Issue: "Configuration Cannot Continue. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)".
Possible causes and remedies:
- Pre-RTM version of SQL Server 2008 or SQL Server 2008 Express is installed. To fix this, install the RTM version of SQL Server 2008 or Express point to another SQL Server 2008 instance.
- You have the correct SQL Server 2008 Express version but left the target database to ".". To fix this, specify ".\<instanceName>" for SQL Server 2008 Express.
- The targeted SQL instance service is not running. To fix this, run services.msc and verify that the status of the SQL Server service is "Started".
Support
Click the following related links for the most up-to-date information:
What's New?
"Quadrant"
With this drop we introduce the new Microsoft code name "Quadrant" visual tool for viewing and editing data. Microsoft "Quadrant" is a graphic tool for viewing, editing and exploring data found in any SQL Server database.
Using "Quadrant", users can connect to multiple SQL databases and open windows (called "workpads") in "Quadrant" to show data. As part of "Oslo", "Quadrant" uses Repository concepts such as Folders to provide a familiar, Windows-like way to navigate data. Workpads can provide viewing and editing experiences for data from different databases, or different views of the same database.
Intellipad
- Performance Improvement:
- Startup performance has been improved.
- Both M-language and DSL grammar editing are now much faster and more responsive.Scrolling speed has also been improved.
- Mini-Buffer: The mini-buffer is now surfaced as a Split, with a new mode "MiniBuffer Interactive Mode."You can type the same commands that you are used to, in this editor.The editor stays up until you dismiss it.
- Batched Commands: The mini-buffer can now be used to batch commands and issue them.These commands are however stored only for the current Intellipad session. For example:
>>> def MyNewCommand():
... Open('c:/foo.txt')
... Zoom(2.0)
... Find('<summary>')
...
>>> MyNewCommand()
- UX:
- The Intellipad keyboard shortcut for horizontal and vertical split changed to Ctrl+- and Ctrl+\
- Progress indicators for many long running actions
- Save All command and menu item have been added
- Save, Save-as and Save A Copy:
- Commands were added or modified to avoid confusion when saving, for example, buffers with transformed text or dependencies on other buffers (such as grammars).
- Save: enabled for file buffers without transforms (including Untitled buffers). Writes buffer content to disk, possibly creating a new file.
- Save-as: enabled when Save is enabled. Save-as writes buffer content to a file and opens that file in a new buffer. Closes source buffer (discarding changes), replacing it in any views with the new buffer.
- Save a copy: enabled always. Writes source buffer contents to file, opens that file in a new buffer and replaces the source buffer with the new buffer only in the active view. Does not close the source buffer, retains any edits to it.
- Intellipad displays its version number in the title bar
- Support for Win7 gestures (Windows + Arrow keys)
- Selection highlight behavior in Standard Mode (can be enabled in other modes via menu "Edit|Behaviors|Selection Highlight")
- Indent behavior changed: only indents on a new blank line to the same level as the previous line
- The highlight color has been updated to match "Quadrant" and the focused editor has a glow for quick identification.Also, all action elements now glow consistently with the same highlight color.
- Sharper edges on the editor and dropdown menus
- M Mode
- New Semantic Graph tree view, accessed via M Mode menu.Tree nodes can be expanded and collapsed by placing the cursor on the text line and using the left and right arrow keys.
- "Create Project From File" command and menu item have been added
- Member completions can now be demanded by typing ctrl-Space after a '.'
- Rich Text Mode
- Intellipad primer now accessible within intellipad in Rich Text Mode (from Help menu)
- The help commands are now displayed in Rich Text Mode
- MGrammar Mode
- Puttinga buffer in "DSL Grammar Mode" dynamically publishes modes to Intellipad based on the grammar
- Output preview can be specified by changing the mode on the input buffer to "XXX Output Mode" where XXX is the name of the grammar buffer.
- Similarly, any buffer can be put into the grammar input mode by choosing "XXX Mode" where XXX is the name of the grammar buffer.
- New menu items:
- DSL Grammar Mode "Split New Input View" menu
- DSL Grammar Mode "Split New Input and Output Views" menu
- Published grammar modes have "Show Grammar" and "Switch to Input/Output Mode" menus
- Input and output modes are removed as soon as the source buffer is no longer in DSL Grammar Mode. Upon removal, any views using those modes are switched to their default mode.
- Declarative modes: Drop an .mx file with a grammar in the Settings directory and modes will be created from it after restarting Intellipad.
- A tooltip can now be obtained for the currently selected Mode by hovering over the Mode indicator. This tooltip provides information about the source of the Mode for DSL input/output modes.
- Project Mode/Project View Mode
- The Build command saves edited project files.
- MSBuildProject Mode has been renamed Project Mode. Project Mode displays the project as its xml text. Project View Mode displays the project in tree form with navigation links for opening project items.
- The Project menu is available in both Project View Mode and Project Mode. It contains items to Build, Toggle between views (modes), and to add project items and references.
- Passing a .mproj on the command line or opening from Most Recently Used opens the file as a Project.
- MGrammar support is built into the Intellipad.The /c:ipad-vs-samples.xaml command line option is no longer required.
Toolchain
New M language features
Scope Resolution Operator (::)
We have added the ability to explicitly scope an identifier to a module. This enables explicit name resolution. For now, this only works to explicitly resolve extent names so that you can initialize additional values into that extent. Here's an example:
module Contacts
{
export People;
People : {
Id : Integer32 => AutoNumber;
Name : Text;
Age : Integer32;
}* where identity Id;
}
module Security
{
import Contacts;
// adds labeled value 'Joe' to Contacts::People
Contacts::People {
Joe { Name => "Joe", Age => 36 }
}
}
This change is a new feature and is not a breaking change.
about() operator
about is a new operator in the M standard library. about is a keyword that queries the catalog for data about M declarations, specifically types, extents, and computed values. Here is an example:
module Contacts {
import Language.Catalog;
type Person {
Name : Text;
Age : Integer32;
}
type Place {
Name : Text;
City : Text;
State : Text;
}
TypeAnnotations : {
Id : Integer32 => AutoNumber;
Annotation : Text;
Target : Types;
}*;
TypeAnnotations {
{ Target => about(Person), Annotation => "Person info" }
{ Target => about(Place), Annotation => "Place info" }
};
}
This is a new feature and is not a breaking change.
Extern for computed values
Support for reference to predefined function is now available through extern.
extern PreDefinedFunction() : Integer32;
Initializing Complex Entities
We now support using complex expressions to initialize entities that are not already in the correct table, for example:
MakePerson(Name : Text)
{ { Name => Name } }
People : Person* { MakePerson('Jeff') }
Recursive Computed Values
Computed Values can be called recursively. For example:
SubFolders(folderId : Integer32) : Text* {
Folders.Id(folderId).Name |
from child in Folders where child.Parent.Id == folderId
from subfolder in SubFolders(child.Id)
select Folders(folderId).Name + ""/"" + subfolder
}
Catalog
Provides UI abilities for "Quadrant", extensions to the SQL catalog to express the contents of repository (patterns), M source model, transformation details between M Source and SQL. Scenario: Customer gets an insight into what repository is; extended ability to store localized resources.
Catalog model (Language.Catalog.*) is implemented and supported through the following command line operations:
Usage: M.exe
Parameters:
[-catalog] Generate catalog entries. (Aliases: C)
[-catalogdefinition] Generate catalog definition. (Aliases: catdef)
Token Actions for MGrammar
Any production in a token can now have an action on its RHS.
token Date = m:Integer#2 '/' d:Integer#2 '/' y:Integer#4 => Date { Month => m, Date => d, Year => y }
token Integer = '0'.. '9';
Additional M Collection Members Are Now Implemented
The following members are available on all collections: Count, Choose, Distinct,
The following members are now available on collections of type Logical* : All, Exists
- SQL gen now supports collection operators: Choose, Count, Distinct, All, Exists, Average, Minimum, Maximum, Sum
The M language tool set now includes support for:
- Identity selectors
- Overloaded computed values
- Length constraints on computed value parameters where appropriate
- Comparison between a field of scalar type and a field having a nullable scalar type
- The M compiler now supports specifying a servicing version on the command line (-servicingversion:Int32)
MGrammar Attributes
Full M Graph syntax is supported in M Grammar attributes.
@{CaseInsensitive{}} // new
@{CaseInsensitive{"true"}} // new
@{NestAttribute, {CaseInsensitive = true}, Classification{"Keyword"}} // new
@{CaseInsensitive} // ongoing
@{CaseInsensitive[]} // ongoing
@{CaseInsensitive[true]} // ongoing
Attribute information can be retrieved using the dynamic parser API:
DynamicParser p = ...;
using (var context = new ParseContext(p.Lexer, p.Parser, null, null)) {
var tokenStream = p.Lexer.GetTokens(
context,
new StringReader(grammar),
p.Lexer.InitialStateId,
SourcePoint.MinValue,
true);
foreach (var tokens in tokenStream) {
foreach (var token in new List<ParseToken>(tokens)) {
foreach (var info in parser.GetTokenInfo(token.Tag)) {
var att = GraphNode.LookupGraph("Classification", info);
if (att != null) {
var arg = GraphNode.LookupGraphArgument(att);
...
MX
MX has a new static class MSql in the Microsoft.M.Loader namespace. Both the old API (SqlLoaderServices) and the new are in this drop. We plan to phase out the old the next SDK drop
Catalog Inference
Catalog model can be inferred through the following command line.
Usage: mx infer /database:DatabaseName
Repository Folders
Folder support is now available in the Repository.
Usage: mx createFolder folderPath
Create a new Repository folder.
Positional Parameters:
folderPath Specify the folder path to create or drop.
Usage: mx dropFolder folderPath
Drop an existing Repository folder.
Positional Parameters:
folderPath Specify the folder path to create or drop.
Create database is a new command line parameter
Usage: mx create
Create the target database.
Parameters:
[-dataFile:STRING] Specify the operating system (physical) file name for the database. (Aliases: df)
[-dataFileInitialSize:STRING] Specify the size of the data file. (Aliases: di)
[-dataFileMaxSize:STRING] Specify the maximum size to which the data file can grow. (Aliases: dm)
[-dataFileGrowth:STRING] Specify the automatic growth increment of the data file. (Aliases: dg)
[-logFile:STRING] Specify the operating system (physical) file name for the log. (Aliases: lf)
[-logFileInitialSize:STRING] Specify the size of the log file. (Aliases: li)
[-logFileMaxSize:STRING] Specify the maximum size to which the log file can grow. (Aliases: lm)
[-logFileGrowth:STRING] Specify the automatic growth increment of the log file. (Aliases: lg)
[-force] Creates the database even if there is one already with the same name, by dropping the old one (Aliases: f)
Pre and Post SQL
- When loading a Mx library, run custom T-SQL scripts in the library before and/or after the import
- T-SQL scripts can be embedded and loaded as Pre and Post SQL Ambles.
Usage: m.exe someFile.m /res:pre.sql /res:post.sql
Mx Property Support
- Properties can be defined on the command line to customize the behavior of Post/Pre SQL Amble scripts via a temporary transient table '#Properties'.
- Property setting through the command line is as follows:
Usage: mx.exe install ImageName /property:PropertyName=Value /database:DatabaseName
System.Dataflow
New Node/Edge API
We have added a new API in System.Dataflow to greatly simplify the .Net programming experience for MGraphs. The primary data type is called Node, similar to XNode from System.Xml.Linq. A Node represents either a value like 1 or "hello", or collection of nodes. If a collection, then each of the child nodes can be labeled. This is called an Edge. In M, when you use the binding operator (=>) to associate a value with a label, you are defining an edge. Here is a simple example of using Nodes and Edges.
string villageGraph = @"
{
Villagers =>
{
Jenn => { Name => 'Jennifer', Age => 28, Spouse => Rich },
Rich => { Name => 'Richard', Age => 26, Spouse => Jenn },
Charly => { Name => 'Charlotte', Age => 12 }
},
HaveSpouses => { Villagers.Rich, Villagers.Jenn }
}";
var village = Node.ReadFromString(villageGraph).Single().Node;
var jenn = village.Edges["Villagers"].Edges["Jenn"];
var jennHasAge = jenn.Edges.ContainsLabel("Age");
var jennsAgeIsConstant = jenn.Edges["Age"].NodeKind == NodeKind.Atomic;
var jennsAge = (int)jenn.Edges["Age"];
var rich = village.Edges["Villagers"].Edges["Rich"];
var richsSpouse = rich.Edges["Spouse"];
var richsSpousesAge = (int)richsSpouse.Edges["Age"];
var richsSpousesSpouse = richsSpouse.Edges["Spouse"];
var haveSpouses = village.Edges["HaveSpouses"];
var rich2 = (from node in haveSpouses.ViewAllNodes() where node.Edges["Name"] == "Richard" select node).Single();
var jenn2 = (from node in haveSpouses.ViewAllNodes() where node.Edges["Name"] == "Jennifer" select node).Single();
var charly = village.Edges["Villagers"].Edges["Charly"];
Assert.IsTrue(jennHasAge);
Assert.IsTrue(jennsAgeIsConstant);
Assert.IsTrue(jenn == richsSpouse);
Assert.AreEqual(jenn, richsSpouse);
Assert.AreEqual(rich, richsSpousesSpouse);
Assert.AreEqual(richsSpousesAge, jennsAge);
Assert.AreEqual(jenn, jenn2);
Assert.AreEqual(rich, rich2);
You may recall that previously we supported a different API for accessing an MGraph in memory, called IGraphBuilder. We also provide a class called NodeGraphBuilder that allows the parsed output of MGrammar as an IGraphBuilder to be consumed as Nodes and Edge. However, the labels used in MGrammar output are not always Edge labels. If a label precedes a sequence, collection, or entity, then the label is actually an additional piece of data that we call a brand. Brand is a new concept that represents a tag on a Node. If a label is written as an entity's field using the binding operator (=>), then it is an Edge label. The brand versus edge label concept is still under development, and currently only present in the Node/Edge model. We are considered it as a new feature for MSchema in the future.
In this example, 'Contact', 'Alias', and 'Number' are brands, and 'Info' is an edge label.
string contactGrammar = @"
module M
{
language Contacts {
syntax Main =
'Contact' ':' a:Alias => Contact { Info => Alias { a } }
| 'Contact' ':' p:Number => Contact { Info => Number { p } };
token Alias = ('A'..'Z' | 'a'..'z')+;
token Number = ('0'..'9' | '-')+;
}
}";
CompilationResults results = Compiler.Compile(
new CompilerOptions {
Sources = {
new TextItem {
Reader = new StringReader(contactGrammar),
ContentType = TextItemType.MGrammar }
}});
DynamicParser parser = results.ParserFactories["M.Contacts"].Create();
parser.GraphBuilder = new NodeGraphBuilder();
Node contact = (Node)parser.Parse(new StringTextStream("Contact:gatsby"), null);
Assert.AreEqual(contact.Brand, "Contact");
Node info = contact.Edges["Info"];
Assert.AreEqual(info.Brand, "Alias");
Node infoSingleValue = info.ViewAllNodes().Single();
Assert.AreEqual(infoSingleValue.AtomicValue, "gatsby");
contact = (Node)parser.Parse(new StringTextStream("Contact:555-1212"), null);
Assert.AreEqual(contact.Brand, "Contact");
info = contact.Edges["Info"];
Assert.AreEqual(info.Brand, "Number");
infoSingleValue = info.ViewAllNodes().Single();
Assert.AreEqual(infoSingleValue.AtomicValue, "555-1212");
In the future, we expect to deprecate and remove IGraphBuilder in favor of this new API.
Documentation Changes
- "M TechnicalReference.docx" was updated to reflect the MX.exe verb based command-line change.
- "MGrammar Language Specification.docx" is removed. The content of "MGrammar Language Specification.docx" is merged into "M Language specification".
Domains
The following domain models are included in this drop. Models that were present in previous drops, such as BPMN or Workflow, have been removed. These models are delivered as image files with the extension .mx and are installed in the repository during "Oslo" setup. The source files in M are also provided for reference purposes. Once installed, content can be explored either in SQL Server 2008 or in "Quadrant".
- Base Domain Library (BDL). This domain set, which consists of the Repository schema, Repository.Item schema, and System.Globalization schema modules in "M" and SQL schemas in the "Oslo" repository, contains models that you can use to support the separation of logical data access (views, in SQL Server 2008) from physical storage (tables). It allows you to establish Folders, which can be used to secure data access and version schemas and data. You can establish efficient ID patterns for data, support globalization and control auditing and other security features in SQL Server 2008. The BDL defines storage Extents and utilities for several commonly occurring kinds of data that can be referenced from other domains as well as a set of domain-neutral types and functions that can be incorporated into the definition of other domains. Image file = Repository.mx
- Common Language Runtime (CLR). The Common Language Runtime (CLR) domain targets the Microsoft implementation of the ECMA CLI (Common Language Infrastructure) specification. It contains the schema of the metadata of a .NET assembly and is installed as the System_Runtime SQL schema. With the Common Language Runtime loader (LoadAssembly.exe) that is also provided with "Oslo" SDK, you can load metadata from your own .NET assemblies into the code name "Oslo" repository to examine .NET metadata across a product, a division, or potentially an entire enterprise. Image file = Sytem.Runtime.mx
- Microsoft UML. The UML domain currently targets the Object Management Group's Unified Modeling Language™ (UML) specification version 2.1.2; it is installed as the Microsoft.Uml2 SQL schema. UML models in the Object Management Group's XML Metadata Interchange (XMI) version 2.1 file format can be imported into the code name "Oslo" repository with the UML loader (LoadUml.exe) that is included with "Oslo". Please note that the UML model is work in progress that shows approach and direction. It is not a complete implementation of the UML specification. Image file = Microsoft.UML212.mx
- Identity. The Identity domain is installed as the System.Identity schema and supports applications such as Directories which are concerned with storing, searching, and retrieving information (called claims) about physical and digital subjects and resources that can be uniquely identified. At the highest level, the System.Identity schema is about entities called "Parties" that have PartyToPartyRelationships.Parties include People, Organizations, Groups, Devices and Software Services.There are also special relationships called Roles that one party can play for another. Parties and Roles have IdentityKeys, or unique names in multiple dimensions issued by Authorities and described in Tokens.They also have (potentially multiple) Locations. Parties access Resources according to Policies. The instances in all these Extents can be specialized through a system of "Kinds".In addition, Parties can be arbitrarily extended without schema changes through PartyAttributes.Since information about physical and digital subjects transcends conventional use in Directory applications, federating subject and claim information to the "Oslo" Repository is an important goal. Image file = System.Identity.mx
Breaking Changes
Intellipad
Removed the About page
Toolchain
M language changes
Note: For the first 3 changes, deprecation warnings are issued by the m compiler. There is a /nodeprecationwarnings switch (/nd) that can be used to turn off all deprecation warnings. This is useful if you report general warnings as errors in your build and aren't ready to make the changes yet.
Label binding deprecates =, switches to =>
In the M language, the equal sign '=' is used to bind entity fields to values. It is also used to bind default constant values for extents. M is a functional language, and assignment (=) gave the wrong intuition about the language. We are thus changing the symbol to the binding operator '=>' in both MSchema and MGrammar.
NOTE: the '=' operator is still accepted with a deprecation warning.
For example:
People {
John { Name = "John", Age = 25, Friends { Mary, Jane} },
Mary { Name = "Mary", Age = 22, Friends { John} }
Jane { Name = "Jane", Age = 39, Friends { John} }
}
becomes
People {
John { Name => "John", Age => 25, Friends { Mary, Jane} },
Mary { Name => "Mary", Age => 22, Friends { John} }
Jane { Name => "Jane", Age => 39, Friends { John} }
}
syntax X = a:A b:B c:C => X { A = a, B = b, C = c };
becomes
syntax X = a:A b:B c:C => X { A => a, B => b, C => c };
Note, the binding operator '=>' is optional when the field or extent binds to a collection value.
This change can be made by searching on ' = ' and replacing with ' => '. Be sure to include the space before and after or you will accidentally replace '==', '<=', and '>='.
Note, the let expression retains its usage of the '=' symbol. If you apply the above replacement globally, you can then replace let identifier => back to let identifier =.
The deprecation warning can be turned off with the /nowarn switch, 0097 for MGrammar and 5046 for MSchema.
Deprecation of 'item'
Currently we have two different keywords used in a where clause to bring into scope an iterator of values over a collection: 'item' and 'value'. We are removing 'item' to simplify down to 1 keyword. Here is an example in the existing language, and then an example after the change:
module Contacts
{
People : {
Name : Text;
Age : Integer32 where value < 35;
}* where item.Name in { "Mary", "John" };
}
becomes
module Contacts
{
People : ({
Name : Text;
Age : Integer32 where value < 35;
} where value.Name in { "Mary", "John" })*;
}
This change will require that all uses of item be change to use value.
NOTE: the 'item' keyword is still accepted with a deprecation warning.
Obsolete usage of 'this'
The value keyword has always been the preferred way to qualify members in a constraint expression. The compiler has also supported unqualified uses of member names, however, the lookup rules were complex and confusing to both users and implementers. We have removed the 'this' keyword, which simplifies how constraints are written.
Constraint expressions that constrain only one field can still reside on that field. Constraint expressions that span two or more fields must appear at the type scope, where the 'value' keyword provides uniform access to all members of the type.
Example:
| Before | After |
|---|
type S { X : Integer32; } type T : S where X > 10; | type S { X : Integer32; } type T : S where value.X > 10; |
| | |
type S { X : Integer32; } type T : S{ Y : Integer32 where value > X; } | type S { X : Integer32; } type T : (S & { Y : Integer32; }) where value.Y > value.X |
| | |
type S { X : Integer32; } type T : S { Y : Integer32; } where Y > X; | type S { X : Integer32; } type T : (S & { Y : Integer32; }) where value.Y > value.X; |
| | |
type S { X : Integer32; } type R { Y : Integer32; } type T : S, R where Y > X | type S { X : Integer32; } type R { Y : Integer32; } type T : (S & R) where value.Y > value.X |
NOTE: the 'this' operator reports an obsolete error indicating you need to prepend the 'value.' operator to your field reference.
Closed Compilation Episodes
Modules are closed at a compilation episode, and after being closed only new instances may be added to a module. For example:
Compilation episode 1, produces FIRST.MX
module M {
export As;
As { 1, 2, 3 }
}
Compilation episode 2, produces SECOND.MX
module N {
import M;
F() { As }
}
module M {
As { 4, 7, 9 }
}
In the second compilation episode the module M is already defined so you will only be allowed to add new instances to exported extents from the original module definition.
Removal of Byte and Character types and literals
Use Binary and Text#1 instead. In addition, the "/x" escape (e.g. /xAB) in text literals has been removed, use "/u" instead (e.g. /u00AB). Example:
//invalid
type A {
F1: Character = 'a';
F2: Byte = 0x00AB;
F3: Text = "My byte /xAB";
}
//valid
type A {
F1: Text#1 = 'a'; //or "a"
F2: Binary = 0x00AB;
F3: Text = "My byte /u00AB";
}
Change of MSchema Escaped Identifier Syntax
The M grammar construct uses [ ] to denote ordered collection, which is in conflict with M schema's use of [ ] for identifier escaping. As we merge the two languages together (including eventually allowing ordered collections in expressions), we need a replacement syntax for identifier escaping.
With this drop, we are moving to use [ ] consistently for ordered collections and are using @[ ] for escaped identifiers.
Example:
| Before | After |
|---|
module M { type [foo bar] { i : Integer32; j : Text; } [foo bars] : [foo bar]*; } | module M { type @[foo bar] { i : Integer32; j : Text; } @[foo bars] : @[foo bar]*; } |
MGrammar CaseSensitive attribute changed
- The CaseSensitive attribute controls whether tokens are matched with our without case sensitivity. In order to bring the name of the attribute in line with .NET Framework standards:
- The attribute has been renamed to CaseInsensitive.
- The CaseInsensitive attribute does not require arguments.
- As a shortcut, MGrammar attribute syntax has changed to allow attributes that don't require arguments to be defined without an empty argument list. For example, you can use "@{CaseInsensitive}" instead of "@{CaseInsensitive[]}". The latter syntax still works, though.
MProject.targets was renamed to Microsoft.M.targets. All mproj files that import MProject.targets will not find the targets anymore with this drop.
Workaround:
To fix this, please open the mproj file in Notepad or any other text editor and replace all occurrences of MProject.targets with Microsoft.M.targets.
Join Table Names Changing
We have change the names of the SQL join tables that are generated when you declare a collection field in M. For example, this M:
module M {
People : {
Id : Integer32;
Friends : People*;
}* where identity(Id);
}
Now generates this join table for "Friends":
create table [M].[People.Friends]
(
[Id] bigint not null identity,
[Parent] int not null,
[Value] int not null,
constraint [PK_People.Friends] primary key clustered ([Id]),
constraint [FK_People.Friends_Parent_M_People] foreign key ([Parent]) references [M].[People] ([Id]) on delete cascade,
constraint [FK_People.Friends_Value_M_People] foreign key ([Value]) references [M].[People] ([Id])
);
Where it used to generate this:
create table [M].[People_Friends]
(
[_Id] bigint not null identity,
[People_Id] int not null,
[Item] int not null,
constraint [PK_People_Friends] primary key clustered ([_Id]),
constraint [FK_People_Friends_People_Id_M_People] foreign key ([People_Id]) references [M].[People] ([Id]) on delete cascade,
constraint [FK_People_Friends_Item_M_People] foreign key ([Item]) references [M].[People] ([Id])
);
M toolchain changes
mg.exe and the .mgx file format have been merged into m.exe/.mx
- mg.exe has been removed. Use m.exe instead.
- .mgx file contents have been merged into the .mx file format.The mgx.exe tool still exists, but it uses the .mx file produced when compiling grammar files.
- MGrammar now supports referencing mx files to reuse language components.You can compile a language into an .mx image, reference it (with /r) from a different language, and import the module.
m.exe
- m.exe now handles both (.m) and (.mg) sources.m.exe command-line arguments have been slightly changed due to the M and Mg merge.
- Image file (.mx) now contains the semantic graph of the compilation.
This release contains several changes that impact the MX image format and all images will need to be compiled.
Changes in dlls
- Microsoft.M.Framework.dll is removed
- Microsoft.M.Grammar.dll is removed
- Microsoft.M.dll is added as a replacement for both Microsoft.M.Framework.dll and Microsoft.M.Grammar.dll
- Activation.dll is removed
- ComponentModel.dll has been renamed as System.ComponentModel.Composition.dll.
Changes in "targets" files:
- Microsoft.M.Grammar.targets has been renamed Microsoft.M.Embedded.targets and now supports .m sources as well.This target file is used when you want to embed a .mx image file
- The schema for the embedded targets has changed, some notable tags below
- MgCompile -> MCompile (.m or .mg sources)
- MgTarget -> MPackage (Image, Script values)
- Microsoft.M.Grammar.Standalone.targets is removed and is now supported by Microsoft.M.targets
- Microsoft.M.Embedded.targets is added to replace the above targets, with the addition that it can handle (.m) sources as well
- Microsoft.M.targets act as a replacement for Microsoft.M.Grammar.Standalone.targets
- M project (.mproj) can include (.mg) files in addition to (.m) files
Compiler object changes
The M and Mg compiler objects have been merged into 1 common Compiler object.
var options = new CompilerOptions() {
Sources = {
new TextItem {
Name = "filename.m",
ContentType = TextItemType.MSchema,
Reader = new StreamReader("filename.m")
},
new TextItem {
Name = "filename.mg",
ContentType = TextItemType.MGrammar,
Reader = new StreamReader("filename.mg")
},
}
};
CompilationResults results = Compiler.Compile(options);
You can then use the compilation results to get at all of the results of compilation. To get at a DynamicParser generated during the compilation, access the results.ParserFactories collection by referencing the fully-qualified language name and then use the factory to create a DynamicParser.
DynamicParser parser = results.ParserFactories["module.lang"].Create();
Loading Dynamic Parsers from .mx Resources
Using Microsoft.M.Embedded.targets from a .csproj lets you embed the result of an m compilation as a resource into your assembly.
To create one of those parsers:
DynamicParser parser = null;
using (var image = MImage.LoadFromResource(
Assembly.GetExecutingAssembly(), "AssemblyName.mx")){
parser = image.ParserFactories[languageName].Create();
}
MX.exe
MX.exe is changed to use verb based command-line. Examples:
| Old MX.exe command | New MX.exe command |
|---|
| mx.exe /d:db /i:foo.mx | mx.exe install /d:dbfoo.mx |
| mx.exe /d:db /in:foo /r:*.mx | mx.exe install /name:foo /r:*.mx |
| mx.exe /l /d:db | mx.exe list /d:db |
| mx.exe /es:S /out:out.mx /d:db | mx.exe export /m:S /out:out.mx /d:db |
System.Dataflow
We have removed the public constructor from Identifier. Use Identifier.Get(string) instead.
CaseInsensitiveAttribute, ClassificationAttribute, FormatScopeAttribute, and NestAttribute have been removed.
Other
Requires .NET Framework 3.5 SP1.
Repository
- The [Document] schema has been renamed to [System.Document]
- The [Item] schema has been renamed to [Repository].[Item] (this change went into Drop 24 but was not announced)
You can no longer build all the supplied "Oslo" models using the /t:Repository option. Some "light-up" catalog models (..\Models\Repository\Loader\*.m )are only supported if built using /t:TSql10. This change only affects cases where users attempt to rebuild the Repository by compiling all the supplied models from source rather than using the provided models.mx file and mx.mx file.
Note that if you check the option to install a default repository database when installing the Repository from the Repository.msi file these light-up tables will be installed automatically. If CreateRepository.exe is used at a later time to create a repository database these light-up tables will not be installed. To install these tables manually you should install the supplied mx file. The two commands below illustrate this process, first the command to create a repository database, then to install the light –up tables into that database. The second step is optional and can be done at any time:
CreateRepository.exe /n:{NewRepositoryDatabaseName}
mx /d:{NewRepositoryDatabaseName} /i:MX.mx
Repository dependency on MX image
The Repository now leverages the standard M tool chain and produces an MX file which contains the Repository models.
Producing an MX file for the repository definitions allows all users of M to other domains to reference the compiled image of the repository models.
One implication of this is that the CreateRepository.exe tool now depends on
- Microsoft.Repository.mx : The image which contains the Repository models.
- mx.exe : CreateRepository makes use of MX to deploy Microsoft.Repository.mx onto a repository.
The two components must be in the same directory as CreateRepository.exe The functionality of CreateRepository.exe is likely to be subsumed completely by MX.exe later this year.
Samples removed
"Samples" have been removed from the SDK. Python Mode, Column Indicator, and SQL Mode have moved into the product. Others may be released on MSDN dev-center. The /c:ipad-vs-samples.xaml command line option no longer will work and there will not be an "Intellipad (with samples)" shortcut. If you have created aliases or shortcuts you may need to modify them to remove this command line option.
Known Issues
"Quadrant"
The following are known issues with the current release of "Quadrant".
"Quadrant" displays a runtime error (' Repository is unavailable') if the Repository database has a name other than 'Repository'
Currently "Quadrant" displays an error if the user chooses a name other than "Repository" at install time for the "Oslo" Repository.
Workaround:
You can connect to the named Repository by creating a connection for it using "Quadrant". Please see the "How To: Connect to a SQL Server Database with "Quadrant"" topic on the "Oslo" Dev Center for guidance on how to do this.
Opening large datasets in "Quadrant" can be very slow
As a technology preview, "Quadrant" is not yet fully-optimized for viewing or editing large sets (thousands of rows) of data. The application may appear to hang if you attempt to load very large sets of data.
Workaround:
For the May 2009 CTP there is no workaround for this issue, but the problem can be mitigated by primarily viewing and editing small- to medium-sized sets of data using "Quadrant". We will address this problem in a subsequent release.
Tables without defined primary keys cannot be viewed or editing using "Quadrant"
Viewing or editing SQL data in "Quadrant" requires definition of a primary key.
Workaround:
For this release there is no workaround for this issue.
Cannot add new rows to tables with non-numeric primary keys
Tables that have non-integral primary keys (such as non-numeric, decimal or other 'non big-int' keys) can be viewed in "Quadrant" but we don't support adding new rows.
Workaround:
For this release there is no workaround for this issue.
"Quadrant" does not launch on XP/Win2K3 when SQL Express is running under the Network Service account
If you're running the May CTP on Windows XP or Windows 2003 and using SQL Express as the database instance, "Quadrant" will not launch if SQL Express is running using the Network Service account.
Workaround:
Run SQL Express under the Local System account rather than Network Service if you're running a pre-Vista version of Windows such as Windows XPSP3 or Win2K3.
"Quadrant" requires SQL sysadmin server role privileges
"Quadrant" will surface an error and exit if the current user does not have SysAdmin server role privileges under the running instance of SQL Server. If you installed SQL yourself on your machine (versus an administrator or other form of installation), typically you are included in the SQL SysAdmin server role by clicking the "Add Current User" button under the "Specify SQL Server Administrators" installation option.
Workaround:
For this release, it is necessary to reinstall SQL and ensure that your domain account is added to "sysadmin" server role on installation.
The "Oslo" Repository must deployed to the default instance on the target machine in order to view "Quadrant" Samples
The "Quadrant" Samples are configured for installation in a repository named "Repository" running under the default SQL instance on the installed machine. If the "Oslo" Repository is not deployed to the default instance on the machine, the "Quadrant" samples won't display properly as configuration is not applied.
Due to a SQL Express installation issue, if you select the "Default Instance" option when installing SQL Express, it doesn't actually make the installed instance the default instance.
Workaround:
Ensure your SQL Server instance for the "Oslo" Repository is the default instance and that your "Oslo" Repository is using name "Repository". If you're using SQL Express, reinstall it and select the option to install a named instance and enter "MSSQLSERVER" as the instance name.
User's application data folder cannot be compressed to use Quadrant
Quadrant does not run if the %LOCALAPPDATA% folder is compressed. LOCALAPPDATA is the environment variable for Vista and later; for Windows XP and Windows Server 2003 the equivalent folder is specified using the %APPDATA% environment variable.
Workaround:
Uncompress the %LOCALAPPDATA% folder in order to use Quadrant.
32-Bit SQL not supported on 64-bit Windows
"Quadrant" requires a 64-bit version of SQL server if you're running on a 64-bit version of Windows.
Workaround:
In order to use "Quadrant" on 64-bit Windows, you must first install a 64-bit version of SQL Server.
If the local Administrators group is included in SQL "sysadmin" role, Quadrant must be run in elevated mode if user is not in the "sysadmin" role
Quadrant users must be part of the SQL Server "sysadmin" role. If the user is not in "sysadmin" role but the local Administrators group on the PC is part of the "sysadmin" role, the user must run Quadrant in elevated mode.
Workaround:
Run Quadrant in elevated mode.
Creating "Oslo" Repository Folders in Quadrant can prevent creation of Folders using M or SQL
Due to a product bug, creating new folders in "Quadrant" can prevent users from creating additional folders in databases such as the "Oslo" Repository database. You can create any arbitrary numbers of Folders directly in "Quadrant" (by adding instances to the Database.Repository_Item_Folders extent) but subsequent use of SQL or M to create folders will fail because Quadrant does not use NextValue from Repository.Item.Folders to determine what the next Folder Id should be.
Workaround:
Run the following SQL using sqlcmd or Microsoft SQL Server 2008 Management Studio to mitigate the problem by creating a folder with a high Folder Id value. This will cause "Quadrant" to increment Folder Ids beginning with the high value, and then Folders created using M or SQL will use lower Ids based on the Repository.IdSequences.NextValue increment.
INSERT INTO [Repository].[Repository.Item].[FoldersTable]
([Id]
,[GlobalId]
,[Name])
VALUES
(10000
,'F81B31CF-88F6-4591-A07B-7C04A5DFD8EA'
,'MyFolder1')
GO
Quadrant hangs when running unelevated on Windows 7 with Visual Studio 2010 Beta and SQL Express
We are aware of an issue where the Quadrant process can hang when running unelevated on Windows 7, when SQL Express 2008 has been installed as part of Visual Studio 2010 Beta1 or later.
Workaround:
Run Quadrant as a elevated user or install SQL Express 2008 (or another SQL SKU) separately from Visual Studio 2010 Beta.
Int64-based Primary Keys must be named "Id" in order to edit instances using Quadrant
Due to a product bug, tables with an Int64-based primary key field must be named "Id" in order to edit rows in Quadrant.
Workaround:
For this release there is no workaround for this issue. This issue will be addressed in a subsequent release of Quadrant.
Domains
Cross-image referencing does not work
Please note that cross image reference is not available in this drop, and therefore referencing any of the repository default instances from other M models directly is not supported.
This affects all instances in Repository.mx:
- Folders
- SecurityClaimKinds
- SecuredResourceKinds
- SecuredOperations
- Locales
- Strings
Inability to insert instances via repository security views in M
M instances against models that apply the Repository security pattern require insertion of the instances against tables instead of views and consequently require administrator privileges while running the installation of mx images using mx.exe.
Folder instances in M require admin privileges
Folder instances created in M will require administrator privileges and a separate stored procedure call to grant privileges to other users.
Error "Logon failed for login <user> due to trigger execution."
The generic error "Logon failed for login <user> due to trigger execution." can be diagnosed by inspecting the SQL Server log. Typically, the repository traps this error and writes detailed diagnostics to the SQL Server log as well.
The SQL Server log can be opened in SQL Management Studio. Expand Management and then SQL Server Logs. Alternatively, you can open the logs with a text editor. The default location of the logs is Program Files\¬Microsoft SQL Server\¬MSSQL.10\¬MSSQL\¬LOG.
Known Issues for the UML domain
- The UML loader "LoadUml.exe" requires a database connection even when only the M graph file needs to be generated. This is because the executable uses the database connection to verify if a folder path already exists or not in the target repository and will create the folder in the database.
- A folder hierarchy can only be created by the loader if a parent folder already exists in the target repository (and if your security settings allow you to do so on the database).The loader doesn't allow creation of sub folders for which a parent folder doesn't exist i.e. if folder A exists, you can specify target folder A/B, but not A/C/B .
- The UML loader ignores some not-yet-implemented model elements that it encounters in the XMI file, but shows them as warnings on the console.
- If the XMI makes file-based references to content in other XMI files, all XMI files must be supplied to the loader in the same session.
- The compile and load episode under the covers of UML loader can be slow depending on the size of XMI files, due to M compiler performance issue. Very large XMI files (e.g. CIM XMI file) passed to the UML loader can't get compiled and loaded, due to the M compiler exhausting memory and throwing an OutOfMemoryException.
- In the event that there are errors in the UML loader, the folder path is not rolled back from the Repository.
- Browsing UML instances in Quadrant using the folder (that you specified in LoadUml.exe) shows all the heterogeneous coarse-grained UML model instances in Repository Explorer, instead of just the top-level instance such as Package.This results in poor navigability to the actual top-level instance due to large amount of noise present in the folder.As a workaround, you can browse from Catalog -> Microsoft.Uml2 -> Packages to find the top-level Package instance as specified in your XMI file.
- UML profiles are only partially loaded by the loader in this CTP.Full support for UML profiles will be provided in the future releases.
Known Issues for the CLR domain
- The following extents are not populated in this drop:
- Method call graphs are not currently populated. This eliminates the impact analysis scenario.
- TypeSignatures, and all child-related extents (ClassOrInterfaces, ClassOrInterfaceGenericArguments, Pointers, PointerCustomModifiers, FunctionPointers, Arrays, ArrayDimensions, SzArrays, SzArrayCustomModifiers, TypeVariables)
- ParameterSignatures and Parameters
- GenericTypeParameters, DelegateGenericTypeParameters, MethodGenericTypeParameters
- ComplexTypes
- Enumerations and EnumerationLabels
- FriendAssemblies
- ImplementedInterfaces
- Resources
- Strings
- Browsing the CLR model and instances in "Quadrant" works best when browsing the top level extents in this drop. The top level extents are [System_Runtime].[Assemblies] and [System_Runtime].[Namespaces].
- Browsing the CLR model and instances in "Quadrant" using folders does not work in this drop. This model has a lot of volume, and the folder browsing scenario needs more work in the next milestone.
Appendix
Copyright
This document supports a preliminary release of a software product that may be changed substantially prior to final commercial release, and is the confidential and proprietary information of Microsoft Corporation. It is disclosed pursuant to a non-disclosure agreement between the recipient and Microsoft. This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information in this document, including URL and other Internet Web site references, is subject to change without notice. The entire risk of the use or the results from the use of this document remains with the user. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in examples herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
©2009 Microsoft Corporation. All rights reserved.
Microsoft, Excel, Visual Studio, Windows, and Windows Server are trademarks of the Microsoft group of companies.
All other trademarks are property of their respective owners.