This repository was archived by the owner on Jun 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.json
More file actions
181 lines (181 loc) · 45.6 KB
/
index.json
File metadata and controls
181 lines (181 loc) · 45.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[
{
"url": "https://d0sl.org/getting-started/chess/sample/",
"title": "Project details",
"description": "",
"content": "To run the chess sample Find a semantic model ChessAII in org.d0sl.examples/sandbox Open the context menu on it by pressing the right mouse button. And select Run Node ChessAII. To change semantic Semantic model is defined in sandbox/ChessAII. When the robot places the queens it calls check board predicate. In the semantic model in advance prepared several different predicates check board. Just change the name of the current check board predicate, and rename some other (e.g. check board1 name to check board. And you can see how the behavior of the robot changes depending on the given semantics.\nFor example, the following model will forbid a robot to put queens on one line, but he will be able to arrange them on one diagonal.\ndef check board2(board : ChessBoard) means check all var queens = ChessDSL.get queens(board) for all q1, q2 in queens not ChessDSL.on one line(q1, q2) end end def \rAfter each change of the model, do not forget to rebuild the MPS solution (Ctrl+F9).\n\rJava part You can find the Java part of the example in org.d0sl.examples/chess\n First of all, pay attention to the ChessDSL class, which, using annotations, indicates the domain specific functions to which we refer in our semantic model. For example\n /** Represents a DSL for task: Arrangement of chess queens */ @DomainModel(name = \u0026#34;ChessDSL\u0026#34;) public class ChessDSL { \u0026lt;...SKIPPED...\u0026gt; /** Check if two queens are in the same horizontal or vertical @param @return */ @DomainFunction(name = \u0026#34;on one line\u0026#34;) public boolean onOneLine(ChessQueen q1, ChessQueen q2) { if (q1.getCol() == q2.getCol() || q1.getRaw() == q2.getRaw()) { return true; } return false; } /** Check if two queens are in the same diagonal @param @return */ @DomainFunction(name = \u0026#34;on one diagonal\u0026#34;) public boolean onOneDiagonal(ChessQueen q1, ChessQueen q2) { if (Math.abs(q1.getCol() - q2.getCol()) == Math.abs(q1.getRaw() - q2.getRaw())) { return true; } return false; } } After that, in our semantic model, we can indicate in which class the implementation of predicates on one line and on one diagonal can be found.\nuse ChessDSL from org.d0sl.examples.chess.ChessDSL Also in class ChessRobot you can find how the robot calls predicate check board from semantic model.\ntry { board.getBoard().setPieces(pieces); LogicalConstant check = semantic.callPredicate(\u0026#34;check board\u0026#34;, board); if (check.getValue() != Logical.TRUE) { pieces[i][j] = null; board.getBoard().setPieces(pieces); } else { boardPanel.setPiece(pieces[i][j], visit); boardPanel.refreshUI(); if (queenNumber == 7) { return true; } else { if (arrange(pieces, new LinkedList(), queenNumber + 1)) { return true; } else { pieces[i][j] = null; board.getBoard().setPieces(pieces); boardPanel.clear(visit); boardPanel.refreshUI(); } } } } catch (SemanticException e) { e.printStackTrace(); } \rThe algorithm is as follows: the robot puts the next queen and asks if everything is good. If the answer is positive, the robot tries to put the next queen, and if the answer is negative, the robot removes the last queen and searches for another cell for it. If a situation arises when it is impossible to place the next queen on any square, the robot goes back a step, cutting off the bad field.\n\r"
},
{
"url": "https://d0sl.org/getting-started/requirements/",
"title": "Requirements",
"description": "",
"content": "So, our main goal is to give a person the opportunity to describe logical rules in an understandable language. We call it d0sl or Delta Zero Semantic Language.\nFor this, we should to implement the language, as well as provide a convenient editor (or IDE Integrated Development Environment) that would allow to create d0sl documents and even immediately run.\nThere are various ways to reach this, but we chose as a bases the powerfull Jetbrains MPS (Meta Programming System).\nOur examples work with version MPS 2020.1 so you must first install it from here. Please be careful and choose version 2020.1 for your computer\u0026rsquo;s OS.\n\rWe choose MPS because:\n MPS IDE is very similar to Intelliji Idea, PyCharm and other Jetbrains products. MPS helps to create powerful DSL (domain specific languages) and helps to create their powerful extensions. With MPS we can build plugins of d0sl Language for Intelliji Idea We were able to develop a technology that does not depend on the MPS and can be used separately. But we see no reason to abandon the convenience of the MPS where it is possible. "
},
{
"url": "https://d0sl.org/d0sl-language/root/",
"title": "Semantic and Domain models",
"description": "",
"content": "There are two kinds of root documents in d0sl - the Semantic Model and the Domain Specific Model.\nSemantic Model is for defining semantic predicates and allows users to define logical rules.\nDomain Specific Model defines objects and functions that can be used in Semantic Model but are specific for domain area. This is similar to C header file.\nTo create a semantic or domain model, open the context menu by right-clicking on the sandbox, and then select new/SemanticLanguage/DomainSpecificModel or new/SemanticLanguage/SemanticModel.\nSemantic Model example model ChessAII def use ChessDSL from org.d0sl.examples.chess.ChessDSL def start() means check all ChessDSL.start() end end def def check board(board : ChessBoard) means check all var queens = ChessDSL.get queens(board) for all q1, q2 in queens not ChessDSL.on one line(q1, q2) and not ChessDSL.on one diagonal(q1, q2) end end def end def end ChessAII Domain Model example domain specific model Math def # Math library # Square root fun sqrt(value : numeric) returns numeric # Sinus and Cosinus fun sin(value : numeric) returns numeric fun cos(value : numeric) returns numeric # Power function fun pow(value : numeric, power : numeric) returns numeric end Math "
},
{
"url": "https://d0sl.org/getting-started/installation/",
"title": "Installation",
"description": "",
"content": " Install Jetbrains Meta Programming System (MPS) https://www.jetbrains.com/mps/ Clone the git repo: git clone https://github.com/d0sl/d0SDK The first time you start MPS, it displays a project selection window. But you first select the gear at the bottom of Configure/plugins. Then select install plugin from disk. Then choose file d0SDK/plugin/0.8.9.2/d0sl-plugin-mps.zip After installing the plugin, you should see the following: Open the project in MPS by choosing the directory cloned (e.g. d0SDK directory) Rebuild the project If everything was successful, you will see the following screen: "
},
{
"url": "https://d0sl.org/vision/problems/",
"title": "Problems of algorithms",
"description": "",
"content": "Theory of algorithms was created by Alan Turing as a part of effort of Allies during WWII to crack Nazi\u0026rsquo;s Enigma code using so called computers. Computers can understand only exact sets of infrustrions explaining how to solve the problem. Such sets of instructions are called algorithms of computer programs.\nBut we humans in our every day life use logic in our language. Regular person could hardly remember all the instructions even for the washing machine. So we have special people who can do a translation between us humans and computers, which are called software developers or programmers. But the problem is that even after more than 70 year history of computers we still have less than 1% of population who can do such job.\nAlgorithms give computers an exact set of instructions on how to solve the problem. In order to create such algorithm you need to perform certain steps:\n Specify the problem in a manner, which excludes uncertainties. Such specifications should have rigid and logical form. Give it to programmers Eventually after several technological steps (such as architecture, OO design, etc) programmers convert the specification into a program written in some of programming languages Such program can now be translated into a machine code and executed on a computer. Developer-How\"\nThis means that everytime we need to make computers to do something we have to have a computer program, which can be created only by software developers manually. Manual work as everybody knows involves human errors. So #1 problem is the Quality of software programs written by humans. Software bugs can kill any good intention.\nThe more programs we need, the more software developers will be involved. The more computers are used by humanity, the more programs we need, and even more developers will be required. Introduction of mobile phones, IoT and Edge Computing into everyday life creates more and more demand for programmers. Don\u0026rsquo;t forget that every mobile phone is a computer. And we want to put computer chips into things like tea pots and fridges.\nToday we have more computers on the planet than humans. Think about this. Where are we going to get enough software developers in the situation when number of computerized equipment grows much faster than numebr of developers. This problem #2 \u0026ndash; we have not enough programmers.\nAnd problem #3 \u0026ndash; is that mobile communications, robots, edge computing and Iot reiterates the problem of the quality: our civilization becomes more and more dependent on the quality of computer programs.\n"
},
{
"url": "https://d0sl.org/getting-started/chess/",
"title": "Eight Queens puzzle",
"description": "",
"content": "The eight queens puzzle The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other.\nThe problem of finding all solutions to the 8-queens problem can be quite computationally expensive, as there are 4,426,165,368 (i.e., 64C8) possible arrangements of eight queens on an 8×8 board, but only 92 solutions.\n\rThe semantic way to solve this problem is as follows:\n Imagine that we have a robot that can arrange randomly eight queens on a chessboard. But he doesn\u0026rsquo;t know whether the position is the right one or not. Then, after each arrangement, the robot asks us if he placed the queens on the board correctly. If we say that is correct, the robot considers the task completed. And if we say what is wrong, the robot tries to place the queens in a different way. In order to determine whether the queens are placed correctly on the chessboard, we will write semantic rules in the d0sl language. For example: For any two queens on a chessboard, it must be true that they are not on the same diagonal, and they are not on the same line. def check board(board : ChessBoard) means check all var queens = ChessDSL.get queens(board) for all q1, q2 in queens not ChessDSL.on one line(q1, q2) and not ChessDSL.on one diagonal(q1, q2) end end def \rNext, we show how to run the example and see the code.\n\r"
},
{
"url": "https://d0sl.org/d0sl-language/predicate/",
"title": "Predicate",
"description": "",
"content": "In mathematical logic, a predicate is commonly understood to be a Boolean-valued function. However, we use the extended notion of a logical type instead of Boolean. And a predicate can return three values: true, false, and none (undefined).\nIf the predicate returns none, you must treat this as an exception. For example, a timeout occurred. none means that the predicate could not calculate true or false.\n\rTo create a predicate within the semantic model, you must type the keyword def. Then the predicate pattern appears. And you can specify the name of the predicate, its arguments, and the body of the predicate, which is a logical expression.\nThe predicate name may contain spaces. Also you can use not only Latin, but also other national alphabets ..\n\rThe predicate pattern is created without arguments. To add an argument, place the cursor inside the parentheses and press Enter or Insert.\n\rThe predicate body can be any logical expression of d0sl language: and, or, not, check all, if, for all. But for simplicity, we advise the body of the predicate to start with the check all instruction. check all instruction is equivalent of and instruction with many arguments each is in new line.\n\rPredicate example def check board(board : ChessBoard) means check all var queens = ChessDSL.get queens(board) for all q1, q2 in queens not ChessDSL.on one line(q1, q2) and not ChessDSL.on one diagonal(q1, q2) end end def "
},
{
"url": "https://d0sl.org/d0sl-language/logical/",
"title": "Logical operations",
"description": "",
"content": " Operation Alias True value False value and and true and true false and true or or true or false false or false not not not false not true check all check check all true check all false check all instruction is equivalent of and instruction with many arguments each is in new line. You can use check alias to enter check all instruction.\nFor example, the next expressions are equivalent.\nA and B and C and D check all A B C D end check "
},
{
"url": "https://d0sl.org/vision/semantic_tech/",
"title": "Semantic technology",
"description": "",
"content": "Semantic modelling is a technology allowing to solve those problems. This is how it works:\n Developer or subject domain expert creates a specification of the application logic (semantic model) in d0SL language in d0SDK IDE. Then d0SDK generates java code of this semantic model This semantic model\u0026rsquo;s java code can now be executed on d0VM (delta 0 virtual machine) "
},
{
"url": "https://d0sl.org/d0sl-language/if/",
"title": "If implication",
"description": "",
"content": "Implication as a if construction in d0sl is false only when the condition is true, and the then part is false. In other words, the implication if(A) then B is an abbreviated entry for the expression not(A) or B.\nUse the if keyword, and the editor will provide you with a template for the if construct.\n\rIf example "
},
{
"url": "https://d0sl.org/vision/apps/",
"title": "Applications",
"description": "",
"content": "\u0026hellip; and use cases Please don\u0026rsquo;t be delluded, semantic modelling is not a silver bullet. It won\u0026rsquo;t allow to create any program for non programmers. Semantic modelling helps to solve so called logical or discrete problems. For example, if you need to solve some specific heavy computational tasks (like neural networks, differential equations, etc) you still need to do traditional programming. UI is still easier to be developed by humans.\nWe see the following areas of applications for semantic modelling:\n Autonomous systems. For example, semantic modelling is being used for many years by mobile telcos, and banks. Business logic and workflow process automation. Embedded systems and edge computing. Industrial IoT Robotics and autonomous equipment "
},
{
"url": "https://d0sl.org/vision/contract/",
"title": "Digital contract example",
"description": "",
"content": "Цифровой двойник контракта var номер_договора = \u0026#34;34/1\u0026#34; var место = \u0026#34;г. Новосибирск\u0026#34; var дата = \u0026#34;01.02.2020\u0026#34; var исполнитель = \u0026#34;Вычислительные системы\u0026#34; var заказчик = \u0026#34;Контрагент 123\u0026#34; ДОГОВОР N 34/1 На разработку программного обеспечения и передачу исключительных прав г. Новосибирск\n1 февраля 2020 года\nОбщество с ограниченной ответственностью Научно-производственная компания «Вычислительные Системы», именуемое далее «Исполнитель», в лице Директора Караванова Павла Владимировича, действующего на основании Устава, с одной стороны, и ООО Арс, именуемое далее «Заказчик», в лице Генерального директора Сидорова Георгия Ивановича, действующего на основании Устава, с другой стороны, по отдельности именуемые «Сторона», совместно именуемые «Стороны», заключили настоящий Договор о нижеследующем:\nvar продукт = \u0026#34;Система мониторинга СМС-центра\u0026#34; 1 Термины и определения\n1.1 Программное обеспечение – Программа для ЭВМ Система мониторинга СМС-центра в соответствии с Техническим заданием Заказчика, приведенным в Приложении 1 к настоящему Договору.\n1.2 Оборудование – компьютерное оборудование Заказчика или третей стороны, предназначенное для инсталляции и функционирования на нем Программного обеспечения.\n1.3 Документация – техническая и иная документированная по Программному обеспечению в печатном либо электронном виде.\nvar начало_работ = дата + 5 рабочих дней var дата_окончания = 01.06.2020 2 Предмет договора\n2.1. В силу настоящего договора Исполнитель по заданию Заказчика обязуется разработать Программное обеспечение в соответствии с Техническим заданием Заказчика (далее – «Программное обеспечение»).\n2.2. Исполнитель обязуется передать Заказчику исключительные права на Программные обеспечения. Исключительные права на Программное обеспечение передаются Заказчику с момента подписания сторонами Акта приемки-передачи Программного обеспечения и исключительных прав на Программное обеспечение.\n2.3. Заказчик, в свою очередь, обязуется принять Программное обеспечение, исключительные права на Программное обеспечение, Документацию иные результаты Работ Исполнителя в порядке и в сроки, обусловленные настоящим Договором, а также уплатить Исполнителю вознаграждение, обусловленное настоящим Договором.\n2.4. Дата начала выполнения Работ по настоящему Договору – в течении 5 (Пяти) рабочих дней с даты подписания настоящего Договора\n2.5. Дата окончания Работ, передачи исключительных прав на Программное обеспечение, окончания оказания Услуг – не позднее 01.06.2020.\n2.6. В случае внесения Заказчиком изменений в Техническое задание цена настоящего Договора и сроки исполнения обязательств по нему могут быть изменены Исполнителем.\n3 Цена Договора. Порядок оплаты.\nvar цена_договора = 3 000 000 var аванс = 500 000 var дата_аванса = 15.02.2020 var дата_оплаты = дата_подписания_акта(номер_договора) + 5 рабочих дней 3.1 Цена настоящего Договора составляет 3 000 000 (три миллиона) рублей, НДС не облагается в связи с применением Исполнителем упрощенной системы налогообложения (Глава 26.2 Налогового кодекса РФ).\n3.2 Стоимость Работ по разработке Программного обеспечения по настоящему Договору включает в себя разовый фиксированный платёж за отчуждение исключительных прав на Программное обеспечение.\n3.3 Уплата вознаграждения Исполнителю Заказчиком производится в следующем порядке:\n 500 000 (пятьсот тысяч) рублей, НДС не облагается, Заказчик уплачивает не позднее «15» февраля 2020 года. 2 500 000 (два миллиона пятьсот тысяч) рублей, НДС не облагается, Заказчик уплачивает не позднее 5 (пяти) рабочих дней со дня подписания сторонами Акта приемки-передачи Программного обеспечения и исключительных прав на Программное обеспечение. 3.4. Уплата вознаграждения по настоящему Договору производится платёжными поручениями на расчётный счёт Исполнителя.\nvar дата_согласования_ТЗ = дата + 5 рабочих дней var срок_ответа_на_email = 2 рабочих дня var срок_запуска_автотестов = 2 рабочих дня var срок_проверки_документации = 2 рабочих дня var срок_запуска_приемки = 2 рабочих дня 4 Иные обязанности сторон\n4.1. Исполнитель обязуется:\n 4.1.1. Своевременно и в полном объёме разработать и передать Заказчику Программное обеспечение, передать Заказчику исключительное право на Программное обеспечение, передать Заказчику Документацию, а также выполнить иные Работы и оказать Услуги, предусмотренные настоящим Договором.\n 4.2. Заказчик обязуется:\n 4.2.1. Оказать всё необходимое содействие исполнителю для выполнения его обязательств по настоящему Договору, в том числе, но не ограничиваясь:\n 4.2.1.1. Не позднее 5 (Пяти) рабочих дней с даты подписания настоящего Договора согласовать с Исполнителем окончательный вариант Технического задания.\n4.2.1.2. Предоставить всю имеющуюся документацию на Оборудование и установленное на него программное обеспечение.\n4.2.1.3. Выделить в распоряжение Исполнителя своего технического специалиста, ответственного за взаимодействие с Исполнителем.\n 4.2.2. Предоставлять ответы на запросы исполнителя (электронные письма) по вопросам, связанным с исполнением настоящего Договора, не позднее 2 (Двух) рабочих дней с момента их получения.\n4.2.3. Не позднее 2 (Двух) рабочих дней со дня получения рабочих версий Программного обеспечения, производить их тестирование и предоставлять Исполнителю перечень выявленных недостатков в функционировании Программного обеспечения либо уведомление об их отсутствии.\n4.2.4. Не позднее 2 (Двух) рабочих дней со дня получения рабочих версий Документации, производить их проверку и предоставлять Исполнителю перечень выявленных недостатков в Документации либо уведомление об их отсутствии.\n4.2.5. Не позднее 2 (Двух) рабочих дней после получения соответствующего уведомления от Исполнителя производить приёмку окончательных версий Программного обеспечения, Документации и/или Работ.\n 5 Конфиденциальная информация\n 5.1. Стороны пришли к соглашению, считать конфиденциальной и не подлежащей разглашению (коммерческой тайной) любую информацию, полученную ими по настоящему Договору, включая, но не ограничиваясь: текст настоящего Договора; текст, диаграммы, рисунки любых документов, в том числе технической и коммерческой документации по настоящему Договору; информация о структуре управления любой из Сторон; информация о ценовой и маркетинговой политике любой из сторон; информация о партнёрах и контрагентах Сторон; исходные тексты и исполняемые коды Программного обеспечения; а так же любая иная информация, имеющая пометку «Конфиденциально» и/или «Коммерческая тайна».\n5.2. Каждая из Сторон обязана предпринять адекватные меры по защите конфиденциальной информации, в том числе путём ограничения доступа к ней лиц, непосредственно не связанных с исполнением настоящего Договора. В любом случае меры, предпринимаемые каждой из Сторон по защите Конфиденциальной информации, полученной от другой стороны, должны быть не меньшими, чем предпринимаемые для защиты собственной конфиденциальной информации.\n 6 Ответственность сторон\nvar неустойка_при_задолженности = задолженность * 0.0005 * количество_дней 6.1. При просрочке платежа в соответствии с условиями настоящего Договора и заключаемых в соответствии с ним Дополнительных соглашений, Исполнитель вправе требовать от Заказчика уплаты неустойки из расчёта 0,05 (Ноль целых пять сотых) процента от суммы Задолженности за каждый день просрочки.\n6.2. При просрочке в разработке Программного обеспечении и/или выполнения иных Работ по настоящему Договору Заказчик вправе требовать от Исполнителя уплаты неустойки из расчёта 0,05 (Ноль целых пять сотых) процента от суммы аванса, уплаченного Заказчиком по настоящему Договору.\n6.3. Исполнитель не несет ответственности за любые убытки, возникшие в связи со сбоями и ошибками в функционировании Программного обеспечения, за исключением реального ущерба, причиненного Заказчику в связи с несвоевременным исполнением Исполнителем обязательств по гарантийной технической поддержке в гарантийный период.\n6.4. В иных случаях ответственность Сторон определяется действующим законодательством Российской Федерации.\n6.5. Ни одна из Сторон не несёт ответственности за просрочку в исполнении своих обязательств, если такая просрочка вызвана действиями или бездействием другой Стороны.\n6.6. Сторона, допустившая просрочку исполнения своих обязательств по настоящему Договору, освобождается от ответственности если докажет, что просрочка в исполнении обязательств явилась следствием действия обстоятельств непреодолимой силы (форс-мажорных обстоятельств). Под обстоятельствами непреодолимой силы Стороны подразумевают любые события, находящиеся вне контроля соответствующей Стороны и объективно препятствующие выполнению её обязательств по настоящему Договору, о возможности наступления которых просрочившая сторона не могла разумно предполагать при заключении настоящего Договора, в том числе включая, но не ограничиваясь: пожары, землетрясения, стихийные бедствия, военные действии, забастовки, гражданские волнения, аварии на линиях электроснабжения и связи.\n 7 Иные условия\nvar срок_уведомления_при_смене_реквизитов = 5 рабочих дней var срок_ответа_на_претензию = 5 рабочих дней 7.1. Настоящий Договор вступает в силу со дня его подписания обеими Сторонами и действует до полного исполнения ими обязательств из него вытекающих.\n7.2. Настоящий Договор, включая Приложение 1 составлен в 2 (Двух) подлинных экземплярах на ___ (_______) страницах – по одному для каждой из Сторон.\n7.3. Любая из Сторон, в случае смены реквизитов, указанных в настоящем Договоре обязана не позднее 5 (Пяти) рабочих дней после смены реквизитов письменно уведомить об этом другую Сторону.\n7.4. Любые разногласия, вытекающие из настоящего Договора, Стороны договорились разрешать в досудебном претензионном порядке. Сторона, получившая письменную претензию, обязана не позднее 5 (Пяти) рабочих дней с момента получения такой претензии устранить указанные в ней нарушения, либо направить другой Стороне письменный мотивированный отказ в удовлетворении претензии.\n7.5. В случае если Сторонам не будет достигнуто согласие в досудебном порядке, спор подлежит передаче на рассмотрение Арбитражного суда Новосибирской области в порядке, определяемом законодательством Российской Федерации.\n 8 Реквизиты и подписи сторон.\nИсполнитель:\nЗаказчик:\nДиректор\n"
},
{
"url": "https://d0sl.org/d0sl-language/for/",
"title": "For all",
"description": "",
"content": "To create for all logical expression, you must type the keyword for. Then the for all pattern appears.\nThe general form of this logical expression is for all x1, x2... xn in listX Expression(x1,...,xn). It means that for every \u0026lt;x1,..,xn\u0026gt; from a list listX an expression Expression(x1, ..., xn) should be true.\nFor all example To calculate the result, a selection of various \u0026lt;x1...xn\u0026gt; combinations from a certain list is made. If such a selection cannot be made, it is considered that the formula was not calculated and the for all expression returns true. That is, if the list is empty, or of a smaller dimension than the vector \u0026lt;x1...xn\u0026gt;, you will end up with a true, and the formula inside for all will not be calculated.\n\r"
},
{
"url": "https://d0sl.org/d0sl-language/var/",
"title": "Variables",
"description": "",
"content": "You can use local variables inside check all block by entering var keyword.\nThere are important restrictions on the use of variables. First, you cannot change their value after it has been calculated. Secondly, each time the predicate is called, the value of a local variable is calculated only once. That is, if you use the variable reference several times within the predicate, the value will be calculated only when you first use\n\rVariable example # Testing for sin \u0026amp; cos def test() means check all var angle = 35 var cosinus = Math.cos(angle) var sinus = Math.sin(angle) var sum of squares = Math.pow(cosinus, 2) + Math.pow(sinus, 2) # considering the features of the library java.lang.Math # and inaccurate calculations when converting degrees to radians sum of squares \u0026lt;= 1 sum of squares \u0026gt;= 0.999999 end end def "
},
{
"url": "https://d0sl.org/d0sl-language/domain/",
"title": "Domain model",
"description": "",
"content": "Domain object Inside the domain model, you can create types using the keyword type, and then to use objects of this type in the arguments of domain functions and semantic predicates.\nDomain function Inside the domain model, you can define domain functions using the keyword fun, and then to use this functions in semantic predicates.\n"
},
{
"url": "https://d0sl.org/d0sl-language/use/",
"title": "Use",
"description": "",
"content": "In Semantic Model the use statement allows you to include other Semantic and Domain models. This means that if you included another semantic model through the use statement, you can call its predicates. Similarly it works with a domain model.\nFor example, below we include AutodromeDSL domain model:\nuse AutodromeDSL from org.d0sl.examples.auto.AutodromeDSL After that we can call domain functions defined in AutodromeDSL in our Semantic Model like this:\ndef can stop2(car : Car) means check all not AutodromeDSL.wall ahead(car) not AutodromeDSL.road sign(car) AutodromeDSL.car ahead(car) end end def \rYou can specify the implementation class for the domain model in the from field (for the Semantic Model, this is not necessary). The implementation class needs to be specified only if you want to run the model inside the MPS project.\n\rIf you specified an implementation class, it should be accessible via dependencies in your MPS project. The implementation can be added either through the jar file, or implemented directly in the MPS in a separate solution, as implemented for Chess and Autodrome examples.\n\r"
},
{
"url": "https://d0sl.org/d0sl-language/editor/",
"title": "Editor tips",
"description": "",
"content": " Alias Effect Ctrl+space Code completion Alt+enter Intentions menu Ctrl+w Item (incremental) selection def Creates predicate definition use Creates use keyword check Check all keyword and, or, not Logical operation \u0026quot; \u0026ldquo;\u0026rdquo;, string value for For all keyword if Implication (if) Insert, enter When needs to insert argument for predicates or functions var Local variable (inside check-all) fun Creates function in Domain Model typedef Creates domain type in Domain Model "
},
{
"url": "https://d0sl.org/d0sl-language/run/",
"title": "How to run model in MPS",
"description": "",
"content": "\rIf you define the predicate start() without parameters in your semantic model, it will be called automatically when you run the model through the context menu in the MPS project.\n\rFor example, the following start() predicate in the example about the Autodrome first sets up obstacles and road signs on the autodrome field, and then starts the graphical user interface by calling the another start domain function.\ndef start() means check all # set walls AutodromeDSL.add wall(5, 1) AutodromeDSL.add wall(5, 14) AutodromeDSL.add wall(10, 8) # set road signs AutodromeDSL.add road sign(4, 5, \u0026#34;south\u0026#34;) AutodromeDSL.add road sign(6, 9, \u0026#34;north\u0026#34;) AutodromeDSL.add road sign(7, 7, \u0026#34;east\u0026#34;) AutodromeDSL.start(10, 500) end end def "
},
{
"url": "https://d0sl.org/",
"title": "d0sl semantic platform",
"description": "",
"content": ""
},
{
"url": "https://d0sl.org/getting-started/",
"title": "Getting started",
"description": "The simplest way to quickly understand d0sl Semantic Platform is to run our samples.",
"content": "This chapter describes installation process of d0sl SDK and how to run the samples. Programmers will also be able to learn more about how d0sl links logic and programming code.\n"
},
{
"url": "https://d0sl.org/d0sl-language/",
"title": "d0sl language",
"description": "Read more about d0sl language",
"content": " d0sl is a semantic language for writing logical rules (or predicates). d0sl is designed to be as simple as possible, but sufficient to record all logical operations, according to the mathematical theory of semantic modeling. d0sl can be easy extended with domain specific functions and objects. Thus d0sl itself is DSL (domain specific language). For d0sl, a language-level extension mechanism is provided. In other words, you can build DSL hierarchies of languages that are transformed into d0sl and can also be executed by the core of d0sl. "
},
{
"url": "https://d0sl.org/vision/",
"title": "Vision",
"description": "Algorithms vs Logic. Or why all people understand logic, but only a small fraction of them can program.",
"content": "Algorithms vs. Logic Road rules book contains logical rules regulating behavior of cars and people on roads. Such road rules book is not really thick, may be about one hundred pages or so. Suppose, you come to a cross road. You use those logic from road rules book to generate an exact algorithm how you are going to behave in this specific situation.\nNow, can you imagine if all possible situations for all possible cross roads were described in road rules book? How many pages such road rules book should contain?;-) That would be an algorithmic approach.\nBut we use logic for road regulations, not algorithms. Because logic allows to represent knowledge in a more compact form. Basically, small set of logical rules allows you to describe very large or even infinite set of situations.\n"
},
{
"url": "https://d0sl.org/math-foundation/",
"title": "Math foundation",
"description": "d0sl is based on the developments of mathematicians from Novosibirsk Akademgorodok, one of the largest scientific centers in Russia.",
"content": "Originally the mathematical theory behind this technology was developed in Sobolev Institute of Mathematics by three famous mathematicians Yuri L. Yershov, Sergey S. Goncharov and Dmitry I. Sviridenko.\nSo the idea behind semantic modelling is how to make it simpler for non-programmers to communicate with computers. Instead of creating yet another algorithmic language for programming, semantic modelling is focusing on using logical language allowing non-programmers to effectively explain computers what to do (opposed to algorithms describing how). Such semantic models are called executable specifications.\nd0sl stands for Delta_0 (delta zero)Semantiс Language.\n d0sl is a declarative executable specifications language, which is a constructive subset of the first order predicate logic language. d0sl syntax here \rMathematical definition of Delta_0-formulas here. If you are interested in math theory behind please check this list of articles\n"
},
{
"url": "https://d0sl.org/math-foundation/articles/",
"title": "",
"description": "",
"content": "Mathematical foundations of semantic programming/modelling Goncharov S.S., Ershov Yu.L., Sviridenko D.I. Methodology aspects of the semantic programming // Scientific knowledge: logic, notions, structure. – Novosibirsk, Nauka 1987, pp. 154-184. S.S. Goncharov, D.I. Sviridenko Mathematical Foundations of Semantic Programming Paper.Academy of Science of USSR.\u0026ndash;1986.\u0026ndash; T.289,No 6 S.S. Goncharov, D.I. Sviridenko Σ-Programming Amer. Math. Soc. Transl. (2) Vol. 142, 1989. Available online: [https://goo.gl/QcocUc] (https://goo.gl/QcocUc) D.I. Sviridenko Introduction into Semantic Smart Contracts [https://goo.gl/zHg1pt] (https://goo.gl/zHg1pt) V.Gumirov, P.Matyukov, D.Palchunov, Semantic Domain Specific Languages, IEEE, 2018 (перевод препринта на русский язык доступен http://bit.ly/sDSL-RU) "
},
{
"url": "https://d0sl.org/math-foundation/delta0_math_def/",
"title": "",
"description": "",
"content": "Mathematical definition of \\(\\Delta_0\\)-formulas Definition\n If \\(P \\) is a predicate symbol, \\(P \\in \\sigma \\), and \\( 𝑡_1,\u0026hellip;,t_n \\) are symbols of constants of the signature \\(\\sigma\\), or variables, then \\( P(𝑡_1,\u0026hellip;,t_n)\\) is a \\(\\Delta_0 \\)-formula. If \\( \\phi \\) and \\( \\psi \\) are \\( \\Delta_0 \\)-formulas, then \\( \\phi \\wedge \\psi, \\phi \\vee \\psi , \\phi \\rightarrow \\psi, \\neg \\psi \\) are \\( \\Delta_0 \\)-formulas. If \\( \\phi \\) is a \\( \\Delta_0 \\)-formula, 𝑥 is a variable, and 𝑙 is a finite list, then \\( (\\forall x \\in l)\\phi (x) \\) and \\( (\\exists x \\in l)\\phi (x) \\) are \\( \\Delta_0 \\)-formulas. There are no other \\( \\Delta_0 \\)-formulas. "
},
{
"url": "https://d0sl.org/categories/",
"title": "Categories",
"description": "",
"content": ""
},
{
"url": "https://d0sl.org/changelog/",
"title": "Changelog posts",
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt dolore magna aliquyam erat, sed diam voluptua. At vero eos et ustoLorem ipsum dolor sit amet, consetetur.",
"content": "February Updates Feb 6, 2019\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt dolore magna aliquyam erat, sed diam voluptua. At vero eos et ustoLorem ipsum dolor sit amet, consetetur.\u0026quot;\nChanged\r Better support for using applying additional filters to posts_tax_query for categories for custom WordPress syncs\n Reporting fine-tuning for speed improvements (up to 60% improvement in latency)\n Replaced login / registration pre-app screens with a cleaner design\n Removed\r Removed an issue with the sync autolinker only interlinking selectively. Removed up an issue with prematurely logging out users \rMarch Updates Mar 6, 2019\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt dolore magna aliquyam erat, sed diam voluptua. At vero eos et ustoLorem ipsum dolor sit amet, consetetur.\u0026quot;\nAdded\r Some scheduled changelogs, tweets, and slack messages queued up this weekend and were not published on time. We fixed the issue and all delayed publications should be out. We now prioritize keywords over title and body so customers can more effectively influence search results Support form in the Assistant is now protected with reCaptcha to reduce spam reinitializeOnUrlChange added to the JavaScript API to improve support for pages with turbolinks Fixed\r Fixed an issue with the sync autolinker only interlinking selectively. Fixed up an issue with prematurely logging out users \rChangelog label Added\r Changed\r Depricated\r Removed\r Fixed\r Security\r Unreleased\r "
},
{
"url": "https://d0sl.org/contact/",
"title": "Got Any Questions",
"description": "this is meta description",
"content": ""
},
{
"url": "https://d0sl.org/search/",
"title": "Search Result",
"description": "this is meta description",
"content": ""
},
{
"url": "https://d0sl.org/tags/",
"title": "Tags",
"description": "",
"content": ""
}]