Introduction To ASF SDF ASF SDF

2y ago
22 Views
2 Downloads
276.72 KB
6 Pages
Last View : 1m ago
Last Download : 2m ago
Upload by : Dahlia Ryals
Transcription

Introduction tot ASF SDFASF SDFMark van den BrandPaul Klintg n VinjujJurgen Goal: defining languagees & manipulating programs SDF SSDF:Syntax ddefinitionfi i i FormalismFli– ASF: Algebraic Specificcation Formalism–Introduction to ASF SDF1What is a Progrram Generator?lexical & context-free syyntaxstatic & dynamic semanttics; fact extraction ASF SDF Meta-Enviroonment: IDE for ASF SDF Manuals/documentationn: www.meta-environment.orgIntroduction to ASF SDFProgramming Enviironment GeneratorDefinitioon ofproblemmPFormal deefinitionoff llanguuage LGeneraatorGeneraatorDedicated envvironmentfor editing, maniipulating andexecutingg L pprogramsgGenerated programm that solves PIntroduction to ASF SDF23Introduction to ASF SDF4

Programming Enviironment Generator collection of program generatorsASF SDF Metta-EnvironmentASF SDF Meta-EnvironmentDefinition ofL syntaxDefinitioon ofL static uatorGeneratorL typechheckerL-typechL evaluatorL-evaluatorL parserL-parserDefinition ofL dynamic semanticsInteractiveDevelopmentEnvironmentfor LanguagedefinitionsStand alone,Stand-alonegenerated,environmentIntegrated L-prograamming environmentIntroduction to ASF SDFASF SDF Metta-Environmentta Environment 5Formal deefinition of language L(writtten in ASF SDF)GGeneratorGGeneratedLprogrammming environmentIntroduction to ASF SDF6Typing asfssdf-metasdf meta .An iinteractiveAtti developmed lentt environmentit forfgenerating tools from formmal language definitionsBased on:–Full context-freecontext free grammarrs–Conditional term rewritinggLLanguagedefinitionsd fi itiwrititttentt ini ASF SDFSDF: Syntax definitionn Formalism– ASF: Algebraic Speciffication Formalism–Introduction to ASF SDFIntroduction to ASF SDF8

Anatomy of ASF SDF specificationsAnatomy of an ASF SDFAModuleName of this moodule; may be followed by parametersmodule A.imports B C.module C.module B.imports D.module ModuleNameM d l itionalEquation*module D.Namess of modules imported by this module;May bee followed by renamingsGrammmar elements that are visible from theoutsidee (exports)) or only inside the module(hiddeens).Unconditional: [tagId] L RConditional: [tagId] C1, C2, ., Cn L RIntroduction to ASF SDF9Booleans Steps towards a Pico ennvironmentIntroduction to ASF SDFmodule basic/BoolCon–Step 1: define syntax–Step 2: define a typecheccker–Step 3: define an evaluattor–Step 4: define a compilerr Traversal functions MethodologyIntroduction to ASF SDF10BoolCon: Boolean ConstantsPlaan imports, aliases, sorts,lexical syntax,context-free syntax,y,priorities, variablesexportssorts BoolConcontext-freefsyntaxy"true" - BoolCon"false" - BoolCon11The sort of Boolean constants, sortsTSShouldalways start with a capital letterThe constannts true and false, literalsshould alwaays be quotedIntroduction to ASF SDF12

Booleaans (1)Booleaans (2)& d or . The infixThi fi operatorst andd &andBoth are left-associative (left)Import Boolean constantsmodule basic/Booleansimports basic/BoolConexportstsorts Booleancontext-free syntaxB lCBoolCon- BooleanB lThe sort of Boolean expressionsEach Boolean constant is a Booleanexpression, also-calledinjectionjec o ruleu eoor cchain ruleueIntroduction to ASF SDFBoolean " " BooleanBoolean "&" Boolean“not” (Boolean)"(" Boolean ")"context-free prioritiesBoolean "&" Boolean - Boolean Boolean " " Boolean - Boolean13context-free prioritiesBoolean "&" Boolean - Boolean {left} Boolean " " Boolean - Boolean {left}( and ) mayy be used as brackets inBoolean expressions;they are ignored after parsing& has higher priority than Example:B l & BoolBoolB l BBoollis interpreted as:((Bool & Bool)) Bool14Booleaans (4)hiddenscontext-free start-symbolsyBooleanShorthand for defining the infixoperatorst andd (&) andd ( )( ).Both are left-associative (left).These rules are ppromoted tocontext-free syntax rulesIntroduction to ASF SDFThe prefix function notIntroduction to ASF SDFBooleaans (3)context-free syntax“not” (Boolean)- Boolean"(" Boolean ")"- Boolean {bracket}- Boolean {left}- Boolean {left}- Boolean- Boolean -9\']* - BooleanThe start symbol of a grammar.grammarWithout a start symbol the parser doesnot know how to start parsing an inputsentencetImport the standard commentconvventions for equationsDeclares thet variables Bool,Bool Bool1,Bool1Bool2, Boool’, Bool’’, Bool1’, etc.Introduction to ASF SDF16

Booleaans (5)Fixed versus useer-defineder defined syntaxThhe meaning of &, and not operatorsequations[B1] true Bool true[B2] false Bool Bool[B3] true & Bool Bool[B4] false & Bool false[B5] not ( false ) true[B6] not ( true ) falseequations[B1] true Bool[B2] false Bool[B3] true & Bool[B4] false & Bool[B5] not ( false )[B6] not ( true )Skeleton syntax for equations true Bool Bool false true falsePoint to ponder: the syntax of equationsis notn fixed but depends on the syntaxdeffinition of the functions.functionsIntroduction to ASF SDFTermms that use user-defined syntax17Introduction to ASF SDFBooleaans (6)18Booleaans (7)not(true & not(false true))[BB2] false Bool BoolThe termnot(true & not(true))not(truet(t& not(falset(f ls ttrue))))[[B6]not ( true ) falsenot(true &RRewritesit s totfalse)[B3] true & Bool Booltruenot((ffalse)[B5] not( false ) truetruetruIntroduction to ASF SDF19Introduction to ASF SDF20

Opening BooleansIntroduction to ASF SDFEditing Boooleans.sdfooleans sdf21Booleans: summary Each module defines a language;lin this case thelanguage of Booleans (ssynonym: data type)We can use this languagge definition to–Create a syntax-directedd editor for the Booleanlanguage and create Booolean terms–Apply the equations to thhis term and reduce it tonormal form–Import it in another moddule; this makes the Booleanlanguage available for thhe importing moduleIntroduction to ASF SDF23Introduction to ASF SDF22

Introduction t Mark van Paul Jurgen Introduction o ASF SDF den Brand Klint Vinju to ASF SDF 1 ASF Goal: defining language SDF S d fi i iSDF: Syntax definition – lexical & context-free s y ASF: Algebraic Specific – static & dynamic semantstatic & dynamic semant ASF SDF Meta-Enviro Manuals/documentation Introduction SDF es & manipulating programs

Related Documents:

An Example MoC Extension: Synchronous Data Flow in SystemC Constructing an SDF model requires: _Encapsulating SDF specific processes (SC_SDF_METHOD) in a top-level SystemC process _Top-level constructs SDF graph with appropriate API _Every unique SDF model must be registered in its own sdf_graph instance _Top-level entry function must invoke sdf_trigger() function

UK Elle Decoration, Elle Décor USA, Wallpaper* and Architectural Digest Russia, as well as garnering many impressive industry awards. The AU ASF Group Limited ASF Group Limited (ASX:ASF) is unique among ASX-listed p

Tier Enhancement, and TDA loan programs, as well as the New York City Deferred Compensation Plan Loan Programs (457 and 401(k)); (b) 75% of your Annuity Savings Fund (ASF) less any current outstanding loan balances on your ASF Loans; or (c) The greater of (1) 50% of your ASF, the Tier Enhancement, and TDA Accounts

Alert Standard Format (ASF 2.0) is also supported to provide system manageability in OS-absent environments. The ASF defines remote control and alerting interfaces that serve managed PCs in OS-absent states. The ASF capability can minimize on-site IT maintenance, improve system availability, and allow remo

CORPORATE TRAINING CALENDAR 2015 No. Workshop Title Fees* Funding Duration Trainer Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec (Incl. of GST) (Days) (SGD) S 1,712.00 SDF 2 Lim Ai Leng S 2,782.002 Module 1A SDF 2 Lim Ai Leng S 2,782.

KNIME Core Chemistry IO Readers and writers for Mol2, Mol, Rxn, SDF and Smiles. Mining Fingerprint Bayesian learner/predictor MoSS & Moss MCSS similarity Misc SDF Property extraction and Insertion Translators Molecule Type Cast converts

HPE Hyper Converged 250 System. Réf. Libellé Prix Liste HT V. M0T03B Système HPE Hyper Converged 250 for VMware vSphere 2 668,00. N. Châssis de base pour 2 à 4 nœuds HPE Hyper Converged 250 ; inclut 2 alimentations 1400W, câbles d'alimentation, ventilation redondante,

Albert Woodfox is a former Black Panther who spent 45 years unjustly incarcerated in a Louisiana State Penitentiary. He was released in 2016, having served more than 43 years in VROLWDU\ FRQ¿QHPHQW WKH ORQJHVW SHULRG RI VROLWDU\ FRQ¿QHPHQW in American prison history. Kano is a British rapper, songwriter and actor. Kano is one of the pioneers of grime music and culture. In 2004, Kano released .