Boogie IVL Documentation
|
|
- Cory Lyons
- 5 years ago
- Views:
Transcription
1 Boogie IVL Documentation Release 2.0 Daniel Liew Jul 14, 2017
2
3 Contents 1 Language Design The Boogie IVL language reference Front-ends that emit Boogie IVL Boogie IVL front-ends Back-ends that consume Boogie IVL Boogie IVL back-ends Tutorials Modelling the heap Using user defined types Indices and tables 37 i
4 ii
5 The Boogie IVL (intermediate verification language) is a simple language designed for verification which was originally created by Microsoft Research. The language is an intermediate language because it is designed to be the middle part of a program verifier. A front-end translates a program written in some language to the Boogie IVL and a back-end tries to verify the translated program. This provides separation of concerns as The front-end does need to care about what method is used to verify the program. The back-end does not need to care about the semantics of several different programming languages. It only needs to care about the Boogie IVL. This idea is analogous to the intermediate representation (IR) used in modern compilers. Contents 1
6 2 Contents
7 CHAPTER 1 Language Design The Boogie IVL language reference Note: Some more information can be found in This is Boogie 2. However this reference manual is very out-of-date and so doesn t accurately reflect the Boogie IVL as it exists today. None the less some may still find it to be a useful reference. Types The following built-in types are avaible. bool - Boolean type int - Mathematical integer type real - Mathematical real type Bitvector types A family of bitvector types of the form bv<n> are built-in where <N> is the width of the bitvector. For example bv1 and bv32 are the bitvector types of a width 1 and width 32 bitvector respectively. Note that bitvector types are not signed. The signed-ness is decided by operators, not operands. Map types Map types map a key of type K to a value of type V. Reading from locations not assigned to will return an unknown value but the same value will returned for every read. 3
8 Discuss map extensionality. Symbooglix assumes this property holds and Boogie does if you use the / usearraytheory option but the original documentation states it doesn t hold and in Boogie s default mode it doesn t hold. // Variable x maps integers to boolean values var x:[int]bool; // Variable y maps boolean values to boolean values var y:[bool]bool; Maps may also be nested. Example // Variable a is a nested map that maps // integers to a map that maps 32-bit wide bitvectors // to booleans. var a:[int][bv32]bool; Note a read like a[0] returns a map of type [bv32]bool. Multiple arity maps are also supported. Example // Variable c is 2-ary map that maps an ordered pair // for integers to booleans. var c:[int,int]:bool; These are not the same as nested maps. Warning: Multiple arity maps may be less well supported by the various Boogie IVL backends because nested maps are generally preferred. Arguably Boogie IVL should not have two ways of basically doing this same thing. You are advised to avoid using multiple arity maps. Creating new types Additional types can be declared using type_aliases and Type constructors. Global declarations A Boogie IVL program consists of global declarations. The order of these declarations does not matter. Axioms Axioms declare an expression that should be assumed to be true for the entire lifetime of the program. A consequence of this is that axioms cannot refer to mutable global variables. 4 Chapter 1. Language Design
9 Warning: It is possible to declare axioms that individually or collectively are not satisfiable. This is a case of Inconsistent assumptions. : axiom_stmt ::= ``axiom'' [ attributes ] expr; : var a:int; var b:int; var map:[int]int; axiom {:some_attribute} a > b; axiom (forall x:int :: map[x] > a); const x:int; axiom x == 0; Axioms may not refer to mutable global variables var x:int; axiom x == 0; // ILLEGAL! Functions : : Global Variables Global variable declarations declare variables with an identifier Id at the global program scope. They can be mutable (var) or immutable (const) The Boogie IVL language reference 5
10 Immutable variables can optionally have a unique qualifier. This qualifier adds the assumption (i.e. like a axiom) that this variable has a different value to all other global immutable variables of the same type Ty that have the unique qualifier. Warning: It is possible to declare several global immutable variables to be unique and have axioms that state they have the same value. This is a case of Inconsistent assumptions. Discuss order specifier and add to grammar : global_var_decl ::= ``var'' [ attributes ] Id'':''Ty; global_const_decl ::= ``const'' [ ``unique'' ] [ attributes ] Id'':''Ty; : var x:int; // Mutable global variable with identifier x var {:something} y:bool; // Mutable global variable with identifier y // Immutable global variable with idenitifer z. // Properties on this variable should be set using axiom(s) const z:bool; Implementations : : Procedures 6 Chapter 1. Language Design
11 : procedure ::= ``procedure'' proc_sign ( '';'' { spec } { spec } impl_body ) proc_sign ::= { attribute } ident [ type_params ] proc_formals [ ``returns'' proc_fo type_params ::= ``<'' ident { '','' ident } ``>'' proc_formals ::= ``('' [ attr_ids_type_where { '','' attr_ids_type_where } '')'' spec ::= ( ensures_spec modifies_spec requires_spec ) ensures_spec ::= [ ``free'' ] ``ensures'' { attribute } proposition '';'' modifies_spec ::= ``modifies'' [ ident { '','' ident } ] '';'' requires_spec ::= [ ``free'' ] ``requires'' { attribute } proposition '';'' : // Procedure declaration without implementation, // notice the semicolon at the end of the signature. procedure Partition(l, r: int) returns (result: int); requires 0 <= l && l+2 <= r && r <= N; modifies A; ensures l <= result && result < r; ensures (forall k: int, j: int :: l <= k && k < result && result <= j && j < r ==> A[k] <= A[j]); ensures (forall k: int :: l <= k && k < result ==> A[k] <= old(a)[l]); ensures (forall k: int :: result <= k && k < r ==> old(a)[l] <= A[k]); // Procedure with implementation. procedure SumPositive(a: int, b: int) returns (c: int) requires 0 <= a; requires 0 <= b; ensures c == a + b && 0 <= c; { c := a + b; return; } // Procedure declaration with type parameter. procedure Identity<T>(a: T) returns (r: T); ensures a == r; // Procedure with attributes. procedure {:some_attribute} {:another_attribute} Foo(); Type aliases 1.1. The Boogie IVL language reference 7
12 : : Type constructors : : Expressions Boolean Constants true The constant that represents true. false The constant that represents false. 8 Chapter 1. Language Design
13 Boolean operators Logical and Logical or Logical iff 1.1. The Boogie IVL language reference 9
14 Logical implication Logical not 10 Chapter 1. Language Design
15 For all Exists 1.1. The Boogie IVL language reference 11
16 Bitvector constants Bitvector constants are written in the form <X>bv<N> where <X> is a positive decimal integer which the bitvector represents and <N> is the width of the bitvector. <X> must be representable in a bitvector of width <N>. Note that bitvectors are not signed. : var x:bv8; x := 0bv8; // 0b x := 1bv8; // 0b x := 2bv8; // 0b x := 3bv8; // 0b x := 15bv8; // 0b Bitvector operators Concatenation Extraction 12 Chapter 1. Language Design
17 Other operators No additional operators are defined. Additional functions (e.g. addition) can be used by using a function declared with a :bvbuiltin string attribute where that attribute gives the name of a bitvector function in the SMT-LIBv2 QF_BV theory. The semantics of that function match the semantics of the bitvector function named in the :bvbuiltin attribute. Example: // Arithmetic function {:bvbuiltin "bvadd"} bv8add(bv8,bv8) returns(bv8); procedure main() { var x:bv8; } assert bv8add(1bv8, 1bv8) == 2bv8; Example declarations for bv8: Here is a mostly complete list of example function declarations for bv8. Similar declarations can be written for other bitvector widths. The names of the functions are a suggestion only, any name can be used provided it does not conflict with other declarations. // Arithmetic function {:bvbuiltin "bvadd"} bv8add(bv8,bv8) returns(bv8); function {:bvbuiltin "bvsub"} bv8sub(bv8,bv8) returns(bv8); function {:bvbuiltin "bvmul"} bv8mul(bv8,bv8) returns(bv8); function {:bvbuiltin "bvudiv"} bv8udiv(bv8,bv8) returns(bv8); function {:bvbuiltin "bvurem"} bv8urem(bv8,bv8) returns(bv8); function {:bvbuiltin "bvsdiv"} bv8sdiv(bv8,bv8) returns(bv8); function {:bvbuiltin "bvsrem"} bv8srem(bv8,bv8) returns(bv8); function {:bvbuiltin "bvsmod"} bv8smod(bv8,bv8) returns(bv8); function {:bvbuiltin "bvneg"} bv8neg(bv8) returns(bv8); // Bitwise operations function {:bvbuiltin "bvand"} bv8and(bv8,bv8) returns(bv8); function {:bvbuiltin "bvor"} bv8or(bv8,bv8) returns(bv8); function {:bvbuiltin "bvnot"} bv8not(bv8) returns(bv8); function {:bvbuiltin "bvxor"} bv8xor(bv8,bv8) returns(bv8); function {:bvbuiltin "bvnand"} bv8nand(bv8,bv8) returns(bv8); function {:bvbuiltin "bvnor"} bv8nor(bv8,bv8) returns(bv8); function {:bvbuiltin "bvxnor"} bv8xnor(bv8,bv8) returns(bv8); // Bit shifting function {:bvbuiltin "bvshl"} bv8shl(bv8,bv8) returns(bv8); function {:bvbuiltin "bvlshr"} bv8lshr(bv8,bv8) returns(bv8); 1.1. The Boogie IVL language reference 13
18 function {:bvbuiltin "bvashr"} bv8ashr(bv8,bv8) returns(bv8); // Unsigned comparison function {:bvbuiltin "bvult"} bv8ult(bv8,bv8) returns(bool); function {:bvbuiltin "bvule"} bv8ule(bv8,bv8) returns(bool); function {:bvbuiltin "bvugt"} bv8ugt(bv8,bv8) returns(bool); function {:bvbuiltin "bvuge"} bv8uge(bv8,bv8) returns(bool); // Signed comparison function {:bvbuiltin "bvslt"} bv8slt(bv8,bv8) returns(bool); function {:bvbuiltin "bvsle"} bv8sle(bv8,bv8) returns(bool); function {:bvbuiltin "bvsgt"} bv8sgt(bv8,bv8) returns(bool); function {:bvbuiltin "bvsge"} bv8sge(bv8,bv8) returns(bool); Integer constants discuss integer constants Integer operators Addition Subtraction 14 Chapter 1. Language Design
19 Negation Multiplication 1.1. The Boogie IVL language reference 15
20 Integer Division Real Division 16 Chapter 1. Language Design
21 Modulus Coerce to real Real constants discuss real constants. Do we do rounding in boogie s parser here? 1.1. The Boogie IVL language reference 17
22 Real operators Addition Subtraction Negation 18 Chapter 1. Language Design
23 Multiplication Division 1.1. The Boogie IVL language reference 19
24 Power Coerce to Integer 20 Chapter 1. Language Design
25 Other overloaded operators Some overloaded operators (e.g. +) have already been discussed. Here are the other overloaded operators. Equality expressions If then else expressions 1.1. The Boogie IVL language reference 21
26 Old expressions Unstructured implementations Discuss unstructured implementation structure, i.e. var decls at beginning then blocks Commands Assignment 22 Chapter 1. Language Design
27 assume assert call 1.1. The Boogie IVL language reference 23
28 call forall goto 24 Chapter 1. Language Design
29 havoc return 1.1. The Boogie IVL language reference 25
30 Structured implementations Discuss structure Commands break if 26 Chapter 1. Language Design
31 while Attributes Discuss attributes Comments A line that starts (skipping all non white space characters) with a // is treated as a comment line and the contents of that line should be ignored. Example: // This is a comment Triggers 1.1. The Boogie IVL language reference 27
32 Discuss triggers Inconsistent assumptions When verifying an implementation a verifier should assume all of the following are true: All axioms declared All conditions declared in the implementation s requires clause The uniqueness of all global immutable variables declared with the unique qualifier If these conditions are not satisfiable then the Boogie IVL program is said to have inconsistent assumptions with respect to entry at that implementation. If a Boogie IVL program has inconsistent assumptions it should be treated as correct, i.e. the program is vacuously correct. If you wish to check a Boogie program for inconsistent assumptions there are several methods for doing so Replace the implementation body with assert false. If the program can be verified then (modulo bugs in the verifier) it must contain inconsistent assumptions. The Symbooglix backend has a program transformation pass that does the transformation described above that can be used separately from the main Symbooglix tool. Check the assumptions using Symbooglix. Symbooglix has a mode that will check assumptions before executing the Boogie IVL program. Debug information Discuss how to represent debug information Namespaces Discuss the different namespaces boogie_program ::= { axiom_decl const_decl func_decl impl_decl proc_de axiom_decl ::= ``axiom'' { attr } proposition '';'' const_decl ::= ``const'' { attr } [ ``unique'' ] typed_idents [ order_spec func_decl ::= ``function'' { attr } ident [ type_params ] ``('' [ var_or_ impl_decl ::= ``implementation'' proc_sign impl_body proc_decl ::= ``procedure'' proc_sign ( '';'' { spec } { spec } impl_bo type_decl ::= ``type'' { attr } ident { ident } [ ``='' type ] { '','' id var_decl ::= ``var'' { attr } typed_idents_wheres '';'' 28 Chapter 1. Language Design
33 order_spec ::= ``extends'' [ [ ``unique'' ] ident { '','' [ ``unique'' ] i var_or_type ::= { attr } ( type ident [ '':'' type ] ) proc_sign ::= { attr } ident [ type_params ] ``('' [ attr_typed_idents_wh impl_body ::= ``{'' { local_vars } stmt_list ``}'' stmt_list ::= { ( label_or_cmd transfer_cmd structured_cmd ) } local_vars ::= ``var'' { attr } typed_idents_wheres '';'' spec ::= ( modifies_spec requires_spec ensures_spec ) modifies_spec ::= ``modifies'' [ idents ] '';'' requires_spec ::= [ ``free'' ] ``requires'' { attr } proposition '';'' ensures_spec ::= [ ``free'' ] ``ensures'' { attr } proposition '';'' label_or_cmd ::= ( assert_cmd assign_cmd assume_cmd call_cmd havoc_c transfer_cmd ::= ( goto_cmd return_cmd ) structured_cmd ::= ( break_cmd if_cmd while_cmd) assert_cmd ::= ``assert'' { attr } proposition '';'' assign_cmd ::= ident { ``['' [ exprs ] ``]'' } { '','' ident { ``['' [ exp assume_cmd ::= ``assume'' { attr } proposition '';'' break_cmd ::= ``break'' [ ident ] '';'' call_cmd ::= [ ``async'' ] [ ``free'' ] ``call'' { attr } call_params '' goto_cmd ::= ``goto'' idents '';'' havoc_cmd ::= ``havoc'' idents '';'' if_cmd ::= ``if'' guard ``{'' [ ``else'' ( if_cmd ``{'' stmt_list `` label ::= ident '':'' par_call_cmd ::= ``par'' { attr } call_params { `` '' call_params } '';'' return_cmd ::= ``return'' '';'' while_cmd ::= ``while'' guard { [ ``free'' ] ``invariant'' { attr } expr yield_cmd ::= ``yield'' '';'' call_params ::= ident ( ``('' [ exprs ] '')'' [ '','' idents ] '':='' ide guard ::= ``('' ( ``*'' expr ) '')'' type ::= ( type_atom ident [ type_args ] map_type ) type_args ::= ( type_atom [ type_args ] ident [ type_args ] map_type type_atom ::= ( ``int'' ``real'' ``bool'' ``('' type '')'' ) map_type ::= [ type_params ] ``['' [ type { '','' type } ] ``]'' type exprs ::= expr { '','' expr } proposition ::= expr expr ::= implies_expr { equiv_op implies_expr } equiv_op ::= ( ``<==>'' ``'' ) implies_expr ::= logical_expr [ implies_op implies_expr explies_op logical implies_op ::= ( ``==>'' ``'' ) explies_op ::= ( ``<=='' ``'' ) logical_expr ::= rel_expr [ and_op rel_expr { and_op rel_expr } or_op rel_ and_op ::= ( ``&&'' ``'' ) or_op ::= ( `` '' ``'' ) rel_expr ::= bv_term [ rel_op bv_term ] rel_op ::= ( ``=='' ``<'' ``>'' ``<='' ``>='' ''!='' ``<:' bv_term ::= term { ``++'' term } term ::= factor { add_op factor } add_op ::= ( ``+'' ``-'' ) factor ::= power { mul_op power } mul_op ::= ( ``*'' ``div'' ``mod'' ``/'' ) power ::= unary_expr [ ``**'' power ] unary_expr ::= ( ``-'' unary_expr neg_op unary_expr coercion_expr ) neg_op ::= ( ''!'' `` '' ) coercion_expr ::= array_expr { '':'' ( type nat ) } array_expr ::= atom_expr { ``['' [ exprs [ '':='' expr ] '':='' expr ] ` 1.1. The Boogie IVL language reference 29
34 atom_expr ::= ( bool_lit nat dec float bv_lit ident [ ``('' ( e bool_lit ::= ``false'' ``true'' nat ::= digits dec ::= ( decimal dec_float ) decimal ::= digits ``e'' [ ``-'' ] digits dec_float ::= digits ''.'' digits [ ``e'' [ ``-'' ] digits ] bv_lit ::= digits ``bv'' digits old_expr ::= ``old'' ``('' expr '')'' arith_coercion_expr ::= ( ``int'' ``('' expr '')'' ``real'' ``('' expr '')'' ) paren_expr ::= ``('' expr '')'' forall_expr ::= ``('' forall quant_body '')'' exists_expr ::= ``('' exists quant_body '')'' lambda_expr ::= ``('' lambda quant_body '')'' forall ::= ( ``forall'' ``'' ) exists ::= ( ``exists'' ``'' ) lambda ::= ( ``lambda'' ``λ'' ) quant_body ::= ( type_params [ bound_vars ] bound_vars ) qsep { attr_or_ bound_vars ::= attr_typed_idents_wheres qsep ::= ( ''::'' `` '' ) if_then_else_expr ::= ``if'' expr ``then'' expr ``else'' expr code_expr ::= `` {'' { local_vars } spec_block { speck_block } ``} '' spec_block ::= ident '':'' { label_or_cmd } ( ``goto'' idents ``return' attr_typed_idents_wheres ::= attr_typed_idents_where { '','' attr_typed_idents_where } attr_typed_idents_where ::= { attr } typed_idents_where typed_idents_wheres ::= typed_idents_where { '','' typed_idents_where } typed_idents_where ::= typed_idents [ ``where'' expr ] typed_idents ::= idents '':'' type idents ::= ident { '','' ident } type_params ::= ``<'' idents ``>'' attr ::= attr_or_trigger attr_or_trigger ::= ``{'' ( '':'' ident [ attr_param { '','' attr_param } ] attr_param ::= ( string expr ) string ::= quote { string_char ``\\\'''' } quote quote ::= ``\''`` string_char ::= any character, except newline or quote ident ::= [ ``\\'' ] non_digit { non_digit digit } non_digit ::= ( ``A...Z'' ``a...z'' ``''' ``~'' ``#'' ``$'' ` digits ::= digit { digit } digit ::= ``0...9'' 30 Chapter 1. Language Design
35 CHAPTER 2 Front-ends that emit Boogie IVL Boogie IVL front-ends Dafny Briefly discuss and provide link to paper and website Joogie Briefly discuss and provide link to paper and website GPUVerify Briefly discuss and provide link to paper and website SMACK 31
36 Briefly discuss and provide link to paper and website VCC Briefly discuss and provide link to paper and website 32 Chapter 2. Front-ends that emit Boogie IVL
37 CHAPTER 3 Back-ends that consume Boogie IVL Boogie IVL back-ends Boogie Briefly discuss boogie verifier and provide link Boogaloo Boogaloo is a symbolic execution engine for Boogie IVL programs. //bitbucket.org/nadiapolikarpova/boogaloo/wiki/home More information can be found at https: Corral Corral is a solver for the reachability modulo theories problem. More information can be found at boogie-org/corral Duality Briefly discuss corral and provide link 33
38 Symbooglix Symbooglix is a symbolic execution engine for Boogie IVL programs. More information can be found at https: //symbooglix.github.io. Whoop Whoop is a SMACK-based symbolic data race analyzer for Linux device drivers. More information can be found at 34 Chapter 3. Back-ends that consume Boogie IVL
39 CHAPTER 4 Tutorials Modelling the heap Write Using user defined types Write 35
40 36 Chapter 4. Tutorials
41 CHAPTER 5 Indices and tables genindex search 37
Program analysis and constraint solvers. Edgar Barbosa SyScan360 Beijing
Program analysis and constraint solvers Edgar Barbosa SyScan360 Beijing - 2014 Who am I? Senior Security Researcher - COSEINC Reverse Engineering of Windows kernel, device drivers and hypervisors One of
More informationSMT-LIB in Z. Copyright c : Lemma 1 Ltd Lemma 1 Ltd. 27, Brook St. Twyford Berks RG10 9NX. Abstract
A1 L E M M Copyright c : Lemma 1 Ltd 2016 Lemma 1 Ltd. 27, Brook St. Twyford Berks RG10 9NX SMT-LIB in Abstract This document specifies models of the theories of SMT-LIB in the notation. Version: 9443557
More informationAn Introduction to Satisfiability Modulo Theories
An Introduction to Satisfiability Modulo Theories Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se February 13, 2019 1/28 Outline From theory... From DPLL to DPLL(T) Slides courtesy of Alberto
More informationGNATprove a Spark2014 verifying compiler Florian Schanda, Altran UK
1 GNATprove a Spark2014 verifying compiler Florian Schanda, Altran UK Tool architecture User view Source gnatprove Verdict 2 Tool architecture More detailed view... Source Encoding CVC4 gnat2why gnatwhy3
More information\n is used in a string to indicate the newline character. An expression produces data. The simplest expression
Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of
More informationLexical Considerations
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a
More informationVerifying Optimizations using SMT Solvers
Verifying Optimizations using SMT Solvers Nuno Lopes Why verify optimizations? Catch bugs before they even exist Corner cases are hard to debug Time spent in additional verification step pays off Technology
More informationChapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.
Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of
More informationThis is Boogie 2. K. Rustan M. Leino. Microsoft Research, Redmond, WA, USA Manuscript KRML 178, working draft 24 June 2008.
This is Boogie 2 K. Rustan M. Leino Microsoft Research, Redmond, WA, USA leino@microsoft.com Manuscript KRML 178, working draft 24 June 2008. Abstract. Boogie is an intermediate verification language,
More informationThe Boogie Intermediate Language
The Boogie Intermediate Language What is BoogiePL? A simplified C-like language that s structured for verification tasks Has constructs that allow specification of assumptions and axioms, as well as assertions
More informationThe PCAT Programming Language Reference Manual
The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language
More informationSMURF Language Reference Manual Serial MUsic Represented as Functions
SMURF Language Reference Manual Serial MUsic Represented as Functions Richard Townsend, Lianne Lairmore, Lindsay Neubauer, Van Bui, Kuangya Zhai {rt2515, lel2143, lan2135, vb2363, kz2219}@columbia.edu
More information1 Lexical Considerations
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler
More informationLexical Considerations
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Decaf Language Tuesday, Feb 2 The project for the course is to write a compiler
More informationAlive: Provably Correct InstCombine Optimizations
Alive: Provably Correct InstCombine Optimizations David Menendez Santosh Nagarakatte Rutgers University John Regehr University of Utah Nuno Lopes Microsoft Research Can We Trust Compilers? Any large software
More informationRuby: Introduction, Basics
Ruby: Introduction, Basics Computer Science and Engineering College of Engineering The Ohio State University Lecture 3 Ruby vs Java: Similarities Imperative and object-oriented Classes and instances (ie
More informationThe SPL Programming Language Reference Manual
The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming
More informationRuby: Introduction, Basics
Ruby: Introduction, Basics Computer Science and Engineering College of Engineering The Ohio State University Lecture 4 Ruby vs Java: Similarities Imperative and object-oriented Classes and instances (ie
More informationIC Language Specification
CS 301 Spring 2016 IC Language Specification The IC Language For the implementation project, you will build a compiler for an object-oriented language called IC (for Irish Coffee 1 ), which is essentially
More informationExpressions and Data Types CSC 121 Spring 2015 Howard Rosenthal
Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal Lesson Goals Understand the basic constructs of a Java Program Understand how to use basic identifiers Understand simple Java data types
More informationRelational Operators and if. Class 10
Relational Operators and if Class 10 Data Type a data type consists of two things: Data Type a data type consists of two things: a set of values Data Type a data type consists of two things: a set of values
More informationDelphiScript Keywords
DelphiScript Keywords Old Content - visit altium.com/documentation Modified by on 13-Sep-2017 This reference covers the DelphiScript keywords used for the Scripting System in Altium Designer. The scripting
More informationBASIC ELEMENTS OF A COMPUTER PROGRAM
BASIC ELEMENTS OF A COMPUTER PROGRAM CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING LOGO Contents 1 Identifier 2 3 Rules for naming and declaring data variables Basic data types 4 Arithmetic operators
More informationCMSC 330: Organization of Programming Languages. OCaml Expressions and Functions
CMSC 330: Organization of Programming Languages OCaml Expressions and Functions CMSC330 Spring 2018 1 Lecture Presentation Style Our focus: semantics and idioms for OCaml Semantics is what the language
More informationTesting, Debugging, and Verification
Testing, Debugging, and Verification Formal Specification, Part II Srinivas Pinisetty 23 November 2017 Introduction Today: Introduction to Dafny: An imperative language with integrated support for formal
More informationBITVECTORS IN SMT-RAT INTEGER ARITHMETICS AND THEIR APPLICATION TO MASTER OF SCIENCE THESIS. Andreas Krüger
The present work was submitted to the LuFG Theory of Hybrid Systems MASTER OF SCIENCE THESIS BITVECTORS IN SMT-RAT AND THEIR APPLICATION TO INTEGER ARITHMETICS Andreas Krüger Examiners: Prof. Dr. Erika
More informationThe Arithmetic Operators. Unary Operators. Relational Operators. Examples of use of ++ and
The Arithmetic Operators The arithmetic operators refer to the standard mathematical operators: addition, subtraction, multiplication, division and modulus. Op. Use Description + x + y adds x and y x y
More informationThe Arithmetic Operators
The Arithmetic Operators The arithmetic operators refer to the standard mathematical operators: addition, subtraction, multiplication, division and modulus. Examples: Op. Use Description + x + y adds x
More informationBOOGIE. Presentation by Itsik Hefez A MODULAR REUSABLE VERIFIER FOR OBJECT-ORIENTED PROGRAMS MICROSOFT RESEARCH
BOOGIE A MODULAR REUSABLE VERIFIER FOR OBJECT-ORIENTED PROGRAMS MICROSOFT RESEARCH Presentation by Itsik Hefez Introduction Boogie is an intermediate verification language, intended as a layer on which
More informationResults and Analysis of SyGuS-Comp 15
Results and Analysis of SyGuS-Comp Rajeev Alur Dana Fisman University of Pennsylvania Rishabh Singh Microsoft Research Armando Solar-Lezama Massachusetts Institute of Technology Syntax-Guided Synthesis
More informationTypescript on LLVM Language Reference Manual
Typescript on LLVM Language Reference Manual Ratheet Pandya UNI: rp2707 COMS 4115 H01 (CVN) 1. Introduction 2. Lexical Conventions 2.1 Tokens 2.2 Comments 2.3 Identifiers 2.4 Reserved Keywords 2.5 String
More informationSFU CMPT 379 Compilers Spring 2018 Milestone 1. Milestone due Friday, January 26, by 11:59 pm.
SFU CMPT 379 Compilers Spring 2018 Milestone 1 Milestone due Friday, January 26, by 11:59 pm. For this assignment, you are to convert a compiler I have provided into a compiler that works for an expanded
More information.Net Technologies. Components of.net Framework
.Net Technologies Components of.net Framework There are many articles are available in the web on this topic; I just want to add one more article over the web by explaining Components of.net Framework.
More informationMutual Summaries: Unifying Program Comparison Techniques
Mutual Summaries: Unifying Program Comparison Techniques Chris Hawblitzel 1, Ming Kawaguchi 2, Shuvendu K. Lahiri 1, and Henrique Rebêlo 3 1 Microsoft Research, Redmond, WA, USA 2 University of California,
More informationCMSC 330: Organization of Programming Languages. OCaml Imperative Programming
CMSC 330: Organization of Programming Languages OCaml Imperative Programming CMSC330 Spring 2018 1 So Far, Only Functional Programming We haven t given you any way so far to change something in memory
More informationDecaf Language Reference
Decaf Language Reference Mike Lam, James Madison University Fall 2016 1 Introduction Decaf is an imperative language similar to Java or C, but is greatly simplified compared to those languages. It will
More informationOutline. Review of Last Week II. Review of Last Week. Computer Memory. Review Variables and Memory. February 7, Data Types
Data Types Declarations and Initializations Larry Caretto Computer Science 16 Computing in Engineering and Science February 7, 25 Outline Review last week Meaning of data types Integer data types have
More informationPLT 4115 LRM: JaTesté
PLT 4115 LRM: JaTesté Andrew Grant amg2215@columbia.edu Jemma Losh jal2285@columbia.edu Jake Weissman jdw2159@columbia.edu March 7, 2016 Jared Weiss jbw2140@columbia.edu 1 Contents 1 Introduction 4 2 Lexical
More informationRuby: Introduction, Basics
Ruby: Introduction, Basics Computer Science and Engineering College of Engineering The Ohio State University Lecture 4 Ruby vs Java: Similarities Imperative and object-oriented Classes and instances (ie
More informationFRAC: Language Reference Manual
FRAC: Language Reference Manual Justin Chiang jc4127 Kunal Kamath kak2211 Calvin Li ctl2124 Anne Zhang az2350 1. Introduction FRAC is a domain-specific programming language that enables the programmer
More informationA Short Summary of Javali
A Short Summary of Javali October 15, 2015 1 Introduction Javali is a simple language based on ideas found in languages like C++ or Java. Its purpose is to serve as the source language for a simple compiler
More informationYour first C++ program
Your first C++ program #include using namespace std; int main () cout
More information2 nd Week Lecture Notes
2 nd Week Lecture Notes Scope of variables All the variables that we intend to use in a program must have been declared with its type specifier in an earlier point in the code, like we did in the previous
More informationReview: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements
Review: Exam 1 9/20/06 CS150 Introduction to Computer Science 1 1 Your First C++ Program 1 //*********************************************************** 2 // File name: hello.cpp 3 // Author: Shereen Khoja
More informationExpressions and Data Types CSC 121 Fall 2015 Howard Rosenthal
Expressions and Data Types CSC 121 Fall 2015 Howard Rosenthal Lesson Goals Understand the basic constructs of a Java Program Understand how to use basic identifiers Understand simple Java data types and
More informationReview of the C Programming Language for Principles of Operating Systems
Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights
More informationHardware versus software
Logic 1 Hardware versus software 2 In hardware such as chip design or architecture, designs are usually proven to be correct using proof tools In software, a program is very rarely proved correct Why?
More informationDecaf Language Reference Manual
Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented
More informationCGS 3066: Spring 2015 JavaScript Reference
CGS 3066: Spring 2015 JavaScript Reference Can also be used as a study guide. Only covers topics discussed in class. 1 Introduction JavaScript is a scripting language produced by Netscape for use within
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationThe SMT-LIB 2 Standard: Overview and Proposed New Theories
1 / 23 The SMT-LIB 2 Standard: Overview and Proposed New Theories Philipp Rümmer Oxford University Computing Laboratory philr@comlab.ox.ac.uk Third Workshop on Formal and Automated Theorem Proving and
More informationAppendix. Grammar. A.1 Introduction. A.2 Keywords. There is no worse danger for a teacher than to teach words instead of things.
A Appendix Grammar There is no worse danger for a teacher than to teach words instead of things. Marc Block Introduction keywords lexical conventions programs expressions statements declarations declarators
More informationIntroduction to C# Applications
1 2 3 Introduction to C# Applications OBJECTIVES To write simple C# applications To write statements that input and output data to the screen. To declare and use data of various types. To write decision-making
More informationData types for mcrl2
Data types for mcrl2 Aad Mathijssen April 5, 2018 We provide a syntax for the standard data types of the mcrl2 language. This syntax is intended to be a practical mix between standard mathematical notation
More informationFall Lecture 3 September 4. Stephen Brookes
15-150 Fall 2018 Lecture 3 September 4 Stephen Brookes Today A brief remark about equality types Using patterns Specifying what a function does equality in ML e1 = e2 Only for expressions whose type is
More information9/2/2016. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Expressions are Used to Perform Calculations Let s talk in more detail starting
More informationmetasmt: A Unified Interface to SMT-LIB2
metasmt: A Unified Interface to SMT-LIB2 Heinz Riener, Mathias Soeken, Clemens Werther, Görschwin Fey and Rolf Drechsler University of Bremen hriener@cs.uni-bremen.de Forum on specification & Design Languages
More information1/31/2017. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Expressions are Used to Perform Calculations Let s talk in more detail starting
More informationF28PL1 Programming Languages. Lecture 11: Standard ML 1
F28PL1 Programming Languages Lecture 11: Standard ML 1 Imperative languages digital computers are concrete realisations of von Neumann machines stored program memory associations between addresses and
More informationIntermediate Representations
Intermediate Representations A variety of intermediate representations are used in compilers Most common intermediate representations are: Abstract Syntax Tree Directed Acyclic Graph (DAG) Three-Address
More informationECE Digital System Design & Synthesis Exercise 1 - Logic Values, Data Types & Operators - With Answers
ECE 601 - Digital System Design & Synthesis Exercise 1 - Logic Values, Data Types & Operators - With Answers Fall 2001 Final Version (Important changes from original posted Exercise 1 shown in color) Variables
More informationContents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual
Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Contents 1 Introduction...2 2 Lexical Conventions...2 3 Types...3 4 Syntax...3 5 Expressions...4 6 Declarations...8 7 Statements...9
More informationQuick Reference Guide
SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD mikroelektronika Development tools - Books - Compilers Quick Reference Quick Reference Guide with EXAMPLES for Basic language This reference guide
More informationLanguage Reference Manual
Espresso Language Reference Manual 10.06.2016 Rohit Gunurath, rg2997 Somdeep Dey, sd2988 Jianfeng Qian, jq2252 Oliver Willens, oyw2103 1 Table of Contents Table of Contents 1 Overview 3 Types 4 Primitive
More informationThe Compiler So Far. CSC 4181 Compiler Construction. Semantic Analysis. Beyond Syntax. Goals of a Semantic Analyzer.
The Compiler So Far CSC 4181 Compiler Construction Scanner - Lexical analysis Detects inputs with illegal tokens e.g.: main 5 (); Parser - Syntactic analysis Detects inputs with ill-formed parse trees
More informationCA4003 Compiler Construction Assignment Language Definition
CA4003 Compiler Construction Assignment Language Definition David Sinclair 2017-2018 1 Overview The language is not case sensitive. A nonterminal, X, is represented by enclosing it in angle brackets, e.g.
More informationC: How to Program. Week /Mar/05
1 C: How to Program Week 2 2007/Mar/05 Chapter 2 - Introduction to C Programming 2 Outline 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers
More informationCHRIST THE KING BOYS MATRIC HR. SEC. SCHOOL, KUMBAKONAM CHAPTER 9 C++
CHAPTER 9 C++ 1. WRITE ABOUT THE BINARY OPERATORS USED IN C++? ARITHMETIC OPERATORS: Arithmetic operators perform simple arithmetic operations like addition, subtraction, multiplication, division etc.,
More informationInduction and Semantics in Dafny
15-414 Lecture 11 1 Instructor: Matt Fredrikson Induction and Semantics in Dafny TA: Ryan Wagner Encoding the syntax of Imp Recall the abstract syntax of Imp: a AExp ::= n Z x Var a 1 + a 2 b BExp ::=
More informationGAWK Language Reference Manual
GAWK Language Reference Manual Albert Cui, Karen Nan, Mei-Vern Then, & Michael Raimi So good, you re gonna GAWK. 1.0 Introduction This manual describes the GAWK language and is meant to be used as a reliable
More informationQuick Reference Guide
SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD mikroelektronika Development tools - Books - Compilers Quick Reference Quick Reference Guide with EXAMPLES for Pascal language This reference guide
More informationFunk Programming Language Reference Manual
Funk Programming Language Reference Manual Naser AlDuaij, Senyao Du, Noura Farra, Yuan Kang, Andrea Lottarini {nya2102, sd2693, naf2116, yjk2106, al3125} @columbia.edu 26 October, 2012 1 Introduction This
More informationMore on Verification and Model Checking
More on Verification and Model Checking Wednesday Oct 07, 2015 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/60 Course fair! 2/60 Exam st October 21, 8:00 13:00 If you want to participate,
More informationCOMP322 - Introduction to C++ Lecture 02 - Basics of C++
COMP322 - Introduction to C++ Lecture 02 - Basics of C++ School of Computer Science 16 January 2012 C++ basics - Arithmetic operators Where possible, C++ will automatically convert among the basic types.
More informationObjectives. Introduce the core C# language features class Main types variables basic input and output operators arrays control constructs comments
Basics Objectives Introduce the core C# language features class Main types variables basic input and output operators arrays control constructs comments 2 Class Keyword class used to define new type specify
More informationLecture 2. The SCADE Language Data Flow Kernel. Daniel Kästner AbsInt GmbH 2012
Lecture 2 The SCADE Language Data Flow Kernel Daniel Kästner AbsInt GmbH 2012 2 Synchronous Programming Two simple ways of implementing reactive systems: Event-driven Foreach input_event
More informationObjectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program
Objectives Chapter 2: Basic Elements of C++ In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates
More informationChapter 2: Basic Elements of C++
Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates
More informationLecture 15 CIS 341: COMPILERS
Lecture 15 CIS 341: COMPILERS Announcements HW4: OAT v. 1.0 Parsing & basic code generation Due: March 28 th No lecture on Thursday, March 22 Dr. Z will be away Zdancewic CIS 341: Compilers 2 Adding Integers
More informationSECTION II: LANGUAGE BASICS
Chapter 5 SECTION II: LANGUAGE BASICS Operators Chapter 04: Basic Fundamentals demonstrated declaring and initializing variables. This chapter depicts how to do something with them, using operators. Operators
More informationOverview: Programming Concepts. Programming Concepts. Names, Values, And Variables
Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating
More informationOverview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript
Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating
More informationChapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction
Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 1 Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers
More informationCMSC 330: Organization of Programming Languages. OCaml Imperative Programming
CMSC 330: Organization of Programming Languages OCaml Imperative Programming CMSC330 Fall 2017 1 So Far, Only Functional Programming We haven t given you any way so far to change something in memory All
More informationIntroduction. Following are the types of operators: Unary requires a single operand Binary requires two operands Ternary requires three operands
Introduction Operators are the symbols which operates on value or a variable. It tells the compiler to perform certain mathematical or logical manipulations. Can be of following categories: Unary requires
More informationCS4120/4121/5120/5121 Spring 2016 Xi Language Specification Cornell University Version of May 11, 2016
CS4120/4121/5120/5121 Spring 2016 Xi Language Specification Cornell University Version of May 11, 2016 In this course you will start by building a compiler for a language called Xi. This is an imperative,
More informationCS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find
CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS
More informationarxiv: v1 [cs.pl] 22 May 2014
Language to Specify Syntax-Guided Synthesis Problems Mukund Raghothaman Abhishek Udupa Friday 7 th December, 2018 arxiv:1405.5590v1 [cs.pl] 22 May 2014 Abstract We present a language to specify syntax
More informationASML Language Reference Manual
ASML Language Reference Manual Tim Favorite (tuf1) & Frank Smith (fas2114) - Team SoundHammer Columbia University COMS W4115 - Programming Languages & Translators 1. Introduction The purpose of Atomic
More informationLanguage Reference Manual simplicity
Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna
More informationC++ Data Types. 1 Simple C++ Data Types 2. 3 Numeric Types Integers (whole numbers) Decimal Numbers... 5
C++ Data Types Contents 1 Simple C++ Data Types 2 2 Quick Note About Representations 3 3 Numeric Types 4 3.1 Integers (whole numbers)............................................ 4 3.2 Decimal Numbers.................................................
More informationProgramming Languages Third Edition
Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand
More informationGBIL: Generic Binary Instrumentation Language. Language Reference Manual. By: Andrew Calvano. COMS W4115 Fall 2015 CVN
GBIL: Generic Binary Instrumentation Language Language Reference Manual By: Andrew Calvano COMS W4115 Fall 2015 CVN Table of Contents 1) Introduction 2) Lexical Conventions 1. Tokens 2. Whitespace 3. Comments
More informationDecision Procedures. An Algorithmic Point of View. Bit-Vectors. D. Kroening O. Strichman. Version 1.0, ETH/Technion
Decision Procedures An Algorithmic Point of View Bit-Vectors D. Kroening O. Strichman ETH/Technion Version 1.0, 2007 Part VI Bit-Vectors Outline 1 Introduction to Bit-Vector Logic 2 Syntax 3 Semantics
More informationCOS 320. Compiling Techniques
Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly
More informationProject 2 Interpreter for Snail. 2 The Snail Programming Language
CSCI 2400 Models of Computation Project 2 Interpreter for Snail 1 Overview In this assignment you will use the parser generator yacc to construct an interpreter for a language called Snail containing the
More informationLECTURE 3 C++ Basics Part 2
LECTURE 3 C++ Basics Part 2 OVERVIEW Operators Type Conversions OPERATORS Operators are special built-in symbols that have functionality, and work on operands. Operators are actually functions that use
More informationLanguage to Specify Syntax-Guided Synthesis Problems
Language to Specify Syntax-Guided Synthesis Problems Mukund Raghothaman Abhishek Udupa Saturday 25 th January, 2014 1 Introduction We present a language to specify syntax guided synthesis (SyGuS) problems.
More informationChapter 2 - Introduction to C Programming
Chapter 2 - Introduction to C Programming 2 Outline 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers 2.4 Memory Concepts 2.5 Arithmetic
More informationCourse Outline Introduction to C-Programming
ECE3411 Fall 2015 Lecture 1a. Course Outline Introduction to C-Programming Marten van Dijk, Syed Kamran Haider Department of Electrical & Computer Engineering University of Connecticut Email: {vandijk,
More information