Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| research:software:secdart [2017/05/27 00:05] – racruz | research:software:secdart [2017/12/05 18:05] (current) – [Dart subset] racruz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Gradual Security Typing in Dart ====== | ====== Gradual Security Typing in Dart ====== | ||
| This page will describe artifacts associated to SecDart which is an extension to the Dart programming language with gradual security typing. | This page will describe artifacts associated to SecDart which is an extension to the Dart programming language with gradual security typing. | ||
| + | |||
| + | ===== Installation instructions ===== | ||
| + | We will provide three ways to interact with the SecDart' | ||
| + | * **Using the online SecDart Pad** at [[https:// | ||
| + | * **The SecDart Analyzer CLI** | ||
| + | * **The SecDart Plugin for Analysis Server**. | ||
| + | |||
| + | |||
| + | ===== SecDart Pad: Functionality ===== | ||
| + | The following screenshot shows how the SecDart Pad looks like | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ===== The SecDart Analyzer CLI ===== | ||
| + | // | ||
| + | |||
| ===== Integration with the Analysis Server ===== | ===== Integration with the Analysis Server ===== | ||
| We developed a plugin for the [[https:// | We developed a plugin for the [[https:// | ||
| - | {{: | + | {{: |
| + | |||
| + | ===== SecDart : Language features ===== | ||
| + | SecDart covers a subset of the language and add security labels to language constructors | ||
| + | |||
| + | ==== Dart subset ==== | ||
| + | The following BNF notation represents the AST of the supported subset of Dart, so is not a grammar specification. We use brackets in the BNF rules to refer to the name of the class of the Ast node provided by the Dart Analyzer. | ||
| + | |||
| + | < | ||
| + | | ||
| + | | [FunctionDeclaration] | ||
| + | |||
| + | | ||
| + | ' | ||
| + | | functionSignature [FunctionBody] | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | [Expression] [Token] [Expression] | ||
| + | |||
| + | |||
| + | | ||
| + | | ||
| + | | [EmptyFunctionBody] | ||
| + | | [ExpressionFunctionBody] | ||
| + | |||
| + | | ||
| + | |||
| + | | ||
| + | |||
| + | block ::= ' | ||
| + | |||
| + | | ||
| + | | ||
| + | | [VariableDeclarationStatement] | ||
| + | | [IfStatement] | ||
| + | | [ReturnStatement] | ||
| + | | [ExpressionStatement] | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | ' | ||
| + | |||
| + | | ||
| + | ' | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | | [ConditionalExpression] cascadeSection* | ||
| + | //the Dart grammar does not include the followings nodes here to avoid left recursion, however for the sake of presentation we inline them here. | ||
| + | | [BinaryExpression] | ||
| + | | [InvocationExpression] | ||
| + | | [Literal] | ||
| + | | [ParenthesizedExpression] | ||
| + | | [Identifier] | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | </ | ||
| + | ==== Security labels ==== | ||
| + | SecDart uses annotations to specify security labels. We can specify security labels for the following entities: | ||
| + | * parameters of functions < | ||
| + | int min(@high int a,@high int b) | ||
| + | </ | ||
| + | * variable definition < | ||
| + | void sendToFacebook(){ | ||
| + | ... | ||
| + | @low String message = .... | ||
| + | ... | ||
| + | } | ||
| + | </ | ||
| + | * function declarations < | ||
| + | @latent(" | ||
| + | @low int max(@low int a,@high int b){ | ||
| + | | ||
| + | } | ||
| + | </ | ||

