2019-01-30 11:25:54 -05:00
|
|
|
@c This document is part of the TAME manual.
|
2019-02-07 13:23:09 -05:00
|
|
|
@c Copyright (C) 2014-2019 Ryan Specialty Group, LLC.
|
2019-01-30 11:25:54 -05:00
|
|
|
@c Permission is granted to copy, distribute and/or modify this document
|
|
|
|
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
|
|
|
@c any later version published by the Free Software Foundation; with no
|
|
|
|
@c Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
|
|
|
@c A copy of the license is included in the section entitled ``GNU Free
|
|
|
|
@c Documentation License''.
|
|
|
|
|
|
|
|
@node Core Concepts
|
|
|
|
@chapter Core Concepts
|
|
|
|
@helpwanted
|
|
|
|
|
|
|
|
@cindex declarative, programming
|
|
|
|
@cindex imperative, programming
|
|
|
|
@tame is a @dfn{declarative} programming language@mdash{
|
|
|
|
}it @emph{describes} how a program ought to behave rather than
|
|
|
|
explicitly telling a computer the steps needed to make it work
|
|
|
|
(@dfn{imperative}).
|
|
|
|
@tame is a calculator at heart,
|
|
|
|
so code written in its language describes mathematical operations.
|
|
|
|
Definitions fall primarily under two categories:
|
|
|
|
|
|
|
|
@table @strong
|
|
|
|
@cindex classifications
|
|
|
|
@item Classifications
|
|
|
|
Higher-order logic used to classify data and predicate calculations,
|
|
|
|
controlling program flow.
|
|
|
|
|
|
|
|
@cindex calculations
|
|
|
|
@item Calculations
|
|
|
|
Mathematical operations motivated by linear algebra.
|
|
|
|
@end table
|
|
|
|
|
|
|
|
@tame also supports abstracting calculations into @dfn{functions},
|
|
|
|
which permits the use of recursion for solving problems that are
|
|
|
|
difficult to fit into an algebraic model.
|
|
|
|
The language is Turing-complete.
|
|
|
|
|
|
|
|
@cindex metalanguage
|
|
|
|
@cindex domain-specific language
|
|
|
|
@tame itself is a @dfn{domain-specific language} (DSL)@mdash{
|
|
|
|
}it was designed for use in comparative insurance rating systems.
|
|
|
|
However,
|
|
|
|
it couldn't possibly know all useful abstractions that may be needed
|
|
|
|
in the future;
|
|
|
|
the domain for which @tame was designed encompasses many
|
|
|
|
subdomains as well.
|
|
|
|
To accommodate future needs,
|
|
|
|
@tame is also a @dfn{metalanguage}@mdash{
|
|
|
|
}a language that can be used to program itself.
|
|
|
|
The core language is based upon broad mathematical foundations
|
|
|
|
that offer great flexibility.
|
|
|
|
Its expressive template system allows the creation of abstractions
|
|
|
|
that are indistinguishable from core language features,
|
|
|
|
and templates have powerful introspective capabilities that allow
|
|
|
|
for many useful types of code generation.
|
|
|
|
Essentially,
|
|
|
|
@tame allows the creation of sub-DSLs.
|
|
|
|
|
|
|
|
Code is written in @tame without regard to order of execution@mdash{
|
|
|
|
}the linker will figure that out for you.
|
|
|
|
This simplifies the development of systems with complex graphs of
|
|
|
|
dependencies.
|
|
|
|
|
|
|
|
@todo{This chapter is a placeholder.
|
|
|
|
More to come.}
|