Carregar apresentação
A apresentação está carregando. Por favor, espere
PublicouJennifer Barbas Alterado mais de 9 anos atrás
1
FuzBlock Paradigmas de Linguagens Computacionais Bruno Edson Flavio Gondim Marcelo Rodrigues Pablo de Santana
2
Conteúdo Apresentação Características da Linguagem Descrição Informal / Sintaxe Abstrata / Semântica Funções Padrão Exemplos (Forma Gráfica) Conclusões
3
FuzBlock Linguagem descritiva para modelagem de blocos fuzzy Criação de uma API Java java.fuzzy.* ¹ Modelagem de: Funções de pertinência, conjuntos, variáveis, operações, qualificadores¹, (de)fuzzificação, inferência e BC (regras e variáveis lingüísticas¹) 1 - futuramente
4
FuzBlock
5
Sintaxe própria e simples, semelhante à Java Compilador para java ¹ Utilização: Educacional – aprendizagem da Lógica Fuzzy e IA Sistemas de controle com IA, sensores, e outras aplicações Geração de relatórios gráficos ¹
6
Características Básicas de FuzBlock Tipos (primitivos, conjuntos e blocos) Memória (bloco – atribuição dinâmica) Associações (Bindings) Abstrações (funções) Encapsulamento (blocos, pacotes) Valores (primitivos, variáveis fuzzy) Escopo (monolítico, global)
7
Modelando um Sistema Fuzzy Blocos Pacotes e Importações Tipos Declarações Comandos de Atribuição Expressões Funções Padrão
8
Blocos block Nega { varin double entra; varout double sai = - entra; } Block = [[ Package Imports "block" Identifier "{" Declaration "}" ]].
9
Pacotes e Importações package(único) import(vários) Part-Identifier = [[ Identifier ]] | [[ Part-Identifier "." Identifier ]]. Package = [[ "package" Part-Identifier ";" ]] | [[ ]]. Imports = [[ Import ]] | [[ Imports Import ]] | [[ ]]. Import = [[ "import" Part-Identifier ";" ]] | [[ "import" Part-Identifier "." "*" ";" ]].
10
Tipos Tipos Primitivos: booleantrue, false int10, 5 double1.3, 0.45 Semelhantes aos tipos correspondentes em outras linguagens de programação
11
Tipos Tipos Compostos: setramp(t, 10, 20) Blockb.frio Sets representam conjuntos difusos.
12
Tipos Type = [[ "int" ]] | [[ "double" ]] | [[ “boolean” ]] | [[ "set" ]] | [[ Identifier ]].
13
Declarações (variáveis) (entrada, saída e restritas) Declaration = [[ Single-Declaration ]] | [[ Declaration Single- Declaration ]]. Single-Declaration = [[ In-Declaration ]] | [[ Out-Declaration ]] | [[ Var-Declaration ]] | [[ Attribution-Command ]]. In-Declaration = [[ "varin" Type Identifier ";" ]]. Out-Declaration = [[ "varout" Type Identifier Attribution-Auxiliar ";" ]]. Var-Declaration = [[ "var" Type Identifier Attribution-Auxiliar ";" ]]. Attribution-Auxiliar = [[ "=" Expression ]] | [[ ]].
14
Comandos de Atribuição Attribution-Command = [[ Part-Identifier "=" Expression ";" ]]. blocoTemp.temp = temp;
15
Expressões Expression = [[ "true" ]] | [[ "false" ]] | [[ Numeral ]] | [[ Decimal ]] | [[ Identifier ]] | [[ Part-Identifier ]] | [[ "(" Expression ")" ]] | [[ Expression Binary-Operator Expression ]] | [[ Unary-Operator Expression ]] | [[ Function ]]. Binary-Operator = [[ "+" ]] | [[ "-" ]] | [[ "*" ]] | [[ "xor" ]] | [[ "and" ]] | [[ "or" ]] | [[ "==" ]]. Unary-Operator = [[ "not" ]] | [[ "-" ]].
16
Operadores not or and xor - + * ==
17
Operações sobre Conjuntos Difusos [1/2] or, and, xor, not Seja μ d (x) = função de pertinência de x no conjunto difuso. set d1 or set d2 = µ d1 (x) U µ d2 (x) = max [ μ d1 (x), μ d2 (x) ] set d1 and set d2 = µ d1 (x) ∩ µ d2 (x) = min [ μ d1 (x), μ d2 (x) ] set d1 xor set d2 = abs [ μ d1 (x) - μ d2 (x) ] set not set d = abs [ 1 – μ d (x) ]
18
Operações sobre Conjuntos Difusos [2/2] Aritmética Difusa -, +, * Sejam A e B números difusos, tal que a avaliação seja. Para toda expressão Exp e set A = f(Exp,...) e set B = f(Exp,...) value(A - B ) = max [0, value(A) – value (B)] value(A + B) = min[1, value(A) – value(B)] value(A * B) = value(A) * value(B)
19
Sintaxe Lexical Numeral = digit | Numeral digit. Decimal = Numeral | Numeral point | Numeral point aux | point aux. aux = digit | digit aux. point = ".". digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9.
20
Funções Padrão Valores: value, defuz Conjuntos: ramp, sine (1ª ordem) trap, bell (2ª ordem) trap(E, V1, V2, V3, V4) = ramp(E, V1, V2) and ramp(E, V4, V3); bell(E, V1, V2, V3, V4) = sine(E, V1, V2) and sine(E, V4, V3);
21
Funções Padrão Function = [[ "value" "(" Expression ")" ]] | [[ "defuz" "(" Expression ")" ]] | [[ "ramp" "(" Expression "," Value "," Value ")" ]] | [[ "sine" "(" Expression "," Value "," Value ")" ]] | [[ "trap" "(" Expression "," Value "," Value "," Value "," Value ")" ]] | [[ "bell" "(" Expression "," Value "," Value "," Value "," Value ")" ]]. Value = [[ Numeral ]] | [[ Decimal ]].
22
Exemplo package meteorologia; block Temp{ varin int temp; var set frio = ramp(temp, 10, 0); var set quente = ramp(temp, 30, 40); var set normal = not (frio or quente); varout double ehFrio = value(frio); varout double ehQuente = value(quente); varout double ehNormal = value(normal); }
23
Forma Gráfica
25
Interconexão – Blocos Internos e Externos package dados; import meteorologia; block Frio{ varin int temp; var Temp blocoTemp; blocoTemp.temp = temp; varout double frio = blocoTemp.ehFrio; }
26
Conclusões Facilidade de Modelagem Visualização Utilização Integração com Java (API), sintaxe Conceitos PLC, associado à SI.
27
Referências Bibliográficas MOSSES, Peter D. Action Semantics. Cambridge Tracts in Theoretical, Computer Science 26. Press Syndicate of the University of Cambridge. New York – United States of America, 1992. MOURA, Hermano P. Action Semantics of Specimen. Department of Informatics, Federal University of Pernambuco. Recife - Brasil, 1996.
Apresentações semelhantes
© 2024 SlidePlayer.com.br Inc.
All rights reserved.