Types in APL – The SimCorp Way Dyalog User Conference 2007 Lars Stampe Villadsen, SimCorp A/S (Denmark)

Slides:



Advertisements
Similar presentations
Variables in C Amir Haider Lecturer.
Advertisements

Introduction to C Programming
Pointers.
Bordoloi and Bock Chapter 2 :TABLES AND INDEXES. Bordoloi and Bock One of the first steps in creating a database is to create the tables that will store.
Arrays.
IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Coding Standard: General Rules 1.Always be consistent with existing code. 2.Adopt naming conventions consistent with selected framework. 3.Use the same.
Chapter 7:: Data Types Programming Language Pragmatics
V14 New Features Dan Baronet. Many new features V14 is probably the release of Dyalog with the most new features.
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 3: Primitive Data Types.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 14 – Student Grades Application: Introducing.
VBA Modules, Functions, Variables, and Constants
1 Arrays  Arrays are objects that help us organize large amounts of information  Chapter 8 focuses on: array declaration and use passing arrays and array.
Aalborg Media Lab 28-Jun-15 Software Design Lecture 8 “Arrays”
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
Chapter 8 Arrays and Strings
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
VB .NET Programming Fundamentals
Data Types.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
WRITING BASIC SQL SELECT STATEMENTS Lecture 7 1. Outlines  SQL SELECT statement  Capabilities of SELECT statements  Basic SELECT statement  Selecting.
CONSTRAINTS AND UPDATES CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1.
Dani Vainstein1 VBScript Session 9. Dani Vainstein2 What we learn last session? VBScript coding conventions. Code convention usage for constants, variables,
ECON 1150 Matrix Operations Special Matrices
CPS120: Introduction to Computer Science Arrays. Arrays: A Definition A list of variables accessed using a single identifier May be of any data type Can.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
C Tokens Identifiers Keywords Constants Operators Special symbols.
Database Management System Lecture 4 The Relational Database Model- Introduction, Relational Database Concepts.
Version Control 101 – The SimCorp Way Dyalog User Conference 2007 Lars Stampe Villadsen, SimCorp A/S (Denmark)
Data Types Copyright © 2006 Patrick McDermott College of Alameda
Chapter 8 Arrays and Strings
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Chapter 4 Introduction to MySQL. MySQL “the world’s most popular open-source database application” “commonly used with PHP”
/* Documentations */ Pre process / Linking statements Global declarations; main( ) { Local Declarations; Program statements / Executable statements; }
The Data in a Relation To consider atomic data in relations; To consider data types in a relation; To consider missing data & NULLs in relations. Objectives.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 9 Arrays.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Copyright  Hannu Laine C++-programming Part 1 Hannu Laine.
8-1 Chapter 8: Arrays Arrays are objects that help us organize large amounts of information Today we will focuses on: –array declaration and use –bounds.
Fundamental Programming: Fundamental Programming Introduction to C++
Data TypestMyn1 Data Types The type of a variable is not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Chapter 3 – Variables and Arithmetic Operations. Variable Rules u Must declare all variable names –List name and type u Keep length to 31 characters –Older.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
 2008 Pearson Education, Inc. All rights reserved. 1 Arrays and Vectors.
Module B - Computation1/61 Module-B-Computation Variables Basic Memory Operations Expressions.
Java Software Solutions Lewis and Loftus Chapter 6 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Objects for Organizing Data.
CHAPTER 2 PROBLEM SOLVING USING C++ 1 C++ Programming PEG200/Saidatul Rahah.
Agenda Comments Identifiers Keywords Syntax and Symentics Indentation Variables Datatype Operator.
Variables and Expressions Programming Right from the Start with Visual Basic.NET 1/e 7.
VCE IT Theory Slideshows By Mark Kelly vceit.com Version 2 – updated for 2016 Data Types 1 a.
Black Box Unit Testing What is black-box testing? Unit (code, module) seen as a black box No access to the internal or logical structure Determine.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
CSE 110: Programming Language I Matin Saad Abdullah UB 1222.
Egyptian Language School Computer Department
Documentation Need to have documentation in all programs
Data Types, Arithmetic Operations
LIS 384K.11 Database-Management Principles and Applications
Test Review Computer Science History
What is FITS? FITS = Flexible Image Transport System
Other Kinds of Arrays Chapter 11
JavaScript: Functions.
Writing Basic SQL SELECT Statements
IDENTIFIERS CSC 111.
Introduction to C Topics Compilation Using the gcc Compiler
Spreadsheets, Modelling & Databases
Introduction to C Topics Compilation Using the gcc Compiler
Arrays.
Presentation transcript:

Types in APL – The SimCorp Way Dyalog User Conference 2007 Lars Stampe Villadsen, SimCorp A/S (Denmark)

2 Agenda Company presentation (short ) It is all about structure Defined types in SimCorp Dimension

3 Business Idea SimCorp offers integrated software solutions to financial service providers supporting their activities worldwide on the financial markets. Our solutions are firmly based on our high quality standards and our insight into financial theory, methods and practices.

4 2007SimCorp sells IT2 2003SimCorp Dimension 2000TMS2000 full STP product 1999 IT2 acquired to substitute TRACTS 1998TMS2000 most important product 1997Sale of Actuarial department Official launch of TMS First TMS2000 implementations 1995TMS2000 development intensified Getting Focused 1991Risk management modules 1990Financial analytics and library 1985Building society systems Money market systems Pricing models for derivatives Treasury systems SimCorp Dimension era Customised software SimCorp History

5 It is all about structure Big house – strict rules Naming conventions: ^[a-z_][a-z0-9_]+$Local variable: dates ^[a-z][a-zA-Z0-9_]+[A-Z] [a-zA-Z0-9_]+[a-z]$Function: dcAndBasicParts ^_[a-z0-9] [a-z0-9_]+$Local d-func: _swap ^[a-z][a-zA-Z0-9_]+[A-Z] [a-zA-Z0-9_]+[A-Z]$Global variable: intTAB ^[A-Z][A-Z0-9_]+$Utility function: FSI Reserved prefixes: ^t[A_Z0_9_]+$Constant for a table: tIBI ^p[A_Z0_9_]+$Constant for a ’pointer’: pSECSHORT ^d[A_Z0_9_]+$Constant for an enumeration: dIT_BOND …

6 It is all about structure – cont. Lets make a simple function: datessince„ex1Main date © Calculate dayes between today and specified date. toDay„ ƒ3†ŒTS datessince„toDay-date ex1Main CHK 'ex1Main' ©... Comply with standards ? ERROR: Missing header: ex1Main ERROR: Missing header (©0©): ex1Main ERROR: Parameters/result not specified in ex1Main: date datessince WARNING: References to unknown functions in ex1Main: toDay

7 It is all about structure – cont. datessince„ex1Main date ©0© ©3© date : ©4© datessince : © Calculate dayes between today and specified date. toDay„ ƒ3†ŒTS datessince„toDay-date Comment conventions: ©0©General description of function ©2©Description of left argument ©3©Description of right argument ©4©Description of result

8 It is all about structure – cont. Clean up: datessince„ex1Main date;today ©0© Calculate days between today and specified date. ©3© date : Reference date ©4© datessince : Days between reference date and today today„ ƒ3†ŒTS datessince„today-date CHK 'ex1Main' ©... Comply with standards ? Yes!

9 It is all about structure – cont. But it is so hard to program in Power Point so we go the dangerous way – live action!

10 Defined types in SimCorp Dimension vtBOOLBoolean. Valid values are bFALSE and bTRUE (wrapping 0 and 1). vtCHARCharacter vtDATEAPL internal date (integer of the form yyyymmdd). vtDOMAIN(dDOMAIN)Domain. Valid values are members of domain dDOMAIN. vtDOUBLEFloating point number. vtENUM(APL expr.)Enumeration. Valid values are the result of the enclosed APL expression. vtINTInteger. vtNULLNull. Valid values are numeric null and text null. vtSTRINGString of characters. Note that also a single character will be accepted as a string. vtTIMEAPL Time of day fraction. Floating point number between 0 and 1. vtTSFull APL time stamp. Floating point number. vtUINTUnsigned integer. vtVARIANTThe joker type. Variables not type declared are considered variants. vtZEROZero. Valid values are – surprise – 0.

11 Defined types in SimCorp Dimension – cont. The named variables types can be used in the function comment headers to specify argument and result types. They can be grouped together to form more complex variables, e.g, {vtUINT {vtSTRING vtTS}} A 2-vector consisting of an unsigned integer and a 2-vector consisting of a string and a timestamp. {vtDOUBLE vtDATE vtDOMAIN(dPRICETYPE)} A 3-vector consisting of a float, a date and a domain value in the domain dPRICETYPE.

12 Defined types in SimCorp Dimension – cont. Arrays of different dimensions of a variable type can be specified using “[“, “]” and “;”, e.g, vtBOOL[]A vector of Booleans. vtINT[;]A 2-dimensional array of integers. vtSTRING[2-]A vector of length two or more containing strings.

13 Defined types in SimCorp Dimension – cont. Sometimes several types are allowed for a variable. Use “|” to separate different choices, e.g, vtDATE|vtZERO A scalar date or zero. vtDOUBLE|vtNULL A float or null. Any combination of the above is allowed, e.g, {vtDOUBLE|vtSTRING|vtNULL}[;5-10]A matrix with between 5 and 10 columns containing a mix of floats, strings and nulls.

14 Defined types in SimCorp Dimension – cont. It is possible to specify the shape of a variable relative to another variable in the argument and result. The main limitation is that the shape of a variable can only be specified relative to an already declared variable, e.g, fooGoo arg;flds;mat;opt ©0© A function. ©3© arg[1] : mat As vtDOUBLE[;] : Matrix of floats ©3© [2] : flds As vtUINT[$3:mat:2] : Field list corresponding to ©3© [3] : opt As vtBOOL : Option ©5© FST: VarTypes mat flds opt„arg