Translating the object constraint language into the java modelling language
机械原理英文词汇
机械原理英文词汇黄清世周传喜编长江大学机械学院Chapter 1 Introduction第一章绪论1.mechanism 机构2.kinematical element 运动学元件3.link 构件4.cam 凸轮5.gear 齿轮6.belt 带7.chain 链8.internal-combustion engine 内燃机9.slider-crank mechanism 曲柄滑块机构10.piston 活塞11.connecting rod 连杆12.crankshaft 曲轴13.frame 机架14.pinion 小齿轮15.cam mechanism 凸轮机构16.linkage 连杆机构17.synthesis 综合Chapter 2 Structure analysis of mechanisms第二章机构的结构分析1. structural analysis 结构分析2. planar mechanisms 平面机构3. planar kinematical pairs 平面运动副4. mobile connection 可动连接5. transmit 传输6. transform 转换7. pair element 运动副元素8. higher pair 高副9. revolute pair 转动副10. sliding pair ,prismatic pair 移动副11. gear pair 齿轮副12. cam pair 凸轮副13. screw pair 螺旋副14. spherical pair 球面副15. surface contact 面接触16. kinematical chain 运动链17. closed chain 闭式链18. open chain 开式链19. driving links 驱动件20. driven links 从动件21. planar mechanism. 平面机构22. spatial mechanism 空间机构23. The kinematical diagram of a mechanism机构运动简图24. schematic diagram 草图25. kinematical dimensions 运动学尺寸26. fixed pivot 固定铰链27. pathway 导路28. guide bar 导杆29. profiles 轮廓30. the actual cam contour 凸轮实际廓线.31. polygon 多边形32. route of transmission 传递路线33. structural block diagram 结构框图34. Degree of Freedom (DOF) 自由度35. constraints 约束36. common normal 公法线37. compound hinge 复合铰链38. gear-linkage mechanism 齿轮连杆机构40. passive DOF 局部自由度41. redundant constraint 虚约束42. The composition principle and structural analysis组成原理与结构分析43. the basic mechanism 基本机构44. Assur groups 阿苏尔杆组45. inner pair 内副46. outer pairs 外副.47. composition principle of mechanism 机构组成原理48. kinematical determination 运动确定性Chapter 3 kinematic analysis of mechanicsms 第三章机构的运动分析1. velocity 速度2. acceleration 加速度3. parameter 参数3. graphical method 图解法4. analytical method 解析法5. experimental method 实验法6. instant center 瞬心7. classification of instant centers 瞬心的分类8. absolute instantaneous center 绝对瞬心9. relative instantaneous center 相对瞬心10. the method of instantaneous center 瞬心法11. the Aronhold-Kennedy theorem阿朗浩尔特-肯尼迪定理(即三心定理)12. the four-bar linkage 四杆机构13. inversion of the slider-crank导杆机构(曲柄滑块机构的倒置机构) 14. complex mechanism 复杂机构,多杆机构Chapter 5 Efficiency and Self-lock ofMachines第五章机械效率和自锁1.pure-slide pair 移动副2.helical pair 螺旋副3.Coulomb’s law 库仑定律4.coefficient of friction 摩擦系数5.rest friction 静摩擦6.kinetic friction 动摩擦7.vee-slot V型槽8.equivalent coefficient of friction 当量摩擦系数9.frictional angle 摩擦角10.equivalent frictional angle 当量摩擦角11.lead angle 导程角12.moment of couple 力偶矩13.clearance 间隙14.frictional circle 摩擦圆15.thrust bearing 推力轴承16.drive work 驱动功17.effective work 有效功18.lost work 损耗功19.ideal machine 理想机械20.serial structure 串联结构21.parallel structure 并联结构22.parallel-serial structure 混联结构23.jack 千斤顶24.self-lock 自锁Chapter 6 Balancing of Machinery第六章机械的平衡1. Vibration 振动2. Frequency 频率3. Resonant 共振4. Amplitudes 振幅5. Balancing of rotors 转子6. Rigid rotors 刚性转子7. Flexible rotors 柔性转子8. Balancing of mechanisms 机构的平衡9. Disk-like rotor 盘状转子10.Non-disk rigid rotor 非盘状转子11.the shaking force 振动力12.the shaking moment 振动力矩13.Balancing of Disk-like Rotors 盘状转子的平衡14.static imbalance 静不平衡15.static balancing machine 静平衡机16.the mass-radius product 质径积17.dynamically unbalanced 动不平衡18.balance planes 平衡基面19.Dynamic balancing machine 动平衡机20.Unbalancing Allowance 许用不平衡量Chapter 7 Motion of Mechanical Systemsand Its Regulation第七章机械系统的运转及其调节1. Periodic speed fluctuation 周期性波动2. punching machine 冲床3. Motion Equation of a Mechanical System机械系统的运动方程4. General Expression of the Equation of Motion运动方程的一般表达式5. the kinetic energy 动能6. the moment of inertia 转动惯量7. Dynamically Equivalent Model of a Mechanical System等效动力学模型8. the equivalent moment of inertia 等效转动惯量9. the equivalent moment of force 等效力矩10.the equivalent link 等效构件11.Pump 泵12.Blower 鼓风机13.Flywheel 飞轮Chapter 8 Planar Linkage Mechanicsms第八章平面连杆机构1.four-bar linkage 四杆机构2.crank-rocker mechanism 曲柄摇杆机构3.double-crank mechanism 双曲柄机构4.double-rocker mechanism 双摇杆机构5.Crashof’s criterion 格拉索夫判据6.Condition for having a crank 有曲柄的条件7.slider-crank mechanism 曲柄滑块机构8.offset distance 偏距9.offset slider-crank mechanism 偏置曲柄滑块机构10.in-line slider-crank mechanism 对心曲柄滑块机构11.rotating guide-bar mechanism. 转动导杆机构12.oscillating guide-bar mechanism 摆动导杆机构13.double rotating block mechanism 双转块机构14.crank and oscillating block mechanism 曲柄摇块机构15.variations 变异16.inversions 倒置17.transmission angle 传动角18.dead point 死点19.imbalance angle 极位夹角20.time ratio 行程速比系数21.quick-return mechanism 急回机构22.pressure angle 压力角23.toggle positions 肘节位置24.oldham coupling 联轴器25.flywheel 飞轮26.clamping device 夹具27.dimensional synthesis 尺度综合28.function generation 函数发生器29.body guidance 刚体导引30.path generation 轨迹发生器Chapter 9 Cam Mechanisms第九章凸轮机构1. contour 轮廓2. Follower 从动件3. Plate cam(or disc cam) 盘形凸轮4. Translating cam 移动凸轮5. Three-dimensional cam 空间凸轮6. cylindrical cam 圆柱凸轮7. Translating follower 直动从动件8. Oscillating follower 摆动从动件9. Camshaft 凸轮轴10.in-line translating follower 对心直动从动件11.offset translating follower 偏置直动从动件12.Knife-edge follower 尖底从动件13.Roller follower 滚子从动件14.Flat-faced follower 平底从动件15.Force-closed cam mechanism 力封闭凸轮机构16.Form-closed cam mechanism 形封闭凸轮机构17.Lift 行程18.cam angle for rise 推程角19.cam angle for outer dwell 远休止角20.cam angle for return 回程角21.cam angle for inner dwell 近休止角22.the quasi-velocity 类速度23.the quasi-acceleration 类加速度24.Constant Velocity Motion Curve 等速运动规律25.rigid impulse 刚性冲击26.Constant Acceleration and Deceleration Motion Curve等加速等减速运动规律27.soft impulse 柔性冲击29.Cosine Acceleration Motion Curve (Simple Harmonic Motion Curve) 余弦加速度运动规律(简谐运动规律)30.Sine Acceleration Motion Curve (Cycloid Motion Curve)正弦加速度运动规律(摆线运动规律)31.3-4-5 Polynomial Motion Curve 3-4-5多项式运动规律bined Motion Curves 组合运动规律33.the cam contour 实际廓线34.the pitch curve 理论廓线35.prime circle 基圆36.the common normal 公法线37.positive offset 正偏置38.negative offset 负偏置39.outer envelope 外包络线40.inner envelope 内包络线41.The locus of the centre of the milling cutter铣刀中心轨迹42.Pressure Angle 压力角43.acute angle 锐角44.the normal 法线45.The allowable pressure angle 许用压力角46.Radius of Curvature 曲率半径47.Cusp 尖点48.Undercutting 根切49.The angular lift 角行程50.interference 干涉Chapter 10 Gear Mechanisms第十章齿轮机构1. constant transmission ratio 定传动比2. planar gear mechanisms 平面齿轮机构3. spatial gear mechanisms 空间齿轮机构4. external gear pair 外齿轮副5. internal gear pair 内齿轮副6. rack and pinion 齿条和齿轮7. spur gear 直齿轮8. helical gear 斜齿轮9. double helical gear 人字齿轮10.spur rack 直齿条11.helical rack 斜齿条12.bevel gear mechanism 圆锥齿轮机构13.crossed helical gears mechanism 螺旋齿轮机构14.worm and worm wheel mechanism 蜗杆蜗轮机构15.Fundamentals of Engagement of Tooth Profiles齿廓啮合基本定律16.the pitch point 节点17.the pitch circle 节圆18.conjugate profiles 共轭齿廓19.transmission ratio 传动比20.involute gear 渐开线齿轮21.the radius of base circle 基圆半径22.generating line 发生线23.unfolding angle 展角24.table of involute function 渐开线函数表25.gearing 啮合26.standard involute spur gears 标准渐开线直齿轮27.the facewidth 齿宽28.addendum circle (or tip circle) 齿顶圆29.dedendum circle (or root circle) 齿根圆30.arbitrary circle 任意圆31.the tooth space 齿槽32.the spacewidth 齿槽宽33.the pitch 齿距,周节34.the reference circle 分度圆35.module 模数36.addendum 齿顶高37.dedendum 齿根高38.tooth depth 齿全高39.the coefficient of addendum 齿顶高系数40.the coefficient of bottom clearance 顶隙系数41.bottom clearance 顶隙42.the normal tooth 正常齿43.the shorter tooth 短齿44.base pitch 基圆齿距,基节45.normal pitch 法向齿距,法节46.conjugated point 共轭点47.proper meshing conditions 正确啮合条件48.working pressure angle 啮合角49.the backlash 齿侧间隙50.the bottom clearance 顶隙51.the reference centre distance 标准中心距52.contact ratio 重合度53.the actual working profile 实际工作齿廓54.the actual line of action 实际啮合线55.manufacturing methods of involute profiles渐开线齿廓的加工方法56.form cutting 仿形法57.generating cutting 展成法或范成法58.disk milling cutter 盘形铣刀59.end milling cutter 指状铣刀60.broach 拉刀ling machines. 铣床62.rack-shaped shaper cutter 齿条插刀63.shaping 插齿64.hobbing 滚齿65.rack-shaped cutter 齿条型刀具the 车床67.cutter Interference 根切68.corrected gears 变位齿轮69.the modification coefficient 变位系数70.positively modified 正变位71.negatively modified 负变位72.the gearing equation without backlash 无侧隙啮合方程73.involute helicoids 渐开线螺旋面74.the transverse plane 端面75.the normal plane 法面78.the transverse contact ratio 端面重合度79.the overlap ratio 轴向重合度80.the virtual gear 当量齿轮81.the virtual number of teeth 当量齿数82.axial thrust 轴向推力83.worm gearing 蜗杆传动84.righthanded 右旋85.lefthanded 左旋86.ZA-worm 阿基米德蜗杆87.involute helicoid worms ----ZI-worm 渐开线蜗杆88.arc-contact worms -----ZC-worm 圆弧齿蜗杆89.enveloping worm 包络蜗杆90.The number of threads 头数91.bevel gears 圆锥齿轮92.back cone 背锥93.virtual gear 当量齿轮94.the reference cone 分度圆锥95.sector gear 扇形齿轮96.the outer cone distance 外锥距97.the reference cone angle 分度圆锥角98.The apexes 锥顶99.The dedendum angle 齿根角100.dedendum cone angle 齿根圆锥角Chapter 11 Gear Trains第十一章轮系1. gear train with fixed axes 定轴轮系2. epicyclical gear train 周转轮系3. elementary epicyclical gear trains 基本周转轮系4. combined gear trains 复合轮系5. planet gear 行星轮6. planet carrier 行星架,系杆,转臂7. sun gears 太阳轮,中心轮8. differential gear train 差动轮系9. the train ratio of a gear train 轮系传动比10.idle wheels 惰轮11.converted gear train 转化轮系12.the efficiency of the gear train 轮系效率13.branching transmission 分路传动14.the brake 刹车片15.the clutch 离合器16.negative mechanism 负号机构17.positive mechanism 正号机构18.train ratio condition 传动比条件19.concentric condition 同心条件20.assembly condition 装配条件21.planetary reducer with small tooth difference少齿差行星减速器22.cycloidal-pin wheel planetary gearing摆线针轮行星传动23.harmonic drive gearing 谐波传动Chapter 12 Other Common Mechanisms 第十二章其它常用机构1. ratchet mechanism 棘轮机构2. pawl 棘爪3. intermittent motion 间歇运动4. geneva mechanism 槽轮机构5. external geneva mechanism 外槽轮机构6. internal geneva mechanism 内槽轮机构7. geneva rack mechanism 齿条槽轮机构8. spherical geneva mechanisms 球面槽轮机构9. the ratio k between motion time and dwell time运动与停歇时间比k10.Cam-Type Index Mechanisms 凸轮式间歇运动机构11.Cylindrical Cam Index Mechanisms圆柱凸轮式间歇运动机构12.Universal Joints 万向联轴节13.The Single Universal Joint 单万向联轴节14.The Double Universal Joint 双万向联轴节15.Screw Mechanisms 螺旋机构16.single-threadscrew mechanisms 单螺旋机构17.Double-thread screw mechanisms 复式螺旋机构18.Index cam mechanism 分度凸轮机构19.Geared linkages 齿轮连杆机构Chapter 13 Creative Design of Mechanism Systems 第十三章机械系统的创新设计1. prototype machine 样机2. Working cycle diagrams 工作循环图3. reference link 定标件4. Circular working cycle diagram 圆工作循环图5. Rectilinear working cycle diagram 矩形工作循环图6. Rectangular coordinate working cycle diagram直角坐标式工作循环图the coefficient travel speed variation K 行程速比系数crank acute angle (imbalance angle) θ极位夹角differential gear train 差动轮系planetary gear train 行星轮系magnitude and direction (大小和方向)compound hinge 复合铰链passive DOF 局部自由度redundant constraint 虚约束offset cam mechanism 偏置凸轮机构pressure angle 压力角base circle 基圆instant centre 瞬心transmission angle 传动角。
机械英文名词
目录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其他零件1机构学机构学theory of mechanisms机构mechanism机器machine机械machinery构件link主动件driving link从动件driven运动副kinematic pair铰链连接hinge, pilot pin joint复合铰链compound hinges, multiple hinges运动链kinematic chain低副lower pair高副higher pair自由度degree of freedom虚约束redundant constraint, passive constraint 机构简图schematic diagram of mechanism机构运动简图kinematic diagram of mechanism 机构综合synthesis of mechanism机构运动学kinematics of mechanism速比velocity ratio of link传动比transmission ratio速度瞬心instantaneous center of velocity机械动力学dynamics of machinery驱动力driving force扰动力perturbed force工作阻力effective resistance静载荷static load动载荷dynamic load离心力centrifugal force作用力active force, applied force 反作用力reaction等效力equivalent force力矩moment力偶couple力偶矩moment of couple力平衡equilibrium扭矩torque, torsional moment等效力矩equivalent moment效率efficiency等效构件equivalent link等效质量equivalent mass转动惯量moment of inertia惯性积product of inertia极转动惯量polar moment of inertia回转半径radius of gyration飞轮flywheel调速器governor, speed regulator转子的静平衡static balance of rotor转子的动平衡dynamic balance of rotor 平衡质量balancing mass质径积mass-radius product连续系统continuous system离散系统discrete system变质量系统variable mass system连杆机构linkage mechanism连架杆side link曲柄crank连杆coupler, floating link摇杆rocker滑块slider导杆guide bar, guide linkTotal 16 Page 11Total 16 Page 12Total 16 Page 13针齿轮pin wheel外齿针齿轮external pin wheel内齿针齿轮internal pin wheel外摆线的等距曲线equidistant curve of epicycloid 长幅外摆线的等距曲线equidistant curve of prolate epicycloid内摆线的等距曲线equidistant curve of epicycloid 短幅外摆线的等距曲线equidistant curve of curtate hypocycloid发生圆柱面generating cylinder发生圆直径generating diameter20锥齿轮传动锥齿轮bevel gear直齿锥齿轮straight bevel gear双曲面齿轮副hypoid gear冠轮crown gear端面齿轮contrate gear弧齿锥齿轮spiral gear摆线齿锥齿轮epicycloid gear平顶齿轮bevel gear wuth 90 face angle正交锥齿轮bevel gear with axes at right angles斜交锥齿轮angular bevel gear左旋锥齿轮left-hand spiral bevel gear右旋锥齿轮right-hand spiral bevel gear直线齿廓锥齿轮bevel gear with straight tooth profile圆弧齿廓锥齿轮bevel gear with circular arc tooth profile正常锥度齿锥齿轮bevel gear with standard taoered tooth profile双重锥度齿锥齿轮bevel gear with circular arc tooth profile 等高齿弧齿锥齿轮spiral gear with duplex tapered teeth根锥顶点root apex斜齿锥齿轮skew [helical] bevel gear曲线齿锥齿轮curved tooth bevel gear节圆锥面pitch cone齿根圆锥面root cone分度圆锥面reference cone背锥面back cone前锥面front cone中间锥面middle cone分锥顶点reference cone apex轴线交点crossing point of axes公共锥顶common apex锥距outer cone distance内锥距inner cone distance中点锥距back cone distance偏置距offset分度圆锥角reference cone angle节圆锥角pitch angle顶圆锥角tip angle根圆锥角root angle背锥角back cone angle齿顶角addenddum angle齿根角dedendum anle产形齿面generating flank凹面concave side凸面convex side21谐波齿轮传动谐波齿轮传动harmonic gear drive波发生器wave generator柔性齿轮flexible gear, flexplineTotal 16 Page 14Total 16 Page 15Total 16 Page 16。
MathExpressions
Greek SymbolsΑα alpha /'ælfə/Ββ beta /'bi:tə/Γγ gamma /'gæmə/Δδ delta /'deltə/Εε epsilon /'epsilən/Ζδ zeta /'ziːtə/Ηε eta /'iːtə/Θζ theta /'ζiːtə/Ιη iota /aɪ'əʊtə/Κθ kappa /'kæpə/Λι lamda /'læmdə/Μκ mu /'mjuː/Νλ nu /'njuː/Ξμ xi /'ksaɪ/Ον omicron /'əʊmɪkrən/ Ππ pi /'paɪ/Ρξ rho /'rəʊ/ζ sigma /'sɪgmə/Ση tau /'tɑʊ/Τυ upsilon /'jʊpsɪlən/Υθ phi /'faɪ/Φχ chi /'kaɪ/Χψ psi /'psaɪ/ Ωω omega /'əʊmɪgə/Operations Signs‘’single quotation marks 单引号‚‛double quotation marks 双引号( ) parentheses 圆括号[ ] square brackets 方括号{} brace (angle bracket) 大括号... ellipsis 省略号+plus 加号;正号-minus 减号;负号±plus or minus 正负号×is multiplied by 乘号÷is divided by 除号=is equal to 等于号≠is not equal to 不等于号≡is equivalent to 全等于号≈is approximately equal to 约等于号<is less than 小于号>is more than 大于号≤is less than or equal to 小于或等于号≥is more than or equal to 大于或等于号%per cent 百分之…‰per mill 千分之…≦infinity 无限大号∝varies as 与…成比例√square root, radical symbol 平方根≧since; because 因为≨hence 所以∷equals, as (proportion) 等于,成比例∠angle 角⌒semicircle 半圆⊙circle 圆○circumference 圆周πpi 圆周率△triangle 三角形⊥perpendicular to 垂直于∪union of 并,合集∩intersection of 交,通集∫the integral of …的积分∑(sigma) summation of 总和°degree 度′minute 分〃second 秒#number …号℃Celsius system 摄氏度@at 单价x' x prime 微分x" x double-prime 二阶微分Notation Signs{ braceleft, open brace, open curly 左花括号} braceright, close brace, close curly 右花括号{} brace 花括号( parenleft, open parenthesis, open paren 左圆括号) parenright, close parenthesis, close paren 右圆括号() brakets/ parentheses 圆括号[ bracketleft, open bracket 左方括号] bracketright, close bracket 右方括号[] square brackets 方括号| bar, vertical bar, vertical virgule 竖线/ slash, divide, oblique, virgule 斜杠,除号\ backslash, sometimes escape 反斜杠// slash-slash, comment 双斜杠‖parallel 双线号& amp; ampersand, and, reference, ref 和# pound, numbersign 井号§section; division 分节号$ dollar 美元符号* asterisk, multiply, star, pointer 星号,乘号. full stop, dot 句号,点, comma 逗号: colon 冒号; semicolon 分号' apostrophe, prime 撇号question mark 问号! exclam, exclamation 感叹号- hyphen 连字号-- dash 破折号... dots/ ellipsis 省略号" quote, back quote, single quotation 单引号"" double quote 双引号→arrow 箭头 ̄hyphen 连字符—dash 破折号_ underscore 下划~ tilde 波浪符~swung dash 代字号¨tandem colon 双点号" ditto 同上@ at 在^ caret, wedge 号= equal 等号+ plus 加号- minus 负号space 空格号Math Expressions the nth root of xintegral from zero to infinity the sum from i equals 1 to nVerbal Expression of Functions and Operationslog a x log to the base a of x 对数the base a logarithm of xx n the nth power of x; x to the nth power 幂函数x raised to the power nf(x) the function of x 函数A∪B the union of A and B 合集A∩B the intersection of A and B 交集a square root of x 平方根a nth root of x n次方根ax2+b+c quadratic polynomialx + y the sum of x and y; y is added to xx – y the difference between x and y;y is subtracted from xxy the product of x and y; x times yx/y the quotient of x and y; x is divided by y;the ratio of x to yx > y x is greater than y; x is more than yx < y x is smaller than y; x is less than yx ≥ y x is at least y; x is not less than yx ≤ y x is at most y; x is not greater than yTerminologySet 数集Subset 子集Union 合集Intersection 交集Real number 实数Nature number, Counting number 自然数Whole number 非负整数Integer 整数Rational number 有理数Irrational number 无理数Fraction, ratio 分数Denominator 分母Numerator 分子Decimal 小数、十进制Interval 区间Endpoints 端点Absolute value 绝对值Opposite, negative, additive inverse 相反数Like signs 同正负号Unlike signs 不同正负号Reciprocal, multiplicative inverse 倒数Arithmetic expression 算术表达式Evaluation 计算Grouping symbol 运算顺序符号Innermost groupAlgebraic expression 代数表达式(含变量)Subscript 下标Commutative property 交换律Associative property 组合律Distributive property 分配率Identity property 同一律Term 项Coefficient 系数Like term 同类项Combining like terms 合并同类项Equation 方程,等式Satisfy 满足Solution, root 方程的根Formula, literal equation 多元方程Variable 变量Inequality 不等式Trichotomy 三分法Compound 复合Close-up 特写Dependent variable 因变量Independent variable 自变量Function 函数Domain 域(自变量)Range 范围(因变量)Substitution 代入Elimination 消元Matrix 矩阵Augmented matrix 增广矩阵Determinant 行列式值Constraint 约束条件MinorScientific notation 科学记数Polynomial 多项式Monomial 一元多项式Binomial 二元多项式Trinomial 三元多项式Degree 维Quadratic polynomial 二次多项式Prime polynomial 素多项式Perfect square trinomial 完全平方Greatest common factor 最大公约数Factor out 提出公约数Rational expression 有理式Rational function 有理函数Least common denominator 最小公分母Least common multiple 最小公倍数Complex fraction 繁分数Extraneous root 增根Proportion 比例Square 平方Cube 立方Like redicals 同类根式Conjugate 共轭Rationalization 有理化Complex 复数Real part 实部Imaginary part 虚部Miscellaneous 杂类Composition 合成Inverse 反函数Direct variation 正比Variation constant 比例系数Inverse variation 反比Joint variationMultiplicity 重(复)数Sequence 序数Series 级数Arithmetic sequence 等差数列Common difference 公差Arithmetic series 等差级数Goemetric sequence 几何数列Common ratio 公比Goemetric series 几何级数Permutation 排列Factorial 阶乘Combination 组合Odd 奇Even 偶Illustrate, graph 作图,曲线图Coordinate 坐标Unit 单位Origin 原点Point 点Number line 数轴Cartesian coordinate system 笛卡儿坐标系Axis 坐标轴Quadrant 象限Plotting, graphing 画出(点)Intercept 交点Slope, rise, run 斜率,因增量,自增量Parallel 平行Perpendicular 垂直Parabola 抛物线Open upward 向上展开Open downward 向下展开Vertex 顶点Focus 焦点Directrix 准线Reflecting 倒映Translating 平移Stretching 拉伸Shrinking 收缩Sketch 描图Asymptote 渐近线Oblique asymptote 斜渐近线Circle 圆周Radius 半径Diameter 直径Circumference 周长Circular 圆Ellipse 椭圆Hyperbola 双曲线Axis of symmetry 对称轴Triangle 三角形Right triangle 直角三角形Trapezoid 梯形Parallelogram 平行四边形Rhombus 菱形Rectangular 长方形Right circular cone 正圆锥体Rectangular solid 长方体Square 正方形Sphere 球形Right circular cylinder 直圆柱体Angle 角Isosceles triangle 等腰三角形Similar triangle 相似三角形Acute angle 锐角Obtuse angle 钝角Supplementary 互补Equilateral triangle 等边三角形Addition 加法Sum 和Summand, augend 被加数Addend 加数Subtraction 减法Difference 差Minuend 被减数Subtrahend 减数Multiplication 乘法Product 积Factor 因数Division 除法Quotient 商Dividend 被除数Divisor 除数Remainder 余数Exponential 指数Base 底数Exponent 指数、幂Common baseNature baseRadical 根式Radication 开方nth root n次方根Index of the radix 次Radicand 被开方数Logarithm 对数Common logarithmNature logarithmQuadratic 二次方程式Rounded to N decimal places 精确到小数点后第N位数A solution (root) to the equation 方程的解(根)Build up the denominator 同一化分母f(x) is a reflection in the x-axis of the graph of g(x).f(x) is a translation to the right of the graph of g(x).y varies directly as the square root of x.y varies jointly as x and the square of z.Symmetry about the y-axisSymmetry about the originRead more booksBook, is the observation window of the world. Book, is the source of knowledge, is the ladder of human progress. To acquire knowledgeMust read more books. To keep up with the pace of The Times development, it has to constantly reading, constantly enrich himself. The content of the book can be varied, not stick to one pattern. Because I always believe, no matter what the book, as long as is beneficial. Often there are a few of my bedside book, with desirable, content is multifarious. Has the book suitable for work want, such as the xinhua digest, \"I am a professional secretary, an introduction to social work, etc.; There are literature books, look at some of the current popular literature in recent years, especially like to reflect the reality of officialdom novels; Also have hit TV series of books, I feel the text rendering far more appealing than the actor's performance. There are a few ways to communicate with their children's book is also I often tread. The six weeks of study time, I have to strengthen the reading notes record. To read more and more books, more read more interested. I feel more to read at least the following four benefits:One is to read more books can increase knowledge, improve ability. The ancients cloud, \"book of medicine also, good reading can cure a fool. Don't eat, hungry, don't you're reading\". Reading can increase knowledge, broaden their; Can reasonable, enhance ability. I had just put \"strengthen learning\" as a slogan shouted, as after reading more, truly discover the meaning of reading. Understand we often say \"to improve the ability of analyzing and resolving problems\" is not empty talk. The same thing, different people have different views, different opinions can produce a different approach. The same job, some people can think clearly and methodically handle well, some people just beside the point, chaos to dry up, the busy along while no actual effect. I thought, this also is not learning, superficial, and understandthe performance of students with less ability. Only read more books, ancient and modern, xiao, improve comprehension, to analyze problems, to use the scientific theory and method to solve the problem.2 it is to read more books can edify sentiment, easy. I often put the idle time for books, such as reading used to send their children to the time after the training course. It is best to find a quiet house, you can have some tea, holding a favorite book, sat on a chair by the window, quietly taste taste of the book. At that moment, my heart is full and satisfied. Reading can let we have \"strategizing, would\" confidence. Reading can make people knew, from ignorance to from awareness to know; Reading books can make people more rational, not for the noise interference by multifarious things, not happy care for a moment of gain and loss. Through experience resonance in the ink elegant and moving, his inner anxiety, fear, loneliness, sadness, make bosom leisurely relief detachment, indifferent to quiet, easy state of psychological harmony.3 it is to read more books can cultivate one's morality raises a gender, gentleness. In fact, I like to read books is not innate. Once when chatting with a university professor's words laid a deep imprint in my heart. One, \"he said,\" read \"how many books are written in the face. Comparison inspection once, at that time, I feel not much ink must be written on my face, very superficial appearance. I find myself wanting to be let a person look is elegant, full of the appearance of the scroll. We know that the first impression is very important. Read more books can let a person feel resalute know book, have poise. Sometimes, we will find that the same age group, a professor at the university and the general staff always let a person can tell at a glance. Mainly is the difference between the temperament. This is what we often say \"abdomen has fuhai gas from China\".Four is read more books can literarily, full of inspiration. We are office workers. Can speak and write is the basic requirement for us. This requests us to read more books. Without reading, and writing could not write or empty, hollow language, no charm. \"Reading break rolls, such as writing.\" More books we read, the harness writing ability, want to express thoughts can smoothly. I have deep experience: when I write an article if it is the same feeling of words, someone reads very well. If there is no feeling of patchworkhard to words, others will feel reluctant to read is not smooth. So, I'm judgment criteria for an article is can let me read on. Read more books, but also can make the person at the time of writing, we use more of a good word and life philosophy, let a person feel full of literary grace, beauty, increase the readability of the article.Reading the British prime minister Winston Churchill once remarked: \"the most rewarding pastime is reading, thousands of people can find spiritual solace from the rich and colorful reading activities.Knowledge is powerGrowth in the extremely rich in the world, if you don't have enough knowledge, will be difficult. Because no matter what things you need to culture. Many ancient sages because attach importance to learning can call wind call rain, has made many great cause. If you want to do great work, we must study hard scientific and cultural knowledge, can increase ability, exert special contribution for our country.The famous English philosopher Francis Bacon once said "knowledge is power", now has been countless facts have proved this sentence. It is because of the search for knowledge, and human nature to inspire people to find infinite mystery. In order to realize the dream of again and again, human paid a hard efforts, studying geology to let people know the secret of China's 960 square kilometers of land under; Studying the effects of information science to modern people to understand science and technology developed a miracle; Genetic science research, people learn to overcome genetic disorders, mastering the genetic engineering of information. Both in physical and chemical and biological mathematics, waiting for the further exploration of human beings.Knowledge is power, the construction of our country need to knowledge, the management of large countries need knowledge, creating a better living environment requires knowledge. There is no scientific cultural knowledge in the modern society based on hard, do not take the country's science and technology will be behind.If you want to have broad rich knowledge takes hard work to learn, indomitable will complete the study task. Proletarian revolutionaries Marx's "das kapital" for writing are making a lot of mind, after hard work, through countless day and night of hard struggle, finallyrealized his dream. Because of his hard efforts, to carry forward marxism. Marx often go to the library have a seat here two deep footprints left him. So to get knowledge, you must pay a price. Is not so, ancient and modern, Chinese and foreign song dynasty poet lu you loved to read, to generation place with a book in his room everywhere. Because so he left for later generations more than nine thousand poems, is known as a famous patriotic poet in China. Both ordinary intellectuals and elite schools are the love of learning, each of us should good good study day day up, improve their self-cultivation, increase their own talents.Understand that knowledge is power, more should study hard and master a lot of scientific knowledge, so as to contribute to human beings. A young don't work hard, idle young, needy old, as the successor of the new century, must treasure the time, efforts to learn useful knowledge, to apply what they have learned in real work and life.。
JSLint报错翻译
JSLint报错翻译“Missing semicolon.” : “缺少分号.”,“Use the function form of \”use strict\”.” : “使⽤标准化定义function.”,“Unexpected space after ‘-’.” : “在’-'后⾯不应出现空格.”,“Expected a JSON value.” : “请传⼊⼀个json的值.”,“Mixed spaces and tabs.”: “空格和TAB重复.”,“Unsafe character.” : “不安全的字符.”,“Line too long.”: “本⾏中的字符超过设定的最⼤长度.”,“Trailing whitespace.”: “本⾏末尾有过多⽆⽤空格.”,“Script URL.” : “脚本URL.”,“Unexpected {a} in ‘{b}’.” : “在 ‘{b}’ 中不该出现 {a}.”,“Unexpected ‘{a}’.” : “不该在此出现’{a}’.”,“Strings must use doublequote.” : “字符串需要⽤双引号”,“Unnecessary escapement.” : “不需要转义”,“Control character in string: {a}.” : “在字符串中出现了Control的字符”,“Avoid .” : “避免 \\”,“Avoid .” : “避免 ”,“Avoid -.” : “避免 -”,“Bad escapement.” : “错误的转义字符”,“Bad number ‘{a}’.” : “错误的数字 ‘{a}’”,“Missing space after ‘{a}’.” : “在’{a}’之后缺少空格”,“Don’t use extra leading zeros ‘{a}’.” : “不要再’{a}’的前⾯⽤多余的0″,“Avoid 0x-. ‘{a}’.” : “避免使⽤ 0x-. ‘{a}’.”,“A trailing decimal point can be confused with a dot ‘{a}’.” : “在’{a}’中使⽤点尾随⼩数点”,“Unexpected comment.” : “不该在此处出现注释”,“Unescaped ‘{a}’.” : “没有转义 ‘{a}’”,“Unexpected control character in regular expression.” : “在正则表达式中出现了control字符”,“Unexpected escaped character ‘{a}’ in regular expression.” : “在正则表达式中出现了没有转义的字符 ‘{a}’”,“Expected ‘{a}’ and instead saw ‘{b}’.” : “应该⽤ ‘{a}’代替’{b}’”,“Spaces are hard to count. Use {{a}}.” : “空格难以统计,请使⽤ {{a}}”,“Insecure ‘{a}’.” : “不安全的 ‘{a}’”,“Empty class.” : “空的class”,“Expected a number and instead saw ‘{a}’.”:“应该⽤数字代替’{a}’”,“‘{a}’ should not be greater than ‘{b}’.”:“‘{a}’不应该⽐’{b}’⼤”,“‘hasOwnProperty’ is a really bad name.”: “‘hasOwnProperty’是关键字”,“‘{a}’ was used before it was defined.”:“‘{a}’未定义就已经使⽤了.”,“‘{a}’ is already defined.”:“‘{a}’被重复定义”,“A dot following a number can be confused with a decimal point.”:“数字后⾯的⼀个点会被误认为是⼗进制的⼩数点”,“Confusing minusses” : “容易混淆的负数表达-”,“Confusing plusses.” : “容易混淆的正数表达+”,“Unmatched ‘{a}’.” : “⽆法匹配的’{a}’”,“Expected ‘{a}’ to match ‘{b}’ from line {c} and instead saw ‘{d}’.”:“在⾏{c}中需要⽤’{a}’和’{b}’匹配,⽤来代替’{d}’”,“Unexpected early end of program.”:“程序不可预期的提前终⽌”,“A leading decimal point can be confused with a dot: ‘.{a}’.”:“‘{a}’前的点容易混淆成⼩数点”,“Use the array literal notation [].”:“使⽤数组的符号 []“,“Expected an operator and instead saw ‘{a}’.”:“需要⽤⼀个符号来代替’{a}’”,“Unexpected space after ‘{a}’.”:“在’{a}’之后不能出现空格”,“Unexpected space before ‘{a}’.”:“在’{a}’之前不能出现空格”,“Bad line breaking before ‘{a}’.”:“在’{a}’之前错误的换⾏”,“Expected ‘{a}’ to have an indentation at {b} instead at {c}.”:“‘{a}’需要在{c}⽽不是{b}处缩进”,“Line breaking error ‘{a}’.”:“换⾏错误 ‘{a}’”,“Unexpected use of ‘{a}’.”:“此处不能⽤’{a}’”,“Bad operand.”:“错误的操作数”,“Use the isNaN function to compare with NaN.”:“使⽤isNaN来与NaN⽐较”,“Confusing use of ‘{a}’.”:“容易混淆的’{a}’的使⽤”,“Read only.”:“只读的属性”,“‘{a}’ is a function.”:“‘{a}’是⼀个函数”,‘Bad assignment.’:“错误的赋值”,“Do not assign to the exception parameter.”:“不要给额外的参数赋值”,“Expected an identifier in an assignment and instead saw a function invocation.”:“在赋值的语句中需要有⼀个标识符,⽽不是⼀个⽅法的调⽤”,“Expected an identifier and instead saw ‘{a}’ (a reserved word).”:“需要有⼀个标识符,⽽不是’{a}’(保留字符)”,“Missing name in function declaration.”:“在⽅法声明中缺少名称”,“Expected an identifier and instead saw ‘{a}’.”:“需要有⼀个标识符,⽽不是’{a}’”,“Inner functions should be listed at the top of the outer function.”:“内部函数的声明应该放在此函数的顶部。
sap bsp开发高级教程
Brian McKellar, Thomas Jung AdvancedBSP ProgrammingContentsIntroduction15Target Audience (15)On What Releases Can You Use BSP? (16)BSP vs. Web Dynpro ABAP (16)Acknowledgements (17)1What is BSP?211.1Internet Communication Manager (21)1.2Internet Communication Framework (24)1.3BSP Development Environment (25)1.4HTMLB Rendering Family (26)1.5BSP Compiler (27)1.6BSP Runtime (28)1.7BSP Debugger (29)1.8MIME Repository (30)1.9Summary (30)2HTTP and HTML312.1Viewing the HTTP Traffic (32)2.2Structure of HTTP (32)2.2.1The HTTP Request Status Line (35)2.2.2HTTP Request Headers (35)2.2.3HTTP Header/Body Separator (37)2.2.4HTTP Request Body (37)2.2.5The HTTP Response Status Line (37)2.2.6HTTP Response Headers (38)2.2.7HTTP Response Body (39)2.3Server Objects for HTTP Request and Response (39)2.4HTML Forms and Data Handling (41)2.5Mapping of HTML onto HTTP Requests (46)2.5.1Input Fields (46)2.5.2Checkboxes, Radio Buttons and Dropdown List Boxes (48)2.5.3File Upload and Download (49)5Contents2.6Cookies (54)2.7HTTP Redirects (58)2.8Handling of HTML Resources in HTTP (59)2.9Troubleshooting Examples (62)2.9.1Missing Resource (62)2.9.2Non-Secure Warnings (63)2.9.3Relative URLs That Become Invalid (63)2.9.4Estimating Performance (65)3HTTP Handler673.1URL Handling in the ICF Tree (67)3.2URL Mapping (68)3.3Sample Handler for Reading Images (69)3.3.1URL Syntax (71)3.3.2Handler Coding (72)3.4Alias Handling (74)3.5Handler Example—Table Query (77)3.5.1Table Query Handler Implementation (78)4URLs in BSP834.1URL Mangling (83)4.1.1What is URL Mangling? (83)4.1.2How is URL Mangling Done? (84)4.1.3Attempting to Hide the URL Mangling (85)4.2Fully Qualified Domain Names (89)4.2.1Motivation for FQDN (90)4.2.2ICM Configuration (91)4.2.3Browser Requirements (91)4.3Namespace Mapping (92)4.4URL Parameters (93)4.5URL Escaping (95)5Authentication975.1Basic Authentication (98)5.2Single Sign-On (102)5.3Digital Certificates (105)5.4Anonymous Services (108)5.5Form-Based Authentication (109)6Contents5.6Implementing a Simple Logon Application (110)5.7De-Authentication (113)6Session Management1156.1Session Identification (115)6.2Session Timeout (118)6.2.1Catching and Handling a Session Timeout (119)6.2.2Session Timeout in Browser (120)6.3Confusion with Processing Timeout (121)6.4Catching and Handling a Restart after Timeout (123)6.5Session Management from the Browser (125)6.6Warning the User of a Pending Timeout (128)6.7Summary (131)7Using BSP Applications in SAP GUI1337.1Using a BSP Application in a Dynpro (133)7.2Pitfalls when Using BSP Applications with SAP GUI (136)7.2.1Communication Path (136)7.2.2The Second Authentication (137)7.2.3The Second Session (138)7.2.4Window Open Behavior (139)7.2.5Effects of SAP’s New Visual Design (141)7.2.6Loading HTML Pages Directly (142)7.3Interaction between SAP GUI and BSP Applications (144)7.3.1BSP Application Event to SAP GUI (144)7.3.2SAP GUI Event to BSP Application (147)7.4Starting a New Browser Outside the SAP GUI (149)8Performance Measurements1518.1Test Applications (152)8.2Quick Sizing with HTTP Trace Tool (153)8.3Network Latency (154)8.4Server Processing Time (155)8.5Browser Rendering Time (157)8.6Determining Hotspots (159)8.7Load Testing (161)8.8SQL Traces (165)7Contents9BSP Extensions1679.1Extension Overview (167)9.1.1Extension Technology (168)9.1.2Using BSP Extensions (168)9.1.3Finding Details about the Extensions (169)9.1.4Available Extensions (172)9.1.5Extensions Designs (172)9.1.6High Level Elements (174)9.2HTMLB Event System (180)9.2.1Event Dispatching (180)9.2.2Manually Handling Events (181)9.3Common Extension Elements (186)9.3.1<htmlb:tableView> (187)9.3.2<htmlb:tree> (192)9.3.3<phtmlb:matrix> (194)9.3.4<xhtmlb:protectDoubleSubmit> (196)9.3.5<phtmlb:containerTabStrip> (197)9.3.6<phtmlb:formLayout> (200)10BSP Element Expressions and Iterators20510.1BSP Element Expressions (205)10.1.1What is a BEE? (205)10.1.2N=1, Using Any BSP Element as BEE (206)10.1.3HTML BEE (209)10.1.4Table BEE (211)10.1.5XML BEE (212)10.1.6Errors and Error Handling (215)10.2Table View Iterators (215)10.2.1What is a Table View Iterator? (217)10.2.2Method GET_COLUMN_DEFINITIONS (218)10.2.3Method RENDER_ROW_START (220)10.2.4Method RENDER_CELL_START (222)10.2.5Finished Output (225)11Creating your own BSP Extension Element22711.1Creating a BSP Extension Element (227)11.1.1Extension Framework Hierarchy (227)11.1.2User-Defined Validation (228)11.1.3Element Content (230)11.2Writing a Composite Element (231)11.2.1Designing a New Composite Element (231)11.2.2Processing Other BSP Elements (233)8Contents11.2.3Writing the Composite BSP Element (237)11.2.4Handling of Inner Data BSP Elements (238)11.3 A Deeper Look at BSP Extensions Events (239)11.3.1Introduction to BSP Extension Events (239)11.3.2Rendering Events (240)11.3.3Handling Incoming Events (243)11.3.4Rendering an Event via the <bsp:htmlbEvent> Element (243)11.4Event Handling in Composite Elements (244)11.4.1Extending the Design of the Composite Element (245)11.4.2Using the Composite Element (245)11.4.3Use of IDs (246)11.4.4Integrating into the HTMLB Manager (247)11.4.5Data-Handling (249)11.4.6Event-Handling (250)12Additional BSP Extensions25312.1Business Text Framework (253)12.1.1SAP Example (253)12.1.2BTF Functionality (254)12.1.3Database Storage (255)12.1.4BSP Extension Element (256)12.1.5BTF Editor in the Page Layout (257)12.1.6Preparing the BTF Document (258)12.1.7Retrieving BTF Content on Input (258)12.2Internet Graphics Service (260)12.2.1IGS Setup and Administration (260)12.2.2SAP Examples (261)12.2.3IGS BSP Extension (261)12.2.4Chart Data (262)12.2.5Chart Model Classes (264)12.2.6IGS Customizing (266)12.2.7Image Click Event Handling (267)12.2.8Image Conversion (268)12.3BSP Library (268)12.3.1findAndReplace Element (268)12.3.2htmlbEvent Element (269)12.3.3Portal Integration (270)13MVC—Model View Controller27513.1MVC Design Paradigm (275)13.2Application Structure (275)13.2.1Model (276)13.2.2Controller (277)13.2.3View (283)9Contents13.3.1Getter/Setter methods (286)13.4Dynamic Model Binding (288)13.5Stateless MVC (291)13.5.1XML Serialization of ABAP Objects (291)13.5.2Server Cookie Storage of the XML Stream (292)13.5.3Controller Modifications to Support Serialized Models (293)13.6Building a Pattern Engine with MVC (295)13.6.1The Final ESS Application (297)13.6.2Writing the ESS Application (298)13.6.3Writing the Pattern Engine (301)14Help Systems30714.1F1—Field Level Help (307)14.1.1The Help UI (307)14.1.2Implementing the BSP Extension Element (311)14.1.3BSP Element Properties (311)14.1.4BSP Element Attributes (312)14.1.5Element Handler Class (312)14.1.6BSP F1 Help Controller Method—DO_REQUEST (318)14.1.7Implementing the BSP F1 Help Application—Model (318)14.2Dialog Windows (319)14.3F4—Value Help (322)14.3.1Value Help Requirements (322)14.3.2The Solution (323)14.3.3The New BSP Element (324)14.3.4Input Help Controller (325)14.3.5Input Help View (326)14.3.6Input Help Model (329)15Internationalization33715.1Multiple Language Support (337)15.2Logon Language (338)15.3Unicode (341)15.3.1What is Unicode? (341)15.3.2Unicode in BSP (343)15.4Online Text Repository (OTR) (346)15.4.1Types of OTR: Alias and Long (347)15.4.2Working with OTR from ABAP Code (348)15.4.3Special Note about using OTR (349)10Contents15.5.1OTR (350)15.5.2Field Labels and Quick Info (351)15.6Date Format (352)16Document Handling in BSP35516.1MIME Repository (355)16.2ICM File Handler (357)16.3Handling Non-HTML Documents (358)16.3.1Test Program (359)16.3.2Display Document Inline (361)16.3.3Display Document Inside HTML Page (363)16.3.4Display Document in New Window (366)16.4Data Manipulation (366)16.5Microsoft Excel Download (367)16.5.1Excel Files (368)16.5.2Excel Unicode Text File (369)16.5.3Unicode Formats and Endians with Excel (369)16.5.4Conversion to Binary String (370)16.5.5Addition of the Byte Order Mark (371)16.6Pushing the Excel Content back through the browser (371)16.6.1Push Using the Current RESPONSE Object (371)16.6.2Push Using a Cached Response (372)16.7BSP Extension Element for Excel Download (374)16.7.1The Download Element User Interface (374)16.7.2The Element Properties and Attributes (375)16.7.3Compile Time and Runtime Checks (376)16.7.4Rendering Logic (377)16.7.5Trapping Events (379)16.7.6Calling the Element from a Page Layout (380)16.7.7Event Handler (381)16.7.8Get Structure Definition (385)16.7.9Process Excel Download (386)16.8Alternatives to the MIME Repository (389)16.8.1ICM File Handler (389)16.8.2SAP Content and Cache Server (390)16.9ZIP Tool (392)17Customization39517.1Customization Overview (395)17.2Export—Modify—Import (395)17.3NetWeaver Theme Editor (397)11Contents17.4ALFS—ABAP Look-and-Feel Service (398)17.4.1ALFS Tool Scope (399)17.4.2What is ALFS? (399)17.4.3How Does Customization Normally Work? (401)17.4.4 A New Theme from Five Colors (401)17.4.5Integration into Web AS (402)17.4.6The Source Code: Making It Work (404)17.4.7ALFS Theme Editor in Detail (405)17.5Configure a Theme Root (406)17.6Theme Root White List (406)17.7Error Pages (408)17.7.1Historical BSP Error Pages (408)17.7.2Error Pages—New Approach (409)17.8Logon Application (412)18Skilled in the Art41718.1Field History (417)18.1.1Working with <phtmlb:comboBox> (417)18.1.2Processing the Field History (419)18.2Server-Side Printing (422)18.2.1PRINT Method Interface (423)18.2.2PRINT Method Coding (424)18.2.3Printer Dialog (426)18.3Select-Options/Parameters (429)18.3.1UI Design (430)18.3.2Solution Structure (431)18.3.3Select-Option Controller Class Attributes (432)18.3.4Select-Option Controller Class Coding (432)18.3.5Select-Option Model Class Attributes (434)18.3.6Select-Option Model Class Coding (436)18.3.7Recreating Transaction SE16 (442)19Breaking Out of the Mold44919.1Interactive Excel (449)19.2RSS Feeds (451)19.2.1Consuming an RSS Feed (451)19.2.2HTTP Client (452)19.2.3XML (453)19.2.4BSP Output (454)19.2.5XSLT (456)19.2.6Creating an RSS Feed (457)12Contents19.3Mini-Portal (458)19.3.1Mini-Portal Example 1—Common Page Header (458)19.3.2Mini-Portal Example 2—Portal with Navigation (460)19.3.3Portal within the SAP GUI (464)19.3.4Current Weather Display (466)20Closing471A Appendix—BSP Utility Classes473B The Authors483Index48513ContentsIntroductionThe history of BSP began in the late 1990s. Back then, the SAP Internet Transac-tion Server (ITS) and the SAP Workplace—SAP’s first attempt at a portal—depended heavily on the use of external Web servers. These solutions neither lev-eraged the inherent strengths of the ABAP technology nor re-used current devel-opers’ skill sets.Therein lay the greatest technical challenge to SAP as Web-based technologies became essential to all businesses. Companies began to realize that E-business was still just business and therefore expected their ERP solutions to transition eas-ily into this brave new world.Starting with Release 6.10, SAP began a major overhaul of its ABAP technology stack. The company broke the traditional Basis layer away from the applications that ran on it and renamed this new technology layer Web Application Server (Web AS). But this name change was far more than a marketing move. With this release, SAP had begun to build native Web server technology into the ABAP Ker-nel. No longer would SAP technology be dependent upon external Web serversor programming languages. ABAP itself was now HTTP-enabled!Naturally, ABAP was extended with a new Web development environment, called Business Server Pages (BSP). Like all other ABAP programming tools, BSP is integrated into the ABAP Workbench (SE80) and fully supports the Transport Management System (TMS). And, given its recent birth, BSP also fully embracesthe new ABAP object-oriented technology.Target AudienceThe target audience for this book is anyone who is currently an ABAP developeror who is interested in becoming an ABAP developer. BSP is another tool in the developer’s tool box, one that adds value to any ABAP development team.It does not matter if you have never done BSP development, are a novice BSP developer, or have several years of BSP development under your belt; there should be something for everyone in this book. We attempted to make this the definitive work on the subject of BSP, revealing behind-the-scenes aspects and discussing features in a new way.This book is not based solely on the underlying technology. Several years of expe-rience building real-world BSP applications at a customer site were also used in writing this book. Therefore, you will find solutions and sample source code to15Introductionhelp you overcome common development hurdles. Toward that goal, you will find all the example source code presented in this book on the accompanying CD.On What Releases Can You Use BSP?BSP has been shipped as an integrated part of the ABAP technology stack since Web AS Release 6.10. Release 6.10 contains the functionality to create basic BSP pages with flow logic.With Web AS Release 6.20, SAP introduced major enhancements to the BSP technology: Model View Controller and BSP Extension Elements. With Release6.20, Service Pack 34, a new HTML rendering engine, and a complete new BSPExtension library, PHTMLB, were added. Because of these additional enhance-ments to BSP, customer development should really only be done on Web AS 6.20 with SP34 or higher.SAP continued to enhance BSP with SAP NetWeaver ’04 (Web AS 6.40) and SAP NetWeaver ’04S (Web AS 7.0); however, nearly every feature of BSP is in sync between the major releases. This means that even if you are on an older Web AS6.20, you still reap the benefits of new developments within the NetWeaverreleases. Although you will rarely find in this book that a feature is limited to a specific release, we will point this out when it occurs.With the coverage for BSP within the latest technology releases of ABAP, you will find BSP present in the equivalent releases of the SAP application components as well. This means, for instance, that R/3 Enterprise (with or without Extension Set1.10 and2.00) and mySAP ERP 2005 (also known as Enterprise Core Component5.00 or ECC 5.00) both contain the technology necessary to create BSP applica-tions.BSP vs. Web Dynpro ABAPIn the past year, much of the attention within the SAP world has focused on SAP’s next generation technology: Web Dynpro. As this book goes to print, Web Dyn-pro for ABAP is scheduled for general availability in spring of 2006.In truth, Web Dynpro contains many of the enhancements that BSP developers have always wanted. Enhancements like built-in value-help and select options will become standard in Web Dynpro, but must be added by the customer into the BSP environment. Do not worry, however: The task of adding many of these enhancements to BSP is the subject of the last one-third of this book.All this begs the question: If Web Dynpro ABAP (WDA) is so great, why continue to use BSP (or for that matter why write a book about it?). There are several archi-16Introductiontectural differences between BSP and WDA. WDA may have some more advanced features compared to BSP, but it is a far more restrictive framework. First of all, WDA is stateful only. BSP supports both stateful and stateless pro-gramming models. Stateless programming is essential to high-performance Inter-net-facing applications.WDA is also designed to be future-proof, obscuring the specific client’s rendering technology. As a consequence, the tool does not allow low-level access to include your own custom HTML, JavaScript, or other controls. WDA targets the browser today, but tomorrow it might well be running within a smart client using entirely different technologies (such as XML and native UI controls). To keep this technol-ogy switch possible, the rendering logic is completely hidden from the developer, presenting only an abstract UI layer with abstract controls. On the other hand, BSP has no such restrictions. BSP is strictly centered on browser-based deploy-ment and therefore allows an extreme level of custom rendering. This makes BSPa perfect platform for applications that require pixel-perfect layout or specializedUI elements.The other aspect to consider is that Web Dynpro ABAP will not be available until NetWeaver ’04S. Therefore, you must upgrade your existing system to be able to use these new development tools. BSP, on the other hand, has been available for several years and is included in the vast majority of supported SAP product releases. For several more years, BSP may be your only choice for Web develop-ment using the ABAP language.AcknowledgementsFirst, we would like to thank the SAP Developer Network (SDN) content team, particularly Mark Finnern and Craig Cmehil, for not only providing a great servicein the form of SDN, but also making sure that BSP has its comfortable little home there.This book itself has deep roots within SDN. In fact, it is doubtful that it would exist at all if were not for SDN. Several sections of the book have their roots as SDN weblogs. The two authors of this book (who to this day have never met in person or even spoken on the phone) would likely never have crossed paths wereit not for the virtual community that is SDN.For their support, guidance and suggestions, Thomas would like to thank co-workers and friends: Chris Cassidy, Sam Mason, Lynn Scheu, and Sandy Smith. A special thanks goes to Steffen Knoeller, who behind the scenes has influenced many chapters in this book, without even knowing it!17AcknowledgementsBrian would wish to thank the complete team that made BSP happen. There is Albert Becker, who showed a team can work across many groups, and who taught the lesson late one night that VPs still know how to debug ABAP code. There are the ICM colleagues, Oliver Luik and Bernhard Braun, who measured performance in CPU cycles and give a new appreciation for “blazing fast.” Not to be forgotten are their partners in crime, the ICF colleagues: Masoud Aghadavoodi, Christoph Hofmann, and Daniel Walz, who has helped many hours so that we could write our first Web-based logon application. Then there are the men in black, the secu-rity group: Wolfgang Janzen and Martin Rex. The last import group required to start the project was the ABAP Language Group: Andreas Blumenthal, who fights like a lion for anything with ABAP stamped on it and who did a lot for BSP (even although it was not called ABAP Server Pages!); Holger Janz, who taught me the elegance of ABAP programming; Jürgen Lehmann and Peter Januschke, who taught me the complexities of compiler writing in ABAP and that it is actually quiet easy; Klaus Ziegler and Kay Mueller-Silva, who integrated JavaScript, Ulrich Elsaesser, who always used a short pencil for the pre-compiler; and the x-team, Karsten Bohlmann (XSLT) and Rupert Hieble (XML).In building BSP itself, the Workbench needed minor tweaking, plus some hard development by: Sigrun Wintzheimer, Michael Wenz, Margarethe Czarnecki, Andreas Herrmann, and, of course, Jürgen Remmel. The runtime was done by our small group: Rüdiger Kretschmer, who had the idea (and together with a col-league wrote the first ABAP book, and always knows the answers to everything or knows someone that knows); Björn Goerke who hacked the runtime years ago;Regina Breuer who did MVC; Jutta Bindewald, and Arndt Rosenthal.And then there is Steffen Knoeller, who shared my office for years and taught me HTML. Quality management was done by Michael Lottbrein, who rolled the first sneak preview out the door, Judith Rabetge, and Rainer Liebisch. Heidi von Gei-sau and Tina Haug wrote all documentation. Our first support steps were handled by Dongyan Zhao. Not to be forgotten is our extended support troop: Artem Gratchev, Vitaly Romanko, Yulia Kuznetsova, Dmitry Vladimirov, and Andrey Ali-mov. They not only taught me two words in Russian, but they also showed each and every time that the trickiest problems are theirs to solve! Finally, a good product required a few good salesmen: Axel Kurka (who passed away unexpect-edly and before his time; we will remember him fondly) and Dirk Feeken, who came up with the BSP name over lunch!Brian can only say: It is still a great team!For his guidance and patience, we wish to thank our publisher from Galileo Press, Florian Zimniak. Although we broke every rule and deadline he gave us, he stuck18Introductionwith us till the end. We also thank John Parker of SAP PRESS America for his edi-torial skills and for also putting up with our rule-breaking nature.Finally we must thank our families who put up with us through this experience. Without the support of our wives, Shari and Anja, we would never have pulled it through.19Acknowledgements11Creating your own BSP ExtensionElementWe already have seen in the last few chapters how powerful the BSPExtension Framework is. Fortunately, this is also an open technologyframework that allows SAP’s customers to build their own BSP exten-sions and to combine existing extensions to create composite ele-ments.11.1Creating a BSP Extension ElementIn Chapter 9, we took a close look at how BSP extension elements are structuredin order to better understand how to use them. However, this only scratched the surface of what lies within the BSP extension element. Before we begin the pro-cess of writing our own elements, it is important to study in detail the most important part of an extension element: its element-handler class.11.1.1Extension Framework HierarchyThe element-handler class actually represents an inherited hierarchy of class objects that all come together to form the extension framework. It is important to build this inheritance hierarchy correctly, because much of the functionality wewill code within our handler will be placed inside of redefinitions of inherited methods.The core extension framework comprises two objects, IF_BSP_ELEMENT and CL_BSP_ELEMENT. IF_BSP_ELEMENT defines all the core methods and attributes forthe extension framework. CL_BSP_ELEMENT implements the IF_BSP_ELEMENT interface and provides the basic functions that support all BSP extension ele-ments.There are two more objects within this hierarchy, both specific to the individual extension element. The first is a generated basis class, usually created with the fol-lowing naming standard:(Z)CL G_<EXTENSION>_<ELEMENT>This class is automatically generated by the BSP development environment. Whenyou define attributes for your extension element inside the BSP extension editor, these attributes will be generated as public attributes of this basis class. This class should also inherit from CL_BSP_ELEMENT and provide the specific constructorfor the element. By dynamically generating this class, all the attributes of your ele-ment can be strictly typed and checked at compile time.227Creating your own BSP Extension ElementThe final object is the core handler class itself. It should inherit from the generated basis class, and its name is completely user definable. However it is probably good form to following a naming standard such as the following:(Z)CL_<EXTENSION>_<ELEMENT>This class is where you will be spending most of your time as an element author.This class has the method redefinitions and any specific methods or attributes needed to implement the element.11.1.2User-Defined ValidationBSP extension elements are unique among the ABAP language tools in their approach to input validation. The extension runtime gives you the opportunity to code different validation routines that will be executed at runtime and compile time. That means that the syntax check of a BSP page will fire validation code that you can write. This gives you the ability to throw compiler errors for your own elements.In order to implement user-defined validation, we must redefine two methods in our handler class that were inherited down from IF_BSP_ELEMENT.The first method is COMPILE_TIME_IS_VALID. This is where we will code our compile time checks. SAP provides a series of validation methods (in class CL_ BSP_ELEMENT_CT_ATTR_VALID), which assist in this process. In addition to pro-viding simple checks, these methods also properly convert attribute-input string values into Boolean and integers values where necessary.What follows are coding examples for the validation routines of a fictional BSP Extension Element. They contain common types of checks in order to demon-strate the different possible techniques.METHOD if_bsp_element~compile_time_is_valid .validator->to_enum( name = 'Color'enums = 'RED/BLUE/GREEN' ).validator->to_enum( name = 'alignment'enums = 'LEFT/RIGHT' ).validator->to_boolean( name = 'disabled' ).validator->to_integer( name = 'size' ).valid = validator->m_all_values_valid.ENDMETHOD.We also have the method RUNTIME_IS_VALID. This method is useful for checking attribute values that are supplied dynamically, such as through BSP expressions228Creating your own BSP Extension Element(<%=...%>) only at runtime, or for attributes whose values are transformed into another data type.METHOD if_bsp_element~runtime_is_valid.get_class_named_parent(class_name = 'CL_HTMLB_CONTENT' ).IF runtime_parms = '/*/' OR runtime_parms CS 'alignment'.alignment = m_validator->to_enum(name = 'alignment'value = alignmentenums = 'LEFT/RIGHT'required = space ).ENDIF.IF runtime_parms = '/*/' OR runtime_parms CS 'disabled'.disabled = m_validator->bindable_to_boolean(name = 'disabled'value = disabledbinding_path = _disabledpage_context = m_page_context ).ENDIF.IF runtime_parms = '/*/' OR runtime_parms CS 'size'.size = m_validator->bindable_to_integer(name = 'size'value = sizebinding_path = _sizepage_context = m_page_context ).ENDIF.ENDMETHOD.The first line in the runtime validation method checks that this BSP element is used with an <htmlb:content> element. It is not possible to check this at com-pile time, as different elements can be used in different views, and these are com-piled separately. We surround each of our dynamic value checks with an IF checkfor performance. That way we only perform validation routines on attributes that actually have values set dynamically.It is important to note that these two validation methods will only be called if the User-Defined Validation option is selected in the BSP Element Properties. That way, if you have no validations that you wish to perform in your element, you can save the time that it would have taken for the framework to make calls into simply empty methods.229Creating a BSP Extension Element。
C语言常见错误提示信息的英汉对照
C语言常见错误提示信息的英汉对照常见错误提示信息的英汉对照Ambiguous operators need parentheses : 不明确的运算需要用括号括起Ambiguous symbol ’xxx’ : 不明确的符号Argument list syntax error : 参数表语法错误Array bounds missing : 丢失数组界限符Array size toolarge : 数组尺寸太大Bad character in paramenters :参数中有不适当的字符Bad file name format in include directive :包含命令中文件名格式不正确Bad ifdef directive synatax :编译预处理ifdef有语法错Bad undef directive syntax :编译预处理undef有语法错Bit field too large :位字段太长Call of non-function :调用未定义的函数Call to function with no prototype :调用函数时没有函数的说明Cannot modify a const object :不允许修改常量对象Case outside of switch: 漏掉了case 语句Case syntax error :Case 语法错误Code has no effect 代码不可述不可能执行到Compound statement missing{ 分程序漏掉"{"Conflicting type modifiers 不明确的类型说明符Constant expression required 要求常量表达式Constant out of range in comparison 在比较中常量超出范围Conversion may lose significant digits 转换时会丢失意义的数字Conversion of near pointer not allowed 不允许转换近指针Could not find file ’xxx’ 找不到XXX文件Declaration missing ; 说明缺少";"Declaration syntax error 说明中出现语法错误Default outside of switch Default 出现在switch语句之外Define directive needs an identifier 定义编译预处理需要标识符Division by zero 用零作除数Do statement must have while Do-while语句中缺少while部分Enum syntax error 枚举类型语法错误Enumeration constant syntax error 枚举常数语法错误Error directive :xxx 错误的编译预处理命令Error writing output file 写输出文件错误Expression syntax error 表达式语法错误Extra parameter in call 调用时出现多余错误File name too long 文件名太长Function call missing ) 函数调用缺少右括号Fuction definition out of place 函数定义位置错误Fuction should return a value 函数必需返回一个值Goto statement missing label Goto语句没有标号Hexadecimal or octal constant too large 16进制或8进制常数太大Illegal character ’x’ 非法字符xIllegal initialization 非法的初始化Illegal octal digit 非法的8进制数字Illegal pointer subtraction 非法的指针相减Illegal structure operation 非法的结构体操作Illegal use of floating point 非法的浮点运算Illegal use of pointer 指针使用非法Improper use of a typedefsymbol 类型定义符号使用不恰当In-line assembly not allowed 不允许使用行间汇编Incompatible storage class 存储类别不相容Incompatible type conversion 不相容的类型转换Incorrect number format 错误的数据格式Incorrect use of default Default使用不当Invalid indirection 无效的间接运算Invalid pointer addition 指针相加无效Irreducible expression tree 无法执行的表达式运算Lvalue required 需要逻辑值0或非0值Macro argument syntax error 宏参数语法错误Macro expansion too long 宏的扩展以后太长Mismatched number of parameters in definition 定义中参数个数不匹配Misplaced break 此处不应出现break语句Misplaced continue 此处不应出现continue语句Misplaced decimal point 此处不应出现小数点Misplaced elif directive 不应编译预处理elif Misplaced else 此处不应出现elseMisplaced else directive 此处不应出现编译预处理else Misplaced endif directive 此处不应出现编译预处理endif Must be addressable 必须是可以编址的Must take address of memory location 必须存储定位的地址No declaration for function ’xxx’ 没有函数xxx的说明No stack 缺少堆栈No type information 没有类型信息Non-portable pointer assignment 不可移动的指针(地址常数)赋值Non-portable pointer comparison 不可移动的指针(地址常数)比较Non-portable pointer conversion 不可移动的指针(地址常数)转换Not a valid expression format type 不合法的表达式格式Not an allowed type 不允许使用的类型Numeric constant too large 数值常太大Out of memory 内存不够用Parameter ’xxx’ is never used 能数xxx没有用到Pointer required on left side of -> 符号->的左边必须是指针Possible use of ’xxx’ before definition 在定义之前就使用了xxx(警告)Possibly incorrect assignment 赋值可能不正确Redeclaration of ’xxx’ 重复定义了xxx Redefinition of ’xxx’ is not identical x xx的两次定义不一致Register allocation failure 寄存器定址失败Repeat count needs an lvalue 重复计数需要逻辑值Size of structure or array not known 结构体或数给大小不确定Statement missing ; 语句后缺少";"Structure or union syntax error 结构体或联合体语法错误Structure size too large 结构体尺寸太大Sub scripting missing ] 下标缺少右方括号Superfluous & with function or array 函数或数组中有多余的"&"Suspicious pointer conversion 可疑的指针转换Symbol limit exceeded 符号超限Too few parameters in call 函数调用时的实参少于函数的参数Too many default cases Default太多(switch语句中一个)Too many error or warning messages 错误或警告信息太多Too many type in declaration 说明中类型太多Too much auto memory in function 函数用到的局部存储太多Too much global data defined in file 文件中全局数据太多Two consecutive dots 两个连续的句点Type mismatch in parameter xxx 参数xxx类型不匹配Type mismatch in redeclaration of ’xxx’ xxx重定义的类型不匹配Unable to create output file ’xxx’ 无法建立输出文件xxx Unable to open include file ’xxx’ 无法打开被包含的文件xxx Unable to open input file ’xxx’ 无法打开输入文件xxx Undefined label ’xxx’ 没有定义的标号xxx Undefined structure ’xxx’ 没有定义的结构xxx Undefined symbol ’xxx’ 没有定义的符号xxx Unexpected end of file in comment started on line xxx 从xxx行开始的注解尚未结束文件不能结束Unexpected end of file in conditional started on line xxx 从xxx 开始的条件语句尚未结束文件不能结束Unknown assemble instruction 未知的汇编结构Unknown option 未知的操作Unknown preprocessor directive: ’xxx’ 不认识的预处理命令xxx Unreachable code 无路可达的代码Unterminated string or character constant 字符串缺少引号User break 用户强行中断了程序Void functions may not return a value Void类型的函数不应有返回值Wrong number of arguments :调用函数的参数数目错‘xxx’ not an argument :xxx不是参数‘xxx’ not part o f struc ture xxx不是结构体的一部分xxx statement missing ( xxx语句缺少左括号xxx statement missing ) xxx语句缺少右括号xxx statement missing ; xxx缺少分号xxx’ declared but never used 说明了xxx但没有使用xxx’ is assigned a value which is never used 给xxx赋了值但未用过。
翻译伦理
• The essence of translation is to be an opening, a dialogue, a cross-breeding,a decentering. • The original text and the difference of language and culture should be respected and accordingly, the objective of the ethics of translation is to enrich Self by introducing Other. (Antoine Berman)
• 1984年初,在一个有关哲学问题的国际学 术研讨会上,贝尔曼对长期统治西方翻译 界的以“意义的传达”为中心的翻译思想 展开批判,主张将为一 种“我族中心主义”的倾向,只注重对出 发语文本中意义的传达,而对“文字”却 漠不关心。
• The Translator's Invisibilty traces the histor y of translation from the seventeenth centu ry to the present day. It shows how fluency prevailed over other translation strategies to shape the canon of foreign literatures in English, and investigates the cultural cons equences of the domestic values which we re simultaneously inscribed and masked in foreign texts during this period.
GBase-8s数据库平台PLSQL语法手册-D
1.2.8.初始化为空值的变量................................................................................-10-
1.2.3.常量和变量的初始化..................................................................................-7-
1.2.4.使用NOTNULL............................................................................................-8-
1.7.5.比较运算符................................................................................................-32-
1.7.6.布尔表达式................................................................................................-35-
1.6.2.用SELECTINTO语句给变量赋值.............................................................-21-
1.6.3.INOUT子程序参数给变量赋值...............................................................-21-
java constraintviolation 用法
java constraintviolation 用法在Java中,ConstraintViolation通常与Bean Validation API(例如,Hibernate Validator)一起使用,该API用于验证对象是否满足一组约束条件。
当对象不满足这些约束时,将生成ConstraintViolation 对象,表示违反的约束。
以下是如何使用ConstraintViolation的基本步骤:1. 定义实体或DTO:首先,您需要定义一个实体或DTO,并使用注解来指定其属性上的约束。
java复制代码:public class User {@NotNull@Size(min = 1, max = 100)private String name;@NotNull@Emailprivate String email;// getters and setters}2. 创建Validator:使用Validation.buildDefaultValidatorFactory()来创建一个Validator实例。
java复制代码:Validator validator = Validation.buildDefaultValidatorFactory().getValidator();3. 验证对象:使用validator.validate()方法来验证对象。
如果对象违反任何约束,此方法将返回一个ConstraintViolation<T>的Set。
java复制代码:User user = new User();user.setName("John");// user.setEmail("not an email"); // comment this out to see a violationSet<ConstraintViolation<User>> violations = validator.validate(user);4. 处理ConstraintViolations:检查返回的ConstraintViolation集合,并对每个违规进行处理。
dyna 荷载
Solver Description
Supported Parameters
HyperMesh Notes
*BOUNDARY_
CONVECTION_SET
Define convection boundary conditions for a thermal or coupled thermal/structural analysis. Two cards are defined for each option.
*DEFINE_CURVE_
FEEDBACK
Define information that is used as the solution evolves to scale the ordinate values of the specified load curve ID.
*DEFORMABLE_TO_RIGID
*LOAD_BODY_X
Define body force loads due to a prescribed base acceleration using global axes directions
Card 39
Activate theproperoption and enter the data. Only the first card defined is valid for Structured.
*INTERFACE_
SPRINGBACK_LSDYNA_
THICKNESS
*INTERFACE_
SPRINGBACK_NASTRAN_
NOTHICKNESS
*INTERFACE_
SPRINGBACK_NASTRAN_
Principles of Knowledge Representation and Reasoning
designed speci cally for automation, Fitting 1983] has developed a related approach based on deductive tableaux. This leads one to wonder whether there are any methods for systematically constructing modal deduction systems from non-modal systems, whether an understanding of the modal systems can be obtained from an understanding of the original non-modal systems, and whether there is a common set of principles underlying systems constructed in this manner. This paper presents a framework for the systematic design of modal deduction systems that allows us to respond a rmatively to each of the above questions. The framework achieves signi cant generality in that it provides for the extension of a wide range of nonmodal deduction systems to corresponding deduction systems for a wide range of modal logics. Along with this transformation of the deductive rules, the proofs of completeness of the original deductive system are transformed into a proof of completeness of the new deductive system. The resulting description and proof of correctness of the new system is relatively simple because it draws upon the general principles of the framework. The framework enables us to provide a proof of completeness of a deductive method, based upon resolution and paramodulation, for modal logics with equality. Most of the features of most of the members of the class of methods mentioned above can be recast into this framework. Those aspects of the methods that can not be so reconstructed serve to delimit the domain of applicability of the framework. A deeper understanding of how this class of related approaches work has been achieved. Very roughly stated, our method works as follows: We start with a set of modal sentences on which the deduction is to be performed. These sentences are translated into non-modal sentences that contain K-atoms, atoms whose predicate symbol represents the accessibility relation between possible worlds. In the case of varying domain modal logics, E-atoms, atoms whose predicate symbol denotes the existence
MQL4程序的常见错误以及如何避免它们
MQL4程序的常见错误以及如何避免它们介绍一些较旧的程序可能在新版本的MQL4编译器中返回错误。
为了避免关键的程序完成,以前版本的编译器在运行环境中处理了许多错误。
例如,除数为零或数组越界都是严重错误,并通常会导致应用程序崩溃。
这些错误只在一些状态下针对某些变量值而发生。
阅读这篇文章了解如何处理这样的情况。
新的编译器可以检测实际或潜在的错误源并提高代码质量。
在这篇文章中,我们讨论了旧程序编译过程中检测到的可能出现的错误,以及解决这些问题的方法。
1.编译错误2.▪ 1.1. 与关键字一致的标识▪ 1.2. 变量和函数名的特殊字符▪ 1.3. 使用switch操作符的错误▪ 1.4. 函数返回值▪ 1.5. 函数参数数组3.运行时间错误4.▪ 2.1. 数组越界▪ 2.2. 除数为零▪ 2.3. 当前字符用0替代NULL▪ 2.4. Unicode格式字符串和它们在DLL中的使用▪ 2.5. 文件共享▪ 2.6. 日期时间转换5.编译器警告▪ 3.1. 全局和局部变量名称一致▪ 3.2. 类型不匹配▪ 3.3. 未使用的变量1编译错误如果程序代码中包含错误,则它不能被编译。
要完全控制所有的错误,建议使用严谨的编译模式,它通过以下指令来设置:这种模式大大简化了故障排除。
1.1. 与关键字一致的标识编译器会返回一个错误信息:图1. 错误“unexpected token(非预期标记)”和“name expected(预期名称)”要解决这个错误,您需要使用变量或函数的正确名称。
1.2. 变量和函数名的特殊字符如果变量或函数名称中包含特殊字符($,@,点):编译器会返回一个错误信息:图 2. 错误“unknown symbol(未知交易品种)”与“semicolon expected(预期分号)”要解决这个错误,您需要使用正确的函数或变量名。
1.3. 使用switch操作符的错误在旧版本的编译器中,您可以在switch操作符的表达式和常量中使用任何值:在新的编译器中,switch操作符的常量和表达式必须是整数,所以当您尝试使用这样的结构时会发生错误:图3. 错误“illegal switch expression type(非法switch表达式类型)”和“constant expression is not integral(常量表??达式不是整数)”在这种情况下,您可以使用明确的数值比较,例如:1.4. 函数返回值除了空值外的所有函数都应该返回声明的类型值。
UVM1.1应用指南及源代码分析_20111211版
6.2. 强大的config .............................................................................................94
6.3. 聚合config变量 .........................................................................................98
写这本书,只是想把自己会的一点东西完全的落于纸上。在努力学习 UVM 的 过程中,自己花费了很多时间和精力。我只想把学习的心得记录下来,希望能够给 后来的人以启发。如果这本书能够给一个人带来一点点的帮助,那么我的努力就不 算是白费。
这本书的前半部分(第 1 到第 9 章)介绍了 UVM 的使用,其用户群较为广泛;
8.2. 搭建一个简单的register model...............................................................129
8.3. 复杂的register model...............................................................................137
函数索引609xvi图目录图11uvm在数字电路设计中的位置3图12uvm对systemverilog的封装4图13简单验证平台5图14uvm验证平台的树形结构6图15实际验证平台7图16packbytes和unpackbytes14图17uvm验证平台中的agent181图21完整的uvm树35图22uvm中常用类的继承关系37图31uvm中的常用phase47图32uvm中所有的phase50图33两个driver位于同一domain57图34两个driver位于不同的domain58图41穿梭的transaction60图51defaultsequence的设置与启动77图52sequencer与driver之间的通信80图53virtualsequence的使用85图61半全局变量93图71monitor与scoreboard的通信104图72使用public成员变量实现通信105图73put操作106图74get操作106xvii图75transport操作107图76component在端口通信中的作用109图77connect关系的建立110图78port与imp的连接111图79portexport与imp的连接115图710使用fifo连接component122图81uvmregfield和uvmreg126图82使用registermodel读取寄存器的流程128图83uvmregfield
C编译器错误信息中文翻译
I.Compiling ——compile 编译II.fatal error ——重大错误III.Error executing ——执行错误IV.syntax error ——语法错误1.Expression syntax error ——表达式语法错误2.Declaration syntax error ——声明中出现语法错误3.Compound statement missing{ ——复合语句漏掉"{"4.Illegal character ``x`` ——非法字符x5.undeclared identifier ——未定义的标识符6.redeclaration of ``xxx`` ——重复定义了xxx7.Declaration missing ; ——声明缺少";"8.Cannot open include file: 'iostram.h': No such file or directory ——打不开包含文件'iostram.h':没有这个文件或者路径错误9.Could not find file ``xxx`` ——找不到XXX文件10.missing ';' before identifier 'cout' ——在标识符'cout' 之前缺少';'11.unexpected end of file found ——找不到文件结束12.unresolved external symbol _main ——缺少主函数main13.missing ')' before '{' ——在'{' 之前缺少')'14.Call to function with no prototype ——调用函数时没有声明函数15.Call of non-function ——调用未定义的函数16.Function should return a value ——函数必需返回一个值17.Type mismatch in parameter xxx ——参数xxx类型不匹配18.Do statement must have while ——Do-while语句中缺少while部分19.Argument list syntax error ——参数表语法错误20.Division by zero ——用零作除数21.Array size toolarge ——数组尺寸太大22.Case outside of switch ——漏掉了case 语句23.Misplaced break ——此处不应出现break语句24.Code has no effect ——代码执行不到25.Constant expression required ——要求常量表达式26.Constant out of range in comparison ——在比较中常量超出范围27.writing output file ——写输出文件错误28.Unable to create output file ``xxx`` ——无法建立输出文件xxx 29.Illegal initialization ——非法的初始化30.Illegal use of floating point ——非法的浮点运算31.Illegal use of pointer ——指针使用非法32.Incompatible type conversion ——不相容的类型转换33.Lvalue required ——需要逻辑值0或非0值34.Macro argument syntax error ——宏参数语法错误35.Mismatched number of parameters in definition ——定义中参数个数不匹配36.Bad character in paramenters ——参数中有不适当的字符37.Bad file name format in include directive ——包含命令中文件名格式不正确38.Conversion may lose significant digits ——转换时会丢失意义的数字39.Out of memory ——内存不够用40.Parameter ``xxx`` is never used ——参数xxx没有用到41.``x xx`` is assigned a value which is never used ——xxx定义了但没有使用42.Possible use of ``xxx`` before definition ——在定义之前就使用了xxx(警告)43.Possibly incorrect assignment ——赋值可能不正确Ambiguous operators need parentheses -----------不明确的运算需要用括号括起Ambiguous symbol ''xxx'' ----------------不明确的符号Argument list syntax error ----------------参数表语法错误Array bounds missing ------------------丢失数组界限符Array size toolarge -----------------数组尺寸太大Bad character in paramenters ------------------参数中有不适当的字符Bad file name format in include directive --------------------包含命令中文件名格式不正确Bad ifdef directive synatax ------------------------------编译预处理ifdef有语法错Bad undef directive syntax ---------------------------编译预处理undef有语法错Bit field too large ----------------位字段太长Call of non-function -----------------调用未定义的函数Call to function with no prototype ---------------调用函数时没有函数的说明Cannot modify a const object ---------------不允许修改常量对象Case outside of switch ----------------漏掉了case 语句Case syntax error ------------------ Case 语法错误Code has no effect -----------------代码不可述不可能执行到Compound statement missing{ --------------------分程序漏掉"{"Conflicting type modifiers ------------------不明确的类型说明符Constant expression required ----------------要求常量表达式Constant out of range in comparison -----------------在比较中常量超出范围Conversion may lose significant digits -----------------转换时会丢失意义的数字Conversion of near pointer not allowed -----------------不允许转换近指针Could not find file ''xxx'' -----------------------找不到XXX文件Declaration missing ; ----------------说明缺少";" houjiumingDeclaration syntax error -----------------说明中出现语法错误Default outside of switch ------------------ Default 出现在switch语句之外Define directive needs an identifier ------------------定义编译预处理需要标识符Division by zero ------------------用零作除数Do statement must have while ------------------ Do-while语句中缺少while部分Enum syntax error ---------------------枚举类型语法错误Enumeration constant syntax error -----------------枚举常数语法错误Error directive :xxx ------------------------错误的编译预处理命令Error writing output file ---------------------写输出文件错误Expression syntax error -----------------------表达式语法错误Extra parameter in call ------------------------调用时出现多余错误File name too long ----------------文件名太长Function call missing -----------------函数调用缺少右括号Fuction definition out of place ------------------函数定义位置错误Fuction should return a value ------------------函数必需返回一个值Goto statement missing label ------------------ Goto语句没有标号Hexadecimal or octal constant too large ------------------16进制或8进制常数太大Illegal character ''x'' ------------------非法字符xIllegal initialization ------------------非法的初始化Illegal octal digit ------------------非法的8进制数字houjiumingIllegal pointer subtraction ------------------非法的指针相减Illegal structure operation ------------------非法的结构体操作Illegal use of floating point -----------------非法的浮点运算Illegal use of pointer --------------------指针使用非法Improper use of a typedefsymbol ----------------类型定义符号使用不恰当In-line assembly not allowed -----------------不允许使用行间汇编Incompatible storage class -----------------存储类别不相容Incompatible type conversion --------------------不相容的类型转换Incorrect number format -----------------------错误的数据格式Incorrect use of default --------------------- Default使用不当Invalid indirection ---------------------无效的间接运算Invalid pointer addition ------------------指针相加无效Irreducible expression tree -----------------------无法执行的表达式运算Lvalue required ---------------------------需要逻辑值0或非0值Macro argument syntax error -------------------宏参数语法错误Macro expansion too long ----------------------宏的扩展以后太长Mismatched number of parameters in definition ---------------------定义中参数个数不匹配Misplaced break ---------------------此处不应出现break语句Misplaced continue ------------------------此处不应出现continue语句Misplaced decimal point --------------------此处不应出现小数点Misplaced elif directive --------------------不应编译预处理elifMisplaced else ----------------------此处不应出现else houjiumingMisplaced else directive ------------------此处不应出现编译预处理else Misplaced endif directive -------------------此处不应出现编译预处理endifMust be addressable ----------------------必须是可以编址的Must take address of memory location ------------------必须存储定位的地址No declaration for function ''xxx'' -------------------没有函数xxx的说明No stack ---------------缺少堆栈No type information ------------------没有类型信息Non-portable pointer assignment --------------------不可移动的指针(地址常数)赋值Non-portable pointer comparison --------------------不可移动的指针(地址常数)比较Non-portable pointer conversion ----------------------不可移动的指针(地址常数)转换Not a valid expression format type ---------------------不合法的表达式格式Not an allowed type ---------------------不允许使用的类型Numeric constant too large -------------------数值常太大Out of memory -------------------内存不够用houjiumingParameter ''xxx'' is never used ------------------能数xxx没有用到Pointer required on left side of -> -----------------------符号->的左边必须是指针Possible use of ''xxx'' before definition -------------------在定义之前就使用了xxx(警告)Possibly incorrect assignment ----------------赋值可能不正确Redeclaration of ''xxx'' -------------------重复定义了xxxRedefinition of ''xxx'' is not identical ------------------- xxx的两次定义不一致Register allocation failure ------------------寄存器定址失败Repeat count needs an lvalue ------------------重复计数需要逻辑值Size of structure or array not known ------------------结构体或数给大小不确定Statement missing ; ------------------语句后缺少";"Structure or union syntax error --------------结构体或联合体语法错误Structure size too large ----------------结构体尺寸太大Sub scripting missing ] ----------------下标缺少右方括号Superfluous & with function or array ------------------函数或数组中有多余的"&" Suspicious pointer conversion ---------------------可疑的指针转换Symbol limit exceeded ---------------符号超限Too few parameters in call -----------------函数调用时的实参少于函数的参数不Too many default cases ------------------- Default太多(switch语句中一个)Too many error or warning messages --------------------错误或警告信息太多Too many type in declaration -----------------说明中类型太多houjiumingToo much auto memory in function -----------------函数用到的局部存储太多Too much global data defined in file ------------------文件中全局数据太多Two consecutive dots -----------------两个连续的句点Type mismatch in parameter xxx ----------------参数xxx类型不匹配Type mismatch in redeclaration of ''xxx'' ---------------- xxx重定义的类型不匹配Unable to create output file ''xxx'' ----------------无法建立输出文件xxx Unable to open include file ''xxx'' ---------------无法打开被包含的文件xxx Unable to open input file ''xxx'' ----------------无法打开输入文件xxx Undefined label ''xxx'' -------------------没有定义的标号xxxUndefined structure ''xxx'' -----------------没有定义的结构xxxUndefined symbol ''xxx'' -----------------没有定义的符号xxxUnexpected end of file in comment started on line xxx ----------从xxx行开始的注解尚未结束文件不能结束Unexpected end of file in conditional started on line xxx ----从xxx 开始的条件语句尚未结束文件不能结束Unknown assemble instruction ----------------未知的汇编结构houjiumingUnknown option ---------------未知的操作Unknown preprocessor directive: ''xxx'' -----------------不认识的预处理命令xxx Unreachable code ------------------无路可达的代码Unterminated string or character constant -----------------字符串缺少引号User break ----------------用户强行中断了程序Void functions may not return a value ----------------- Void类型的函数不应有返回值Wrong number of arguments -----------------调用函数的参数数目错''xxx'' not an argument ----------------- xxx不是参数''xxx'' not part of structure -------------------- xxx不是结构体的一部分xxx statement missing ( -------------------- xxx语句缺少左括号xxx statement missing ) ------------------ xxx语句缺少右括号xxx statement missing ; -------------------- xxx缺少分号houjiumingxxx'' declared but never used -------------------说明了xxx但没有使用xxx'' is assigned a value which is never used ----------------------给xxx赋了值但未用过Zero length structure ------------------结构体的长度为零。
deserializeobject转jobject
deserializeobject转jobject [deserializeObject转jobject]在计算机编程中,数据的序列化是将数据结构或对象转化为可存储或传输的格式的过程。
而反序列化则是将序列化后的数据重新还原成原始的数据结构或对象。
在许多编程语言中,包括Java和C#等,都提供了相应的序列化和反序列化的功能。
在这篇文章中,我们将重点讨论Java中的deserializeObject 转jobject的过程。
第一步:了解序列化和反序列化的概念在开始具体讨论deserializeObject转jobject之前,我们首先需要了解什么是序列化和反序列化。
序列化是将对象转化为字节流的过程,而反序列化则是将字节流还原为原始对象的过程。
在Java中,序列化和反序列化是通过Java对象流实现的。
序列化对象需要实现Serializable接口,该接口没有任何方法,只是一个标志接口,用于表示该对象是可序列化的。
第二步:使用Gson库进行反序列化在Java中,可以使用多种方式进行反序列化操作。
其中一种常用的方式是使用Gson库,它是Google开发的一个将Java对象转化为JSON格式的库。
首先,我们需要添加Gson库的依赖。
可以通过Maven或Gradle将其添加到项目中。
接下来,我们需要创建一个Gson对象,该对象将用于执行反序列化操作。
可以使用以下代码创建一个Gson对象:Gson gson = new Gson();然后,我们可以使用gson对象的fromJson方法将JSON格式的字符串转化为Java对象。
如下所示:String jsonString = "{\"name\":\"Alice\",\"age\":25}";Person person = gson.fromJson(jsonString, Person.class);上述代码中,我们创建了一个包含name和age属性的JSON字符串。
语言语境与非语言语境对翻译的影响
RestrictionandInfluenceofContcxtua}FactorsOBTranslationPartI.IntroductionContextreferstotheenvironmentinwhichlanguageisused.Specificcontextcaninfluencetheconveyanceofmeaningofwords,sentences,paragraphsandeventextsintheparticularlanguageenvironment,Becauseofdifferentunderstandingsofthecontextualconnotation,manylinguistsstillcannotreachtheagreementonitsdefinition,elements,classification,andfunctions.Inthisthesis,onthebasisoftheachievementsoftheSCholars,theauthortries韬providethedefinition,function,elements,andclassificationofcontextfromanewperspective.1·Translationistofindthecounterpartofthesourcelanguageinthetargetlanguage,whichistheinter-linguistictransferofinformation。
Contextplaysavitalroleintranslationbecausenotonlycorrectunderstandingoftheoriginalisdeterminedbycontextbutalsoaccurateexpressionofthesourcelanguagedependsonthecontext。
glslang用法 -回复
glslang用法-回复GLSLang是一种用于编写着色器程序的编程语言,它为图形渲染管线中的各个阶段提供了编程接口。
本文将详细介绍GLSLang的用法,以帮助读者了解如何使用GLSLang编写高效的着色器程序。
第一步:了解GLSLang的背景和基本概念(200字)在介绍GLSLang的用法之前,让我们先来了解一下它的背景和基本概念。
GLSLang是OpenGL Shading Language(GLSL)的一个方言,它用于编写图形渲染管线中的着色器程序。
着色器是一种程序,用来定义如何计算图元(点、线、三角形等)的颜色和其他属性,从而实现图形渲染。
GLSLang是一种基于C语言的语言,它为图形渲染管线中的各个阶段(如顶点着色器、片段着色器等)提供了编程接口。
GLSLang使用一种类似于C语言的语法,并提供了一套丰富的内建函数和变量,方便程序员进行图形计算和操作。
第二步:安装GLSLang编译器和开发环境(200字)在开始使用GLSLang之前,我们需要安装GLSLang编译器和相关的开发环境。
GLSLang编译器是将GLSLang代码翻译成底层图形API调用的工具,我们可以在官方网站上下载并安装最新版本的GLSLang编译器。
另外,为了编写和调试GLSLang代码,我们还需要一个集成开发环境(IDE)或代码编辑器。
常见的IDE和代码编辑器如Visual Studio Code、Eclipse、Xcode等,你可以根据自己的喜好选择合适的工具。
第三步:学习GLSLang的基本语法和语义(300字)在开始编写GLSLang代码之前,我们需要先了解它的基本语法和语义。
GLSLang的语法类似于C语言,包括变量的声明和赋值、控制流语句(如if-else、for循环)、函数定义等。
另外,GLSLang还有一些特殊的语义,主要是为了实现图形渲染的需求而设计的。
例如,通过使用关键字in和out,我们可以在不同的阶段传递数据。
五言绝句英语
五言绝句英语The beauty of five-character ancient-style verse in English lies in its conciseness yet profound expression The form originated in classical Chinese poetry where each line consists of exactly five characters or words This constraint forces the poet to carefully select each word to convey the intended meaning and emotion within the limited space The result is a compact yet impactful verse that resonates with the reader on a deeper levelTranslating this ancient poetic form into English presents unique challenges The fundamental differences between the two languages in terms of grammar structure word order and syllabic patterns make a direct translation nearly impossible Instead the essence of five-character verse must be reimagined and recreated in the English language While the format may not be identical the core elements of brevity imagery and emotional resonance can be preservedOne of the key aspects of five-character verse is the use of concise language to evoke vivid imagery The poet must paint a complete picture using the barest minimum of words Each character or wordcarries immense weight and significance contributing to the overall impression conveyed to the reader In the original Chinese the words are meticulously chosen for their precise meanings and subtle connotations to maximize the impact within the five-character constraintReplicating this in English requires a deep understanding of the language and a keen eye for word choice An English five-character verse must select words that not only fit the structure but also work in harmony to create a cohesive and evocative image Consider the following exampleAutumn winds whisperCrimson leaves gently fallWinter's chill approachesIn just fifteen words this verse encapsulates the transition from fall to winter The use of concise yet descriptive language paints a vivid mental picture for the reader The words autumn winds whisper convey a sense of movement and change while crimson leaves gently fall evokes a serene natural scene Finally the simple statement winter's chill approaches foreshadows the impending seasonal shiftThe emotional resonance of five-character verse is another crucial element that must be captured in the English translation Thecompact format forces the poet to distill complex feelings and experiences into a few carefully chosen words This condensed expression can often feel more impactful and profound than lengthy descriptionsAn English five-character verse that exemplifies this emotional depth could beLonely heart yearnsFor a love long since lostSorrow echoes onThis verse communicates a profound sense of grief and longing in just three lines The words lonely heart yearns establish the emotional state of the speaker while for a love long since lost provides the context for their sorrow Finally the simple statement sorrow echoes on conveys the lingering pain and melancholy that persistsOf course crafting effective five-character verse in English is no easy feat The poet must possess a masterful command of the language an eye for imagery and a keen understanding of human emotion Endless permutations and variations are possible within the constraints of the form allowing for a diverse range of themes and styles to be exploredSome five-character verses may take on a more philosophical or reflective tone pondering the mysteries of the human experience or the natural world Others may capture a fleeting moment in time a snapshot of beauty or a glimpse of the sublime The possibilities are endless as the poet seeks to distill complex ideas and emotions into their purest most essential formUltimately the beauty of five-character verse in English lies in its ability to transcend the limitations of language and connect with the reader on a deeper level Through the careful selection of words the poet is able to evoke powerful emotions and paint vivid mental landscapes that linger long after the verse has been read The conciseness of the form forces the reader to slow down and savor each word to uncover the layers of meaning and significance beneath the surfaceIn a world that often values verbosity and complexity the five-character verse in English stands as a testament to the power of simplicity and restraint By stripping away the unnecessary and focusing on the essential the poet is able to create works of art that are simultaneously elegant economical and profoundly moving It is a form that challenges the reader to engage actively with the text to fill in the gaps with their own experiences and interpretationsAs the English-speaking world continues to explore and experimentwith this ancient poetic form the possibilities for innovation and creativity are endless The five-character verse may have originated in classical Chinese literature but in the hands of skilled modern poets it can transcend cultural boundaries and speak to the universal human experience With each new iteration the form evolves and transforms growing ever more vibrant and resonantIn the end the true beauty of five-character verse in English lies not in its adherence to a specific structural formula but in its ability to capture the essence of the human condition in the simplest of terms It is a testament to the power of language to distill complex emotions into their purest form and to connect us to the deepest parts of ourselves and our shared experiences As the form continues to evolve and inspire new generations of poets the five-character verse will undoubtedly remain a cherished and enduring part of the literary landscape。
分享fortunately
Postscri ptbythe Translat orPostscript by the TranslatorIn 2003, Mainland China acquired the rights of 12,516 books from overseas publishers and licensed the rights of 811 Chinese books to overseas publishers, with an inbound-outbound ratio of 15.4:1.1Since Mainland China published 110,812 new books in 2003, one out of every nine new books published in Mainland China was introduced from overseas while less then 1% of new books published in Mainland China were available in any foreign language. While an overwhelming majority of acquired titles are in English, an overwhelming majority of Chinese titles are licensed to non-English-speaking regions such as Hong Kong, Taiwan, Singapore, Malaysia, Japan and South Korea. Therefore, for every 100 English books translated into Chinese, less than one Chinese book was translated into English. This imbalance is especially drastic between China and the U.S. so that Mr. Xin Guangwei of the General Administration of Press and Publication of the PRC commented that “In sharp contrast to China’s substantial rights acquisitions from the U.S., America’s licensing from China is pathetically minimal.”2Since most Chinese books introduced to foreign readers are in the fields of traditional Chinese medicine, arts, culture and language, only a very limited number of Chinese books about contemporary China, especially about its economy and businesses, have been translated into English.This huge imbalance can be partially attributed to the insufficient number of Chinese books published in economics and business, especially high-quality ones. Only a few excellent books on China’s reform have been published in Chinese up to this moment, with Professor Wu Jinglian’s Economic Reform in Contemporary China (Dangdai Zhongguo jingji gaige) being the most prominent one. This huge imbalance can also be attributed to the language barrier because thousands of Chinese terms about reform have been created in the past half century without their counterparts in any other language. In the process of translating this book, about 3,000 special terms and phrases were identified, including more than 1,000 with a Chinese origin, many of which hadnever been translated into any other language. The language barrier is in turn partially caused by the ideological constraint. For example, since hiring workers by private business owners was considered committing the crime of exploitation by fundamentalists, when the Chinese government partially lifted the ban on private businesses in the early 1980s, it artificially divided private businesses into individual businesses (geti qiye) hiring seven or less workers each and private enterprises (siying qiye) hiring eight or more workers each and gave the green light only to the former.The translation of this book is a Herculean task beyond the capacity of any single person, especially someone with an extremely tight teaching and administration schedule like me at the China Europe International Business School (CEIBS). Fortunately, many people lent helpful hands. Dr. Zhou Xuelin of CEIBS Translation and Publication Department, Dr. Liu Shengjun and Dr. Chen Junsong of CEIBS Case Development Center, and Ms. Ma Xiaoying and Ms. Yan Xiaoyun of Donghua University each reviewed a part of an early draft. Mr. Du Qian of CEIBS Translation and Publication Department, Ms. Xu Po of CEIBS Case Development Center, and Mr. Shen Baoshun and Ms. Hu Min of CEIBS Library helped check hundreds of quotes and references. The contribution of Dr. Zhang Chunlin of the World Bank Office Beijing deserve special acknowledgement because he reviewed all twelve chapters of the early draft. Special thanks also go to editors of Thomson Leaning for their professional expertise and advice on how to make this book more readable for an audience outside China. Of course, all remaining mistakes, if any, are my responsibility.While some people in North America and Western Europe complain bitterly how imbalanced their trade with China is, they often ignore the fact that there is a huge imbalance between China and Western countries in terms of knowledge about the other party. This imbalance causes difficulties and losses for both China and Western countries, more for the latter than the former in my opinion. Therefore, effort to deepen Western countries’ understanding of China brings benefits to both sides. I believe that the publication of the English version of this book by the most authoritative scholar on China’s economic reform is a significant contribution to this effort.In the twenty-first century, China is too important to be ignored or misunderstood.Wang JianmaoProfessor of EconomicsAcademic Director of MBA ProgramDirector of Case Development CenterChina Europe International Business School (CEIBS)整理丨尼克本文档信息来自于网络,如您发现内容不准确或不完善,欢迎您联系我修正;如您发现内容涉嫌侵权,请与我们联系,我们将按照相关法律规定及时处理。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Translating the Object Constraint Language into the JavaModelling LanguageAli HamieSchool of Computing, Mathematical and Information SciencesUniversity of BrightonBrighton, UKa.a.hamie@ABSTRACTThe Object Constraint Language OCL is a textual specification language that could be used for constraining the modelling elements that occur in UML diagrams. Typical constraints include class invariants and preconditions and postconditions of operations. The Java Modelling Language (JML) is a behavioural interface specification language designed for specifying Java classes and interfaces. This paper defines a translation of OCL expressions and constraints into the Java Modelling Language. The objective of this translation is to be able to map UML object-oriented designs with OCL constraints to Java classes and interfaces annotated with JML specifications, and to carry out logical reasoning about such classes and interfaces using JML tools which include a run time assertion checker and an interactive prover based on PVS.KeywordsOCL, JML, UML, constraints, reasoning1.INTRODUCTIONThe Unified Modelling Language UML [11][12] is widely accepted as the standard for object-oriented modelling and is supported by a number of CASE tools. The Object Constraint Language OCL [10][14] is a part of UML, and was introduced to express additional constraints on object-oriented models that diagrams cannot convey by themselves. The type of constraints that can be expressed using OCL include invariants on classes and types, preconditions and postconditions of operations.Java [1] is a popular and widely used programming language. The Java Modelling Language JML [6][7] is a specification language specifically developed to specify Java classes and interfaces. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage, and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee.SAC’04, March 14-17, 2004, Nicosia, CyprusCopyright 2004 ACM 1-58113-812-1/03/04...$5.00.The constraints that can be expressed and specified include invariants of classes and interfaces, and preconditions and postconditions of methods. The assertion language of JML is based on Java expressions following the lead of Eiffel [9]. In addition JML supports various constructs and operators such as universal and existential quantifications that are essential for greater expressiveness. The approach of JML is model based like VDM [5] and Z [13] which means that JML specifications can be expressed abstractly in terms of mathematical models such as sets, bags and sequences. JML also provides a library of model types (sets, bags, etc.) to be used in specifications defined as pure Java classes. The advantage of this approach is that the same notation (in this case Java) which will be familiar to object-oriented programmers is used throughout the specification. JML also supports specification only variables (or fields) which is necessary for complete and expressive specifications. In addition, JML specifications allow frame conditions to be expressed and specified [2]. A number of tools [8] that manipulate and check JML specifications are available including a runtime assertion checker [3].This paper presents a translation of OCL expressions and constraints into JML. This translation could be used for mapping object-oriented design models expressed in UML and OCL to Java classes and interfaces annotated with JML specifications. JML is specifically designed for specifying Java programs whereas OCL is not specific to any one programming language. For this reason JML is better suited for specifying the detailed design of a Java program than a generic language like OCL. In the development of a Java application using UML/OCL, one can use the translation so that JML is used for the specification of object constraints in the later stages of the development. The benefits of this include the use of a wide range of tools that support JML for reasoning about specifications, and for the testing and verification of programs. The mapping could also be incorporated within CASE tools that generate Java code from UML diagrams.The paper is organised as follows. Section 2 shows how OCL basic types are translated. Section 3 shows how collections and their operators are translated. Section 4 shows how OCL iterator expressions are translated. Section 5 shows how other constructs are translated. Section 6 provides the conclusion.2.TRANSLATING OCL BASIC TYPESThe OCL supports the following basic types Boolean, Integer, Real and String. OCL expressions of type Boolean are translated to corresponding JML boolean expressions, i.e. expressions of type boolean. The boolean operators and, or, implies, not are translated into the corresponding JML operators &&, ||, ==>, !. Equality of boolean expressions is mapped to the JML equality ==, but it can also be represented by the operator <==>. More formally, we define µ to denote the mapping that takes an OCL expression and provides the corresponding JML expression. If b1and b2 are boolean expressions, then we have:µ(b1 and b2) = µ(b1) &&µ(b2)µ(b1 or b2) = µ(b1) ||µ(b2)µ(b1 implies b2) = µ(b1) ==>µ(b2)µ(not b1) = !µ(b1)µ(b1 = b2) = µ(b1) <==>µ(b2)The OCL types Integer, Real and String are mapped to the types long, double, and String respectively. Operators and expressions on these types are mapped easily.3.TRANSLATING COLLECTIONOPERATORSOCL provides a common supertype Collection(T) for the collection types Set(T), OrderedSet(T), Bag(T), and Sequence(T). The supertype Collection(T) is defined to be abstract so it does not occur in actual OCL constraints, but it is used to define features that all collection types have in common (e.g. the size function).JML defines some model types that represent various kinds of collections implemented as Java classes. All of the collections implement the interface JMLCollection. Collections are divided into two kinds: object and value collections. The elements of object collections are object references. These include JMLObjectSet, JMLObjectBag, JMLObjectSequence and so on. All of these treat their elements as object references (addresses) and don’t care about the values of these objects. For example, objects of type JMLObjectSet are sets of object references. When an object is inserted into such a set, it is not cloned. The equality test used by the membership method has uses Java’s == operator to compare addresses of these objects. In contrast, the value collections, such as JMLValueSet, JMLValueBag, JMLValueSequence contain object values. The objects references stored in such a collection are merely representatives of the corresponding equivalence classes (of all objects with the same value). For example, objects of JMLValueSet are sets of values. When an object is inserted into such a set, it is cloned, so that later changes to the object do not affect its value. The equality test used by the has method uses the equals method of the object’s class. To support cloning, all of the value collection types contain elements that implement the JMLType interface.The OCL type Set(T) contains finite sets with elements from type T. If type T is one of the basic types (i.e. Integer, Boolean, Real, String), then Set(T) is mapped to JMLValueSet. Each set s of Set(T) is then mapped to a set of type JMLValueSet with an additional constraint expressing that the elements of the translated set belong to a suitable JML type. For example if s is of type Set(Integer) then the corresponding set µ(s) belongs to JMLValueSet and satisfies the following constraint:(\forall JMLType e; µ(s).has(e);e instanceof JMLLong)where JMLLong is a reflection of Long that implements JMLType. For the other basic types similar constraints are needed using the types JMLBoolean, JMLFloat and JMLString.If the type T is an object type which corresponds to a class on a class diagram, then Set(T) is mapped to JMLObjectSet. Again each set s is mapped to an object set of type JMLObjectSet with the following constraint:(\forall Object e; µ(s).has(e);e instanceof T)For example, given a class Person representing person objects, a set s : Set(Person) is mapped to a set of type JMLObjectSet with the following constraint:(\forall Object p; µ(s).has(p);p instanceof Person)where Person is the corresponding Java class.In a similar way other collection types such as bags and sequences are mapped to the corresponding JML collection types JMLValueBag, JMLObjectBag, JMLValueSequence, and JMLObjectSequence.3.1Translating EqualityThe equality between OCL collections is denoted by “=”. For example, if s1 and s2 are of type Set(T), the assertion s1 = s2 is true if and only if the two sets contain the same elements. Since JML collection types are defined as pure Java classes, using == as the equality between collections will give the wrong results in the presence of the new operator. Instead the defined method equals is used to compare collections for equality. Thus, we have µ(s1 = s2) = µ(s1).equals(µ(s2)). This mapping works if both s1and s2 contain either values or objects, because equals is defined in both JMLValueSet and JMLObjectSet. In the type JMLValueSet it is defined in terms of equality between values (i.e. equals) and in JMLObjectSet it is defined in terms of equality between objects (i.e. ==). For other OCL collections the mapping of equality is very similar.3.2Translating the Common OperatorsIn this section the operators common to all collection types are translated into JML. Most of these operators will be translated into the methods that are their direct counterparts defined in JML library of collection types.The OCL expression c->size() returns the size of the collection c. This is translated as µ(c->size()) = µ(c).size().The expression E = c->includes(e) expresses that e is an element in the collection c. It is translated as µ(E) = µ(c).has(µ(e)). The expression E = c->excludes(e) expresses that e is not an element in the collection c. This can be treated as the negation of includes, thus µ(E) = !µ(c).has(µ(e)).The expression E = c1->includesAll(c2) expresses that the collection c1 is subcollection of c2. If c1 is a set, then the expression E is translated as:µ(E) = µ(c1).isSuperset(convertFrom(µ(c2))) where convertFrom is a static method that converts a collection into a set. In the translation the name of the method convertFrom will be qualified with the appropriate class which is in this case can be JMLvalueSet or JMLObjectSet depending on whether c2 is a value or object set. If c1 is a bag, we have:µ(E) = µ(c1).isSuperbag(convertFrom(µ(c2)))In the case where c1 is a sequence, we have:µ(E)=µ(c1).isSupersequence(convertFrom(µ(c2)))The expression E = c1->excludesAll(c2) expresses that no element of c2 is an element of c1. The operation excludesAll does not have a corresponding method in JML. One way to translate it is to use universal quantification as follows:µ(E) = (\forAll T e;µ(c2).has(e);!µ(c2).has(e)) The expression E = c->isEmpty() is true when the collection c is empty and false otherwise. The translation of E is given as follows µ(E) = µ(c).isEmpty(). The expression E = c->notEmpty() expresses that c is not empty and can be treated as the negation of isEmpty. Thus µ(E) = !µ(c).isEmpty().The expression E = c->sum() adds the elements of the collection c. The elements must be of type supporting the + operation. This is translated using the JML sum operator \sum as follows µ(E) = (\sum T e; µ(c).has(e);e).3.3Translating Set OperatorsThis section considers some of the operators defined on sets.The expression E = s->union(s1) denotes the union of the sets s and s1. It is translated as µ(E) = µ(s).union(µ(s1)).The expression E = s->union(b) denotes the union of the set s and the bag b. The value of the expression is a bag. JML does not support such an operation. However, this can be translated by converting the set into a bag and use the union operation on bags. That is µ(E) = µ(s).toBag().union(µ(b)).The expression E = s->intersection(s1) denotes the intersection of the sets s and s1. It is translated as follows µ(E) = µ(s).intersection(µ(s1)).The expression E = s->intersection(b) denotes the intersection of the set s and the bag b. The value of the expression is a set. JML does not support such an operation. However this can be translated as µ(s).intersection(µ(b).toSet()).The expression E = s-s1 denotes the difference between s and s1. It is translated as µ(E) = µ(s).difference(µ(s1).The expression E = s->including(e) denotes the set containing all the elements of s plus e. It is translated as follows µ(E)=µ(s).insert(µ(e)). The expression E =s->excluding(e) denotes the set containing all the elements of s without e. It is translated as µ(E) = µ(s).remove(µ(e).The expression E = s->count(e) denotes the number of occurrences of e in s. JML does not have a corresponding method on sets. However, this can be translated by using the conditional expression and method size as µ(E) = µ(s).has(µ(e)?1 : 0. The expression E = s->asBag() returns a bag containing all the elements of s. The expression is translated using the method toBag as µ(E) = µ(s).toBag(). The expression E = s->asSequence() returns a sequence containing all the elements of s in undefined order. It is translated as follows µ(E) = µ(s).toSequence().The operator flatten flattens the set if its elements are themselves collections. JML does not support a corresponding method. However, it is useful to have a method that flattens collection of collections. In this case the translation of E = s->flatten() can be given by µ(E) = µ(s).flatten().3.4Translating Bag OperatorsThis section considers some of the operators defined on bags.The expression E = b->union(b1) denotes the union of the bags b and b1. It is translated as µ(E) = µ(b).union(µ(b1)).The expression E = b->union(s) denotes the union of the bag b and the set s. The value of the expression is a bag. JML does not support such an operation. However, this can be translated by converting the set into a bag and use the union operation on bags. That is µ(E) = µ(b).union(µ(s).toBag()).The expression E = b->intersection(b1) denotes the intersection of the bags b and b1. This expression is translated as follows µ(E) = µ(b).intersection(µ(b1)).The expression E = b->intersection(s) denotes the intersection of the bag b and the set s. The value of the expression is a set. JML does not support such an operation. This can be translated as µ(b).toSet().intersection(µ(s)).The expression E = b->including(e) denotes the bag containing all the elements of b plus e. This expression is translated as µ(E) = µ(b).insert(µ(e)).The expression E = b->excluding(e) denotes the bag containing all the elements of b apart from all occurrences of e. It is translated as µ(E) = µ(b).removeAll(µ(e).The expression E = b->count(e) denotes the number of occurrences of e in b. This expression is translated as µ(E) = µ(b).count(e).The expression E = b->asSet() returns a set containing all the elements of b. The expression is translated using the method toSet as µ(E) = µ(b).toSet(). The expression E = b->asSequence() returns a sequence containing all the elements of b in undefined order. It is translated as µ(E) = µ(b).toSequence().3.5Translating Sequence OperatorsThis section considers some of the operators defined on sequences.The expression E = s->union(s1) denotes the union of the sequences s and s1. The result is the sequence consisting of all the elements in s, followed by all the elements in s1. It is translated as µ(E) = µ(s).concat(µ(s1)).The expression E = s->including(e) denotes the sequence containing all the elements of s plus e added as the last element. It is translated as µ(E) = µ(s).insertBack(µ(e)).The expression E = s->append(e) denotes the sequence of elements, consisting of all the elements of s followed by e. It is translated as µ(E) = µ(s).insertBack(µ(e)).The expression E = s->insert(i, e) denotes the sequence consisting of s with e inserted at position i. It is translated as follows µ(E) = µ(s).insertBeforeIndex(i,µ(e)).The expression E = s->first() denotes the first element of s. It is translated as µ(E) = µ(s).first(). The expression E= s->last() denotes the last element of s, and translated as µ(E) = µ(s).last().The expression E = s->at(i) denotes the ith element of s, and is translated as µ(E) = µ(s).itemAt(i-1). The expression E = s->indexOf(e) denotes the index of element e in s. It is translated as µ(E) = µ(s).indexOf(µ(e)).4.TRANSLATING ITERATOREXPRESSIONSThe OCL supports a number of iterator expressions. The semantics of these expressions is defined in terms of the iterate construct. The expression E = c->exists(e : T | p(e)) is true if the boolean expression p(e) evaluates to true for at least one element in the collection c. In a sense this provides a restricted form of existential quantification where it is quantified over a finite collection. JML provides the operator \exists for existential quantification. Thus, the expression E is translated as follows µ(E) = (\exists T e;µ(c).has(e);µ(p)). The case with more than one iterator is treated in a similar way.The expression E = c->forAll(e : T | p(e)) is true if the boolean expression p(e) evaluates to true for each element in the collection c. Again, this provides a restricted form of universal quantification where it is quantified over a finite collection. JML provides the operator \forall for universal quantification. Thus, E is translated as µ(E ) =(\forall T e;µ(c).has(e);µ(p)). The case with more than one iterator is treated in a similar way. The expression E = c->select(e : T | p(e)) denotes the collection consisting of those elements of c for which the predicate p evaluates to true when e is instantiated with the element. JML does not have a corresponding operation for filtering collections except a form of set comprehension. Thus if c is a set and T is an object type, the expression is translated as µ(E) = new JMLObjectSet{T e | µ(c).has(e)&& µ(p)}. Bags and sequences comprehension is not supported in JML, however these can be represented by using set comprehension together with some auxiliary methods. For example, if b is a bag, then we form the following set:s = new JMLObjectSet{T e| b.toSet().has(e)&& p}Using the set s and the bag b, we build a bag consisting of all the elements of s where the number of occurrences of each element is equal to the number of occurrences of that element in b. This can be formalised by adding a new method buildFrom on bags with the following specification:public JMLObjectBag buildFrom(JMLObjectSet s) requires (s.toBag()).isSubbag(this);ensures (\forall Object e;;result.has(e)<==> (s.has(e)&& result.count(e) = this.count(e))); Sequence comprehension can be simulated in JML in a similar way by converting the sequence to a set, apply set comprehension, and then define a method that builds a sequence from the obtained set and the original sequence.The expression E = c->reject(e : T | p(e)) denotes the collection consisting of those elements of c for which the predicate p evaluates to false when e is instantiated with the element. This can be treated in a similar way to select by negating the predicate p. The expression E = c->collect(e : T | exp) denotes the collection of elements which results from applying exp to every element of c. The result is flattened. JML does not support such an operator and it is not easy to translate it using the existing JML constructs. Therefore it seems sensible to introduce a primitive construct (\collect T e; c.has(e);exp) with the result type depending on the collection c.5.TRANSLATING OTHER OCLCONSTRUCTSThe OCL operators oclIsKindOf and oclIsTypeOf allow to check which type the value of an expression exp has. The translation of exp.oclIsKindOf(T) is µ(exp) instanceof T. The translation of exp.oclIsTypeOf(T) is \typeof(µ(exp)) == \type(T), where \typeof returns the most specific dynamic type of an expression’s value, and \type is used to represent types in expressions.The expression T.allInstances() returns all the instances of type T at a point in time. The operator allInstances may only be used on types (classifiers) that have a finite number of instances. This is normally the case for user defined classes since instances need to be created explicitly. Hence, the operator cannot be applied to String, Integer and Real types. JML does not have a corresponding operator. For this we introduce the operator \allInstances, thus the translation of T.allInstances() is \allInstances(T).The expression E = exp.oclIsNew() returns true of the expression exp refers to a newly created object and false otherwise. It is intended to be used in the postconditions of operations. It is translated as µ(E) = \fresh( µ(exp)).The translation of an OCL variable v is a JML variable with the same name, i.e. µ(v) = v.To translate literals of collections, in case they enumerate the elements of a collection, a JML set is constructed using the collection constructors and the insert method. For example,µ(Set{1,2}) = new JMLValueSet().insert(Integer(1)).insert(Integer(2)) For bags and sequences the translation is similar.6.CONCLUSIONThis paper presented a mapping of OCL expressions and constraints into the Java Modelling Language JML. The mapping can be used for translating object-oriented design models expressed in UML and OCL to Java classes and interfaces annotated with JML specifications. Because JML is tailored to Java, it seems that it is better suited for recording and specifying the detailed design of a Java program than a generic langauge like OCL. Hence, in the development of a Java application using UML/ OCL, it may be better to use JML rather than OCL for the specification of constraints, especially in the later stages of the development. This also ensures that the various tools that support JML could be used for testing and verifying the correctncess of programs with respect to their specifications. The mapping could also be incorporated within CASE tools that generate Java code from UML diagrams. The JML types in the org.jmlspecs.models package are intended to (loosely) correspond to the libraries of mathematical concepts found in theorem provers, such as PVS. The mapping makes it possible to add new packages of such types tailored to OCL. REFERENCES[1]Arnold, K. and Gosling, J., The Java programmingLanguage. The Java Series. Addisson-Wesley, Reading,MA, second edition, 1998.[2]Borgida, A., Mylopoulos, J., and Reiter, R., On the frameproblem in procedure specifications. IEEE Transactions onSoftware Engineering, 21(10): 785-798, October, 1995. [3]Cheon, Y. and Leavens, G., A Runtime Assertion Checkerfor the Java Modeling Language (JML). In SoftwareEngineering Research and Practice (SERP’02), pages 322-328. CSREA Press, June 2002.[4]Guttag, J., Horning, J., Garland, S., Jones, K., Modet, A.,and Wing, J.. Larch : Languages and Tools for FormalSpecification. Springer Verlag, New York, 1993.[5]Jones B. C. Systematic Software Development usingVDM. Prentice Hall 1990.[6]Leavens G., Baker A., and Ruby C., JML: A notation fordetailed design. In Haim Kilov, Bernhard Rumpe, and IanSimmonds, editors, Behavioral Specifications ofBusinesses and Systems, pages 175-188. KluwerAcademic Publishers, Boston, 1999.[7]Leavens G., Baker A., and Ruby C., Preliminary Design ofJML: A Behavioral Interface Specification Language forJava. TR98-06, revised version 2003.[8]Leavens G., Rustan K., Leino M., Poll E., Ruby C., andJacobs B., JML: notations and tools supporting detaileddesign in Java. In OOPSLA 2000 Companion,Minneapolis, Minnesota, pages 105-106. ACM, October2000.[9]Meyer, B., Eiffel: The Language. Object-oriented Series.Prentice Hall, New york, N. Y., 1992.[10]Rational Software Corporation. The Object ConstraintLanguage Specification Version 2.0. Available at, 2003.[11]Rational Software Corporation. The Unified ModelingLanguage UML Version 2.0. Available at, 2003.[12]Rumbaugh J., Jacobson I., and Booch G., The UnifiedModelling Language Reference manual. Addison-Wesley,Reading, Mass., 1998.[13]Spivey, The Z Notation: A Reference Manual.International Series in Computer Science. Prentice-Hall,New York, N. Y., second edition, 1992.[14]Warmer, J., and Kleppe, A., The Object ConstraintLanguage: Precise Modelling with UML. Addison-Wesley,1999.。