Domain-specific languageFrom Wikipedia, the free encyclopediaProgrammi การแปล - Domain-specific languageFrom Wikipedia, the free encyclopediaProgrammi ไทย วิธีการพูด

Domain-specific languageFrom Wikipe

Domain-specific language
From Wikipedia, the free encyclopedia
Programming paradigms
Action
Agent-oriented
Automata-based
Concurrent computing
Relativistic programming
Data-driven
Declarative (contrast: Imperative)
Constraint
Dataflow
Flow-based
Cell-oriented (spreadsheets)
Reactive
Functional
Functional logic
Logic
Abductive logic
Answer set
Constraint logic
Functional logic
Inductive logic
Relational
End-user programming
Event-driven
Service-oriented
Time-driven
Expression-oriented
Feature-oriented
Function-level (contrast: Value-level)
Generic
Imperative (contrast: Declarative)
Procedural
Language-oriented
Natural language programming
Discipline-specific
Domain-specific
Grammar-oriented
Dialecting
Intentional
Metaprogramming
Automatic
Reflective
Attribute-oriented
Homoiconic
Template
Policy-based
Non-structured (contrast: Structured)
Array
Nondeterministic
Parallel computing
Process-oriented
Point-free style
Concatenative
Semantic
Structured (contrast: Non-structured)
Block-structured
Modular (contrast: Monolithic)
Object-oriented (OOP)
Class-based
Prototype-based
By separation of concerns:
Aspect-oriented
Role-oriented
Subject-oriented
Recursive
Value-level (contrast: Function-level)
Probabilistic
Concept
v t e
A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains, and lacks specialized features for a particular domain. There is a wide variety of DSLs, ranging from widely used languages for common domains, such as HTML for web pages, down to languages used by only a single piece of software. DSLs can be further subdivided by the kind of language, and include domain-specific markup languages, domain-specific modeling languages (more generally, specification languages), and domain-specific programming languages. Special-purpose computer languages have always existed in the computer age, but the term "domain-specific language" has become more popular due to the rise of domain-specific modeling. Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages.

The line between general-purpose languages and domain-specific languages is not always sharp, as a language may have specialized features for a particular domain but be applicable more broadly, or conversely may in principle be capable of broad application but in practice used primarily for a specific domain. For example, Perl was originally developed as a text-processing and glue language, for the same domain as AWK and shell scripts, but has since become a general-purpose programming language. By contrast, PostScript is a Turing complete language, and in principle can be used for any task, but in practice is narrowly used as a page description language.

Contents [hide]
1 Use
2 Overview
2.1 In design and implementation
2.2 Programming tools
3 Domain-specific language topics
3.1 Usage patterns
3.2 Design goals
3.3 Idioms
4 Examples
4.1 Game Maker Language
4.2 Unix shell scripts
4.3 ColdFusion Markup Language
4.4 Erlang OTP
4.5 FilterMeister
4.6 MediaWiki templates
4.7 Software engineering uses
4.8 Metacompilers
4.9 Unreal Engine and other games
4.10 Rules Engines for Policy Automation
4.11 Statistical modelling languages
4.12 Generate model and services to multiple programming Languages
5 Advantages and disadvantages
6 See also
7 References
8 Further reading
9 External links
Use[edit]
The design and use of appropriate DSLs is a key part of domain engineering, by using a language suitable to the domain at hand – this may consist of using an existing DSL or GPL, or developing a new DSL. Language-Oriented Programming considers the creation of special-purpose languages for expressing problems a standard part of the problem solving process. Creating a domain-specific language (with software to support it), rather than reusing an existing language, can be worthwhile if the language allows a particular type of problem or solution to be expressed more clearly than an existing language would allow and the type of problem in question reappears sufficiently often. Pragmatically, a DSL may be specialized to a particular problem domain, a particular problem representation technique, a particular solution technique, or other aspect of a domain.

Overview[edit]
A domain-specific language is created specifically to solve problems in a particular domain and is not intended to be able to solve problems outside it (although that may be technically possible). In contrast, general-purpose languages are created to solve problems in many domains. The domain can also be a business area. Some examples of business areas include:

domain-specific language for life insurance policies developed internally in large insurance enterprise
domain-specific language for combat simulation
domain-specific language for salary calculation
domain-specific language for billing
A domain-specific language is somewhere between a tiny programming language and a scripting language, and is often used in a way analogous to a programming library. The boundaries between these concepts are quite blurry, much like the boundary between scripting languages and general-purpose languages.

In design and implementation[edit]
Domain-specific languages are languages (or often, declared syntaxes or grammars) with very specific goals in design and implementation. A domain-specific language can be one of a visual diagramming language, such as those created by the Generic Eclipse Modeling System, programmatic abstractions, such as the Eclipse Modeling Framework, or textual languages. For instance, the command line utility grep has a regular expression syntax which matches patterns in lines of text. The sed utility defines a syntax for matching and replacing regular expressions. Often, these tiny languages can be used together inside a shell to perform more complex programming tasks.

The line between domain-specific languages and scripting languages is somewhat blurred, but domain-specific languages often lack low-level functions for filesystem access, interprocess control, and other functions that characterize full-featured programming languages, scripting or otherwise. Many domain-specific languages do not compile to byte-code or executable code, but to various kinds of media objects: GraphViz exports to PostScript, GIF, JPEG, etc., where Csound compiles to audio files, and a ray-tracing domain- specific language like POV compiles to graphics files. A computer language like SQL presents an interesting case: it can be deemed a domain-specific language because it is specific to a specific domain (in SQL's case, accessing and managing relational databases), and is often called from another application, but SQL has more keywords and functions than many scripting languages, and is often thought of as a language in its own right, perhaps because of the prevalence of database manipulation in programming and the amount of mastery required to be an expert in the language.

Further blurring this line, many domain-specific languages have exposed APIs, and can be accessed from other programming languages without breaking the flow of execution or calling a separate process, and can thus operate as programming libraries.

Programming tools[edit]
Some domain-specific languages expand over time to include full-featured programming tools, which further complicates the question of whether a language is domain-specific or not. A good example is the functional language XSLT, specifically designed for transforming one XML graph into another, which has been extended since its inception to allow (particularly in its 2.0 version) for various forms of filesystem interaction, string and date manipulation, and data typing.

In model-driven engineering many examples of domain-specific languages may be found like OCL, a language for decorating models with assertions or QVT, a domain-specific transformation language. However languages like UML are typically general purpose modeling languages.

To summarize, an analogy might be useful: a Very Little Language is like a knife, which can be used in thousands of different ways, from cutting food to cutting down trees. A domain-specific language is like an electric drill: it is a powerful tool with a wide variety of uses, but a specific context, namely, putting holes in things. A General Purpose Language is a complete workbench, with a variety of tools intended for performing a variety of tasks. Domain-specific languages should be used by programmers who, looking at their current workbench, realize they need a better drill, and find that a particular domain-specific language provides exactly that.

Domain-specific language topics[edit]
Usage patterns[edit]
There are several usage patterns for domain-specific languages:[1][2]

processing with standalone tools, invoked via direct user operation, often on the command line or from a Makefile (e.g., the GraphViz tool set)
domain-specific languages which are implemented using programming language macro systems, and which are converted or expanded into a host general purpose language at compile-time or read-time
embedded (or internal) domain-specific languages, implemented as libraries which exploit the syntax of their host general purpose language or a subset thereof, while adding domain-specific language elements (data types, routines, methods, macros etc.).
domain-specific languages which are called (at runtime) from programs written in general purpose languages like C or Perl, to perform a specific function, often returning the results of operation to the "host" programming language for further processing; generally, an interpreter or virtual machine for the domain-specific language is embedded into the host application
domain-specific languages which are embedded into user applications (e.g., macro languages within spreadsheets) and which are (1) used to
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
ภาษาเฉพาะโดเมนจากวิกิพีเดีย สารานุกรมฟรีParadigms โปรแกรมการดำเนินการแปลกแทนโดยออโตมาตาใช้งานพร้อมกันเขียนโปรแกรม relativisticปรับปรุงข้อมูลDeclarative (ความคมชัด: ความจำ)ข้อจำกัดDataflowตามกระแสเน้นเซลล์ (กระดาษคำนวณ)ปฏิกิริยาใช้งานได้ตรรกะที่ทำงานตรรกะตรรกะ abductiveชุดคำตอบตรรกะข้อจำกัดตรรกะที่ทำงานตรรกะเชิงอุปนัยเชิงสัมพันธ์ผู้เขียนโปรแกรมขับเคลื่อนกิจกรรมเด่นเวลาขับนิพจน์แปลกเน้นคุณลักษณะฟังก์ชันระดับ (ความคมชัด: ค่าระดับ)ทั่วไปความจำ (ความคมชัด: Declarative)ขั้นตอนเน้นภาษาการเขียนโปรแกรมภาษาวินัยเฉพาะโดเมนเฉพาะเน้นไวยากรณ์DialectingมิMetaprogrammingอัตโนมัติสะท้อนแสงแอตทริบิวต์เน้นHomoiconicแม่แบบโดยใช้นโยบายไม่มีโครงสร้าง (ความคมชัด: โครงสร้าง)อาร์เรย์ถูกการคำนวณแบบขนานมุ่งเน้นกระบวนการลักษณะจุดฟรีConcatenativeทางตรรกโครงสร้าง (ความคมชัด: ไม่ใช่โครงสร้าง)โครงสร้างแบบบล็อคโมดูลาร์ (ความคมชัด: เสาหิน)เชิงวัตถุ (OOP)ตามระดับชั้นไทป์โดยแบ่งแยกความกังวล:เชิงเน้นบทบาทเรื่องแปลกซ้ำค่าระดับ (ความคมชัด: ฟังก์ชันระดับ)Probabilisticแนวความคิดv t eภาษาเฉพาะโดเมน (DSL) คือภาษาคอมพิวเตอร์ในโดเมนโปรแกรมประยุกต์เฉพาะ นี้จะตรงข้ามกับภาษาวัตถุ (GPL), ซึ่งสามารถใช้ได้ทั่วไปเป็นโดเมน และขาดคุณลักษณะเฉพาะสำหรับโดเมนเฉพาะ มีความหลากหลายของ DSLs ตั้งแต่ภาษาที่ใช้กันอย่างแพร่หลายในโดเมนทั่วไป เช่น HTML บนเว็บเพจ ลงภาษาที่ใช้ โดยเฉพาะชิ้นงานของซอฟแวร์ DSLs สามารถเพิ่มเติมปฐมภูมิ โดยชนิดของภาษา และรวมถึงภาษามาร์กอัปเฉพาะโดเมน โดเมนเฉพาะโมเดลภาษา (เพิ่มเติมโดยทั่วไป ข้อมูลจำเพาะเกี่ยวกับภาษา), และภาษาโปรแกรมเฉพาะโดเมน วัตถุประสงค์พิเศษคอมพิวเตอร์ภาษามีอยู่เสมอในยุคคอมพิวเตอร์ แต่คำว่า "เฉพาะโดเมนภาษา" ได้กลายเป็นที่นิยมมากขึ้นเนื่องจากการเพิ่มขึ้นของโดเมนเฉพาะโมเดล DSLs เรียบง่าย โดยเฉพาะอย่างยิ่งคนที่ใช้ โดยโปรแกรมประยุกต์เดียว บางอย่างจะเรียกว่ามินิภาษาเส้นระหว่างวัตถุและภาษาเฉพาะของโดเมนมักจะไม่คมชัด เป็นภาษาอาจมีความคุณลักษณะสำหรับโดเมนเฉพาะ แต่สามารถใช้ได้อย่างกว้างขวางขึ้น หรือในทางกลับกัน ในหลักอาจสามารถประยุกต์กว้าง แต่ ในทางปฏิบัติที่ใช้เป็นหลักสำหรับโดเมนที่ระบุ ตัวอย่าง ภาษาเพิร์ลถูกพัฒนาขึ้นครั้งแรกเป็นการประมวลผลข้อความและกาวภาษา สำหรับโดเมนเดียวกันเป็นภาษาออว์ค และเชลล์สคริปต์ แต่เนื่องจากเป็น ภาษาการเขียนโปรแกรมวัตถุประสงค์ทั่วไป โดยคมชัด PostScript เป็นภาษาสมบูรณ์ทัวริง และในหลักใช้งานใด ๆ แต่ในทางปฏิบัติแคบ ๆ ใช้เป็นภาษาการบรรยายหน้าเนื้อหา [ซ่อน] ใช้ 1ภาพรวม 22.1 ในการออกแบบและการใช้งาน2.2 เครื่องมือเขียนโปรแกรมหัวข้อภาษาเฉพาะโดเมน 33.1 รูปแบบการใช้3.2 ออกแบบเป้าหมาย3.3 สำนวนตัวอย่างที่ 44.1 เครื่องเกมภาษา4.2 Unix เชลล์สคริปต์4.3 ColdFusion Markup ภาษา4.4 Erlang OTP4.5 FilterMeister4.6 แม่แบบ MediaWiki4.7 ใช้วิศวกรรมซอฟต์แวร์4.8 Metacompilers4.9 ลวงตาและเกมอื่น ๆ4.10 เครื่องยนต์กฎนโยบายระบบ4.11 ภาษาการสร้างแบบจำลองทางสถิติ4.12 สร้างรูปแบบและบริการเขียนโปรแกรมหลายภาษา5 ข้อดีข้อเสีย6 ดูอ้างอิง 78 อ่านเพิ่มเติมเชื่อมโยงภายนอก 9ใช้ [แก้ไข]การออกแบบและการใช้ DSLs ที่เหมาะสมเป็นส่วนสำคัญของโดเมนวิศวกรรม โดยใช้ภาษาที่เหมาะสมไปยังโดเมนที่ – ซึ่งอาจประกอบด้วยใช้ DSL ที่มีอยู่การ GPL หรือพัฒนา DSL ใหม่ การเขียนโปรแกรมภาษาเชิงมาตรฐานสร้างภาษาวัตถุประสงค์พิเศษสำหรับปัญหาที่กำลังพิจารณาเป็นส่วนหนึ่งของกระบวนการแก้ปัญหา สร้างภาษาเฉพาะโดเมน (กับซอฟแวร์สนับสนุน), แทนที่จะนำมาใช้ใหม่เป็นภาษาที่มีอยู่ ได้อย่างคุ้มค่า ถ้าภาษาช่วยให้ปัญหาบางชนิด หรือโซลูชันการแสดงชัดเจนเป็นภาษาที่มีอยู่จะช่วยให้ reappears ชนิดของปัญหาสงสัยมักจะเพียงพอ Pragmatically, DSL อาจความโดเมนเฉพาะปัญหา เทคนิคการนำเสนอปัญหาเฉพาะ เทคนิคโซลูชั่นเฉพาะ หรือด้านอื่น ๆ ของโดเมนภาพรวม [แก้ไข]ภาษาเฉพาะโดเมนถูกสร้างขึ้นโดยเฉพาะเพื่อแก้ปัญหาในโดเมนเฉพาะ และไม่ได้มีไว้เพื่อให้สามารถแก้ปัญหานอก (แต่ที่อาจเป็นไปได้ทางเทคนิค) ในทางตรงกันข้าม ภาษาวัตถุถูกสร้างเพื่อแก้ปัญหาในหลายโดเมน โดเมนยังสามารถเป็นพื้นที่ธุรกิจ ตัวอย่างของธุรกิจรวมถึง:ภาษาเฉพาะโดเมนสำหรับกรมธรรม์ประกันชีวิตที่ได้รับการพัฒนาภายในองค์กรขนาดใหญ่ประกันโดเมนเฉพาะภาษาสำหรับการจำลองการต่อสู้ภาษาเฉพาะโดเมนสำหรับการคำนวณเงินเดือนโดเมนเฉพาะภาษาสำหรับเรียกเก็บเงินภาษาเฉพาะโดเมนอยู่ที่ใดที่หนึ่งระหว่างภาษาเล็ก ๆ และภาษาการเขียนสคริปต์ และมักใช้ในลักษณะที่คล้ายคลึงกับไลบรารีโปรแกรม รอยต่อระหว่างแนวคิดเหล่านี้จะค่อนข้างมัว เหมือนเขตแดนระหว่างและวัตถุภาษาสคริปต์ในการออกแบบและการใช้งาน [แก้ไข]ภาษาเฉพาะโดเมนเป็นภาษา (หรือประกาศบ่อย syntaxes หรือ grammars) มีเป้าหมายเฉพาะเจาะจงมากในการออกแบบและใช้งาน ภาษาเฉพาะโดเมนสามารถภาษาไดอะแกรมภาพ เช่นผู้สร้าง โดยทั่วไปคราสโมเดลระบบ ด้านโปรแกรม abstractions เช่นกรอบการสร้างแบบจำลองอีคลิปส์ หรือภาษาที่เป็นข้อความอย่างใดอย่างหนึ่ง ตัวอย่าง grep โปรแกรมอรรถประโยชน์บรรทัดคำสั่งที่มีไวยากรณ์นิพจน์ทั่วไปที่ตรงกับรูปแบบในบรรทัดของข้อความ ยูทิลิตี้ถูกกำหนดไวยากรณ์สำหรับการจับคู่ และเปลี่ยนนิพจน์ทั่วไป มักจะ ภาษาเล็ก ๆ เหล่านี้สามารถใช้ร่วมกันภายในเปลือกทำงานเขียนโปรแกรมที่ซับซ้อนเส้นระหว่างโดเมนเฉพาะและภาษาสคริปต์จะค่อนข้างเบลอ แต่เฉพาะโดเมนภาษามักขาดฟังก์ชันระดับต่ำสำหรับการเข้าถึงระบบแฟ้ม ควบคุม interprocess และฟังก์ชั่นอื่น ๆ ที่เต็มภาษาโปรแกรม สคริปต์ หรืออื่นใด ในโดเมนเฉพาะภาษาคอมไพล์ไบต์โค้ดหรือรหัสที่ปฏิบัติการได้ แต่ของสื่อประเภทต่าง ๆ: GraphViz ส่งออก PostScript, GIF, JPEG ฯลฯ ที่ Csound คอมไพล์ไฟล์เสียง และภาษาเฉพาะโดเมนเรย์ติดตามเช่น POV คอมไพล์แฟ้มกราฟิก ภาษาคอมพิวเตอร์เช่น SQL แสดงกรณีน่าสนใจ: จะสามารถถือว่าเป็นภาษาเฉพาะโดเมนเนื่องจากมันเป็นเฉพาะโดเมนเฉพาะ (ในกรณีของ SQL การเข้าถึง และการจัดการฐานข้อมูลเชิงสัมพันธ์), และมักจะเรียกจากโปรแกรมประยุกต์อื่น แต่ SQL มีคำหลักและฟังก์ชันกว่าสคริปต์ภาษาต่าง ๆ เพิ่มเติม และคือมักจะคิดว่า เป็นภาษาของตนเองอาจเนื่องจากความชุกของการจัดการฐานข้อมูลในการเขียนโปรแกรมและจำนวนของจำเป็นต้องมีผู้เชี่ยวชาญในภาษานั้นอพยพเพิ่มเติม บรรทัดนี้ หลายเฉพาะโดเมนภาษามีการเปิดเผย APIs และสามารถเข้าถึงได้จากภาษาโปรแกรมอื่น ๆ โดยแบ่งขั้นตอนของการดำเนินการ หรือเรียกกระบวนการแยก กจึงสามารถทำงานเป็นไลบรารีโปรแกรมเครื่องมือเขียนโปรแกรม [แก้ไข]ภาษาเฉพาะโดเมนขยายเวลารวมเต็มมือเขียน ซึ่งเพิ่มเติม complicates คำถามที่ว่าภาษาเป็นโดเมนเฉพาะ หรือไม่ ตัวอย่างที่ดีคือ ทำงานภาษา XSLT ออกแบบเฉพาะสำหรับเปลี่ยนกราฟ XML หนึ่งอีก ซึ่งมีการขยายตั้งแต่ให้ (โดยเฉพาะอย่างยิ่งในของรุ่น 2.0) ในรูปแบบต่าง ๆ ของระบบแฟ้มโต้ตอบ จัดการสายอักขระและวัน และพิมพ์ข้อมูลแบบโมเดลวิศวกรรม อาจพบตัวอย่างมากของภาษาเฉพาะโดเมนเช่น OCL ภาษาสำหรับแบบจำลองตกแต่งด้วย assertions หรือ QVT ภาษาเฉพาะโดเมนการแปลง อย่างไรก็ตาม ภาษาเช่น UML มีวัตถุประสงค์ทั่วไปมักจะสร้างโมเดลภาษาสรุป การเปรียบเทียบอาจเป็นประโยชน์: มีภาษาน้อยมากเช่นมีด ซึ่งสามารถใช้เป็นหลักพันหลาย ๆ จากอาหารตัดตัดลงต้นไม้ ได้ ภาษาเฉพาะโดเมนจะเหมือนไฟฟ้าสว่าน: เป็นเครื่องมือมีประสิทธิภาพกับหลากหลายของใช้ แต่เนื้อหาที่เฉพาะเจาะจง ได้แก่ ใส่หลุมในสิ่งนั้น ภาษาวัตถุประสงค์ทั่วไปปรับแต่งสมบูรณ์ มีความหลากหลายของเครื่องมือสำหรับการทำงานที่หลากหลายได้ ภาษาเฉพาะโดเมนควรใช้ โดยโปรแกรมเมอร์ที่ มองที่ปรับแต่งของปัจจุบัน รู้ว่า พวกเขาต้องการสว่านดีกว่า และค้นหาที่มีภาษาเฉพาะโดเมนเฉพาะที่ตรงนั้นหัวข้อเฉพาะโดเมนภาษา [แก้ไข]รูปแบบการใช้งาน [แก้ไข]มีหลายรูปแบบการใช้ภาษาเฉพาะโดเมน: [1] [2]ประมวลผล ด้วยเครื่องมือแบบสแตนด์อโลน เรียกผ่านการดำเนินงานผู้ใช้โดยตรง มักจะ บนบรรทัดคำสั่ง หรือ จาก Makefile (เช่น GraphViz เครื่องมือตั้งค่า)ภาษาเฉพาะโดเมนซึ่งดำเนินการโดยใช้โปรแกรมภาษาแมโครระบบ และการแปลง หรือขยายเข้าไปในโฮสต์ทั่วไปภาษาที่เวลาคอมไพล์หรือเวลาอ่านฝังตัว (ภายใน) เฉพาะโดเมนภาษา หรือ ใช้เป็นไลบรารีซึ่งใช้ไวยากรณ์ของภาษาทั่วไปโฮสต์หรือย่อยดังกล่าว ในขณะที่การเพิ่มองค์ประกอบเฉพาะโดเมนภาษา (ชนิดข้อมูล งานประจำ วิธี แมโครเป็นต้น)ภาษาเฉพาะโดเมนที่เรียกว่า (ขณะใช้งานจริง) จากโปรแกรมที่เขียนขึ้นโดยทั่วไปวัตถุประสงค์ภาษาเช่น C หรือภาษาเพิร์ล เพื่อทำหน้าที่เฉพาะ มักจะพบผลการดำเนินงาน "โฮสต์" เขียนโปรแกรมภาษาสำหรับการประมวลผลเพิ่มเติม ทั่วไป การล่ามหรือเครื่องเสมือนสำหรับภาษาเฉพาะโดเมนถูกฝังเข้าไปในโปรแกรมประยุกต์โฮสต์ภาษาเฉพาะโดเมนที่ถูกฝังอยู่ในโปรแกรมประยุกต์ของผู้ใช้ (เช่น แมโครภาษาภายในกระดาษคำนวณ) และที่อยู่ (1) ใช้
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
Domain-specific language
From Wikipedia, the free encyclopedia
Programming paradigms
Action
Agent-oriented
Automata-based
Concurrent computing
Relativistic programming
Data-driven
Declarative (contrast: Imperative)
Constraint
Dataflow
Flow-based
Cell-oriented (spreadsheets)
Reactive
Functional
Functional logic
Logic
Abductive logic
Answer set
Constraint logic
Functional logic
Inductive logic
Relational
End-user programming
Event-driven
Service-oriented
Time-driven
Expression-oriented
Feature-oriented
Function-level (contrast: Value-level)
Generic
Imperative (contrast: Declarative)
Procedural
Language-oriented
Natural language programming
Discipline-specific
Domain-specific
Grammar-oriented
Dialecting
Intentional
Metaprogramming
Automatic
Reflective
Attribute-oriented
Homoiconic
Template
Policy-based
Non-structured (contrast: Structured)
Array
Nondeterministic
Parallel computing
Process-oriented
Point-free style
Concatenative
Semantic
Structured (contrast: Non-structured)
Block-structured
Modular (contrast: Monolithic)
Object-oriented (OOP)
Class-based
Prototype-based
By separation of concerns:
Aspect-oriented
Role-oriented
Subject-oriented
Recursive
Value-level (contrast: Function-level)
Probabilistic
Concept
v t e
A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains, and lacks specialized features for a particular domain. There is a wide variety of DSLs, ranging from widely used languages for common domains, such as HTML for web pages, down to languages used by only a single piece of software. DSLs can be further subdivided by the kind of language, and include domain-specific markup languages, domain-specific modeling languages (more generally, specification languages), and domain-specific programming languages. Special-purpose computer languages have always existed in the computer age, but the term "domain-specific language" has become more popular due to the rise of domain-specific modeling. Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages.

The line between general-purpose languages and domain-specific languages is not always sharp, as a language may have specialized features for a particular domain but be applicable more broadly, or conversely may in principle be capable of broad application but in practice used primarily for a specific domain. For example, Perl was originally developed as a text-processing and glue language, for the same domain as AWK and shell scripts, but has since become a general-purpose programming language. By contrast, PostScript is a Turing complete language, and in principle can be used for any task, but in practice is narrowly used as a page description language.

Contents [hide]
1 Use
2 Overview
2.1 In design and implementation
2.2 Programming tools
3 Domain-specific language topics
3.1 Usage patterns
3.2 Design goals
3.3 Idioms
4 Examples
4.1 Game Maker Language
4.2 Unix shell scripts
4.3 ColdFusion Markup Language
4.4 Erlang OTP
4.5 FilterMeister
4.6 MediaWiki templates
4.7 Software engineering uses
4.8 Metacompilers
4.9 Unreal Engine and other games
4.10 Rules Engines for Policy Automation
4.11 Statistical modelling languages
4.12 Generate model and services to multiple programming Languages
5 Advantages and disadvantages
6 See also
7 References
8 Further reading
9 External links
Use[edit]
The design and use of appropriate DSLs is a key part of domain engineering, by using a language suitable to the domain at hand – this may consist of using an existing DSL or GPL, or developing a new DSL. Language-Oriented Programming considers the creation of special-purpose languages for expressing problems a standard part of the problem solving process. Creating a domain-specific language (with software to support it), rather than reusing an existing language, can be worthwhile if the language allows a particular type of problem or solution to be expressed more clearly than an existing language would allow and the type of problem in question reappears sufficiently often. Pragmatically, a DSL may be specialized to a particular problem domain, a particular problem representation technique, a particular solution technique, or other aspect of a domain.

Overview[edit]
A domain-specific language is created specifically to solve problems in a particular domain and is not intended to be able to solve problems outside it (although that may be technically possible). In contrast, general-purpose languages are created to solve problems in many domains. The domain can also be a business area. Some examples of business areas include:

domain-specific language for life insurance policies developed internally in large insurance enterprise
domain-specific language for combat simulation
domain-specific language for salary calculation
domain-specific language for billing
A domain-specific language is somewhere between a tiny programming language and a scripting language, and is often used in a way analogous to a programming library. The boundaries between these concepts are quite blurry, much like the boundary between scripting languages and general-purpose languages.

In design and implementation[edit]
Domain-specific languages are languages (or often, declared syntaxes or grammars) with very specific goals in design and implementation. A domain-specific language can be one of a visual diagramming language, such as those created by the Generic Eclipse Modeling System, programmatic abstractions, such as the Eclipse Modeling Framework, or textual languages. For instance, the command line utility grep has a regular expression syntax which matches patterns in lines of text. The sed utility defines a syntax for matching and replacing regular expressions. Often, these tiny languages can be used together inside a shell to perform more complex programming tasks.

The line between domain-specific languages and scripting languages is somewhat blurred, but domain-specific languages often lack low-level functions for filesystem access, interprocess control, and other functions that characterize full-featured programming languages, scripting or otherwise. Many domain-specific languages do not compile to byte-code or executable code, but to various kinds of media objects: GraphViz exports to PostScript, GIF, JPEG, etc., where Csound compiles to audio files, and a ray-tracing domain- specific language like POV compiles to graphics files. A computer language like SQL presents an interesting case: it can be deemed a domain-specific language because it is specific to a specific domain (in SQL's case, accessing and managing relational databases), and is often called from another application, but SQL has more keywords and functions than many scripting languages, and is often thought of as a language in its own right, perhaps because of the prevalence of database manipulation in programming and the amount of mastery required to be an expert in the language.

Further blurring this line, many domain-specific languages have exposed APIs, and can be accessed from other programming languages without breaking the flow of execution or calling a separate process, and can thus operate as programming libraries.

Programming tools[edit]
Some domain-specific languages expand over time to include full-featured programming tools, which further complicates the question of whether a language is domain-specific or not. A good example is the functional language XSLT, specifically designed for transforming one XML graph into another, which has been extended since its inception to allow (particularly in its 2.0 version) for various forms of filesystem interaction, string and date manipulation, and data typing.

In model-driven engineering many examples of domain-specific languages may be found like OCL, a language for decorating models with assertions or QVT, a domain-specific transformation language. However languages like UML are typically general purpose modeling languages.

To summarize, an analogy might be useful: a Very Little Language is like a knife, which can be used in thousands of different ways, from cutting food to cutting down trees. A domain-specific language is like an electric drill: it is a powerful tool with a wide variety of uses, but a specific context, namely, putting holes in things. A General Purpose Language is a complete workbench, with a variety of tools intended for performing a variety of tasks. Domain-specific languages should be used by programmers who, looking at their current workbench, realize they need a better drill, and find that a particular domain-specific language provides exactly that.

Domain-specific language topics[edit]
Usage patterns[edit]
There are several usage patterns for domain-specific languages:[1][2]

processing with standalone tools, invoked via direct user operation, often on the command line or from a Makefile (e.g., the GraphViz tool set)
domain-specific languages which are implemented using programming language macro systems, and which are converted or expanded into a host general purpose language at compile-time or read-time
embedded (or internal) domain-specific languages, implemented as libraries which exploit the syntax of their host general purpose language or a subset thereof, while adding domain-specific language elements (data types, routines, methods, macros etc.).
domain-specific languages which are called (at runtime) from programs written in general purpose languages like C or Perl, to perform a specific function, often returning the results of operation to the "host" programming language for further processing; generally, an interpreter or virtual machine for the domain-specific language is embedded into the host application
domain-specific languages which are embedded into user applications (e.g., macro languages within spreadsheets) and which are (1) used to
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
โดเมนเฉพาะภาษา
จากวิกิพีเดีย สารานุกรมเสรี


เจ้าหน้าที่ไทยทาวน์การมุ่งเน้น


ตามสภาพแสงจำกัดคอมพิวเตอร์โปรแกรมจัดเก็บข้อมูลขับเคลื่อน

( ความคมชัด : ขวาง )



เซลล์ข้อมูลการไหลตามแนว ( สเปรดชีต )
3


หน้าที่การทำงานตรรกะตรรกะ

ตอบ abductive ตรรกะ

ชุดตรรกะข้อจำกัดการทำงาน

ตรรกะเชิงอุปนัยตรรกศาสตร์เป็นผู้ใช้โปรแกรม



เวลาเหตุการณ์ขับเคลื่อนบริการมุ่งขับเคลื่อน
การแสดงออกเชิงคุณลักษณะเชิงฟังก์ชัน (

) ความคมชัดระดับค่า )

( ขวางทั่วไปความคมชัด : คำประกาศ )


ภาษาเชิงกระบวนการธรรมชาติภาษาเฉพาะโดเมนเฉพาะ


วินัย dialecting



ตั้งใจโกปาเดลเรย์สะท้อนแสง
อัตโนมัติ คุณลักษณะที่มุ่งเน้น homoiconic


เน้นไวยากรณ์

ไม่ใช่แม่แบบนโยบายตามโครงสร้าง ( ความคมชัด : โครงสร้างอาร์เรย์

)
nondeterministic ขนานคอมพิวเตอร์

เน้นกระบวนการจุดฟรีสไตล์
concatenative

ความหมายโครงสร้าง ( ความคมชัดไม่บล็อกโครงสร้าง : โครงสร้าง )

แบบแยกส่วน ( ความคมชัด : แบบเชิงวัตถุ ( OOP )
)


ตามชั้นตามต้นแบบ โดยการแยกเรื่อง :


เน้นบทบาทด้านมุ่งเน้นวิชาที่มุ่งเน้นผล

ระดับค่า ( ความคมชัดระดับฟังก์ชันความน่าจะเป็น )


V E
t แนวคิดโดเมนเฉพาะภาษา ( DSL ) เป็นคอมพิวเตอร์ภาษาเฉพาะโดเมนโปรแกรมประยุกต์เฉพาะ นี้เป็นในทางตรงกันข้ามกับภาษาเอนกประสงค์ ( GPL ) ซึ่งสามารถใช้ได้อย่างกว้างขวางข้ามโดเมน และขาดคุณสมบัติเฉพาะสำหรับโดเมนเฉพาะ มีความหลากหลายของ dsls ,ตั้งแต่ใช้ภาษาสำหรับโดเมนทั่วไป เช่น HTML สำหรับหน้าเว็บที่ลงกับภาษาที่ใช้โดยเฉพาะ ชิ้นส่วนของซอฟต์แวร์ dsls สามารถเพิ่มเติมแบ่งตามชนิดของภาษา และรวมถึงโดเมนภาษามาร์กอัปเฉพาะโดเมนแบบภาษา ( มากกว่าปกติสเปคภาษา ) และโดเมนภาษาโปรแกรมจุดประสงค์พิเศษภาษาคอมพิวเตอร์มักจะอยู่ในยุคคอมพิวเตอร์ แต่คำว่า " โดเมนเฉพาะภาษา " ได้กลายเป็นที่นิยมมากขึ้นเนื่องจากการเพิ่มขึ้นของตัวแบบเฉพาะโดเมน dsls ง่ายกว่า โดยเฉพาะพวกที่ใช้โดยโปรแกรมเดียว บางครั้งเรียกภาษาแบบมินิ

เส้นระหว่างภาษาทั่วไปและโดเมนเฉพาะภาษามักไม่แหลมเป็นภาษาอาจมีคุณสมบัติเฉพาะสำหรับโดเมนโดยเฉพาะ แต่สามารถใช้งานได้มากขึ้น หรือในทางกลับกันอาจจะในหลักการสามารถประยุกต์ใช้ในวงกว้าง แต่ในการปฏิบัติที่ใช้เป็นหลักสำหรับโดเมนเฉพาะ ตัวอย่างเช่น , Perl ได้ถูกพัฒนามาเป็นการประมวลผลข้อความภาษาและกาวสำหรับโดเมนเดียวกันเป็นภาษาอุซเบกและสคริปต์เปลือกแต่เนื่องจากเป็นภาษาการเขียนโปรแกรมเอนกประสงค์ . โดยคมชัด , PostScript เป็นภาษาทัวริงสมบูรณ์ และในหลักการสามารถใช้งานใด ๆแต่ในทางปฏิบัตินี้ใช้เป็นหน้าภาษาคำอธิบาย

เนื้อหา [ ซ่อน ]
1
2
2.1 ใช้ภาพรวมในการออกแบบและสร้างเครื่องมือการเขียนโปรแกรม
2
3
โดเมนเฉพาะภาษาหัวข้อ 3.1 การใช้งานรูปแบบ
3
3
เป้าหมายการออกแบบ สำนวน4 ตัวอย่างเกมภาษา

4.1 4.2 4.3 ยูนิกซ์ เชลล์สคริปต์ภาษามาร์กอัป ColdFusion



filtermeister OTP Erlang 4.4 4.5 4.6 4.7 วิศวกรรมซอฟต์แวร์มีเดียวิกิแม่แบบ


ใช้ metacompilers 4.8 4.9 Unreal Engine และเกมอื่น ๆ

4.10 กฎสำหรับเครื่องยนต์อัตโนมัตินโยบาย 4.11 ทางภาษาแบบ
4.12 สร้างรูปแบบและการบริการเพื่อการเขียนโปรแกรมภาษาหลาย
5 ข้อดีและข้อเสีย
6
7 ดูยังอ้างอิง
8
9 อ่านต่อการเชื่อมโยงภายนอก

ใช้ [ แก้ไข ] การออกแบบและการใช้ dsls ที่เหมาะสมเป็นกุญแจสำคัญของวิศวกรรมโดเมนโดยการใช้ภาษาเหมาะสมกับโดเมนที่–มือนี้อาจจะประกอบด้วยการใช้ที่มีอยู่ DSL หรือ GPL หรือการพัฒนา DSL ใหม่ภาษา Oriented Programming จะพิจารณาการสร้างภาษาพิเศษสำหรับการแสดงปัญหาส่วนมาตรฐานของกระบวนการแก้ปัญหา การสร้างโดเมนเฉพาะภาษา ( กับซอฟต์แวร์เพื่อสนับสนุน ) แทนที่จะใช้ภาษาที่มีอยู่
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2025 I Love Translation. All reserved.

E-mail: