140 likes | 398 Views
Xtext. Typesystem Framework. http://code.google.com/a/eclipselabs.org/p/xtext-typesystem/. Markus Voelter independent /itemis. Typesystem (from Wikipedia).
E N D
Xtext Typesystem Framework http://code.google.com/a/eclipselabs.org/p/xtext-typesystem/ Markus Voelter independent/itemis
Typesystem (from Wikipedia) In computer science, a type system may be defined as a tractable syntactic framework for classifying phrases according to the kinds of values they compute. A type system associates types with each computed value. By examining the flow of these values, a type system attempts to prove that no type errors can occur. The type system in question determines what constitutes a type error, but a type system generally seeks to guarantee that operations expecting a certain kind of value are not used with values for which that operation makes no sense.
Typesystem (from Wikipedia) In computer science, a type system may be defined as a tractable syntactic framework for classifying phrases according to the kinds of values they compute. A type system associates types with each computed value. By examining the flow of these values, a type system attempts to prove that no type errors can occur. The type system in question determines what constitutes a type error, but a type system generally seeks to guarantee that operations expecting a certain kind of value are not used with values for which that operation makes no sense.
Typesystem (from Wikipedia) In computer science, a type system may be defined as a tractable syntactic framework for classifying phrases according to the kinds of values they compute. A type system associates types with each computed value. By examining the flow of these values, a type system attempts to prove that no type errors can occur. The type system in question determines what constitutes a type error, but a type system generally seeks to guarantee that operations expecting a certain kind of value are not used with values for which that operation makes no sense.
Typesystem (from Wikipedia) In computer science, a type system may be defined as a tractable syntactic framework for classifying phrases according to the kinds of values they compute. A type system associates types with each computed value. By examining the flow of these values, a type system attempts to prove that no type errors can occur. The type system in question determines what constitutes a type error, but a type system generally seeks to guarantee that operations expecting a certain kind of value are not used with values for which that operation makes no sense.
x: Var y: Calc type type expr IntType IntType Plus left right IntConst Multi left right IntConst Sqrt expr VarRef
declarefixedtypes x: Var y: Calc type type expr IntType IntType Plus int int left right IntConst Multi int left right double IntConst Sqrt int expr VarRef
declarefixedtypes derivetypes x: Var y: Calc int type type expr IntType IntType Plus int int left right IntConst Multi int left right double IntConst Sqrt int expr VarRef int
declarefixedtypes derivetypes calculatecommon x: Var y: Calc (type hierarchies) int type type expr double IntType IntType Plus int int left right IntConst Multi int double left right double IntConst Sqrt int expr VarRef int
declarefixedtypes derivetypes calculatecommon x: Var y: Calc (type hierarchies) int check types type type expr double IntType IntType Plus int int left right ! ! ! ! ! ! ! IntConst Multi int double left right double IntConst Sqrt int expr VarRef int
declarefixedtypes derivetypes calculatecommon (type hierarchies) check types Xtext Typesystem Framework Demo
declarefixedtypes derivetypes calculatecommon (type hierarchies) check types Xtext Typesystem Framework Editor:popuptoshow type information use type information in scopes Debug:tracetohelp understand how type was calculated Testing:internal Java DSL fortestingthetypesystemrules Docs: 22-page tutorial
declarefixedtypes derivetypes calculatecommon (type hierarchies) check types Xtext Xtext Typesystem Framework Try it: http://code.google.com/a/eclipselabs.org/p/xtext-typesystem/